@@ -16,18 +16,6 @@ Characteristics
1616- Gossip spreads information redundantly across overlapping paths, which
1717 improves resilience but increases traffic.
1818
19- How gossip compares to centralized systems
20- - Central brokers (Kafka, MQTT, Pulsar) keep authoritative topic membership
21- and provide stronger delivery guarantees, but introduce a single point of
22- failure and operational overhead.
23- - Gossip trades strict guarantees for decentralization, simplicity, and
24- resilience in highly dynamic environments.
25-
26- When to use gossip
27- - Lightweight broadcast where eventual delivery is acceptable.
28- - Dynamic membership (peers frequently join/leave or change addresses).
29- - No single point of failure is desired.
30-
3119
3220## iroh-gossip
3321
@@ -37,11 +25,18 @@ based on the papers
3725[ HyParView] ( https://asc.di.fct.unl.pt/~jleitao/pdf/dsn07-leitao.pdf ) and
3826[ PlumTree] ( https://asc.di.fct.unl.pt/~jleitao/pdf/srds07-leitao.pdf ) .
3927
28+ ### Installation
29+ ```
30+ cargo add iroh-gossip
31+ ```
32+
4033Iroh provides a Router that takes an Endpoint and any protocols needed for the
4134application. Similar to a router in webserver library, it runs a loop accepting
4235incoming connections and routes them to the specific protocol handler, based on
4336ALPN.
4437
38+ ### Example
39+
4540``` rust
4641use iroh :: {protocol :: Router , Endpoint , EndpointId };
4742use iroh_gossip :: {api :: Event , Gossip , TopicId };
@@ -145,3 +140,17 @@ joined the topic:
145140receiver . joined (). await ? ;
146141```
147142
143+
144+ ## How gossip compares to centralized systems
145+
146+ - Central brokers (Kafka, MQTT, Pulsar) keep authoritative topic membership
147+ and provide stronger delivery guarantees, but introduce a single point of
148+ failure and operational overhead.
149+ - Gossip trades strict guarantees for decentralization, simplicity, and
150+ resilience in highly dynamic environments.
151+
152+ ## When to use gossip
153+
154+ - Lightweight broadcast where eventual delivery is acceptable.
155+ - Dynamic membership (peers frequently join/leave or change addresses).
156+ - No single point of failure is desired.
0 commit comments