kadoh
play

KadOH Kademlia over HTTP a Javascript framework bringing DHT to - PowerPoint PPT Presentation

Alexandre Lachze Pierre Guilleminot KadOH Kademlia over HTTP a Javascript framework bringing DHT to mobile applications What have been done so far in the DHT landscape ? * * Distributed Hash Table Theoretical resuts Chord Kademlia


  1. Alexandre Lachèze Pierre Guilleminot KadOH Kademlia over HTTP a Javascript framework bringing DHT to mobile applications

  2. What have been done so far in the DHT landscape ? * * Distributed Hash Table

  3. Theoretical resuts Chord Kademlia Improvement proposals

  4. Public large scale implementations File sharing eMule BitTorrent’s Mainline

  5. What is missing ?

  6. Mobiles Ignored by DHTs Huge and growing audience Private data

  7. Web Applications taking advantage of DHTs scalability

  8. Beyond file sharing... overlay networks improving privacy protections

  9. What have we done ?

  10. A Javascript framework implementing Kademlia in browsers using XMPP over HTTP a.k.a. KadOH

  11. Why Javascript ? • improved portability vs. native • good performance • event-driven asynchronous I/O • simplified distribution process • automated backward compatibility

  12. Why XMPP ?

  13. How to establish peer to peer connections ?

  14. Common problem on obstrusive cellular networks highly restrictive firewalls technicaly impossible need a for third party router

  15. Develop our own router ? Router

  16. Develop our own routers ? distributed s2s Router Router

  17. Develop our own routers ? heavy does not scale against the end-to-end principle

  18. Unsing the XMPP infrastructures GTalk Jabber.com peer to peer messaging distributed – already scaled open

  19. XMPP protocol e X tensible M essaging and P resence P rotocol open and standard based on XML TCP made for instant messaging and extensible <message from='juliet@jabber.org’ to='romeo@jabber.org' xml:lang='en'> <body>Art thou not Romeo, and a Montague? &lt;3</body> </message>

  20. But in the browser ? GTalk bosh Jabber.com bosh Bidirectional-streams Over Synchronous HTTP XHR long polling XMPP in browser

  21. Good news : It works !

  22. How does it work ?

  23. Architecture 1 * Node IterativeFind 1 1 1 1 1 1 Reactor ValueManagement RoutingTable 1 * * KBucket 1 1 1 Transport FindNodeRPC RPC (XMPP, UDP, ..) modular FindValueRPC StoreRPC extensible PingRPC independant parts highly hackable

  24. How to use it ?

  25. Instantation node = new KadOH.Node(id, options)

  26. Connection and joining node.connect(function() { node.join(); });

  27. Store node.put( '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33' , 'Hello world !');

  28. Retrieve node.get( '62cdb7020ff920e5aa642c3d4066950dd1f01f4d' , function(value) { alert(value); });

  29. That’s it ! ...but possibility to access to lower level functions or totally rewrite the logic

  30. Some extra sugar ? • runs in Node.js • supports various transports : • UDP • raw XMPP • WebSocket • connects to the Mainline DHT

  31. DEMO Proxy to Mainline

  32. How to test a DHT from scratch ? • instantiate a large number of peers • automatic behavior – bots • heavy computing capacity Amazon EC2

  33. Bar.com bosh testing device XMPP server elastic ip EC2 instance EC2 instance EC2 instance bootstraps fork process bot

  34. DEMO XMPP & DHT simulation

  35. Benchmarking • sequence of iterative look ups • 5 non reaching • 5 reaching • collected relevant metrics on multiple devices

  36. Benchmarking Non resolved Iterative find - time (ms) Resolved Iterative find - time (ms) 20000 20000 15000 15000 10000 10000 5000 5000 0 0 250 500 750 1000 1500 2000 3000 3500 250 500 750 1000 1500 2000 3000 3500 chrome firefox iphone-wifi iphone-3g

  37. Let’s sum up.

  38. A Javascript framework implementing Kademlia in browsers using XMPP over HTTP < 5s (even in3G)

  39. KadOH https://github.com/jinroh/kadoh http://jinroh.github.com/kadoh/

  40. And now ? • still lots of features to implement • focus on new promising technologies

More recommend