336 Commits

Author SHA1 Message Date
Marcel Märtens
048fcf88f8 Stabelize Network again:
- completly switch to Bytes, even in api. speed up TCP by fak 2
 - improve benchmarks
 - speed up mpsc metrics
 - gracefully handle shutdown by interpreting Ok(0) as tokio::tcpstream closed now.
 - fix hotloop in participants by adding `Some(n)` to fix endless handing.
 - fix closing bug by closing streams after `recv_mgr` is shutdown even if now shutdown is triggered locally.
 - fix prometheus
 - no longer throw when a `Stream` is dropped while participant still receives a msg for it.
 - fix the bandwith handling, TCP network send speed is up to 1.5GiB/s while recv is 150MiB/s
 - add documentation
 - tmp require rt-multi-threaded in client for tokio, to not fail cargo check

this is prob stable, i tested over 1 hour.
after that some optimisations in priomgr.
and impl. propper bandwith.
Speed is up to 2GB/s write and 150MB/s recv on a single core

sync add documentation
2021-02-17 19:37:48 +01:00
Marcel Märtens
00386b6955 Great improvements to the codebase:
- better logging in network
 - we now notify the send of what happened in recv in participant.
 - works with veloren master servers
 - works in singleplayer, using a actual mid.
 - add `mpsc` in whole stack incl tests
 - speed up internal read/write with `Bytes` crate
 - use `prometheus-hyper` for metrics
 - use a metrics cache
2021-02-17 16:15:00 +01:00
Marcel Märtens
33085f1645 COMPLETE REDESIGN of network crate
- Implementing a async non-io protocol crate
    a) no tokio / no channels
    b) I/O is based on abstraction Sink/Drain
    c) different Protocols can have a different Drain Type
       This allow MPSC to send its content without splitting up messages at all!
       It allows UDP to have internal extra frames to care for security
       It allows better abstraction for tests
       Allows benchmarks on the mpsc variant
       Custom Handshakes to allow sth like Quic protocol easily
 - reduce the participant managers to 4: channel creations, send, recv and shutdown.
   keeping the `mut data` in one manager removes the need for all RwLocks.
   reducing complexity and parallel access problems
 - more strategic participant shutdown. first send. then wait for remote side to notice recv stop, then remote side will stop send, then local side can stop recv.
 - metrics are internally abstracted to fit protocol and network layer
 - in this commit network/protocol tests work and network tests work someway, veloren compiles but does not work
 - handshake compatible to async_std
2021-02-17 12:39:47 +01:00
Marcel Märtens
13276a6d00 get rid of async_std::channel
switch to `tokio` and `async_channel` crate.
I wanted to do tokio first, but it doesnt feature Sender::close(), thus i included async_channel
Got rid of `futures` and only need `futures_core` and `futures_util`.

Tokio does not support `Stream` and `StreamExt` so for now i need to use `tokio-stream`, i think this will go in `std` in the future

Created `b2b_close_stream_opened_sender_r` as the shutdown procedure does not need a copy of a Sender, it just need to stop it.

Various adjustments, e.g. for `select!` which now requieres a `&mut` for oneshots.

Future things to do:
 - Use some better signalling than oneshot<()> in some cases.
 - Use a Watch for the Prio propergation (impl. it ofc)
 - Use Bounded Channels in order to improve performance
 - adjust tests coding

bring tests to work
2021-02-17 12:38:53 +01:00
Marcel Märtens
88620c804a Initial switch to tokio for network, minimum working example. 2021-02-17 12:37:59 +01:00
Caelan
86d1b00735 Clean and update dependencies
* Remove tweak feature
 * Remove const-tweaker
 * Update tiny_http
 * Update bitvec to 0.21.0
 * Downgrade euc to avoid conflict with vek 0.12.0
 * Require exactly vek 0.12.0
 * Update all other dependencies automatically based on these changes
 * Update gilrs to latest at the request of Ada Lovegirls
 * Update meshing benchmarks to new criterion API
2021-02-17 01:27:06 -08:00
Joshua Barretto
2706ccd675 Merge branch 'lboklin/quat-ori' into 'master'
Redefine Ori as a quaternion

See merge request veloren/veloren!1755
2021-02-16 22:39:11 +00:00
Lippy13
47d877b888 Fix compile error under Windows 2021-02-10 03:38:01 +00:00
Ludvig Böklin
b151f88b63 Ori: add tests, rename to_vec() => look_vec(); Dir: add methods, normalize on rot 2021-02-09 13:52:03 +01:00
Imbris
61a02c5527 Update native_dialog to 0.5.2 2021-02-07 00:48:57 -05:00
James Melkonian
4d4c6d8b13 Move agent system to server 2021-02-06 06:15:25 +00:00
jiminycrick
64a3c16999 Update rand dependency 2021-01-26 20:35:08 -08:00
Imbris
e818403dcb Update winit and iced 2021-01-23 01:09:33 -05:00
Acrimon
99bad0dcc6
update itertools for voxygen 2021-01-20 16:00:08 +01:00
Acrimon
97bec6e012
update a few deps 2021-01-20 15:53:58 +01:00
Ben Wallis
8661cb1ffc Refactored loadout to have public functions for each slot instead of requiring callers to use the _INDEX consts 2021-01-08 19:12:09 +00:00
ccgauche
228cc6a4fc Update lock 2021-01-08 16:57:29 +01:00
Joshua Barretto
f325bddf60 Merge branch 'ccgauche/new-wasmer-backend' into 'master'
ccgauche/new wasmer backend

See merge request veloren/veloren!1644
2021-01-08 08:48:31 +00:00
ccgauche
1acb394e93 Added feature flag
changed field name to size
2021-01-08 08:48:30 +00:00
Joshua Barretto
ad48b85d68 fixed Cargo.lock conflict
Fixed `crossbeam-queue` being referenced  twice in the lockfile
2021-01-07 20:25:12 +00:00
jiminycrick
3d430fdfae Upgrade noise eliminating old rand dependency 2021-01-05 10:10:47 -08:00
Acrimon
d99750f746
update authc 2020-12-28 16:42:40 +01:00
Benoît du Garreau
2c94b05e99 Improve world::Index 2020-12-17 12:08:04 +01:00
Benoît du Garreau
db18cc1770 Use assets_manager to load assets 2020-12-17 12:06:07 +01:00
Marcel Märtens
04b71f9dc8 update specs 2020-12-16 14:31:16 +01:00
Marcel Märtens
1f2f9905a3 update guillotiere 2020-12-16 10:56:00 +01:00
Marcel Märtens
075933d60b get rid of some insecure dependencies 2020-12-16 10:42:36 +01:00
Marcel Märtens
1ea395a47f update further crates 2020-12-16 08:56:21 +01:00
Marcel Märtens
bcb4c075ed update chrossbeam, tracy, prometheus (and reduce server deps to crossbeam-channel) 2020-12-16 00:51:07 +01:00
Joshua Barretto
e5100040b4 Moved common networking code to common/net, clippy fixes 2020-12-13 17:23:45 +00:00
Joshua Barretto
1ffd18d093 Resolved plugin dependency cycle, allowing more interesting plugin API 2020-12-13 17:15:33 +00:00
Joshua Barretto
01efed677b Reorganised plugin crates 2020-12-13 17:15:32 +00:00
ccgauche
c2bc112e44 Fixed comments
- Would be better to remove the iterator and just collect with a loop to avoid extra allocations
 - tructure
 - A HashSet is probably better
 - Usefull -> Useful
 - I'd have thought plugin-api-derive is a better name
2020-12-13 17:14:39 +00:00
ccgauche
3a5386e047 Added plugin system
Added a plugin system based on wasmer-runtime
 - Support Action (Print handled)
 - Support Events (PluginLoadEvent handled)
2020-12-13 17:14:37 +00:00
Joshua Barretto
cb19252226 Began work on plugin API and plugin loading 2020-12-13 17:13:57 +00:00
Marcel Märtens
118abb9bd4 move tools and chat-cli in src/bin and examples 2020-12-12 02:12:00 +01:00
Marcel Märtens
cc062ffaea get rid of insecure dependency completly 2020-12-11 16:13:57 +01:00
Ben Wallis
135f019078 Changed logging to use termcolor crate to fix ansi control codes showing when run under Windows Command Prompt 2020-12-06 14:49:13 +00:00
James Melkonian
6b100bce79 Aura System and Campfire Health Regen 2020-12-04 22:24:56 +00:00
Marcel Märtens
791f8d6f16 move common_state into common_sys 2020-12-01 13:46:28 +01:00
Marcel Märtens
d216ed2a2f Move Systems out of common into common_sys
This requires to move `State` into a own crate called `common_state` which depends on `common` and `common_sys`
2020-12-01 13:44:07 +01:00
Marcel Märtens
8468e67217 Change the version number to 0.8 2020-11-28 11:25:58 +01:00
Joshua Barretto
3e6d1f5f3b Added rtsim entities moving when unloaded, better generation 2020-11-23 10:45:01 +00:00
Joshua Barretto
a2ff9f7f20 Added entity simulation to rtsim, reification, assimilation 2020-11-23 10:44:59 +00:00
jiminycrick
a02a5d63c3 Hackily upgraded rodio and cpal to 0.13 2020-11-18 13:31:12 -08:00
Imbris
73c0a7a751 Add tracy feature that randomly disappeared back into voxygen 2020-11-11 22:33:02 -05:00
Imbris
69d019e5ac Make fps display and specification more precise 2020-11-11 21:47:22 -05:00
Imbris
343cdfa1ea Make iced ui use scale from the settings 2020-11-11 03:02:22 -05:00
Imbris
1de4c950cd Update iced 2020-11-11 03:02:22 -05:00
Imbris
9348f5915a Update to the latest git iced 2020-11-11 03:02:22 -05:00