Crates.io | reactive-messaging |
lib.rs | reactive-messaging |
version | 0.3.0 |
source | src |
created_at | 2023-07-03 03:01:59.521926 |
updated_at | 2024-02-20 23:35:27.613215 |
description | Reactive client/server communications, focused on high performance |
homepage | https://github.com/zertyz/reactive-messaging |
repository | https://github.com/zertyz/reactive-messaging |
max_upload_size | |
id | 906583 |
size | 4,146,337 |
Provides Stream
-based reactive client/server communications focused on high performance -- through sockets, shared mem IPCs and other goodies -- async-powered by Tokio
.
The distinct features of this library are:
a thorough protocol modeling, with the help of Rust's powerful enum
s;
ease of logic decoupling by using reactive Stream
s for the client / server logic;
the main network loop for both client & server is fully optimized;
const-time (yet powerful) configurations, to achieve the most performance possible;
zero-cost retrying strategies & dropping the connection vs ignoring on errors through const time configs & the keen-retry
lib
for version 1: only textual socket protocols are supported by now -- binary & shared mem IPCs to be added later;
Take a look at the ping-pong game in example/
, which shows some nice patterns on how to use this library:
How the ping-pong game logic is shared among the client and server;
How the protocol is modeled;
How to work with server-side sessions;
How decoupled and testable those pieces are;
How straight-forward it is to create flexible server & client applications once the processors are complete.
The API has been stabilized -- new features yet to be added for v1.0:
Stream
s of non-fallible & non-future items are allowed)