git ssb


6+

Dominic / epidemic-broadcast-trees



Commit 23ba81085dd83343c92fd95d407f0116d636a19a

basic readme

Dominic Tarr committed on 3/20/2017, 10:37:37 PM
Parent: 27caf48cbfb18fa1b4f1661bfdaabf2285f42e69

Files changed

README.mdchanged
README.mdView
@@ -1,45 +1,15 @@
11 # epidemic-broadcast-trees
22
3-## Broadcast
4-```
5-vars = have_clock, request_clock
3+This is an implementation of the plumtree Epidemic Broadcast Trees paper.
4+It's a algorithm that combines the robustness of a flooding epidemic gossip broadcast,
5+with the efficiency of a tree model. It's intended for implementing realtime protocols
6+(such as chat, scuttlebutt, also radio/video) over networks with random topology -
7+or networks where otherwise peers may be unable to all connect to each other or to a central hub.
68
7-READY:
8- request: (id, seq) {
9- if(have_clock[id] >= seq)
10- get(id, seq) //GETTING => got
11- },
12-GETTING:
13- got: (msg) {
14- if(request_clock[msg.key] + 1 == msg.value.sequence) {
15- request_clock[msg.key] ++
16- send(msg)
17- if(request_clock[msg.key] < have_clock[id]) get(id, msg.value.sequence + 1) //GETTING -> got
18- }
19- //shift to real time
20- }
21- live: (msg) { // received a message in realtime, send if that is what they want.
22- if(request_clock[msg.key] + 1 == msg.value.sequence) {
23- request_clock[msg.key] ++
24- send(msg)
25- }
26- }
27-```
9+Although the primary motivation for this module is to use it in secure scuttlebutt,
10+it's intended to be decoupled sufficiently to use for other applications.
2811
29-READ:
30- if(new connection)
31- reply: wants
32-
33-SET_REMOTE_HAS:
34- for(id in local)
35- if(local[id] > remote[id])
36- attach_queue(id, local[id])
37-
38-LIVE_LOCAL:
39- if(remote[msg.author] < msg.sequence)
40- q
41-
4212 ## License
4313
4414 MIT
4515
@@ -54,4 +24,5 @@
5424
5525
5626
5727
28+

Built with git-ssb-web