Major rust libraries such as [std] and [tokio] provide great synchronization primitives to be used for message-passing between threads and tasks. However, there are not many libraries that provide similar APIs that can be used over the network.
Tsyncp tries to fill the gap by providing the similar APIs (mpsc, broadcast, barrier, etc) over TCP. If you have a project where it only has a few services running, and they need to pass some data to each other; instead of setting up a message-broker service, you can use tsyncp to easily pass data between them.
Tsyncp also allows customizing different Serialization/Deserialization methods to encode/decode data; currently, supported schemes straight from the library are Json, Protobuf, ~Bincode~, ~Speedy~, and ~Rkyv~; however, users can very easily implement their own [EncodeMethod] and [DecodeMethod].
Currently, tsyncp provides 6 types of channels:
The API documentation has a very detailed guide on how to use the primitives. So please check them out!
Note: Tsyncp is built on [tokio]; and thus may not be compatible with other async runtimes like async-std.
Warning: Tsyncp is not a message-broker nor it tries to be; it's just a message-passing library for simple and convenient use cases.
Warning: Tsyncp is still WIP! It's usable, but still needs some encode/decode features implemented, extensive testing, documentations, and examples.