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

Couchbase Lite OSCON

Couchbase Lite OSCON

Lightweight embedded database for iOS and Android. This presentation focussed on the data structures you need to create a reliable mobile sync engine.

Chris Anderson

July 24, 2013
Tweet

More Decks by Chris Anderson

Other Decks in Technology

Transcript

  1. Brute  Force 3 1 2 5 4 A B 3ʹ′

    1 2ʹ′ 5ʹ′ 4 3ʹ′ 1 2ʹ′ 5ʹ′ 4
  2. Merkle  Trees 3 1 2 5 4 A B 1

    5ʹ′ 4 3ʹ′ 2ʹ′ 5ʹ′ 3ʹ′ 2ʹ′
  3. Sparse  Sequences 3 1 2 5 4 A B 1

    5ʹ′ 4 3ʹ′ 2ʹ′ 5ʹ′ 3ʹ′ 2ʹ′
  4. Sparse  Sequences  allow  Subset  Sync 2 4 A B 1

    5ʹ′ 4 3ʹ′ 2ʹ′ 2ʹ′ 3 1 5 C 5ʹ′ 3ʹ′
  5. Revision  Trees 1 2 3 1 2 1 2 3

    4 4 4 4 4 3 3 4 5 4
  6. Revision  Trees 1 2 3 1 2 1 2 3

    4 4 4 3 3 4 5 5 4 4
  7. Revision  Trees 1 2 3 1 2 1 2 4

    4 3 3 4 5 5 3 3 4 4 5 4 4
  8. Couchbase  Lite Dalvik Cocoa Couchbase   Lite Couchbase   Lite

    • NoSQL ­ JSON  documents ­ binary  a7achments ­ views  and  queries • Lightweight ­ na;ve  Objec;ve-­‐C  /  Java ­ less  than  1MB  library  size • Robust ­ SQLite  storage  engine  is  part  of  the   opera;ng  system  standard  library “The  best  database  for  mobile  devices.”
  9. Sync  Gateway Sync  Gateway App  Server Access   Control Push

      No;fica;ons etc Couchbase  Server • Sync  Engine ­ HTTP  sync  protocol ­ Compa;ble  with  lots  of  clients • Access  Control ­ User  management ­ Channels ­ Applica;on  override! • Easy  to  deploy ­ Go  run;me  works  on  all  supported   Couchbase  Server  plaQorms ­ Buil;n  lightweight  storage  for   development  mode
  10. Sync  Gateway App  Server Access   Control HTTP  /  JSON

    Sync Couchbase  Server Dalvik Cocoa Couchbase   Lite Couchbase   Lite Push   No;fica;ons etc
  11. Medical  Records • NoSQL  flexible  schema  integrates  well  with  exis9ng

     systems • Staff  can  carry  data  with  them  to  pa9ents • WiFi  limited  in  hospitals
  12. Airline • Flight  plans • Passenger  manifest  and  purchases •

    Mobile  to  mobile  sync  in  the  air • Connects  to  cloud  on  the  ground
  13. Games  and Social  Media • Fine  grained  sharing  &  messaging

    • Great  for  turn-­‐based  games,  chat