Webinar: Couchbase for Mobile - Introduction to Couchbase Lite


Published on

Couchbase Lite is the first and only NoSQL database for mobile devices. It's available for both iOS and Android and it allows for rapid development using native JSON data. Couchbase Lite is part of the mobile strategy of Couchbase called "JSON Anywhere", which includes two additional products: Couchbase Sync Gateway and Couchbase Cloud.

In this webinar you will see:

An overview of the new mobile strategy of Couchbase ("JSON Anywhere")
The main features of Couchbase Lite
How can you easily sync your data to the cloud using Couchbase Sync Gateway
An example of a mobile app built using Couchbase Lite

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • {"6":"Use sentence from press release\nNeed an example list.\n** *** Do [ Sync Gateway] and [Server] [Lite] MUST USE COLORS\nPull out Android and Apple\nCouchbase outside as well\nCouchbase logo on server and devices – not hidden on server\nCouchbase server say this in the cloud\nThe bullets need fixing.\n","12":"1. I tried to make the graphic bigger. Maybe he can do better with this graphic than I did.\n","41":"don’t talk about event handlers\n","36":"other features we aren’t going to look at the code for, but could in a a more detailed talk:\nlogin\nsync setup\nadmin api\n","37":"bring up demo now\n","10":"1. I tried to make the graphic bigger. Maybe he can do better with this graphic than I did.\n"}
  • Webinar: Couchbase for Mobile - Introduction to Couchbase Lite

    1. 1. Couchbase for Mobile essica Liu – Product Manager . Chris Anderson – Mobile Architect
    2. 2. Couchbase Lite The only Native NoSQL Database for Mobile
    3. 3. Mobile – The Next Generation Platform 1980 Mainframe Green Terminal Millions of users Thousands of Apps 1990 2000 PC Client/Server LAN/Internet Hundreds of Millions of users Tens of Thousands of Apps 2010 2020+ Cloud Mobile Devices & Apps Trillions of Things Billions of users Millions of Apps
    4. 4. Mobile – The Next Generation of Apps Multi-User Interactions - Group and Social (Facebook, Games, Video) Single User Interaction - Voice, Text - Personal Apps Couchbase Server Local Sensor Applications e.g., Medical Interacting with Enterprises
    5. 5. JSON Anywhere Couchbase Server JS N Sy n c G a t e w a y Lit e Se r v e r JS N JS N • JSON on the device ­ Developers increasingly prefer NoSQL database • JSON on the wire • JSON in the cloud ­ ­ Flexible data model ­ High performance ­ Easy scalability No need for data transformation
    6. 6. The Complete Mobile Solution
    7. 7. Architecture On Premise In the cloud Couchbase Server Server 1 Sync Gateway Channel Channel Server 2 Server 3 Sync Gateway Channel Channel Couchbase Lite for iOS and Android
    8. 8. Before Couchbase Lite… ocally, could use SQLite or Core Data ­ ­ This works well for apps using relational algebra, and/or not dataintensive However this does not suit the needs for mobile developers interested in an intuitive and flexible data store or sync and storage, could use a file-sharing service like Dropbox or iCloud ­ Not an actual database; ownership, insight, and analytics unavailable r alternatively, could use MBaaS like Parse or Kinvey ­ But, it missed out on the offline experience, and we are still very much in an occasionally connected world; to write a good app, you need to
    9. 9. Couchbase Lite The only NoSQL Database for Mobile Devices Couchbase Lite iOS Couchbase Lite Android Lit e eatures ­ Ultra-lightweight, secure JSON database ­ Native support for iOS, Android and REST/HTML5 ­ Full document, index and querying and sync capabilities ­ Powerful conflict resolution
    10. 10. Couchbase Lite Full Feature List Features Native APIs REST APIs JSON support Easy sync with Couchbase Sync Gateway Peer to peer support via REST APIs Data routing via channels Changes Feed Indexing and querying for JSON Authentication plug-ins Attachment support on device and in the cloud Benefits Manage your mobile database using APIs optimized specifically for iOS and Android REST APIs provide an alternative access method based on your development needs Use a flexible data model designed for mobile object-oriented apps. Adapt to your application needs with immediacy and little impact Get sync-ready in less than a few lines of code. Focus on application development, not syncing Communicate with nearby devices, even offline, with our REST API-enabled P2P support Get users only the data they need for a focused, relevant app experience Provides developers visibility and notification into data changes Use powerful secondary indexes to query your data on the device Use popular existing third-party authentication services like Facebook and Mozilla Person instead of writing your own Manage binary data, like photos and large files, separately from your JSON documents for optional, speedier sync
    11. 11. What you get Couchbase Lite iOS Couchbase Lite Android Lit e ­ Enable new class of rich data intensive local applications ­ Rapid development using native JSON data ­ Highly responsive interactive applications ­ Always available - online or offline
    12. 12. What you get JSON JSON JSO JSON N JSON JSON Anywhere •Flexible JSON on device lets you work with local data & modify your data structure on the fly without impacting 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, replication or collaborative sharing. •In addition, scale your data tier horizontally and reliably as your data and sync needs grow.
    13. 13. Integrations 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 https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin http://plugins.cordova.io/#/com.couchbase.lite.phonegap
    14. 14. Integrations Couchbase Lite for Xamarin • • • Partnered to support C# community Available on Developer Center Includes sample application to help developers get started today http://components.xamarin.com/view/couchbase-lite/
    15. 15. Integrations Couchbase Lite Titanium • • Build rich native apps for iOS & Android using JavaScript SDK Now available on the Appcelerator Marketplace https://github.com/couchbaselabs/couchbase-lite-titanium/ https://marketplace.appcelerator.com/apps/6706?1396013098
    16. 16. Couchbase Sync Gateway Easy, Reliable Data Sync to the Cloud eatures • Dynamic sync capabilities via Sync Function APIs • Easy Administration • Seamless scaleout Sy n c G a t e w a y enefits ­ 10x reduction in development time ­ Scales to support millions of users
    17. 17. How does sync work?
    18. 18. Collaborate using Channels or each document, you specify a set of channels it belongs to or each user or device, you control which channels they can access eplicate only a subset of documents down to the device ­ ­ User-defined filter functions Simply lets you know whether a document should be replicated
    19. 19. Channel A Doc 1 Channel A Doc 2 Channel B Doc 2 Doc 1 Doc 2 Channel A & B Channel B
    20. 20. Data Data D ta Daata Data Routing
    21. 21. Data Routing Data Data D ta Daata t Daaaa D t
    22. 22. Data Routing Data Data Data Data Data Data Da Da ta ta
    23. 23. Data Routing D t ta Daaa ta ta aa DD D D t aaaa t Data Data t aaaa D t D
    24. 24. ta ta aa DD Data Data D t Daaaa t Data Data D Daat taa Data Routing Daaa D t ta
    25. 25. ta ta Da Da D t Daaaa t Data Data Data Data D Daat taa Data Routing Da Da ta ta
    26. 26. The Power of Mobile - Learning Then Classrooms, Whiteboards, One-Size-Fits-All Learning Now Multi-Media, Self-Paced, Adaptive, Interactive, Anywhere Anytime
    27. 27. 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
    28. 28. The Power of Mobile - Expenses Then Paper receipts, manual spreadsheet entry, paper signature routing Now Email/photo receipt, e-routing, e-signature
    29. 29. Zero to sync in 5 minutes !!! How do I get started?
    30. 30. A little deep dive • Get familiar with Couchbase Lite through looking at an application • Introduce the app with a demo ­ ­ ­ ­ create a list / live query my lists create some tasks / live query tasks sign in to the cloud collaborate via the cloud • Show the code for the features as we use them
    31. 31. Application Runtime (OS Process) Native Application Logic Sync Couchbase Lite Storage
    32. 32. Couchbase Lite Components Application API Sync Engine Query Engine Map/Reduce View Indexer Key-Value JSON Storage
    33. 33. Application Runtime (OS Process) Native Application Logic Sync Couchbase Lite Storage
    34. 34. PhoneGap Plugin Web Runtime PhoneGap Plugins Camera, etc JavaScript Application Logic getURL(function(err, url){ console.log(url) }) XHR Ajax REST Connector Couchbase Lite Storage Sync
    35. 35. Demo Features Collaborate via Cloud -social network login JSON / REST interface -CRUD operations use HTTP verbs -Works with libraries like Live Query UI Updates jQuery and Backbone -UI updated to reflect database changes, even for remote changes -HTTP long poll API to support quick redraw -programmable sync function for update validation and channel routing
    36. 36. JSON Document Schema
    37. 37. All Todo Lists endered with HTML and JavaScript iew query to show all the lists on a device. orm submit event creates a document representing a list.
    38. 38. Task List - Items oggle a checkbox dd a photo ive update
    39. 39. Toggle a Task Checkbox by updating the JSON Document Uses a familiar REST paradigm. GET and PUT used here.
    40. 40. Live Update UI Local and remote updates both trigger a database event, used for redraw.
    41. 41. Sign-in to sync and collaborate xample uses Facebook, we support a wide variety of authentication option ick from the list of signed in users when sharing
    42. 42. Photo Attachment
    43. 43. Sync Gateway Components Sync REST API Authentication Channel Change Tracking App’s Sync Function to client Revision/Co nflict Management Couchbase Smart Client to Couchbase Server External Auth Services
    44. 44. Sync Function Your cloud in one page of code. pplication code run in the cloud ccess control hannel routing pdate Validation
    45. 45. Sync Gateway: App Logic & Storage Authentication val ida function(doc, oldDoc) { function(doc, oldDoc) { tio… … n rou requireUser(oldDoc.owner); requireUser(oldDoc.owner); … acc tin… g ess channel(doc.channel); channel(doc.channel); ct…l r… access(doc.members, doc.roomID); access(doc.members, doc.roomID); } } App’s Sync Function Revision/Co nflict Management rev 3a rev 1 rev 2 rev 3b Couchbase Smart Client to Couchbase Server
    46. 46. Get Started mobile.couchbase.com Sample App https://github.com/couchbaselabs/TodoLite-PhoneGap Couchbase Cloud http://www.couchbasecloud.com