NOSQL GAMES Patrick Huesler wooga GmbH D o you like to play? - - PowerPoint PPT Presentation

nosql games
SMART_READER_LITE
LIVE PREVIEW

NOSQL GAMES Patrick Huesler wooga GmbH D o you like to play? - - PowerPoint PPT Presentation

NOSQL GAMES Patrick Huesler wooga GmbH D o you like to play? technical challenges monthly acti v e use r s 20,543,500 f o r D iamond D ash http:/ /www.appdata.com/apps/facebook/127995567256931-diamond-dash (03/10/2012) daily acti v e use r s


slide-1
SLIDE 1

NOSQL GAMES

Patrick Huesler wooga GmbH
slide-2
SLIDE 2

play?

Do you like to

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5
slide-6
SLIDE 6
slide-7
SLIDE 7
slide-8
SLIDE 8

challenges

technical

slide-9
SLIDE 9

for Diamond Dash

20,543,500

monthly active users

http:/ /www.appdata.com/apps/facebook/127995567256931-diamond-dash (03/10/2012)
slide-10
SLIDE 10

for Diamond Dash

3,871,133

daily active users

http:/ /www.appdata.com/apps/facebook/127995567256931-diamond-dash (03/10/2012)
slide-11
SLIDE 11

for Monster World

6,500 RPS

backend traffic up to

slide-12
SLIDE 12

Database?

what does mean that for a

slide-13
SLIDE 13

write heavy

read/write ratio?

slide-14
SLIDE 14
  • f architecture

EVOLUTION

Wooga’s

slide-15
SLIDE 15 Game backend iOS Flash Facebook Reporting
slide-16
SLIDE 16
slide-17
SLIDE 17

... well, nginx instead of apache

LAMP

Built with

slide-18
SLIDE 18

scale

mysql does

slide-19
SLIDE 19

use cases

for certain

slide-20
SLIDE 20

people

with the right

slide-21
SLIDE 21
slide-22
SLIDE 22

cloud

T

  • the
slide-23
SLIDE 23

instead of PHP

Rails

Let’s use

slide-24
SLIDE 24 load balancer app server app server app server master shard 1 master shard 2 slave shard 2 slave shard 2
slide-25
SLIDE 25

short

story

long

slide-26
SLIDE 26
slide-27
SLIDE 27 load balancer app app app app app app app app db db db db db db db db db db db db db db db db app app app app app app app app app app app app app app app app
slide-28
SLIDE 28

use case

different

slide-29
SLIDE 29

Are NOT

arcade games farming games

slide-30
SLIDE 30

going to work

NOT

Tis is

slide-31
SLIDE 31

at the end of the tunnel

Light

but there is

slide-32
SLIDE 32
slide-33
SLIDE 33

to redis

SLOW PARTS

Move

slide-34
SLIDE 34

rinsE and REPEAT

slide-35
SLIDE 35
slide-36
SLIDE 36
slide-37
SLIDE 37

dedicated

back to

slide-38
SLIDE 38

for the buck

bang

More

slide-39
SLIDE 39

Machines

Faster

slide-40
SLIDE 40

network

faster

slide-41
SLIDE 41

all the way

REdis

Let’s use

slide-42
SLIDE 42 load balancer app server app server app server redis redis slave
slide-43
SLIDE 43

REDIS HASH

slide-44
SLIDE 44

Redis Land

all is well in

slide-45
SLIDE 45
slide-46
SLIDE 46
slide-47
SLIDE 47

Memory Leaks

slide-48
SLIDE 48

work again?

BGSAVE

how does

slide-49
SLIDE 49

working

no longer

dumps are

slide-50
SLIDE 50
slide-51
SLIDE 51

going to work

NOT

Tis is

slide-52
SLIDE 52
slide-53
SLIDE 53

Restore on Demand

Fx it with

slide-54
SLIDE 54

(never really supported)

Disk Store

Redis

slide-55
SLIDE 55
slide-56
SLIDE 56

Stateful

Let’s go

slide-57
SLIDE 57

is faster than no database

database

no

slide-58
SLIDE 58

all the way

S3

Let’s use

slide-59
SLIDE 59

erlang

Let’s use

slide-60
SLIDE 60 http://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlang
slide-61
SLIDE 61 http://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlang
slide-62
SLIDE 62
slide-63
SLIDE 63

SPARTAN

project

slide-64
SLIDE 64
slide-65
SLIDE 65
slide-66
SLIDE 66

yesterday

ready

it has to be

slide-67
SLIDE 67

enormously

scale

It has to

slide-68
SLIDE 68
slide-69
SLIDE 69

node.js

slide-70
SLIDE 70

without sharding?

Scales

What DB

slide-71
SLIDE 71

masterless replication?

what DB has

slide-72
SLIDE 72

Async Saving

slide-73
SLIDE 73

Riak

slide-74
SLIDE 74

for now

good enough

slide-75
SLIDE 75

for good

good enough

slide-76
SLIDE 76
slide-77
SLIDE 77

Riak

life with

slide-78
SLIDE 78 1 { 2 "userId" : 1000000011100, 3 "xp" : 20, 4 "coins" : 400, 5 "cash" : 300, 6 "rooms" : [ 7 { 8 "id" : 1, 9 "type" : "x-ray", 10 "status" : "busy" 11 } 12 ] 13 } 14
slide-79
SLIDE 79
slide-80
SLIDE 80

is plain awesome

SPoF

no

slide-81
SLIDE 81

for our use case

suboptimal

bitcask was

slide-82
SLIDE 82
  • ver all keys!

map/reduce

Do not

slide-83
SLIDE 83

ulimit

dreadfl

slide-84
SLIDE 84

riak Attach

the tale of

slide-85
SLIDE 85
slide-86
SLIDE 86

Mobile

Monsters go

slide-87
SLIDE 87
slide-88
SLIDE 88

a flash client

NOT

An iOS client is

slide-89
SLIDE 89

at all?

database

do we need a

slide-90
SLIDE 90

in a stateless architecture?

s3

Could we just use

slide-91
SLIDE 91

at all?

backend

do we need a

slide-92
SLIDE 92

writes to

client

what if the

S3?

slide-93
SLIDE 93

wooga.com/ jobs