an introduction to couchbase mobile

25
Couchbase for Mobile Kadhambari Anbalagan Anish K. Mathew Software Architect, RedBlackTree Software Architect, RedBlackTree

Upload: redblacktree

Post on 14-Apr-2017

895 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: An Introduction to Couchbase Mobile

Couchbase for Mobile

Kadhambari AnbalaganAnish K. Mathew

Software Architect, RedBlackTreeSoftware Architect, RedBlackTree

Page 2: An Introduction to Couchbase Mobile

The Question

Why Couchbase Mobile?

Page 3: An Introduction to Couchbase Mobile

Try again later.

No Internet

please wait…

Today’s Mobile Apps

Page 4: An Introduction to Couchbase Mobile

©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.

Page 5: An Introduction to Couchbase Mobile

©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

Page 6: An Introduction to Couchbase Mobile

What’s the problem?

Page 7: An Introduction to Couchbase Mobile

The Problem: Remote Data

Page 8: An Introduction to Couchbase Mobile

What’s the solution?

Page 9: An Introduction to Couchbase Mobile

The Solution: Remote & Local Data + Sync

Page 10: An Introduction to Couchbase Mobile

What’s the proof?

Page 11: An Introduction to Couchbase Mobile

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

Page 12: An Introduction to Couchbase Mobile

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

Page 13: An Introduction to Couchbase Mobile

Couchbase Mobile

• The only noSQL database for Mobile devices

• Embedded JSON database

• Works online and offline

• Automated secure sync mechanism

Page 14: An Introduction to Couchbase Mobile

Architecture – Couchbase Mobile

Page 15: An Introduction to Couchbase Mobile

Couchbase Server

Couchbase Server

(Cloud DB)

Cloud noSQL Database

Highly Scalable

High Performance

Always ON

Page 16: An Introduction to Couchbase Mobile

Couchbase Lite

Couchbase Lite

(Embedded Database)

Embedded NoSQL Database

Lightweight – 500Kb

Flexible Data Model

Always Available

CRUD Operations

Page 17: An Introduction to Couchbase Mobile

CRUD Operations

• Get

• Insert

• Update - > Delete, Insert

• Upsert - > Insert/ Update

• Delete

Page 18: An Introduction to Couchbase Mobile

Sync Gateway

Sync Gateway

(Secure Synchronization)

Replication

Authentication

Data Partitioning

Data Read/Write Access Control - Channels

Page 19: An Introduction to Couchbase Mobile

Let’s dive deep…

Page 20: An Introduction to Couchbase Mobile

Replication • Types (Directions)

• Push

• Pull

• Modes

• One-shot

• Continuous

• Observers for replication status changes

Page 21: An Introduction to Couchbase Mobile

Replication Topologies

STAR

TIERED

MESHFull multi-master replication

Continuous or ad-hoc in either direction

Page 22: An Introduction to Couchbase Mobile

Sync Gateway

• Sync Function• Authorization

– requireRole()– requireUser()– requireAccess()

• Channels– access()– channel()

Page 23: An Introduction to Couchbase Mobile

Channels

Sync Gateway

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Page 24: An Introduction to Couchbase Mobile

Demo

Live Use Case

Page 25: An Introduction to Couchbase Mobile

Thank you

Q & A