Published on

Published in: Technology
1 Like
  • Be the first to comment

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

No notes for slide
  • Use sentence from press release
    Need an example list.
    ** *** Do [ Sync Gateway] and [Server] [Lite] MUST USE COLORS
    Pull out Android and Apple
    Couchbase outside as well
    Couchbase logo on server and devices – not hidden on server
    Couchbase server say this in the cloud
    The bullets need fixing.
  • 1. I tried to make the graphic bigger. Maybe he can do better with this graphic than I did.
  • 1. I tried to make the graphic bigger. Maybe he can do better with this graphic than I did.
  • bring up demo now
  • Shows a view of all list objects and allows for creation of a new document that represents a list object
  • Shows a live query of tasks related to the list object, in reverse chronological order (newest is at top)
  • In DetailViewController.m UI correlation to a document that represents a task, looks at tasks’s checked property to determine UI look and sets that look for both color and a check mark accessory
  • In List.m, we define how a list should query for task documents related to that list. Task document are queried in descending order with the newest created documents set as the first result, and this query is then used by the DetailViewController.m to display a List’s Tasks.
  • We’ve talked about Couchbase Lite and lightly touched on how it could be used in code. I’d like to quickly go over Sync Gateway. This is an architecture diagram of the gateway, you can see it has REST APIs, requires authentication before promoting document changes up to Couchbase Server or to other clients, and then one authentication is verified, is processed by the Sync Function, which we will go over in a little bit. Document changes are accepted, and revisions incremented before then being stored in Couchbase Server. Those changes are also notified down to appropriate channels based on the Sync Function.
  • In our example, we used Facebook authentication, and derived a list of users based off of a query of authenticated users. You can see how a user document is created Profile.m, and how this is then utilized for display in the ShareViewController.m
  • This is the Sync Function code, as you can see it’s a single page of Javascript code where you can determine who has access to what documents based on perhaps role, or user id, etc. Here we determine it by user id.
  • This is a visual demonstration of that earlier architecture diagram in relation to the app. The Sync Function you can now see and the addition and management of conflict.
  • Intro_to_Couchbase_lite_tokyo_14

    1. 1. Couchbase for Mobile essica Liu – Product Manager
    2. 2. 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
    3. 3. 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
    4. 4. The Complete Mobile Solution
    5. 5. 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
    6. 6. Couchbase Lite The only Native NoSQL Database for Mobile
    7. 7. Couchbase Lite The only NoSQL Database for Mobile Devices Couchbase Lite iOS Couchbase Lite Android • Features ­ Ultra-lightweight, secure JSON database ­ 非常に軽量で安全な JSON 形式のデータベー ス Native support for iOS, Android and REST/HTML5 iOS 、 Android をネイティブサポート ­ Full document, index and querying and sync capabilities Lit e ­ ドキュメント作成、インデックス、クエリ、シンク が可能 Powerful conflict resolution コンフリクト発生時の対応
    8. 8. 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 Persona instead of writing your own Manage binary data, like photos and large files, separately from your JSON documents for optional, speedier sync
    9. 9. What you get Couchbase Lite iOS Couchbase Lite Android ­ Enable new class of rich data intensive local applications これまでにはないデータのクラスをローカル アプリケーションに提供 ­ Rapid development using native JSON data JSON でスピーディな開発が可能 ­ Highly responsive interactive applications 高速な対話型のアプリケーション Lit e ­ Always available - online or offline オンライン、オフライン問わず、 常にデータにアクセス可能
    10. 10. Couchbase Sync Gateway Easy, Reliable Data Sync to the Cloud eatures • Dynamic sync capabilities via Sync Function API で動的なデータのシンクが可能 Sync Function APIs • 分かりやすい管理ツール Easy Administration • 手間のかからないスムーズなスケールアウト Seamless scaleout Sy n c G a t e w a y enefits 開発時間が従来の 10 分の1に短縮 ­ 10x reduction in development time ビッグユーザをサポート ­ Scales to support millions of users
    11. 11. How does sync work?
    12. 12. 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 ユーザ認証機能 filter functions ­ User-defined ­ Simply lets you know whether a document should be replicated
    13. 13. Channel A Doc 1 Channel A Doc 2 Channel B Doc 2 Doc 1 Doc 2 Channel A & B Channel B
    14. 14. Data Data D ta Daata Sync Gateway
    15. 15. Sync Function Sync Gateway vali function(doc, oldDoc) { dat function(doc, oldDoc) { io… … n rou requireUser(oldDoc.owner); requireUser(oldDoc.owner); … acc tin… g ess channel(; channel(; ct…l r… access(doc.members, doc.roomID); t Daaaa D t Data Data D ta Daata access(doc.members, doc.roomID); } }
    16. 16. Sync Gateway Data Data Data Data Data Data Da Da ta ta
    17. 17. Sync Gateway D t ta Daaa ta ta aa DD D D t aaaa t Data Data t aaaa D t D
    18. 18. ta ta aa DD Data Data D t Daaaa t Data Data D Daat taa Sync Gateway Daaa D t ta
    19. 19. ta ta Da Da D t Daaaa t Data Data Data Data D Daat taa Sync Gateway Da Da ta ta
    20. 20. 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 柔軟な JSON データをモバイルに持たせること 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 ケーション、 etc ) horizontally and reliably as your data and sync needs grow. データ量やシンクの増加に伴い、データベースを 水平方向に拡張することができる
    21. 21. Live Demo & Quick Look
    22. 22. Getting Up And Running • Download Couchbase Lite • Download ToDo Lite sample code • Copy framework into sample app folder • Build & Run
    23. 23. 1. Download Couchbase Lite
    24. 24. 2. Download ToDo Lite for iOS
    25. 25. 3. Plug In The Framework option option
    26. 26. Live Demo
    27. 27. Quick Look
    28. 28. Application Runtime (OS Process) Native Application Logic Sync Couchbase Lite Storage
    29. 29. Couchbase Lite Components Application API Sync Engine Query Engine Map/Reduce View Indexer Key-Value JSON Storage
    30. 30. JSON document schema for ToDo Lite
    31. 31. All Todo Lists view is created to show all the lists on a クエリを表示して、端末上 device のリストを表示させる orm submit event ドキュメントの作成 creates a document representing a list
    32. 32. Task List - Items oggle a checkbox チェックを入れ る 自動アップデー ト ive update
    33. 33. Toggle a Task Checkbox by updating the JSON Document
    34. 34. Live Query Update
    35. 35. 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
    36. 36. Sign-in to sync and collaborate xample uses Facebook, we support a wide variety of Facebook の例: authentication option 認証オプションの機能をサポート 情報を共有する場合は、サインイン ick from the list of signed in しているユーザを選択 users when sharing
    37. 37. Sync Function Your cloud in one page of code. pplication code run in クラウド上で実行される the cloud アプリケーションコード アクセス制御 ccess control チャネル経路の指定 更新データのチェック hannel routing pdate Validation
    38. 38. 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(; 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
    39. 39. How do I get started?
    40. 40. Get Started Sample App Couchbase Cloud
    41. 41. Additional Resources Webinar Series: ­ Developing with Couchbase Lite iOS ­ Developing with Couchbase Lite Android ­ Couchbase Lite Under the Hood Community Forum!forum/mobile-couchbase
    42. 42. 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
    43. 43. Integrations Couchbase Lite for Xamarin • • • Partnered to support C# community Available on Developer Center Includes sample application to help developers get started today
    44. 44. Integrations Couchbase Lite Titanium • • Build rich native apps for iOS & Android using JavaScript SDK Now available on the Appcelerator Marketplace
    45. 45. Q&A