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

Woot for Lift

Woot for Lift

Presentation at Scala eXchange, London, 3 December 2013.
With @jonoabroad

Richard Dallaway

December 03, 2013
Tweet

More Decks by Richard Dallaway

Other Decks in Programming

Transcript

  1. Don’t Do This A B C A B C Site

    A Site B 1 2 3 1 2 3
  2. Don’t Do This A B C A B C Site

    A Site B 1 2 3 1 2 3 A x B C 1 2 3 4 insert x @ 2
  3. Don’t Do This A B C A B C Site

    A Site B 1 2 3 1 2 3 A x B C 1 2 3 4 insert x @ 2 A B 1 2 delete 3
  4. Don’t Do This A B C A B C Site

    A Site B 1 2 3 1 2 3 A x B C 1 2 3 4 insert x @ 2 A B 1 2 delete 3 A x B
  5. Don’t Do This A B C A B C Site

    A Site B 1 2 3 1 2 3 A x B C 1 2 3 4 insert x @ 2 A B 1 2 delete 3 A x B A x C
  6. WOOT A B C A B C Site A Site

    B 1 2 3 1 2 3 1 2 3 4 A x B C A ≺ x ≺ B
  7. WOOT A B C A B C Site A Site

    B 1 2 3 1 2 3 1 2 3 4 A x B C A ≺ x ≺ B 1 2 A B delete C
  8. WOOT A B C A B C Site A Site

    B 1 2 3 1 2 3 1 2 3 4 A x B C A ≺ x ≺ B 1 2 A B delete C A x B
  9. WOOT A B C A B C Site A Site

    B 1 2 3 1 2 3 1 2 3 4 A x B C A ≺ x ≺ B 1 2 A B delete C A x B A x B
  10. WOOT Algorithm (WString, Char, Pos) => 
 (WString, WChar) Local

    Integration (WString, WChar) => WString Remote Integration
  11. WOOT Algorithm a b c d a b c d

    a b c d a b c x d a c d a b y c d
  12. WOOT Algorithm a b c d a b c d

    a b c d a b c x d a c d a b y c d a b c d
  13. WOOT Algorithm a b c d a b c d

    a b c d a b c x d a c d a b y c d a b c d x
  14. WOOT Algorithm a b c d a b c d

    a b c d a b c x d a c d a b y c d a b c d x /
  15. WOOT Algorithm a b c d a b c d

    a b c d a b c x d a c d a b y c d a b c d x y /
  16. JavaScript jQuery(document).ready(function() { wootServer.init({doc:1}).then(messageHandler); }); <script data-lift="WootServices"> var wootServer =

    { init: function(config) { return $.Deferred().promise(); }, send: function(wchar) {} }; </script>
  17. JavaScript jQuery(document).ready(function() { wootServer.init({doc:1}).then(messageHandler); }); <script data-lift="WootServices"> var wootServer =

    { init: function(config) { return $.Deferred().promise(); }, send: function(wchar) {} }; </script>
  18. Scala def services = List[RoundTripInfo]( "send" -> receive _, "init"

    -> init _) def init(config: JValue) : Stream[JValue] = { ! 
 ! }
  19. Scala def services = List[RoundTripInfo]( "send" -> receive _, "init"

    -> init _) def init(config: JValue) : Stream[JValue] = { ! 
 ! } val doc = toJson(wootModel) val q = LinkedBlockingQueue[JValue]() doc #:: Stream.continually(q.take())
  20. You Have Options OT Many options (since 1998) •Wave •Google

    Docs •Etherpad Post-OT Tombstones Tombstones WOOT 2005 RGA 2011 CT 2010 Treedoc 2007 Logoot 2009 LSEQ 2013 ×
  21. References Oster et al (2006) Data Consistency for P2P Collaborative

    Editing http://www.loria.fr/~oster/pmwiki/pub/papers/OsterCSCW06.pdf Ahmed-Nacer et al (2011) Evaluating CRDTs for Real-time Document Editing http://hal.archives-ouvertes.fr/docs/00/62/95/03/PDF/doce63-ahmednacer.pdf Nédelec, Molli, Mostefaoui & Desmontils (2013)
 LSEQ: an Adaptive Structure for Sequences in Distributed Collaborative Editing http://dl.acm.org/citation.cfm?id=2494278
  22. Summary ‣WOOT pretty neat ‣Lift is pretty neat ‣Put effort

    into the editor
 ‣Fun area, go explore