@ -22,6 +22,15 @@ export RUST_LOG=debug
## Design Guidelines
Diplonat is made of a set of Components.
Components communicate between them thanks to [tokio::sync::watch](https://docs.rs/tokio/0.2.21/tokio/sync/index.html#watch-channel) transferring copiable messages.
Each message must contain the whole state (and not a transition) as messages can be lost if a more recent message is received.
This choice has been made to limit bugs.
If you need to watch two actors and merge their content, you may use [tokio::sync::select](https://docs.rs/tokio/0.2.21/tokio/macro.select.html).
When you read a value from source 1, you must cache it to be able to merge it later when you read from source 2.
## About Consul Catalog
* We query the `/v1/catalog/node/<node>` endpoint