9 unstable releases (4 breaking)
0.5.0 | Sep 19, 2021 |
---|---|
0.4.4 | Apr 2, 2021 |
0.4.3 | Dec 30, 2020 |
0.3.1 | Sep 3, 2020 |
0.1.0 | Aug 28, 2020 |
#2141 in Database interfaces
26 downloads per month
68KB
393 lines
Hive
Hive is a generic Pub/Sub library for Rust.
By default, Hive provides a very basic pub/sub system which you can integrate into something like a web socket server, this system is perfect for small-scale applications which only use one node.
It is important to note that Hive is not for everyone, all the data is returned through one callback which is intended to be piped into things such as websocket servers, mpsc channels, etc. (If you want this functionality, feel free to contact me and I'll put it higher on my priority list)
For an example on how to use the library, please see the documentation.
Design
Hive is designed to be slotted into any server application to act as a middle-man between you and your clients, it will automatically distribute any notifications you give it to all relevant connected clients and other nodes.
Testing
Before testing, specify a MongoDB connection script in your .env
or just pass it into the environment.
MONGODB_URI=mongodb://
Then, run the following command to run all tests: (this will also show you all the output)
cargo test --features test -- --nocapture
Dependencies
~0–17MB
~255K SLoC