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

Mobile Sync with Couchbase mobile

Mobile Sync with Couchbase mobile

Avatar for Emmanuel Vinas

Emmanuel Vinas

December 11, 2015
Tweet

More Decks by Emmanuel Vinas

Other Decks in Programming

Transcript

  1. Solution : Couchbase If you find that you’re building a

    “sync engine” to sync data from your app to other instances of your app and/or the cloud, then you should probably be building it on top of Couchbase Lite instead of going down that rabbit hole — since you may never make it back out.
  2. Couchbase mobile history 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.1 May

    Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May 2014 2015 Coubase Lite IOS Android OS X Linux Windows Sync Gateway Sync Authentication Read/Write Access Rest Coubase Lite .Net Xamarin Mono Coubase Lite Forest DB (alpha) Coubase Lite Unity (Beta) Coubase Lite Unity Sync Gateway Web Hooks View Query
  3.  Open Source  Document oriented NoSql Databe  Schema

    less  Versionning  Connectors (spark, hadoop…) Couchbase Server
  4.  Link between couchbase Server and Couchbase Lite  http

    Protocol – Lots of clients  Access management  Authentication (facebook, persona, custom…)  Authorization  Sync function (require user, roles, channels)  Easy to deploy  Written in Go – works on all Couchbase Server platforms  Test Database (Walrus) Couchbase Sync gateway
  5.  NoSql Database  Json Documents  Views and Queries

     Robust – Uses sql lite (part of the system)  Lightweight (less than 500kb library size)  Native Api – Multi platforms  Multi architectures Coubase Lite
  6. Native Api  Manager  Database  Document  Revision

     Query / View  Channel / Role  Attachement  Model (IOS only)  Replication
  7. « A Replication object represents a replication (or "sync") task

    that transfers changes between a local database and a remote one » Replication ?
  8.  Push, Pull  One-shot vs Continuous  Filtered 

    Peer to Peer (bluethooth, wifi…)  Conflict management Replication in Couchbase
  9. “Conflicts are not an error condition, they are the result

    of your infrastructure allowing the same data set to be modified across disconnected systems. The introduction of such conflicts in such a topology is the expected behaviour and their programmatic resolution is a core piece of application logic.” Conflicts
  10.  revision : {%counter%-%hash%}  Same change on different devices

    produce the same hash -> no conflict  Revision Tree Conflicts
  11.  Documentations https://github.com/couchbase/couchbase-lite-android  Démo https://github.com/EmmanuelVinas/talk-couchbase  Peer 2 Peer

    http://www.couchbase.com/nosql- resources/presentations/couchbase-mobile-103-building- a-peer-to-peer-app-with-couchbase-mobile.html Links