Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 992 Bytes

README.md

File metadata and controls

27 lines (21 loc) · 992 Bytes

Distributed example

This example allows to create a distributed network of participants based in a discovery server.

Test it!

Launch the discovery server in a terminal:

cargo run --example distributed discovery-server

Run a participant (one terminal per participant):

cargo run --example distributed participant <name-1>
cargo run --example distributed participant <name-2>
...
cargo run --example distributed participant <name-n>

Note: You can play closing the participants (ctrl-c) in order to see the removed notifications.

Network topology

The participant register and unregister itself in the discovery server, that will notify the rest of the participant about the new existance member. Then, a participant can create a direct and private communication to another participant.