webinar - developing mobile apps with nosql

49
1 Building Mobile Applica2ons With NoSQL Chris Anderson Chief Architect, Mobile @jchris

Upload: couchbase

Post on 21-Jun-2015

1.851 views

Category:

Technology


0 download

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

TRANSCRIPT

Page 1: Webinar - Developing Mobile Apps With NoSQL

1

Building)Mobile)Applica2ons)With)NoSQL

Chris&AndersonChief)Architect,)Mobile

@jchris

Page 2: Webinar - Developing Mobile Apps With NoSQL

2

Mobile)is)Different

GROWTHSPEED

FLEXIBILITYPUSH

Page 3: Webinar - Developing Mobile Apps With NoSQL

3

GROWTH:RIDING&THE&MOBILE&ROCKET

Page 4: Webinar - Developing Mobile Apps With NoSQL

4

Draw)Something)by)OMGPOP

Page 5: Webinar - Developing Mobile Apps With NoSQL

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

Page 6: Webinar - Developing Mobile Apps With NoSQL

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.

Page 7: Webinar - Developing Mobile Apps With NoSQL

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

Page 8: Webinar - Developing Mobile Apps With NoSQL

8

SPEED:YOUR&USERS&WILL&THANK&YOU

Page 9: Webinar - Developing Mobile Apps With NoSQL

Users)Don’t)Want)to)Wait

9

Page 10: Webinar - Developing Mobile Apps With NoSQL

Users)Don’t)Want)to)Wait

9

Page 11: Webinar - Developing Mobile Apps With NoSQL

Slow)performance)==)lost)users

10

h_p://blog.kissmetrics.com/loadingX2me/

Page 12: Webinar - Developing Mobile Apps With NoSQL

Your)secret)weapon:)SubXmillisecond)latency

11

Page 13: Webinar - Developing Mobile Apps With NoSQL

12

Reliably)fast,)even)under)stress

Page 14: Webinar - Developing Mobile Apps With NoSQL

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

Page 15: Webinar - Developing Mobile Apps With NoSQL

14

FLEXIBILITY:YOU&CAN’T&CONTROL&EVERYTHING

Page 16: Webinar - Developing Mobile Apps With NoSQL

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

Page 17: Webinar - Developing Mobile Apps With NoSQL

JSON)is)going)na2ve)(in)Objec2veXC)

16

Page 18: Webinar - Developing Mobile Apps With NoSQL

You)are)not)alone

17

Page 19: Webinar - Developing Mobile Apps With NoSQL

Normalize)mixed)data)structures)at)query)2me

18

Page 20: Webinar - Developing Mobile Apps With NoSQL

Easily)ingest)data)from)JSON)APIs

19

Page 21: Webinar - Developing Mobile Apps With NoSQL

20

PUSH:KEEP&YOUR&USERS&ENGAGED

Page 22: Webinar - Developing Mobile Apps With NoSQL

Real2me)ma_ers

21

Page 23: Webinar - Developing Mobile Apps With NoSQL

With)Couchbase,)your)database)can)push

22

Page 24: Webinar - Developing Mobile Apps With NoSQL

23

CAN&YOUR&DATABASE&DO&THIS?

Page 25: Webinar - Developing Mobile Apps With NoSQL

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

Page 26: Webinar - Developing Mobile Apps With 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

Page 27: Webinar - Developing Mobile Apps With NoSQL

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

Page 28: Webinar - Developing Mobile Apps With NoSQL

27

Couchbase)Server)Features

• BuiltXin)clustering)–)All)nodes)equal

• Data)replica2on)with)autoXfailover

• ZeroXXdown2me)maintenance)

• Clone)to)grow)and)scale)horizontally

Page 29: Webinar - Developing Mobile Apps With NoSQL

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

Page 30: Webinar - Developing Mobile Apps With NoSQL

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

Page 31: Webinar - Developing Mobile Apps With NoSQL

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

Page 32: Webinar - Developing Mobile Apps With NoSQL

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

Page 33: Webinar - Developing Mobile Apps With NoSQL

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

Page 34: Webinar - Developing Mobile Apps With NoSQL

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

Page 35: Webinar - Developing Mobile Apps With NoSQL

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

Page 36: Webinar - Developing Mobile Apps With NoSQL

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

Page 37: Webinar - Developing Mobile Apps With NoSQL

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

Page 38: Webinar - Developing Mobile Apps With NoSQL

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

Page 39: Webinar - Developing Mobile Apps With NoSQL

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

Page 40: Webinar - Developing Mobile Apps With NoSQL

31

Couchbase)Server)Features

• Memcached)compa2ble)(builtXin)caching)

• Monitoring)and)administra2on)APIs)and)

GUI)

• Reliable)storage)architecture)

Page 41: Webinar - Developing Mobile Apps With NoSQL

32

REAL&WORLD&MOBILE&USAGE

Page 42: Webinar - Developing Mobile Apps With NoSQL

33

Concur

Page 43: Webinar - Developing Mobile Apps With NoSQL

NTT)Docomo

34

Page 44: Webinar - Developing Mobile Apps With NoSQL

35

Trusted)for)mission)cri2cal)deployments

Page 45: Webinar - Developing Mobile Apps With NoSQL

36

THE&FUTURE

Page 46: Webinar - Developing Mobile Apps With NoSQL

Mobile)Syncpoint)X)Your)Data)Anywhere

37

LocalSyncpoint

Lightweight&Syncpoint&Clients

SyncpointCluster

h_ps://groups.google.com/forum/#!forum/mobileXcouchbase

Page 47: Webinar - Developing Mobile Apps With NoSQL

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

Page 48: Webinar - Developing Mobile Apps With NoSQL

39

DOWNLOAD&COUCHBASE&SERVERHTTP://WWW.COUCHBASE.COM