Skip to content

Latest commit

 

History

History

distributed

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

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.