Slide 1

Slide 1 text

Gossiping on node.js Gentile introduction to distributed communications environments by Raul Pino Node.JS Conf Italy 2016 1

Slide 2

Slide 2 text

Who am I? • Born in Venezuela • Living in Chile • uBiome (we love bacteria) • Groupon Latam • <3 mortadella Github/Twitter: @p1nox 2

Slide 3

Slide 3 text

What about that title? Gossiping on node.js? Who's that guy? 3

Slide 4

Slide 4 text

"What Shakespeare is to drama, Bernini may be to sculpture..." 4

Slide 5

Slide 5 text

What about that title? Bernini - Baldinucci - Borromini Gossiping on node.js! The Gossiper/Biographer! The protocol! The cool title! Yeah right (ʭ✧Д✧))ʭ୴ˍʓˍ 5

Slide 6

Slide 6 text

Agenda • Gossip protocol • P2P libraries (demo) • Message passing frameworks (demo) • Mix implementations 6

Slide 7

Slide 7 text

Gossip protocol Multicast problem Protocol stages Notes 7

Slide 8

Slide 8 text

Gossip protocol Multicast problem 8

Slide 9

Slide 9 text

Gossip protocol Naive approach solving multicast 9

Slide 10

Slide 10 text

Gossip protocol Gossip first stage 10

Slide 11

Slide 11 text

Gossip protocol Gossip n stage 11

Slide 12

Slide 12 text

Gossip protocol Notes: • Same nodes can be picked multiple times. • Periods are not syncronised across nodes (so each node could have its own intervals). 12

Slide 13

Slide 13 text

Gossip protocol Implementations: • Is rumored that AWS EC2 and S3 uses it (postmortems refers to gossip messages). • Cassandra uses gossip to maintain membership lists in the system. • Usenet NNTP from the 70's (Network News Transport Protocol). 13

Slide 14

Slide 14 text

P2P libraries List of libraries Demo 14

Slide 15

Slide 15 text

P2P libraries • peer.js - http:/ /peerjs.com • freedom.js - http:/ /www.freedomjs.org • P - http:/ /unsetbit.com/p 15

Slide 16

Slide 16 text

P2P libraries Demo: • Simple example. • Gossip implementation. 16

Slide 17

Slide 17 text

Message passing frameworks List of frameworks Demo 17

Slide 18

Slide 18 text

Message passing frameworks • klyng - https:/ /github.com/Mostafa-Samir/klyng • zeromq - http:/ /zeromq.org/ (using zeromq.node package) 18

Slide 19

Slide 19 text

Message passing frameworks Demo: • Simple example. • Gossip implementation. 19

Slide 20

Slide 20 text

Mixed implementations capataz.js https:/ /github.com/LeonardoVal/capataz.js Lateralus ß https:/ /github.com/project-lateralus 20

Slide 21

Slide 21 text

Lateralus ß: Architecture 21

Slide 22

Slide 22 text

Lateralus ß: Architecture Gossip protocol variant 22

Slide 23

Slide 23 text

Lateralus ß: Architecture Membership protocol variant 23

Slide 24

Slide 24 text

Takeaways Hot topics: • Descentralized web. • Distributed computing. • P2P communications. • Blockchain. Ultimate goal: A decentralized web would give power back to the people online Matthew Hodgson (matrix.org in TC) 24