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

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

27a38e420ceeb97e61f109c4c6a0e9b4?s=128

Jonathan Lee Martin

October 08, 2016
Tweet

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. None
  4. I ’ M F R O M AT L A

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

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

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

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

    N O M A D . @ N Y B B L R
  9. 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 .
  10. None
  11. • Last-minute flights • Live out of a backpack •

    Translate road signs at 60 mph • Live like the locals
  12. 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.
  13. • Bloggers, journalists, or software devs • Primarily writing +

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

    O D I E J O U R N A L I S T
  15. 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…
  16. 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 …
  17. None
  18. I O N LY C H A N G E

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

    H E S E F L A G S ? !
  20. R E A LT I M E . Y E

    P.
  21. G O O G L E D O C S

  22. None
  23. E T H E R PA D

  24. None
  25. 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 ?
  26. • Conflict resolution algorithm • Network for propagating changes to

    peers • Slick editor
  27. 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 .
  28. 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.
  29. 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.
  30. 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 …
  31. None
  32. A L E X B E T H

  33. {,,}∪{,} = {,,,} {,,}∩{,} = {} {,,}

  34. ?

  35. A L E X B E T H

  36. A L E X B E T H {,,,} {}

    = or ?
  37. A L E X B E T H = DEL()

    INS() DEL() ∪ {DEL(),INS(),DEL()}
  38. {,,} {DEL(),INS(),DEL()} = {,}

  39. 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…
  40. Sandwiches are a popular type of lunch food, taken to

    work, school, or picnics to be eaten as part of a packed lunch. “ ”
  41. “sandwich”

  42. “sandwich” A L E X “sandwich” ⁰¹² ³⁴⁵⁶ B E

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

    INS(5,“h”) ⁰¹²³⁴⁵⁶⁷ “sandwihch” ⁰¹² ³⁴⁵⁶⁷
  44. “sanwihch”

  45. B E T H A L E X “sandwich” DEL(3)

    INS(5 =4,“h”) ⁰¹²³⁴⁵⁶⁷ “sanwhich” ⁰¹²³⁴⁵⁶⁷ ⁰¹²-³⁴⁵⁶ ⁰¹²³⁴⁵⁶⁷ “sandwich” -1
  46. “sanwhich”

  47. 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
  48. 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
  49. B E T H A L E X “abc” “abc”

    op1: INS(3,“x”) op2: DEL(2) “abxc” “ac” “axc” “acx”
  50. 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 ?
  51. – G ´ E R A L D O S

    T E R E T A L . “…currently there are no correct transformation functions…”
  52. – 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].”
  53. M E E T D O C S .

  54. 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 ?
  55. s≺a≺n

  56. s≺a≺n a≻s,a≺n ≡

  57. “sandwich” ⁰¹²³⁴⁵⁶⁷

  58. INS(d≺y≺w) INS(d≺e≺w) s≺a≺n≺d≺w≺i≺c≺h DEL(n≺d≺w)

  59. INS(d≺y≺w) INS(d≺e≺w) s≺a≺n≺w≺i≺c≺h

  60. “sandwich” ⁰¹²-³⁴⁵⁶

  61. INS(d≺y≺w) INS(d≺e≺w) s≺a≺n≺d≺w≺i≺c≺h

  62. INS(d≺e≺w) s≺a≺n≺d≺y≺w≺i≺c≺h

  63. s≺a≺n≺d≺e≺y≺w≺i≺c≺h

  64. “saneywich”

  65. “sandwich” ⁰¹²-³⁴⁵⁶

  66. “sandywhiddwich” ⁰¹²-------³⁴⁵⁶

  67. 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 .
  68. 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
  69. “sandwich” ⁰¹²³⁴⁵⁶⁷

  70. s a n d w i c h

  71. n a d s w i c h root begin

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

    h root begin end 0 9 5 8 3 4 3
  73. d 3 7 7 a s root

  74. [3.7.7]

  75. INS([3.7.7],“y”,[3.8]) [3.7.7] [3.8]

  76. INS( ,“y”, ) d w [3.7.7] [3.8]

  77. INS( ,“y”, ) = d w [3.7.7] [3.8] y [3.7.9]

  78. [3.7.9]

  79. n a d s w i c h root begin

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

    end 0 9 3 5 7 8 3 7 4 3 y 9
  81. INS( ) y [3.7.9] INS( ) h [3.8.2] B E

    T H A L E X
  82. n a d s w i c h root begin

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

    end 0 9 3 5 7 8 3 7 4 3 y 9
  84. 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
  85. “sandywhich”

  86. • 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
  87. 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
  88. arxiv.org/abs/1608.03960 J S O N C R D T

  89. 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 .
  90. • 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)
  91. • Topology • Discovery • Transport • Security

  92. C E H I B A D F G J

  93. C E H I B A D F G J

  94. C E H I B A D F G J

  95. C E H I B A D F G J

    “hi”
  96. C E H I B A D F G J

    “hi” “hi” “hi” “hi” “hi” “hi” “hi”
  97. B A “hi” “hi” “hi” “hi” “hi” “hi”

  98. 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…
  99. • Scuttlebutt • Gossip • Hyperlog • libp2p

  100. github.com/kgryte/awesome-peer-to-peer A L L T H E P 2 P

    A W E S O M E N E S S
  101. 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 .
  102. github.com/nybblr/p2p-experiments

  103. • WebRTC • WiFi Direct • LTE Direct • BLE

    • Bonjour
  104. None
  105. 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 .
  106. 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
  107. T H A N K S ! @nybblr yellowscale.com