Crates.io | ws-gonzale |
lib.rs | ws-gonzale |
version | 0.5.0 |
source | src |
created_at | 2020-07-22 21:57:06.734742 |
updated_at | 2020-08-08 22:03:52.11559 |
description | Naive websocket server implemented using async / await |
homepage | |
repository | https://github.com/Muqito/ws-gonzale |
max_upload_size | |
id | 268330 |
size | 482,959 |
Ws Gonzale is aimed to be a async ws-server and that's it.
Right now it's just in it's most naive representation and it's not fully compatible yet
I also want to include some good examples of "presence" and shared data.
I didn't want to just copy another framework.
+--------+ +--------------+ +------+
| Client |<----->| WsConnection |<----| MPMC |<-------<-------.
+--------+ +--------------+ +------+ |
\ |
+--------+ +--------------+ \ +------+ +---+---------------+
| Client |<----->| WsConnection |--*--->----| MPMC |-->->-| Server lifecycle |
+--------+ +--------------+ +------+ +--------+----------+
\ /
+--------+ +-----------+ \ +------+ /
| Client |------>| handshake | '---<-<--| MPMC |<--*
+--------+ |___________| +------+
If you wanna run a simple WS server
cargo run --example life-cycle
cargo run bench
Start the test server first
cargo run --example life-cycle
and then in another window run
artillery run benches/artillery.yml
This is just to play around with so I can get used to multithreading environments coming from a NodeJS background.
There are a lot of great Rust developers out there; but sometimes a bit less intermediate approach can help teach people some basic concepts.
See Issues
Speedy gonzales
This is the most lazy implementation of the WS protocols. Right now it's just supporting handshakes and sending basic messages. https://tools.ietf.org/html/rfc6455
Always