Skip to content

Instantly share code, notes, and snippets.

@yifan-gu
Last active August 29, 2015 14:11
Show Gist options
  • Save yifan-gu/9c676ae4328c7a30a7c7 to your computer and use it in GitHub Desktop.
Save yifan-gu/9c676ae4328c7a30a7c7 to your computer and use it in GitHub Desktop.
pseudo

��

Sender: 
gossip() {
    for (i = 0; i < fanout; i++ ) {
    q = getPeer();
    send (msg, q);
}
Receiver:
while (1) {
    recv(&msg, &p);
    update(msg);
    gossip();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment