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

Into to Couchbase Mobile

Jeff Harris
December 13, 2013
38

Into to Couchbase Mobile

Intro to Couchbase Mobile

Jeff Harris

December 13, 2013
Tweet

Transcript

  1. Couchbase  for  Mobile   Jessica  Liu  –  Product  Manager  

    J.  Chris  Anderson  –  Mobile  Architect  
  2. Mainframe   Green  Terminal   Millions   of  users  

    Thousands   of  Apps   PC  Client/Server   LAN/Internet   Hundreds  of   Millions     of  users   Tens  of     Thousands    of  Apps   Cloud   Mobile  Devices  &  Apps   Trillions  of  Things   Billions  of  users   Millions  of  Apps   Mobile  –  The  Next  Genera=on  PlaIorm   1980   1990   2020+   2000   2010  
  3. Mobile  –  The  Next  Genera=on    of  Apps    

      Couchbase     Server       Single  User  Interac:on      -­‐  Voice,  Text      -­‐  Personal  Apps   Mul:-­‐User  Interac:ons        -­‐  Group  and  Social        (Facebook,  Games,  Video)   Local  Sensor     Applica:ons   e.g.,  Medical   Interac:ng   with  Enterprises  
  4. JSON  Anywhere     Couchbase  Server   •  JSON  on

     the  device   ­  Developers   increasingly  prefer   NoSQL  database   •  JSON  on  the  wire   ­  No  need  for  data   transforma:on   •  JSON  in  the  cloud   ­  Flexible  data  model   ­  High  performance   ­  Easy  scalability   Server Sync Gateway Lite JS N JS N JS N
  5. Architecture       SERVER  3       SERVER

     1       SERVER  2   Couchbase  Server       Channel Sync  Gateway   Channel     Channel Sync  Gateway   Channel Couchbase  Lite  for  iOS  and  Android   On Premise In the cloud
  6. Before  Couchbase  Lite…   •  Locally,  could  use  SQLite  or

     Core  Data   ­  This  works  well  for  apps  using  rela:onal  algebra,  and/or  not  data-­‐ intensive   ­  However  this  does  not  suit  the  needs  for  mobile  developers  interested   in  an  intui:ve  and  flexible  data  store   •  For  sync  and  storage,  could  use  a  file-­‐sharing  service  like   Dropbox  or  iCloud   ­  Not  an  actual  database;  ownership,  insight,  and  analy:cs  unavailable   •  Or  alterna=vely,  could  use  MBaaS  like  Parse  or  Kinvey   ­  But,  it  missed  out  on  the  offline  experience,  and  we  are  s:ll  very  much   in  an  occasionally  connected  world;  to  write  a  good  app,  you  need  to   think  offline  
  7. Couchbase  Lite   The  only  NoSQL  Database  for  Mobile  Devices

      •  Features   ­  Ultra-­‐lightweight,  secure  JSON   database     ­  Na:ve  support  for  iOS,  Android   and  REST/HTML5   ­  Full  document,  index  and   querying  and  sync  capabili:es   ­  Powerful  conflict  resolu:on   Lite Couchbase   Lite     Android   Couchbase   Lite     iOS  
  8. Couchbase  Lite   Full  Feature  List   Features   Benefits

      Na=ve  APIs     Manage  your  mobile  database  using  APIs  op:mized  specifically   for  iOS  and  Android   REST  APIs   REST  APIs  provide  an  alterna:ve  access  method  based  on  your   development  needs   JSON  support     Use  a  flexible  data  model  designed  for  mobile  object-­‐oriented   apps.  Adapt  to  your  applica:on  needs  with  immediacy  and   li]le  impact   Easy  sync  with  Couchbase  Sync  Gateway   Get  sync-­‐ready  in  less  than  a  few  lines  of  code.  Focus  on   applica:on  development,  not  syncing   Peer  to  peer  support  via  REST  APIs       Communicate  with  nearby  devices,  even  offline,  with  our  REST   API-­‐enabled  P2P  support   Data  rou=ng  via  channels     Get  users  only  the  data  they  need  for  a  focused,  relevant  app   experience   Changes  Feed         Provides  developers  visibility  and  no:fica:on  into  data   changes     Indexing  and  querying  for  JSON   Use  powerful  secondary  indexes  to  query  your  data  on  the   device   Authen=ca=on  plug-­‐ins   Use  popular  exis:ng  third-­‐party  authen:ca:on  services  like   Facebook  and  Mozilla  Person  instead  of  wri:ng  your  own   A_achment  support  on  device  and  in  the  cloud   Manage  binary  data,  like  photos  and  large  files,  separately   from  your  JSON  documents  for  op:onal,  speedier  sync  
  9. What  you  get   Lite Couchbase   Lite    

    Android   Couchbase   Lite     iOS   ­  Enable  new  class  of  rich  data   intensive  local  applica:ons     ­  Rapid  development  using   na:ve  JSON  data   ­  Highly  responsive  interac:ve   applica:ons   ­  Always  available  -­‐    online  or   offline  
  10. What  you  get            JSON  Anywhere

        •  Flexible  JSON  on  device  lets  you   work  with  local  data  &  modify   your  data  structure  on  the  fly   without  impac:ng  your  back-­‐end.   •  Your  users  can  count  on  having  an   amazing  app  experience  with  a   fast  and  unbreakable  local   database       Easy  Sync   •  Effortlessly  sync  local  data  with  a   database  in  the  cloud  for  updates,   replica:on  or  collabora:ve   sharing.   •  In  addi:on,  scale  your  data  :er   horizontally  and  reliably  as  your   data  and  sync  needs  grow.     JSON JSON JSON JSON JSON
  11. Integra=ons   Couchbase  Lite  Plug-­‐in  for  PhoneGap   •  Support

     for  HTML5  developers   •  Develop  once  in  JavaScript  and  deploy   on  iOS  &  Android   •  Available  on  GitHub,  Cordova  Plugin   Registry,  and  coming  soon  to   build.phonegap.com     h]ps://github.com/couchbaselabs/Couchbase-­‐Lite-­‐PhoneGap-­‐Plugin   h]p://plugins.cordova.io/#/com.couchbase.lite.phonegap  
  12. Integra=ons   Couchbase  Lite  for  Xamarin   •  Partnered  to

     support  C#  community   •  Available  on  Developer  Center   •  Includes  sample  applica:on  to  help   developers  get  started  today   h]p://components.xamarin.com/view/couchbase-­‐lite/  
  13. Integra=ons   Couchbase  Lite  Titanium   •  Build  rich  na:ve

     apps  for  iOS  &   Android  using  JavaScript  SDK   •  Now  available  on  the  Appcelerator   Marketplace   h]ps://github.com/couchbaselabs/couchbase-­‐lite-­‐:tanium/   h]ps://marketplace.appcelerator.com/apps/6706?1396013098  
  14. Couchbase  Sync  Gateway   Easy,  Reliable  Data  Sync  to  the

     Cloud   •  Features   •  Dynamic  sync  capabili:es  via   Sync  Func:on  APIs   •  Easy  Administra:on   •  Seamless  scaleout   •  Benefits   ­  10x  reduc:on  in  development   :me   ­  Scales  to  support  millions  of   users   Sync Gateway
  15. Collaborate  using  Channels   •  For  each  document,  you  specify

     a  set  of   channels  it  belongs  to   •  For  each  user  or  device,  you  control  which   channels  they  can  access   •  Replicate  only  a  subset  of  documents  down  to   the  device   ­  User-­‐defined  filter  func:ons     ­  Simply  lets  you  know  whether  a  document  should  be  replicated   •  And  you  can  authen=cate  users      
  16. Doc  1   Channel  A   Doc  2   Channel

     A   Channel  B   Channel  A  &  B   Channel  B   Doc  1   Doc  2   Doc  2  
  17. Infinite  Campus   Problem   •  Low  classroom  engagement  

    •  Students  are  having  trouble  understanding  classroom   material   •  Rich  media  materials  are  not  readily  available  for  all   students  
  18. Infinite  Campus   Challenge   •  U=lize  tools  that  a_ract

     students  already,  namely  mobile   and  web  applica=ons  on  their  favorite  lifestyle  aid,  the  smart   phone   •  Receive  and  give  instant  feedback  to  effec=vely  guide  the   classroom  in  real-­‐=me   •  Provide  rich  material  and  content  to  students  both  on  and   off-­‐campus  
  19. Infinite  Campus   Solu:on   •  Uses  the  Couchbase  Mobile

     Solu=on  for  the   organiza=on  of  teaching  materials,  that   reference  Postgres  for  textual  content,  and   Hadoop  for  binary  data   •  Teachers  can  build  material  based  on   district  standards  via  a  mobile  or  web  client     •  Content  is  distributed  in-­‐classroom  to  each   student  for  real-­‐=me  feedback  to  guide  the   lesson   •  Alterna=vely,  content  can  be  distributed  for   offline  studying,  or  homework;  progress   made  on  this  offline  content  is  synced  back   to  Couchbase  Server  for  teacher  evalua=on   once  online  connec=vity  is  available  
  20. The  Power  of  Mobile  -­‐  Learning   Then    

       Now   Classrooms,  Whiteboards,     One-­‐Size-­‐Fits-­‐All  Learning   Mul:-­‐Media,  Self-­‐Paced,  Adap:ve,   Interac:ve,  Anywhere  Any:me  
  21. The  Power  of  Mobile  -­‐  Point  of  Sale   Then

           Now   Big  +  odd  looking  machines,   receipt  printers,  cash  drawers   Simple,  elegant  tablet  +  square  reader,     email  receipts,  touch  signing    
  22. The  Power  of  Mobile  -­‐  Expenses   Then    

       Now   Paper  receipts,  manual  spreadsheet   entry,  paper  signature  rou:ng     Email/photo  receipt,     e-­‐rou:ng,  e-­‐signature