Crates.io | actaeon |
lib.rs | actaeon |
version | 0.2.1 |
source | src |
created_at | 2021-10-31 21:15:51.840103 |
updated_at | 2021-11-10 15:11:12.820567 |
description | Decentralized PubSub & messaging protocol inspired by Kademlia. |
homepage | https://github.com/EngineOrion/actaeon |
repository | https://github.com/EngineOrion/actaeon |
max_upload_size | |
id | 474883 |
size | 258,342 |
Distributed PubSub and messaging protocol for decentralized real time applications.
This library offers users a simple to use, easy to understand API for a mostly automatically managed decentralized messaging system based on the Kademlia paper. Fast and reliable message exchange is possible through both direct and indirect TCP messaging.
A very simple example of how to use the library to broadcast messages on a specific topic:
use actaeon::{
config::Config,
node::{Center, ToAddress},
Interface,
};
use sodiumoxide::crypto::box_;
fn main() {
let config = Config::new(20, 1, 100, "example.com".to_string(), 4242);
let (_, secret) = box_::gen_keypair();
let center = Center::new(secret, String::from("127.0.0.1"), 1234);
let interface = Interface::new(config, center).unwrap();
let mut topic = interface.subscribe(&"example".to_string().to_address());
let _ = topic.broadcast("hello world".as_bytes().to_vec());
}
There are still some unresolved issues: