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

Couchbase Mobile Update

Jens Alfke
February 20, 2013

Couchbase Mobile Update

Update on status of mobile projects, February 2013. Talks about Couchbase Lite (aka TouchDB) and the Couchbase Sync Gateway.

Jens Alfke

February 20, 2013
Tweet

More Decks by Jens Alfke

Other Decks in Technology

Transcript

  1. 2 The  Story  So  Far • 2011:  First  GeneraFon –

    CouchDB  ported  to  iOS/Android – CouchCocoa  (iOS  client  API) • 2012:  R&D – TouchDB – Syncpoint • 2013:  Second  GeneraFon – Couchbase  Lite – Sync  Gateway Wednesday, February 20, 13
  2. Applica'on  Code 2011:  Couchbase  Mobile Couchbase  Mobile Erlang JavaScript CouchDB

    CouchCocoa  /  Ektorp Mobile  App }~3.5MB ~3sec  startup DEPRECATED Wednesday, February 20, 13
  3. Applica'on  Code 2012:  TouchDB TouchDB SQLite CouchCocoa  /  Ektorp Mobile

     App }~0.8MB ~0.1sec  startup STABLE Wednesday, February 20, 13
  4. Applica'on  Code 2013:  Couchbase  Lite Couchbase  Lite SQLite Mobile  App

    } ~0.5MB ~0.1sec  startup aka  “TouchDB  1.5” PRE-ALPHA Faster  throughput Wednesday, February 20, 13
  5. Current  Status • Mobile  clients  sync  with  Apache  CouchDB –

    Open  protocol – REST-­‐based – MulFple  providers • This  made  sense  for  Couchbase  in  2011,  but  not  today – Couchbase  Single  Server  no  longer  exists – Couchbase  Server  2  is  not  CouchDB-­‐compaFble 8 Wednesday, February 20, 13
  6. Server-­‐Side  Goals 9 • ConnecFvity  with  Couchbase  Server • Scaling

     to  large  numbers  of  users • Filtering  server-­‐side  data  sets – For  size – For  access  control Wednesday, February 20, 13
  7. ConnecFng  To  Couchbase  Server • Server’s  naFve  protocol  is  for

     app  servers,  not  clients – No  access  control – No  validaFon – Binary  memcached  protocol • CouchDB  sync  protocol  is  great  for  client/server • SoluFon:  Add  a  gateway  between  client  and  server 10 Sync  Gateway memcached CouchSync Wednesday, February 20, 13
  8. Filtered  ReplicaFon • Data  Scalability – Replicate  only  docs  relevant

     to  the  client – “Only  sales  data  for  California  region” • Access  Control – Replicate  only  docs  visible  to  the  client – “Only  pages  of  wikis  I’m  invited  to” • These  don’t  work  with  the  CouchDB  model – Filtered  replicaFon  is  inefficient – No  per-­‐document  access  control 14 Wednesday, February 20, 13
  9. App  Server  Tags  Documents  On  Entry 16 function(doc) { sync(doc.dept);

    if (doc.dept == ”Sales”) sync(doc.state); } { “dept”: “Sales”, “state”: “CA”, “date”: “2013-02-19” ... CA Sales R&D Sales WA Wednesday, February 20, 13
  10. Docs  Are  Indexed  By  Channel 17 Sales CA WA R&D

    Feb jens Wednesday, February 20, 13
  11. Apps  Sync  From  A  Set  Of  Channels 18 Sales CA

    WA RnD Feb jens jens Wednesday, February 20, 13
  12. …But  Have  Limited  Access 19 Sales CA WA RnD Feb

    jens jens “jens”: [“jens”,“Sales”] Wednesday, February 20, 13
  13. Current  Status 20 • Pre-­‐alpha! – github.com/couchbase/couchbase-­‐lite-­‐ios – github.com/couchbaselabs/sync_gateway •

    Preview  in  the  spring • Scalable  beta  in  summer • TargeFng  release  by  end  of  2013 Wednesday, February 20, 13