Commit Graph

4563 Commits

Author SHA1 Message Date
Imbris
0d570ffc27 Merge branch 'yusdacra/fix-nixshell' into 'master'
Fix shell.nix build

See merge request veloren/veloren!1078
2020-06-14 17:28:26 +00:00
Forest Anderson
2efaba31a9 Merge branch 'angel/add-doc-gitlab-pages' into 'master'
Add Veloren docs on Gitlab pages

See merge request veloren/veloren!1062
2020-06-14 17:08:17 +00:00
Imbris
4901dde20d Merge branch 'shandley/docs-audio' into 'master'
Add documentation for audio module.

See merge request veloren/veloren!1060
2020-06-14 16:56:32 +00:00
S Handley
00dd75526c Add documentation for audio module. 2020-06-14 16:56:32 +00:00
Imbris
26e53409d8 Merge branch 'xvar/clippy-globally-suppress-option_map_unit_fn' into 'master'
Globally suppressed clippy lint option_map_unit_fn for #587

See merge request veloren/veloren!1071
2020-06-14 16:48:07 +00:00
Ben Wallis
c1c968f479 Globally suppressed clippy lint option_map_unit_fn for #587 2020-06-14 16:48:07 +00:00
Imbris
fb47115695 Merge branch 'xvar/clippy-fixes-redundant_closure_found' into 'master'
Fixed suppressed clippy warnings for #587 - redundant_closure

See merge request veloren/veloren!1065
2020-06-14 16:33:04 +00:00
Imbris
290cb58039 Merge branch 'imbris/fix' into 'master'
Stop rendering images without area

See merge request veloren/veloren!1081
2020-06-14 16:32:40 +00:00
Imbris
aff43e6bea Stop rendering 0 size images 2020-06-14 12:06:47 -04:00
Songtronix
24f6c585a5 Merge branch 'songtronix/hot-fix-594' into 'master'
hotfix: panic trying to create a character

Closes #594

See merge request veloren/veloren!1080
2020-06-14 11:11:01 +00:00
Songtronix
779769f64e hotfix: panic trying to create a character 2020-06-14 12:40:08 +02:00
Songtronix
0fba5283a2 Merge branch 'slipped/attacks' into 'master'
bow m2 attack and arrow hold animation

See merge request veloren/veloren!1079
2020-06-14 09:22:21 +00:00
Justin Shipsey
688f917308 asset
missing fix
2020-06-14 09:22:21 +00:00
Songtronix
69710cde5c Merge branch 'jtai/log-chat-messages' into 'master'
log-chat-messages

See merge request veloren/veloren!1076
2020-06-14 08:41:41 +00:00
Yusuf Bera Ertan
f9d7626b66
Add the network crate to sources in shell.nix 2020-06-14 06:29:11 +03:00
Monty Marz
03cea72415 Merge branch 'pfau/fix_menu' into 'master'
fix broken main menu

See merge request veloren/veloren!1077
2020-06-14 00:56:34 +00:00
Monty Marz
716f936f6c fix broken main menu 2020-06-14 02:11:31 +02:00
jshipsey
cd8f2c801e log-chat-messages 2020-06-13 15:21:58 -04:00
Imbris
38ec0fde63 Merge branch 'xvar/clippy-fixes-collapsible_if' into 'master'
Fixed suppressed clippy warnings for #587 - collapsible_if

See merge request veloren/veloren!1064
2020-06-12 20:27:13 +00:00
Ben Wallis
4d6c553b1b Fixed suppressed clippy warnings for #587 - redundant_closure 2020-06-12 20:47:22 +01:00
Ben Wallis
8ed2109bcf Fixed suppressed clippy warnings for #587 - collapsible_if 2020-06-12 20:34:54 +01:00
Forest Anderson
d8a8cc7032 Test pages
Added stage

Move files to public

Move folder instead

Make if already exists

Move filees

Finished cleaning
2020-06-12 09:41:09 -04:00
Marcel
4822150220 Merge branch 'cleanup' into 'master'
remove unused files

See merge request veloren/veloren!1069
2020-06-12 11:03:22 +00:00
Marcel Märtens
1435d8d6be remove unused files 2020-06-12 11:53:59 +02:00
Forest Anderson
7459a1e95a Merge branch 'xvar/clippy-fixes-many_single_char_names' into 'master'
Fixed suppressed clippy warnings for #587 - many_single_char_names

See merge request veloren/veloren!1066
2020-06-12 08:02:53 +00:00
Songtronix
058f9a8e32 Merge branch 'j-tai/update-readme-mac-builds' into 'master'
Update README with Mac builds

See merge request veloren/veloren!1068
2020-06-12 06:11:34 +00:00
James Tai
99b7762d2f
Update README with Mac builds 2020-06-11 21:58:44 -07:00
Marcel
2802e8f6b1 Merge branch 'xMAC94x/increase_compile_time' into 'master'
dependency reduction:

See merge request veloren/veloren!1063
2020-06-11 22:19:26 +00:00
Marcel
ea0d2a8f0e Merge branch 'quickfix-ci' into 'master'
quickfix ci

See merge request veloren/veloren!1067
2020-06-11 21:51:29 +00:00
Marcel Märtens
7d9b2ff9b6 quickfix ci 2020-06-11 22:37:49 +02:00
Ben Wallis
967fd9280b Fixed suppressed clippy warnings for #587 - many_single_char_names 2020-06-11 20:07:46 +01:00
Marcel Märtens
0e59ee901e dependency reduction:
- authc no longer uses reqwest
 - image only supports PNG
 - replace routille with tiny_http
 - several other dependencies
 - cargo upgrade
 - following improvement was measured on R7 1700X:
   before:
    - cargo build: 3076.73s user / 4:45 total / 589 dependencies
    - cargo test: 6118.38s user / 7:30 total / 959 dependencies
   after:
    - cargo build: 2680.54s user / 4:05 total / 480 dependencies
    - cargo test: 5351.81s user / 7:04 total / 791 dependencies
 - added xMAC94x to CODEOWNERS for Cargo.toml, he will protect them from now on and hit people with evil looks ;)
2020-06-11 20:55:34 +02:00
Songtronix
d612e875a6 Merge branch 'shandley/missing-audio-no-panic' into 'master'
Use empty sound data when a sound file cannot be loaded

See merge request veloren/veloren!1053
2020-06-11 12:53:24 +00:00
S Handley
eda2f14940 Use empty sound data when a sound file cannot be loaded 2020-06-11 12:53:24 +00:00
Songtronix
85ad70e862 Merge branch 'xvar/suppress-existing-clippy-warnings' into 'master'
Suppress all clippy warnings and change CI config to fail on clippy warnings

See merge request veloren/veloren!1059
2020-06-11 09:54:59 +00:00
Ben Wallis
950c62efc6 Suppressed all existing clippy warnings in preparation for fixes as part of #587 2020-06-10 22:01:42 +01:00
Marcel
de849adf84 Merge branch 'xMAC94x/network' into 'master'
xMAC94x/network

See merge request veloren/veloren!1032
2020-06-10 17:14:17 +00:00
Marcel Märtens
2e3d5f87db StreamError::Deserialize is now triggered when recv fails because of wrong type
- added PartialEq to StreamError for test purposes (only yet!)
 - removed async_recv example as it's no longer for any use.
   It was created before the COMPLETE REWRITE in order to verify that my own async interface on top of mio works.
   However it's now guaranteed by async-std and futures. no need for a special test
 - remove uvth from dependencies and replace it with a `FnOnce`
 - fix ALL clippy (network) lints
 - basic fix for a channel drop scenario:
   TODO: this needs some further fixes
   up to know only destruction of participant by api was covered correctly.
   we had an issue when the underlying channels got dropped. So now we have a participant without channels.
   We need to buffer the requests and try to reopen a channel ASAP!
   If no channel could be reopened we need to close the Participant, while
    a) leaving the BParticipant in takt, knowing that it only waits for a propper close by scheduler
    b) close the BParticipant gracefully. Notifying the scheduler to remove its stuff (either scheduler schould detect a stopped BParticipant or BParticipant will send Scheduler it's own destruction, and then Scheduler just does the same like when API forces a close)
       Keep the Participant alive and wait for the api to acces BParticipant to notice it's closed and then wait for a disconnect which isn't doing anything as it was already cleaned up in the background
2020-06-09 13:16:39 +02:00
Marcel Märtens
3324c08640 Fixing the DEADLOCK in handshake -> channel creation
- this bug was initially called imbris bug, as it happened on his runners and i couldn't reproduce it locally at fist :)
- When in a Handshake a seperate mpsc::Channel was created for (Cid, Frame) transport
  however the protocol could already catch non handshake data any more and push in into this
  mpsc::Channel.
  Then this channel got dropped and a fresh one was created for the network::Channel.
  These droped Frames are ofc a BUG!
  I tried multiple things to solve this:
   - dont create a new mpsc::Channel, but instead bind it to the Protocol itself and always use 1.
     This would work theoretically, but in bParticipant side we are using 1 mpsc::Channel<(Cid, Frame)>
     to handle ALL the network::channel.
     If now ever Protocol would have it's own, and with that every network::Channel had it's own it would no longer work out
     Bad Idea...
   - using the first method but creating the mpsc::Channel inside the scheduler instead protocol neither works, as the
     scheduler doesnt know the remote_pid yet
   - i dont want a hack to say the protocol only listen to 2 messages and then stop no matter what
  So i switched over to the simply method now:
   - Do everything like before with 2 mpsc::Channels
   - after the handshake. close the receiver and listen for all remaining (cid, frame) combinations
   - when starting the channel, reapply them to the new sender/listener combination
   - added tracing
- switched Protocol RwLock to Mutex, as it's only ever 1
- Additionally changed the layout and introduces the c2w_frame_s and w2s_cid_frame_s name schema
- Fixed a bug in scheduler which WOULD cause a DEADLOCK if handshake would fail
- fixd a but in api_send_send_main, i need to store the stream_p otherwise it's immeadiatly closed and a stream_a.send() isn't guaranteed
- add extra test to verify that a send message is received even if the Stream is already closed
- changed OutGoing to Outgoing
- fixed a bug that `metrics.tick()` was never called
- removed 2 unused nightly features and added `deny_code`
2020-06-09 01:24:21 +02:00
Marcel Märtens
2a7c5807ff overall cleanup, more tests, fixing clashes, removing unwraps, hardening against protocol errors, prepare prio mgr to take commands from scheduler
fix async_recv and double block_on panic on Network::drop and participant::drop
include Cargo.lock from all examples
Found a bug on imbris runners with doc tests of `stream::send` and `stream::recv`
As neither a backtrace, nor tracing on runners in the doc tests seems to help, i disable them and add them as unit tests
2020-06-09 01:24:16 +02:00
Marcel Märtens
a86cfbae65 add new tests and increase coverage 2020-06-09 01:24:07 +02:00
Marcel Märtens
6e776e449f fixing all tests and doc tests including some deadlocks 2020-06-09 01:24:05 +02:00
Marcel Märtens
9550da87b8 speeding up metrics by reducing string generation and Hashmap access with a metrics cache for msg/send and msg/recv 2020-06-09 01:24:01 +02:00
Marcel Märtens
8b839afcae move prios from scheduler to participant in oder to fixing closing of stream/participant
however i need to coordinate the prio adjustments in scheduler from now on, so that ParticipantA doesn't get all the network bandwith and ParticipantB nothing
2020-06-09 01:23:58 +02:00
Marcel Märtens
bd69b2ae28 renamed all Channels to new naming scheme and fixing shutting down bparticipant and scheduler correctly. Introducing structs to keep Info in scheduler.rs and participant.rs 2020-06-09 01:23:55 +02:00
Marcel Märtens
007f5cabaa DOCUMENTATION for everything 2020-06-09 01:23:52 +02:00
Marcel Märtens
a8f1bc178a Experiments with a prometheus bug which actually worked as designed because i had client and server running at the same time
- https://github.com/tikv/rust-prometheus/issues/321
 - split up channel into a hanshake part and channel part.
   The handshake part is non endless and ends when its either done or aborted.
   If its okay i will send a request to the BParticipant which then opens a channel on the existing TCP or UDP connection.
   this streamlines the command chain alot. also the channel is almost empty now, thinking about removing it completly.
   isnt perfect, as shutdown and udp doesnt work yet
 - make PID to print as Base64
 - replace rouille with tiny_http
2020-06-09 01:23:49 +02:00
Marcel Märtens
9074de533a handling frames no longer is channel -> scheduler -> participant, but it's directly channel -> participant, removing a lock and a single bottleneck in the scheduler 2020-06-09 01:23:45 +02:00
Marcel Märtens
661060808d switch from serde to manually for speed, remove async_serde
- removing async_serde as it seems to be not usefull
  the idea was because deserialising is slow parallising it could speed up.
  Whoever we need to keep the order of frames, (at least for controlframes) so serialising in threads would be quite complicated.
  Also serialisation is quite fast, about 1 Gbit/s such speed is enough for messaging, it's more important to serve parallel streams better.
  Thats why i am removing async serde coding for now
- frames are no longer serialized by serde, by byte by byte manually, increadible speed upgrade
- more metrics
- switch channel_creator into for_each_concurrent
- removing some pool.spwan_ok() as they dont allow me to use self
- reduce features needed
2020-06-09 01:23:42 +02:00
Marcel Märtens
2ee18b1fd8 Examples, HUGE fixes, test, make it alot smother
- switch `listen` to async in oder to verify if the bind was successful
- Introduce the following examples
  - network speed
  - chat
  - fileshare
- add additional tests
- fix dropping stream before last messages can be handled bug, when dropping a stream, BParticipant will wait for prio to be empty before dropping the stream and sending the signal
- correct closing of stream and participant
- move tcp to protocols and create udp front and backend
- tracing and fixing a bug that is caused by not waiting for configuration after receiving a frame
- fix a bug in network-speed, but there is still a bug if trace=warn after 2.000.000 messages the server doesnt get that client has shut down and seems to lock somewhere. hard to reproduce

open tasks
[ ] verify UDP works correctly, especcially the connect!
[ ] implements UDP shutdown correctly, the one created in connect!
[ ] unify logging
[ ] fill metrics
[ ] fix dropping stream before last messages can be handled bug
[ ] add documentation
[ ] add benchmarks
[ ] remove async_serde???
[ ] add mpsc
2020-06-09 01:23:37 +02:00