Slide 1

Slide 1 text

Lite

Slide 2

Slide 2 text

Sync  is  the  Future  of  Mobile  Data

Slide 3

Slide 3 text

What  is  Sync? Lite

Slide 4

Slide 4 text

Data  Structures

Slide 5

Slide 5 text

Collec9on  Sync  & Conflict  Management

Slide 6

Slide 6 text

Collec9on  Sync •Brute  Force •Merkle  Trees •Sparse  Sequences

Slide 7

Slide 7 text

Ini9al  Sync   3 1 2 5 4 A B 3 1 2 5 4

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Collec9on  Sync •Brute  Force •Merkle  Trees •Sparse  Sequences

Slide 13

Slide 13 text

Vector  Clocks • Scale  with  the  #  of  processes  upda9ng  an  item

Slide 14

Slide 14 text

Revision  Trees {counter,  content  hash} 4-­‐3a14f7d8 5-­‐d7ad89bd 4 4 4 3 3 3 2 2 2 3

Slide 15

Slide 15 text

Revision  Trees 1 2 3 1 2 3 4 4

Slide 16

Slide 16 text

Revision  Trees 1 2 3 1 2 3 4 4 4

Slide 17

Slide 17 text

Revision  Trees 1 2 3 1 2 3 4 4 4

Slide 18

Slide 18 text

Revision  Trees 1 2 3 4 1 2 3 4 4 4

Slide 19

Slide 19 text

Revision  Trees 1 2 3 4 4 1 2 3 4 4

Slide 20

Slide 20 text

Revision  Trees 1 2 3 1 2 3 1 2 3 4 4 4 4 4 3 4

Slide 21

Slide 21 text

Revision  Trees 1 2 3 1 2 1 2 3 4 4 4 4 4 3 3 4

Slide 22

Slide 22 text

Revision  Trees 1 2 3 1 2 1 2 3 4 4 4 4 4 3 3 4 5 4

Slide 23

Slide 23 text

Revision  Trees 1 2 3 1 2 1 2 3 4 4 4 3 3 4 5 5 4 4

Slide 24

Slide 24 text

Revision  Trees 1 2 3 1 2 1 2 4 4 3 3 4 5 5 3 3 4 4 5 4 4

Slide 25

Slide 25 text

Conflict  Detec9on  and  Management •Vector  Clocks •Revision  Trees

Slide 26

Slide 26 text

Couchbase  Lite

Slide 27

Slide 27 text

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.”

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

Sync  Gateway App  Server Access   Control HTTP  /  JSON Sync Couchbase  Server Dalvik Cocoa Couchbase   Lite Couchbase   Lite Push   No;fica;ons etc

Slide 30

Slide 30 text

One Page of Cloud

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

One  Page  of  Cloud

Slide 34

Slide 34 text

Data Routing Data Data

Slide 35

Slide 35 text

Data Routing Data Data Data

Slide 36

Slide 36 text

Data Routing Data Data Data Data

Slide 37

Slide 37 text

Data Routing Data D ata Data Data Data

Slide 38

Slide 38 text

Data Routing Data D ata Data Data Data Data

Slide 39

Slide 39 text

Data Routing Data Data Data Data Data Data

Slide 40

Slide 40 text

Demo  -­‐  CouchChat

Slide 41

Slide 41 text

New  PhoneGap  Plugin haps://github.com/couchbaselabs/LiteGap plugman  -­‐-­‐platform  $PLATFORM  -­‐-­‐project  ~/MyPhoneGapApp  -­‐-­‐plugin  https://github.com/couchbaselabs/LiteGap.git

Slide 42

Slide 42 text

Use  Cases

Slide 43

Slide 43 text

Medical  Records • NoSQL  flexible  schema  integrates  well  with  exis9ng  systems • Staff  can  carry  data  with  them  to  pa9ents • WiFi  limited  in  hospitals

Slide 44

Slide 44 text

Retail  /  Loyalty  /  Point  of  Sale •  

Slide 45

Slide 45 text

Airline • Flight  plans • Passenger  manifest  and  purchases • Mobile  to  mobile  sync  in  the  air • Connects  to  cloud  on  the  ground

Slide 46

Slide 46 text

Personal  Data Timebox by Pepper Networks • contacts,  photos,  etc

Slide 47

Slide 47 text

Games  and Social  Media • Fine  grained  sharing  &  messaging • Great  for  turn-­‐based  games,  chat

Slide 48

Slide 48 text

Collabora9on  “Groupware” • Con9nuous  sync • Conflict  detec9on • Rich  data  model h7p://www.hubapp.com/

Slide 49

Slide 49 text

Thank  You Chris  Anderson      @jchris haps://groups.google.com/forum/#!forum/mobile-­‐couchbase haps://github.com/couchbaselabs/LiteGap haps://github.com/couchbase/couchbase-­‐lite-­‐ios haps://github.com/couchbase/couchbase-­‐lite-­‐android