Upload
couchbase
View
1.851
Download
0
Embed Size (px)
DESCRIPTION
We are in the post-PC era – more mobile computing devices (smartphones, tablets) ship per quarter than PC’s, and have since the fourth quarter of 2010*. Mobile devices are where we gather and consume information with increasing frequency, but the cloud is where that information will be aggregated, analyzed and enriched. NoSQL databases are ideal for the cloud-side data management needs of mobile applications, powering some of the most successful and widely used mobile apps, including the recent hit Draw Something by OMGPOP which reached 50 million downloads in 50 days. In this webinar you will learn about: - The rapidly evolving mobile landscape - Why a NoSQL database may be the best fit for your application - Mobile use cases from real-world deployments To view Couchbase webinars on-demand visit http://www.couchbase.com/webinars
Citation preview
1
Building)Mobile)Applica2ons)With)NoSQL
Chris&AndersonChief)Architect,)Mobile
@jchris
2
Mobile)is)Different
GROWTHSPEED
FLEXIBILITYPUSH
3
GROWTH:RIDING&THE&MOBILE&ROCKET
4
Draw)Something)by)OMGPOP
5
Draw)Something)“goes)viral”)3)weeks)aQer)launch)
191715131197533/12826242220181614121082/6
Draw&Something&by&OMGPOPDaily&Ac)ve&Users&(millions)
21
2
4
6
8
10
12
14
16
6
As)usage)grew,)game)data)went)nonXlinear.
191715131197533/12826242220181614121082/6
Draw&Something&by&OMGPOPDaily&Ac)ve&Users&(millions)
21
2
4
6
8
10
12
14
16
By)March)19,)there)were)over)30,000,000&downloads)of)the)app,
over)5,000&drawings)being)stored)per&second,over)2,200,000,000&drawings)stored,
over)105,000)database)transacQons&per&second,and)over)3.3&terabytes)of)data)stored.
7
In)contrast.
191715131197533/12826242220181614121082/6
The&Simpson’s:&Tapped&OutDaily&Ac)ve&Users&(millions)
21
2
4
6
8
10
12
14
16
#2&Free)app)on)iPad#3&Free)app)on)iPhone
8
SPEED:YOUR&USERS&WILL&THANK&YOU
Users)Don’t)Want)to)Wait
9
Users)Don’t)Want)to)Wait
9
Slow)performance)==)lost)users
10
h_p://blog.kissmetrics.com/loadingX2me/
Your)secret)weapon:)SubXmillisecond)latency
11
12
Reliably)fast,)even)under)stress
13
Cross)Data)Center)Replica2on
! Data)close)to)users
!Mul2ple)loca2ons)for)disaster)recovery
! Independently)managed)clusters)serving)local)data
US)DATA)
CENTER
EUROPE)DATA)
CENTER
ASIA)DATA)CENTER
ReplicaQon ReplicaQon
ReplicaQon
14
FLEXIBILITY:YOU&CAN’T&CONTROL&EVERYTHING
JSON)is)more)relaxed
15
Old)and)new)data)structures)can)coexist)in)the)same)database
so)you)don’t)have)to)force)your)users)to)upgrade
JSON)is)going)na2ve)(in)Objec2veXC)
16
You)are)not)alone
17
Normalize)mixed)data)structures)at)query)2me
18
Easily)ingest)data)from)JSON)APIs
19
20
PUSH:KEEP&YOUR&USERS&ENGAGED
Real2me)ma_ers
21
With)Couchbase,)your)database)can)push
22
23
CAN&YOUR&DATABASE&DO&THIS?
24
)Couchbase)automa2cally)distributes)data)across)commodity)servers.)BuiltXin)caching)enables)
apps)to)read)and)write)data)with)subXmillisecond)latency.)And)with)no)schema)to)manage,)
Couchbase)effortlessly)accommodates)changing)data)management)requirements.)
Couchbase)Server)))))))))))))))))))))))))(a.k.a.)Membase)
Simple.)Fast.)Elas2c.)NoSQL.)
25
Traditional Database
Application Scales OutJust add more commodity web servers
Database Scales UpGet a bigger, more complex server
Expensive & disruptive sharding, doesn’t perform at web scale
26
NoSQL)Scalability
Application Scales OutJust add more commodity web servers
Database Scales OutJust add more commodity data servers
Scaling out flattens the cost and performance curves
•)Horizontally)scalable)with)autoXsharding•)High)performance)at)web)scale
•)SchemaXless)for)flexibility
27
Couchbase)Server)Features
• BuiltXin)clustering)–)All)nodes)equal
• Data)replica2on)with)autoXfailover
• ZeroXXdown2me)maintenance)
• Clone)to)grow)and)scale)horizontally
28
Couchbase)Server)Basic)Opera2on
COUCHBASE)CLIENT)LIBRARY
! Docs)distributed)evenly)across)servers)in)the)cluster
! Each)server)stores)both)ac)ve)&)replica)docs! Only)one)server)ac2ve)at)a)2me
! Client)library)provides)app)with)simple)interface)to)database
! Cluster)map)provides)map)to)
which)server)doc)is)on! App)never)needs)to)know
! App)reads,)writes,)updates)docs
! Mul2ple)App)Servers)can)access)
same)document)at)same)2meDoc)2
Doc)5
SERVER&1
Doc)4
SERVER&2
Doc)1
SERVER&3
COUCHBASE)CLIENT)LIBRARY
Doc)9
Doc)7
Doc)8 Doc)6
Doc)3
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
CLUSTER)MAP CLUSTER)MAP
APP&SERVER&1 APP&SERVER&2
COUCHBASE&SERVER&CLUSTER
28
Couchbase)Server)Basic)Opera2on
COUCHBASE)CLIENT)LIBRARY
! Docs)distributed)evenly)across)servers)in)the)cluster
! Each)server)stores)both)ac)ve)&)replica)docs! Only)one)server)ac2ve)at)a)2me
! Client)library)provides)app)with)simple)interface)to)database
! Cluster)map)provides)map)to)
which)server)doc)is)on! App)never)needs)to)know
! App)reads,)writes,)updates)docs
! Mul2ple)App)Servers)can)access)
same)document)at)same)2me
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
COUCHBASE)CLIENT)LIBRARY
Doc)9
Doc)7
Doc)8 Doc)6
Doc)3
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
Doc)9
Doc)5
DOC
DOC
DOC
Doc)1
Doc)8 Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
CLUSTER)MAP CLUSTER)MAP
APP&SERVER&1 APP&SERVER&2
COUCHBASE&SERVER&CLUSTER
28
Couchbase)Server)Basic)Opera2on
COUCHBASE)CLIENT)LIBRARY
! Docs)distributed)evenly)across)servers)in)the)cluster
! Each)server)stores)both)ac)ve)&)replica)docs! Only)one)server)ac2ve)at)a)2me
! Client)library)provides)app)with)simple)interface)to)database
! Cluster)map)provides)map)to)
which)server)doc)is)on! App)never)needs)to)know
! App)reads,)writes,)updates)docs
! Mul2ple)App)Servers)can)access)
same)document)at)same)2me
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Read/Write/Update
COUCHBASE)CLIENT)LIBRARY
Read/Write/Update
Doc)9
Doc)7
Doc)8 Doc)6
Doc)3
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
Doc)9
Doc)5
DOC
DOC
DOC
Doc)1
Doc)8 Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
CLUSTER)MAP CLUSTER)MAP
APP&SERVER&1 APP&SERVER&2
COUCHBASE&SERVER&CLUSTER
29
Add)Nodes
Doc)7
Doc)9
Doc)3
Ac2ve)Docs
Replica)Docs
Doc)6
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
APP&SERVER&1
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
APP&SERVER&2
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Doc)9
Doc)7
Doc)8 Doc)6
Doc)3
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
Doc)9
Doc)5
DOC
DOC
DOC
Doc)1
Doc)8 Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
COUCHBASE&SERVER&CLUSTER
29
Add)Nodes
Doc)7
Doc)9
Doc)3
Ac2ve)Docs
Replica)Docs
Doc)6
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
APP&SERVER&1
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
APP&SERVER&2
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Doc)9
Doc)7
Doc)8 Doc)6
Doc)3
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
DOC
Doc)9
Doc)5
DOC
DOC
DOC
Doc)1
Doc)8 Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
SERVER&4 SERVER&5
Ac2ve)Docs Ac2ve)Docs
Replica)Docs Replica)Docs
COUCHBASE&SERVER&CLUSTER
29
Add)Nodes
! Two)servers)added)to)
cluster
! OneXclick)opera2on
! Docs)automa2cally)
rebalanced)across)cluster! Even)distribu2on)of)docs! Minimum)doc)movement
! Cluster)map)updated
! App)database)calls)now)
distributed)over)larger)#)of)
servers
Doc)7
Doc)9
Doc)3
Ac2ve)Docs
Replica)Docs
Doc)6
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
APP&SERVER&1
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
APP&SERVER&2
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Doc)9
Doc)7 Doc)8
Doc)6
Doc)3
DOC
DOC
DOCDOC
DOC DOC
DOC
DOC
DOC
DOC
DOC DOC
DOC
DOC
DOC
Doc)9
Doc)5DOC
DOC
DOC
Doc)1
Doc)8
Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
SERVER&4 SERVER&5
Ac2ve)Docs Ac2ve)Docs
Replica)Docs Replica)Docs
COUCHBASE&SERVER&CLUSTER
29
Add)Nodes
! Two)servers)added)to)
cluster
! OneXclick)opera2on
! Docs)automa2cally)
rebalanced)across)cluster! Even)distribu2on)of)docs! Minimum)doc)movement
! Cluster)map)updated
! App)database)calls)now)
distributed)over)larger)#)of)
servers
Read/Write/Update Read/Write/Update
Doc)7
Doc)9
Doc)3
Ac2ve)Docs
Replica)Docs
Doc)6
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
APP&SERVER&1
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
APP&SERVER&2
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Doc)9
Doc)7 Doc)8
Doc)6
Doc)3
DOC
DOC
DOCDOC
DOC DOC
DOC
DOC
DOC
DOC
DOC DOC
DOC
DOC
DOC
Doc)9
Doc)5DOC
DOC
DOC
Doc)1
Doc)8
Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
SERVER&4 SERVER&5
Ac2ve)Docs Ac2ve)Docs
Replica)Docs Replica)Docs
COUCHBASE&SERVER&CLUSTER
30
Fail)Over)Node
Doc)7
Doc)9
Doc)3
Ac2ve)Docs
Replica)Docs
Doc)6
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Doc)9
Doc)7 Doc)8
Doc)6
Doc)3
DOC
DOC
DOCDOC
DOC
DOC
DOC
DOC
DOC DOC
DOC
DOC
DOC
Doc)9
Doc)5DOC
DOC
DOC
Doc)1
Doc)8
Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
SERVER&4 SERVER&5
Ac2ve)Docs Ac2ve)Docs
Replica)Docs Replica)Docs
COUCHBASE&SERVER&CLUSTER
DOC
DOC
! App)servers)happily)accessing)docs)on)Server)3
! Server)fails
! App)server)requests)to)server)3)fail
! Cluster)detects)server)has)failed
! Promotes)replicas)of)docs)to)ac)ve! Updates&cluster&map
! App)server)requests)for)docs)now)go)to)appropriate)server
! Typically)rebalance)would)follow
30
Fail)Over)Node
Doc)7
Doc)9
Doc)3
Ac2ve)Docs
Replica)Docs
Doc)6
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Doc)9
Doc)7 Doc)8
Doc)6
Doc)3
DOC
DOC
DOCDOC
DOC
DOC
DOC
DOC
DOC DOC
DOC
DOC
DOC
Doc)9
Doc)5DOC
DOC
DOC
Doc)1
Doc)8
Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
SERVER&4 SERVER&5
Ac2ve)Docs Ac2ve)Docs
Replica)Docs Replica)Docs
COUCHBASE&SERVER&CLUSTER
DOC
DOC
! App)servers)happily)accessing)docs)on)Server)3
! Server)fails
! App)server)requests)to)server)3)fail
! Cluster)detects)server)has)failed
! Promotes)replicas)of)docs)to)ac)ve! Updates&cluster&map
! App)server)requests)for)docs)now)go)to)appropriate)server
! Typically)rebalance)would)follow
30
Fail)Over)Node
Doc)7
Doc)9
Doc)3
Ac2ve)Docs
Replica)Docs
Doc)6
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Doc)9
Doc)7 Doc)8
Doc)6
Doc)3
DOC
DOC
DOCDOC
DOC
DOC
DOC
DOC
DOC DOC
DOC
DOC
DOC
Doc)9
Doc)5DOC
DOC
DOC
Doc)1
Doc)8
Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
SERVER&4 SERVER&5
Ac2ve)Docs Ac2ve)Docs
Replica)Docs Replica)Docs
COUCHBASE&SERVER&CLUSTER
DOC
DOC
! App)servers)happily)accessing)docs)on)Server)3
! Server)fails
! App)server)requests)to)server)3)fail
! Cluster)detects)server)has)failed
! Promotes)replicas)of)docs)to)ac)ve! Updates&cluster&map
! App)server)requests)for)docs)now)go)to)appropriate)server
! Typically)rebalance)would)follow
30
Fail)Over)Node
Doc)7
Doc)9
Doc)3
Ac2ve)Docs
Replica)Docs
Doc)6
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
COUCHBASE)CLIENT)LIBRARYCLUSTER)MAP
Doc)4
Doc)2
Doc)5
SERVER&1
Doc)6
Doc)4
SERVER&2
Doc)7
Doc)1
SERVER&3
Doc)3
Doc)9
Doc)7 Doc)8
Doc)6
Doc)3
DOC
DOC
DOCDOC
DOC
DOC
DOC
DOC
DOC DOC
DOC
DOC
DOC
Doc)9
Doc)5DOC
DOC
DOC
Doc)1
Doc)8
Doc)2
Replica)Docs Replica)Docs Replica)Docs
Ac2ve)Docs Ac2ve)Docs Ac2ve)Docs
SERVER&4 SERVER&5
Ac2ve)Docs Ac2ve)Docs
Replica)Docs Replica)Docs
COUCHBASE&SERVER&CLUSTER
DOC
DOC
! App)servers)happily)accessing)docs)on)Server)3
! Server)fails
! App)server)requests)to)server)3)fail
! Cluster)detects)server)has)failed
! Promotes)replicas)of)docs)to)ac)ve! Updates&cluster&map
! App)server)requests)for)docs)now)go)to)appropriate)server
! Typically)rebalance)would)follow
31
Couchbase)Server)Features
• Memcached)compa2ble)(builtXin)caching)
• Monitoring)and)administra2on)APIs)and)
GUI)
• Reliable)storage)architecture)
32
REAL&WORLD&MOBILE&USAGE
33
Concur
NTT)Docomo
34
35
Trusted)for)mission)cri2cal)deployments
36
THE&FUTURE
Mobile)Syncpoint)X)Your)Data)Anywhere
37
LocalSyncpoint
Lightweight&Syncpoint&Clients
SyncpointCluster
h_ps://groups.google.com/forum/#!forum/mobileXcouchbase
Point of Sale
• Massively multi-player interactive data
• Realtime sharing between front and back of house
• Shopping cart functionality
• Integrate with external transaction APIs
• Birds eye view for management
39
DOWNLOAD&COUCHBASE&SERVERHTTP://WWW.COUCHBASE.COM