3 releases
new 0.0.5 | Dec 5, 2024 |
---|---|
0.0.4 |
|
0.0.3 | Sep 26, 2024 |
0.0.2 | Jun 2, 2024 |
0.0.1 |
|
#1310 in Network programming
250KB
5K
SLoC
scr-axum-cranker-router
A Rust port of mu-cranker-router
"scr" means from scratch, there was a "cranker-ruster" previously when Rust was too hard for me. Rust is still too hard, but it's not so painful now, that's why this one is written from scratch again.
TODO
- Replace
VecDeque
with a timeout-able mpsc channel for polling router socket [ ] Define errors withCurrent approach should be adequate.thiserror
crate[ ] Wrap the whole thing into a tower serviceLooks like tower http not designed for WebSocket so no way- V3 support
- Handle invalid router socket
-
Invoke listeners at hooking pointInvokeon_failure_to_acquire_proxy_socket
inProxyListener
-
Add health map for observability.To achieve this we need to change the currentWebSocketFarm done. The /health/connectors is available by default.Arc<dyn RouteSocket>
inroute_to_socket_chan
toWeak<_>
, and store the only Arc in a global map in the AppState. ReferenceWebSocketFarm
in mu cranker router. - Deregister handler
[ ] Replace all unnecessary async mpmc unbounded channel with tokio's mpsc unbounded channel.Abandoned.- Dark mode manager
- Tidy up access modifiers, expose as little implementation details as possible.
- Consider
tracing
crate for logging - Get rid of the
rfc7239
crate which has bug in parsing host with port - Documentation. Migrate from java doc for all public available code.
- Graceful shutdown. Check simple_v1.
Dependencies
~12–22MB
~312K SLoC