Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Does the network seem thin up here? Collaborati...

Does the network seem thin up here? Collaborating with Mountaintop Mesh Networks

Code, blogs, videos and more: https://jonathanleemartin.com/

Digital nomads can now work anytime, anywhere—but often with **no WiFi.** Despite the explosion of feature-rich web apps, offline editors like Microsoft Word remain their tool of choice, leaving them out in the cold when it comes to realtime collaboration.

With the help of *Operational Transforms* + *Conflict-Free Replicated Data Types,* peer-to-peer web apps can enable writers, musicians and other creators to collaborate *off-the-grid* and climb up to the writer’s ultimate dream: **collaborative writing atop Half Dome.**

LSEQ implementation: https://github.com/nybblr/LSEQTree/
P2P experiments: https://github.com/nybblr/p2p-experiments

Jonathan Lee Martin

October 08, 2016
Tweet

More Decks by Jonathan Lee Martin

Other Decks in Programming

Transcript

  1. C O L L A B O R AT I

    N G O V E R M O U N TA I N T O P N E T W O R K S . D O E S T H E N E T W O R K S E E M T H I N U P H E R E ?
  2. I ’ M J O N AT H A N

    M A R T I N . @ N Y B B L R
  3. I ’ M F R O M AT L A

    N TA . @ N Y B B L R
  4. I ’ M F R O M M O B

    I L E . @ N Y B B L R
  5. I ’ M F R O M D A L

    L A S . @ N Y B B L R
  6. I ’ M F R O M A N Y

    W H E R E . @ N Y B B L R
  7. I ’ M A D I G I TA L

    N O M A D . @ N Y B B L R
  8. T H E O F F I C E O

    F D I G I TA L N O M A D S . W E L C O M E T O M Y C U B I C L E .
  9. • Last-minute flights • Live out of a backpack •

    Translate road signs at 60 mph • Live like the locals
  10. H O T E L W I F I D

    O E S N ’ T C O U N T. is the WiFi of nomads.
  11. • Bloggers, journalists, or software devs • Primarily writing +

    collaborating on the go • Poor connectivity outside the cities • Offline a lot of the time
  12. A L E X B E T H F O

    O D I E J O U R N A L I S T
  13. A L E X A N D B E T

    H A R E S A N D W I C H H I S T O R I A N S . S O B A S I C A L LY…
  14. T H E Y WA N T T O W

    R I T E C O L L A B O R AT I V E LY. N O M AT T E R T H E I R L O C AT I O N …
  15. I O N LY C H A N G E

    D O N E W O R D …
  16. W H AT A R E A L L T

    H E S E F L A G S ? !
  17. A L E X A N D B E T

    H WA N T T O C O L L A B O R AT E U P H E R E . D O E S T H E N E T W O R K S E E M T H I N U P H E R E ?
  18. M E R G I N G C H A

    N G E S F O R E V E N T U A L C O N S I S T E N C Y A L E X A N D B E T H M A K E C H A N G E S A T T H E S A M E T I M E .
  19. W E C A N ’ T TA K E

    T U R N S . T H E S P E E D O F L I G H T I S S L O W.
  20. L E T ’ S B E C O N

    S I S T E N T. E V E N T U A L LY.
  21. A L E X & B E T H A

    R E G R O C E RY S H O P P I N G . M E A N W H I L E I N A N A L P I N E V I L L A G E …
  22. ?

  23. A L E X B E T H = DEL()

    INS() DEL() ∪ {DEL(),INS(),DEL()}
  24. A L E X & B E T H A

    R E B L O G G I N G A B O U T S A N D W I C H E S . W I T H L U N C H TA K E N C A R E O F…
  25. Sandwiches are a popular type of lunch food, taken to

    work, school, or picnics to be eaten as part of a packed lunch. “ ”
  26. “sandwich” A L E X “sandwich” ⁰¹² ³⁴⁵⁶ B E

    T H “sandwhich” ⁰¹²³⁴⁵⁶⁷⁸ ⁰¹²³⁴⁵⁶⁷
  27. B E T H A L E X “sandwich” DEL(3)

    INS(5,“h”) ⁰¹²³⁴⁵⁶⁷ “sandwihch” ⁰¹² ³⁴⁵⁶⁷
  28. B E T H A L E X “sandwich” DEL(3)

    INS(5 =4,“h”) ⁰¹²³⁴⁵⁶⁷ “sanwhich” ⁰¹²³⁴⁵⁶⁷ ⁰¹²-³⁴⁵⁶ ⁰¹²³⁴⁵⁶⁷ “sandwich” -1
  29. A TA L E O F T W O T

    I P I S O P E R AT I O N A L T R A N S F O R M S
  30. op1 ∘ T(op2, op1) ≡ op2 ∘ T(op1, op2) T(op3,

    op1 ∘ T(op2, op1)) = T(op3, op2 ∘ T(op1, op2)) T P 2 T P 1
  31. B E T H A L E X “abc” “abc”

    op1: INS(3,“x”) op2: DEL(2) “abxc” “ac” “axc” “acx”
  32. B E T H A L E X “abc” “abc”

    op1: INS(2,“x”) op2: DEL(2) “axbc” “ac” C H R I S “abc” op3: INS(3,“y”) “abyc” “axyc” “ayxc” or ?
  33. – G ´ E R A L D O S

    T E R E T A L . “…currently there are no correct transformation functions…”
  34. – G ´ E R A L D O S

    T E R E T A L . “…OT cannot be used to build a safe decentralized collaborative [editor].”
  35. P R E C O N D I T I

    O N S & T O M B S T O N E S I D O N ’ T F O L L O W. C O U L D Y O U G I V E M E M O R E C O N T E X T ?
  36. C R D T: C O N F L I

    C T- F R E E R E P L I C AT E D D ATA T Y P E W E C A N D O ( M U C H ) B E T T E R .
  37. L S E Q : L I N E A

    R S E Q U E N C E A N E F F I C I E N T T R E E - B A S E D C R D T S E Q U E N C E
  38. n a d s w i c h root begin

    end 0 9 3 5 7 8 3 7 4 3
  39. d 3 7 7 n a s w i c

    h root begin end 0 9 5 8 3 4 3
  40. n a d s w i c h root begin

    end 0 9 3 5 7 8 3 7 4 3
  41. n a d s w i c h root begin

    end 0 9 3 5 7 8 3 7 4 3 y 9
  42. n a d s w i c h root begin

    end 0 9 3 5 7 8 3 7 4 3
  43. n a d s w i c h root begin

    end 0 9 3 5 7 8 3 7 4 3 y 9
  44. n a d s w h c h root begin

    end 0 9 3 5 7 8 3 7 2 3 y 9 i 4
  45. • No master peer • Works with any number of

    peers • No tombstones • Memory usage grows slowly • Operations can be applied quickly • Resilient to long offline spells
  46. github.com/Chat-Wane/LSEQTree L S E Q J A VA S C

    R I P T I M P L E M E N TA T I O N
  47. P 2 P N E T W O R K

    S A L E X A N D B E T H N E E D T O E X C H A N G E O P E R A T I O N S .
  48. • Connection (WiFi, socket, BLE, sound) • Topology (Spray) •

    Discovery (mDNS) • Transport (TCP, UDP, SCTP) • Protocol (HTTP, HTTPS, stream) • Resolver (ICE, STUN, TURN) • Signaling (WebRTC) • Security (SSL, DTLS)
  49. C E H I B A D F G J

    “hi” “hi” “hi” “hi” “hi” “hi” “hi”
  50. W E ’ R E R E I N V

    E N T I N G T H E I N T E R N E T. S O B A S I C A L LY…
  51. R I C H C O N T E N

    T E D I TA B L E M A R K D O W N E D I T O R A L E X A N D B E T H N E E D A N A W E S O M E E D I T O R .
  52. T H E I R F U T U R

    E I S H I D I N G I N A C A D E M I C PA P E R S . A L E X A N D B E T H A R E C O U N T I N G O N Y O U .
  53. Y E L L O W S C A L

    E . C O M L A N D S C A P E P H O T O G R A P H Y & D I G I TA L N O M A D I S M