Commit Graph

132 Commits

Author SHA1 Message Date
Marcel Märtens
ccb78eeb5c move tracing code to own crate 2021-03-30 16:35:36 +02:00
Marcel Märtens
edebe06a10 make interactive OPT-OUT isntead so that it's not forgotten when its important. and its more userfriendly for the average user. scripts prob just add a -n or -b 2021-03-26 00:22:46 +01:00
Marcel Märtens
fdc40f52d9 give more threads a fixed name 2021-03-22 12:37:03 +01:00
Marcel Märtens
96049904a6 add keepalive in server-cli so we know it still ticks, ~ all 30s 2021-03-21 19:15:40 +01:00
Marcel Märtens
2733ba2e27 Change the version number to 0.9 2021-03-20 13:07:09 +01:00
Marcel Märtens
a286eb084a create a wrapper around rayon, slowjobpool, that spawns on rayon but drop feed it 2021-03-16 13:31:04 +01:00
Avi Weinstock
2e2b74fde1 Copy assets/server to the right place in server-cli's Dockerfile. 2021-03-15 09:46:16 -04:00
Imbris
0127832172 Fix tracy not working in certain areas, add span to chunk gen, missing fmt, remove extra span, make voxygen use INFO level instead of TRACE in tracy mode 2021-03-13 13:30:20 -05:00
Imbris
2511b8959c Add tracy entity count plot, span tweaks 2021-03-13 02:59:58 -05:00
Imbris
8d0b776f18 Move server-cli commands to separate file, tracy profiling par_join improvements, misc improvements
- remove overwritten logging setting in server-cli
- add server-cli command to load a random area for testing without a client
- make admin add/remove commands modify ingame players instead of needing to reconnect
- add spans to par_join jobs
- added test command that loads up an area of the world
- add tracy-world-server alias
- set debug directives to info for logging
2021-03-13 02:28:59 -05:00
Marcel Märtens
767bae540e the docker container was missing the ca-certificates root store
Its now using ubuntus default root-store for tls operations.
2021-03-12 00:08:34 +01:00
Marcel Märtens
381bb5eef0 fix tracy 2021-03-11 17:05:17 +01:00
Marcel Märtens
a98e72c391 Auth requests are now done async, the register system is fetching it, via a PendingLogin component
The auth server no longer allows the protocol to be specified. we enforce `https` for the auth server, so DO NOT provide a auth url with `https://` but without.
correct is now `auth.veloren.net`
incorrect is: `https://auth.veloren.net`
2021-03-11 17:05:02 +01:00
Marcel Märtens
d7df741671 update dependencies, including removal of some tracy deps as they are get through common/tracy 2021-03-09 20:17:29 +01:00
Marcel Märtens
4ebfbdde0f Move Specs code to own common_ecs create, put tracy and macros into common_base 2021-03-09 00:54:01 +01:00
Marcel Märtens
514d5db038 Update Network Protocol
- now last digit version is compatible 0.6.0 will connect to 0.6.1
 - the TCP DATA Frames no longer contain START field, as it's not needed
 - the TCP OPENSTREAM Frames will now contain the BANDWIDTH field
 - MID is not Protocol internal

Update network
 - update API with Bandwidth

Update veloren
 - introduce better runtime and `async` things that are IO bound.
 - Remove `uvth` and instead use `tokio::runtime::Runtime::spawn_blocking`
 - remove futures_execute from client and server use tokio::runtime::Runtime instead
 - give threads a Name
2021-02-22 17:34:55 +01:00
Marcel Märtens
03af9937cf 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
ea8ab1ce7a 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
5aa1940ef8 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
1b77b6dc41 Initial switch to tokio for network, minimum working example. 2021-02-17 12:37:59 +01:00
Caelan
dda4931f46 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
Ben Wallis
c785e75e60 Follow-up fixes from review of inventory MR 2021-01-10 11:27:09 +00:00
Ben Wallis
aef2637288 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
Marcel Märtens
107fd432f5 update further crates 2020-12-16 08:56:21 +01:00
Marcel Märtens
26918d10c9 update chrossbeam, tracy, prometheus (and reduce server deps to crossbeam-channel) 2020-12-16 00:51:07 +01:00
Joshua Barretto
494436be01 Hid plugins behind a feature flag to resolve Windows CI issue 2020-12-15 11:14:26 +00:00
Joshua Barretto
f8c8e342e6 Moved common networking code to common/net, clippy fixes 2020-12-13 17:23:45 +00:00
Marcel Märtens
ccb01e1898 adjust fmt and clippy after toolchain upgrade 2020-12-10 14:53:01 +01:00
Ben Wallis
81a8ee0c19 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
Ben Wallis
c37b91fbf1 Changed Dockerfile to use ENTRYPOINT to allow the veloren-server-cli process to receive signals sent by Watchtower 2020-11-30 16:46:36 +00:00
Marcel Märtens
ca1601a980 Change the version number to 0.8 2020-11-28 11:25:58 +01:00
Imbris
1355c1e8f5 Move tracy frame markers to proper locations, add a few spans 2020-11-22 14:22:39 -05:00
Imbris
a97b188bea Make fps display and specification more precise 2020-11-11 21:47:22 -05:00
Marcel Märtens
e4e5c6e55b massivly switch clock algorithm.
- before we had a Clock that tried to average multiple ticks and predict the next sleep.
   This system is massivly bugged.
   a) We know exactly how long the busy time took, so we dont need to predict anything in the first place
   b) Preduction was totally unrealistic after a single lag spike
   c) When a very slow tick happens, we dont benefit from 10 fast ticks.
 - Instead we just try to keep the tick time exact what we expect.
   If we can't manage a constant tick time because we are to slow, the systems have to "catch" this via the `dt` anyway.
2020-11-10 18:31:42 +01:00
Marcel Märtens
40f5afc2b0 ci cleanup, dependency update 2020-11-06 14:34:42 +01:00
Marcel Märtens
00456c8373 extract a Presence Component, which is server only and has state of Player and Client. Presence is only valid for Clients that are in game 2020-11-03 08:56:02 +01:00
Imbris
47b06658b0 Log where the userdata folder is in binary crates, fix bug where the old
path was logged instead of the new path when renaming invalid settings
2020-10-29 18:30:49 -04:00
Capucho
e77cc3eae2 Fixed the server cli dropping new lines 2020-10-23 20:30:33 +01:00
Marcel Märtens
f1c9b959f4 rename a file, fix error msg, dont spam persistence by default 2020-10-13 00:06:24 +02:00
Imbris
fa45edb541 Fix clippy, minor fmt, add TODO comments 2020-10-10 03:01:30 -04:00
Imbris
71251ca6a6 Change admins from Vec<String> into Hashset<Uuid>, add commands to server-cli-bin for adding and removing admins 2020-10-10 02:10:32 -04:00
Imbris
83fb26c4f9 Group editable server settings into one struct that is stored in the ecs, don't expose DataDir, use Uuid in the whitelist instead of usernames, replace Banlist record tuple with new type with named fields, remove commented code 2020-10-10 02:10:32 -04:00
Imbris
fb2cf1a292 Fix clippy warnings 2020-10-10 02:10:32 -04:00
Imbris
522880a0ab Update CI and docker files to work with changes to data folder structure 2020-10-10 02:10:32 -04:00
Imbris
308cca0dc9 Put server-cli specific settings in their own structure, serde_derive -> serde 2020-10-10 02:10:32 -04:00
Imbris
7c14a3f4a4 New userdata folder that holds voxygen settings and logs and server saves and settings, split up server settings file into parts that are persisted back to their files and parts that are read-only, misc fixes 2020-10-10 02:10:32 -04:00
Imbris
66d2d636ee Add server-cli option to disable auth 2020-10-10 02:10:32 -04:00
Imbris
873ea1ec46 Make basic server-cli mode default to not reading input and add interactive option 2020-10-10 02:10:31 -04:00
Ben Wallis
51459c0733 Implemented graceful shutdown on SIGUSR1 signal. Added shutdown <seconds> TUI command. Added abortshutdown TUI command. Fixed a bug in TUI that caused a panic on quit in basic mode on windows. 2020-10-04 21:24:45 +01:00
Ben Wallis
b3dd8e8a02 Added #![deny(clippy::clone_on_ref_ptr)] to all crates and fixed resulting lint errors 2020-09-27 17:25:33 +01:00