an introduction to couchbase mobile
TRANSCRIPT
Couchbase for Mobile
Kadhambari AnbalaganAnish K. Mathew
Software Architect, RedBlackTreeSoftware Architect, RedBlackTree
The Question
Why Couchbase Mobile?
Try again later.
No Internet
please wait…
Today’s Mobile Apps
©2015 Couchbase Inc.
Does this affect what people think about the app?
4
Doesn’t work a lot of the time and when it does it’s slow.
©2015 Couchbase Inc.
How does this affect application uninstall rates?
5
0%
20%
40%
60%
80%
100%U
nin
stal
l Rat
e
Freezing
Crashing
Slow Responsiveness
Source: uSamp
What’s the problem?
The Problem: Remote Data
What’s the solution?
The Solution: Remote & Local Data + Sync
What’s the proof?
DataLocation
NetworkRequirement
Application Availability
ApplicationResponsiveness
EnablingTechnology
RemoteOnly
AlwaysConnected
SometimesAvailable
VariableREST Services
(JSON)
LocalOnly
NeverConnected
AlwaysAvailable
AlwaysFast
SQLite
Local& Remote
Sometimes Connected
AlwaysAvailable
AlwaysFast
Sync
1 2 3 4 5
Effects of Data Location
DataLocation
NetworkRequirement
Application Availability
ApplicationResponsiveness
EnablingTechnology
RemoteOnly
AlwaysConnected
SometimesAvailable
VariableREST Services
(JSON)
LocalOnly
NeverConnected
AlwaysAvailable
AlwaysFast
SQLite
Local& Remote
Sometimes Connected
AlwaysAvailable
AlwaysFast
Sync
1 2 3 4 5
Effects of Data Location
Couchbase Mobile
• The only noSQL database for Mobile devices
• Embedded JSON database
• Works online and offline
• Automated secure sync mechanism
Architecture – Couchbase Mobile
Couchbase Server
Couchbase Server
(Cloud DB)
Cloud noSQL Database
Highly Scalable
High Performance
Always ON
Couchbase Lite
Couchbase Lite
(Embedded Database)
Embedded NoSQL Database
Lightweight – 500Kb
Flexible Data Model
Always Available
CRUD Operations
CRUD Operations
• Get
• Insert
• Update - > Delete, Insert
• Upsert - > Insert/ Update
• Delete
Sync Gateway
Sync Gateway
(Secure Synchronization)
Replication
Authentication
Data Partitioning
Data Read/Write Access Control - Channels
Let’s dive deep…
Replication • Types (Directions)
• Push
• Pull
• Modes
• One-shot
• Continuous
• Observers for replication status changes
Replication Topologies
STAR
TIERED
MESHFull multi-master replication
Continuous or ad-hoc in either direction
Sync Gateway
• Sync Function• Authorization
– requireRole()– requireUser()– requireAccess()
• Channels– access()– channel()
Channels
Sync Gateway
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Data
Demo
Live Use Case
Thank you
Q & A