Wednesday, March 7, 2012 Our games all look the same Flash client - - PowerPoint PPT Presentation

wednesday march 7 2012 our games all look the same
SMART_READER_LITE
LIVE PREVIEW

Wednesday, March 7, 2012 Our games all look the same Flash client - - PowerPoint PPT Presentation

G AMES FOR THE M ASSES How DevOps Affects Architecture Jesper Richter-Reichhelm, @jrirei Wednesday, March 7, 2012 Wednesday, March 7, 2012 Our games all look the same Flash client Backend Wednesday, March 7,


slide-1
SLIDE 1

GAMES ¡FOR ¡THE ¡MASSES

How ¡DevOps ¡Affects ¡Architecture Jesper ¡Richter-­‑Reichhelm, ¡@jrirei

Wednesday, March 7, 2012
slide-2
SLIDE 2 Wednesday, March 7, 2012
slide-3
SLIDE 3

Our ¡games ¡all ¡look ¡the ¡same

Flash ¡client Backend

Wednesday, March 7, 2012
slide-4
SLIDE 4

Our ¡games ¡all ¡look ¡the ¡same

Flash ¡client Game ¡Session

  • Asynch. ¡CommunicaEon
Wednesday, March 7, 2012
slide-5
SLIDE 5

Our ¡games ¡all ¡look ¡the ¡same

State ¡Changes ValidaEon Persistence Backend

Wednesday, March 7, 2012
slide-6
SLIDE 6

But ¡the ¡scale ¡is ¡interesEng

14 ¡billion ¡requests ¡/ ¡month

Wednesday, March 7, 2012
slide-7
SLIDE 7

But ¡the ¡scale ¡is ¡interesEng

14 ¡billion ¡requests ¡/ ¡month

Wednesday, March 7, 2012
slide-8
SLIDE 8

But ¡the ¡scale ¡is ¡interesEng

14 ¡billion ¡requests ¡/ ¡month >100,000 ¡DB ¡operaEons ¡/ ¡second

Wednesday, March 7, 2012
slide-9
SLIDE 9

But ¡the ¡scale ¡is ¡interesEng

14 ¡billion ¡requests ¡/ ¡month >100,000 ¡DB ¡operaEons ¡/ ¡second >50,000 ¡DB ¡updates ¡/ ¡second

Wednesday, March 7, 2012
slide-10
SLIDE 10

2 ¡Developers ¡to ¡do ¡it ¡all

Typical ¡team ¡setup 4 ¡product ¡managers 4 ¡ar0sts 4 ¡frontend ¡engineers 2 ¡backend ¡engineers

  • ­‑ design, ¡implementa6on, ¡opera6on
Wednesday, March 7, 2012
slide-11
SLIDE 11

Wooga ¡has ¡dedicated ¡game ¡teams

Wednesday, March 7, 2012
slide-12
SLIDE 12 Wednesday, March 7, 2012
slide-13
SLIDE 13 Wednesday, March 7, 2012
slide-14
SLIDE 14

Oct ¡2009

Wednesday, March 7, 2012
slide-15
SLIDE 15

Oct ¡2009 Jan ¡2010

Wednesday, March 7, 2012
slide-16
SLIDE 16

Oct ¡2009 Jan ¡2010 Oct ¡2010

Wednesday, March 7, 2012
slide-17
SLIDE 17

Oct ¡2009 Jan ¡2010 Oct ¡2010 Aug ¡2012

Wednesday, March 7, 2012
slide-18
SLIDE 18

Architecture ¡EvoluEon ¡at ¡Wooga

The ¡Start The ¡Next ¡Step Best ¡of ¡Two ¡Worlds Company ¡Values

Wednesday, March 7, 2012
slide-19
SLIDE 19

Oct ¡2009: ¡1st ¡team ¡wanted ¡good ¡code ¡quality

Good ¡code ¡quality Easy ¡to ¡understand Easy ¡to ¡test Easy ¡to ¡refactor

Wednesday, March 7, 2012
slide-20
SLIDE 20

Oct ¡2009: ¡1st ¡team ¡wanted ¡good ¡code ¡quality

Good ¡code ¡quality Easy ¡to ¡understand Easy ¡to ¡test Easy ¡to ¡refactor

Wednesday, March 7, 2012
slide-21
SLIDE 21

EvoluEon ¡I: ¡Use ¡Ruby ¡(on ¡Rails)

Oct ¡2009

Wednesday, March 7, 2012
slide-22
SLIDE 22

A ¡basic ¡setup ¡using ¡sharding ¡worked ¡fine

app app app app app app app app app lb My SQL My SQL slave slave

Wednesday, March 7, 2012
slide-23
SLIDE 23

250K ¡daily ¡users

!" #!!$!!!" %$!!!$!!!" %$#!!$!!!" &$!!!$!!!" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"

Life ¡was ¡good

Wednesday, March 7, 2012
slide-24
SLIDE 24

250K ¡daily ¡users

!" #!!$!!!" %$!!!$!!!" %$#!!$!!!" &$!!!$!!!" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"

Life ¡was ¡good NO ¡MORE

Wednesday, March 7, 2012
slide-25
SLIDE 25

Welcome ¡to ¡6 ¡weeks ¡of ¡pain!

Heavy ¡opEmizaEons ¡were ¡necessary

Wednesday, March 7, 2012
slide-26
SLIDE 26

Welcome ¡to ¡6 ¡weeks ¡of ¡pain!

Heavy ¡opEmizaEons ¡were ¡necessary Numerous ¡small ¡fixes ¡regarding ¡DB ¡config

Wednesday, March 7, 2012
slide-27
SLIDE 27

Welcome ¡to ¡6 ¡weeks ¡of ¡pain!

Heavy ¡opEmizaEons ¡were ¡necessary Numerous ¡small ¡fixes ¡regarding ¡DB ¡config More ¡shards

Wednesday, March 7, 2012
slide-28
SLIDE 28

Welcome ¡to ¡6 ¡weeks ¡of ¡pain!

Heavy ¡opEmizaEons ¡were ¡necessary Numerous ¡small ¡fixes ¡regarding ¡DB ¡config More ¡shards Even ¡more ¡shards

Wednesday, March 7, 2012
slide-29
SLIDE 29

Welcome ¡to ¡6 ¡weeks ¡of ¡pain!

Heavy ¡opEmizaEons ¡were ¡necessary Numerous ¡small ¡fixes ¡regarding ¡DB ¡config More ¡shards Even ¡more ¡shards SpliBng ¡the ¡model ¡to ¡get ¡more ¡shards

Wednesday, March 7, 2012
slide-30
SLIDE 30

Early ¡sharding ¡hell: ¡8 ¡master ¡and ¡8 ¡slaves

app app app app app app app app app app app app app app app app app app lb My SQL My SQL My SQL My SQL My SQL My SQL My SQL My SQL slave slave slave slave slave slave slave slave

Wednesday, March 7, 2012
slide-31
SLIDE 31

At ¡500K ¡daily ¡users ¡we ¡were ¡at ¡a ¡dead ¡end

!" #!!$!!!" %$!!!$!!!" %$#!!$!!!" &$!!!$!!!" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"

Wednesday, March 7, 2012
slide-32
SLIDE 32

OUCH!

http://www.flickr.com/photos/billue_the_bear/ Wednesday, March 7, 2012
slide-33
SLIDE 33

Don’t ¡break ¡the ¡bank Make ¡it ¡faster Make ¡it ¡cheaper Make ¡it ¡simpler

Jan ¡2010: ¡Meanwhile ¡at ¡the ¡2nd ¡team

Wednesday, March 7, 2012
slide-34
SLIDE 34

Don’t ¡break ¡the ¡bank Make ¡it ¡faster Make ¡it ¡cheaper Make ¡it ¡simpler

Jan ¡2010: ¡Meanwhile ¡at ¡the ¡2nd ¡team

Wednesday, March 7, 2012
slide-35
SLIDE 35

EvoluEon ¡II: ¡Use ¡Redis ¡as ¡main ¡database

Oct ¡2009 Jan ¡2010

Wednesday, March 7, 2012
slide-36
SLIDE 36

If ¡MySQL ¡is ¡a ¡truck Fast ¡enough Disk ¡based Robust

Fast ¡enough ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡disk ¡based ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡robust

Wednesday, March 7, 2012
slide-37
SLIDE 37

If ¡MySQL ¡is ¡a ¡truck, ¡Redis ¡is ¡a ¡race ¡car Super ¡fast RAM ¡based Fragile

Super ¡fast ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡RAM ¡based ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡fragile

Wednesday, March 7, 2012
slide-38
SLIDE 38

Bare ¡metal ¡for ¡low ¡latency!

app app app lb Re-­‑ dis Re-­‑ dis disk (S3) app app app app

Wednesday, March 7, 2012
slide-39
SLIDE 39

How ¡could ¡we ¡apply ¡that ¡knowledge?

!" #!!$!!!" %$!!!$!!!" %$#!!$!!!" &$!!!$!!!" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"

Wednesday, March 7, 2012
slide-40
SLIDE 40

On-­‑demand ¡migraEons ¡from ¡MySQL ¡to ¡Redis

Wednesday, March 7, 2012
slide-41
SLIDE 41

On-­‑demand ¡migraEons ¡from ¡MySQL ¡to ¡Redis

Wednesday, March 7, 2012
slide-42
SLIDE 42

On-­‑demand ¡migraEons ¡from ¡MySQL ¡to ¡Redis

Wednesday, March 7, 2012
slide-43
SLIDE 43

On-­‑demand ¡migraEons ¡from ¡MySQL ¡to ¡Redis

Wednesday, March 7, 2012
slide-44
SLIDE 44

On-­‑demand ¡migraEons ¡from ¡MySQL ¡to ¡Redis

Wednesday, March 7, 2012
slide-45
SLIDE 45

On-­‑demand ¡migraEons ¡from ¡MySQL ¡to ¡Redis

Wednesday, March 7, 2012
slide-46
SLIDE 46

On-­‑demand ¡migraEons ¡from ¡MySQL ¡to ¡Redis

Wednesday, March 7, 2012
slide-47
SLIDE 47

Typical ¡migraEon ¡throughput ¡over ¡3 ¡days

Wednesday, March 7, 2012
slide-48
SLIDE 48

Big ¡and ¡staEc ¡data ¡in ¡MySQL, ¡rest ¡goes ¡to ¡Redis

60 ¡GB ¡data 50% ¡writes 256 ¡GB ¡data 10% ¡writes

hCp://www.flickr.com/photos/erix/245657047/ Wednesday, March 7, 2012
slide-49
SLIDE 49

One ¡team ¡saved ¡the ¡other ¡one

!" #!!$!!!" %$!!!$!!!" %$#!!$!!!" &$!!!$!!!" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"

Wednesday, March 7, 2012
slide-50
SLIDE 50

One ¡team ¡saved ¡the ¡other ¡one

!" #!!$!!!" %$!!!$!!!" %$#!!$!!!" &$!!!$!!!" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"

Wednesday, March 7, 2012
slide-51
SLIDE 51

We ¡now ¡have ¡more ¡than ¡2 ¡million ¡users ¡/ ¡day

!" #!!$!!!" %$!!!$!!!" %$#!!$!!!" &$!!!$!!!" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"

Wednesday, March 7, 2012
slide-52
SLIDE 52

We ¡now ¡have ¡more ¡than ¡2 ¡million ¡users ¡/ ¡day

!" #!!$!!!" %$!!!$!!!" %$#!!$!!!" &$!!!$!!!" '()*%!" +,-*%!" ./0*%!" +12*%%" '()*%%" +,-*%%" ./0*%%"

AWS ¡outage in ¡Ireland

Wednesday, March 7, 2012
slide-53
SLIDE 53

10 ¡single-­‑points-­‑of-­‑failure ¡-­‑ ¡no ¡fun ¡at ¡all!

app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app app lb lb redis redis redis redis redis My SQL My SQL My SQL My SQL My SQL slave slave slave slave slave slave slave slave slave slave

Wednesday, March 7, 2012
slide-54
SLIDE 54

OUCH!

http://www.flickr.com/photos/wolfsavard/ Wednesday, March 7, 2012
slide-55
SLIDE 55

Architecture ¡EvoluEon ¡at ¡Wooga

The ¡Start: ¡Ruby The ¡Next ¡Step Best ¡of ¡Two ¡Worlds Company ¡Values

Wednesday, March 7, 2012
slide-56
SLIDE 56

Stateless ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-57
SLIDE 57

Stateless ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-58
SLIDE 58

Stateless ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-59
SLIDE 59

Stateless ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-60
SLIDE 60

Stateless ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-61
SLIDE 61

Stateless ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-62
SLIDE 62

Stateful ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-63
SLIDE 63

Stateful ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-64
SLIDE 64

Stateful ¡servers ¡and ¡DBs

Server Database

Wednesday, March 7, 2012
slide-65
SLIDE 65

Stateful ¡servers ¡and ¡DBs

Server Database One ¡Game ¡Session

Wednesday, March 7, 2012
slide-66
SLIDE 66

Stateful ¡servers ¡and ¡DBs

Server Database One ¡Game ¡Session

Wednesday, March 7, 2012
slide-67
SLIDE 67

Oct ¡2010: ¡3rd ¡team ¡used ¡a ¡stateful ¡server

If ¡DBs ¡are ¡the ¡problem Don’t ¡use ¡them Store ¡state ¡in ¡server Need ¡to ¡be ¡robust

Wednesday, March 7, 2012
slide-68
SLIDE 68

Oct ¡2010: ¡3rd ¡team ¡used ¡a ¡stateful ¡server

If ¡DBs ¡are ¡the ¡problem Don’t ¡use ¡them Store ¡state ¡in ¡server Need ¡to ¡be ¡robust

Wednesday, March 7, 2012
slide-69
SLIDE 69

EvoluEon ¡III: ¡Use ¡Erlang ¡for ¡a ¡stateful ¡server

Oct ¡2009 Jan ¡2010 Oct ¡2010

Wednesday, March 7, 2012
slide-70
SLIDE 70

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

session

Wednesday, March 7, 2012
slide-71
SLIDE 71

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

session session session session

Wednesday, March 7, 2012
slide-72
SLIDE 72

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

Server session session session session

Wednesday, March 7, 2012
slide-73
SLIDE 73

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

Server session session session session S3

Wednesday, March 7, 2012
slide-74
SLIDE 74

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

Server session session session session S3

Wednesday, March 7, 2012
slide-75
SLIDE 75

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

Server session session session session S3

Wednesday, March 7, 2012
slide-76
SLIDE 76

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

Server session session session session S3

Wednesday, March 7, 2012
slide-77
SLIDE 77

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

Server session session session session S3

Wednesday, March 7, 2012
slide-78
SLIDE 78

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

Server session session session session S3

Wednesday, March 7, 2012
slide-79
SLIDE 79

Stateful ¡servers ¡are ¡not ¡as ¡hard ¡as ¡you ¡think

Server session session session session Server session session session session Server session session session session S3

Wednesday, March 7, 2012
slide-80
SLIDE 80

With ¡stateful ¡server ¡the ¡DB ¡is ¡less ¡used

7,500 15,000 22,500 30,000 database ¡operations ¡/ ¡sec Ruby ¡Stateless Erlang ¡Stateful

Wednesday, March 7, 2012
slide-81
SLIDE 81

With ¡stateful ¡server ¡the ¡DB ¡is ¡less ¡used

7,500 15,000 22,500 30,000 database ¡operations ¡/ ¡sec Ruby ¡Stateless Erlang ¡Stateful 700

Wednesday, March 7, 2012
slide-82
SLIDE 82

Deploying ¡with ¡a ¡stateful ¡server

In ¡order ¡to ¡bring ¡up ¡a ¡new ¡version

Wednesday, March 7, 2012
slide-83
SLIDE 83

Deploying ¡with ¡a ¡stateful ¡server

In ¡order ¡to ¡bring ¡up ¡a ¡new ¡version Just ¡deploy ¡it Hot ¡code ¡replacement ¡is ¡great!

Wednesday, March 7, 2012
slide-84
SLIDE 84

There ¡are ¡even ¡more ¡advantages

Faster ¡than ¡Ruby ¡(5,000 ¡rps ¡/ ¡node)

  • ­‑ CPU ¡bound
Wednesday, March 7, 2012
slide-85
SLIDE 85

There ¡are ¡even ¡more ¡advantages

Faster ¡than ¡Ruby ¡(5,000 ¡rps ¡/ ¡node)

  • ­‑ CPU ¡bound

Very ¡few ¡SPOFs

  • ­‑ ... ¡and ¡those ¡are ¡easy ¡to ¡recover
Wednesday, March 7, 2012
slide-86
SLIDE 86

There ¡are ¡even ¡more ¡advantages

Faster ¡than ¡Ruby ¡(5,000 ¡rps ¡/ ¡node)

  • ­‑ CPU ¡bound

Very ¡few ¡SPOFs

  • ­‑ ... ¡and ¡those ¡are ¡easy ¡to ¡recover

TransacEonal ¡logic

  • ­‑ Invariants ¡instead ¡of ¡explicit ¡error ¡handling
Wednesday, March 7, 2012
slide-87
SLIDE 87

Example ¡“controller” ¡in ¡Erlang

Wednesday, March 7, 2012
slide-88
SLIDE 88

Example ¡“controller” ¡in ¡Erlang

Wednesday, March 7, 2012
slide-89
SLIDE 89

Example ¡“controller” ¡in ¡Erlang

Wednesday, March 7, 2012
slide-90
SLIDE 90

Example ¡“controller” ¡in ¡Erlang

Wednesday, March 7, 2012
slide-91
SLIDE 91

Example ¡“controller” ¡in ¡Erlang

Central ¡handling ¡of ¡effects

Wednesday, March 7, 2012
slide-92
SLIDE 92

Example ¡“controller” ¡in ¡Erlang

Central ¡handling ¡of ¡effects TransacEonal ¡behavior

Wednesday, March 7, 2012
slide-93
SLIDE 93

Example ¡model ¡in ¡Erlang

Wednesday, March 7, 2012
slide-94
SLIDE 94

Example ¡model ¡in ¡Erlang

Wednesday, March 7, 2012
slide-95
SLIDE 95

Example ¡model ¡in ¡Erlang

Wednesday, March 7, 2012
slide-96
SLIDE 96

Example ¡model ¡in ¡Erlang

Wednesday, March 7, 2012
slide-97
SLIDE 97

Example ¡model ¡in ¡Erlang

Wednesday, March 7, 2012
slide-98
SLIDE 98

Example ¡model ¡in ¡Erlang

Erlang ¡code ¡is ¡not ¡that ¡hard ¡to ¡read, ¡isn’t ¡it?

Wednesday, March 7, 2012
slide-99
SLIDE 99 http://www.flickr.com/photos/hotreactor/ Wednesday, March 7, 2012
slide-100
SLIDE 100

Architecture ¡EvoluEon ¡at ¡Wooga

The ¡Start: ¡Ruby The ¡Next ¡Step: ¡Erlang Best ¡of ¡Two ¡Worlds Company ¡Values

Wednesday, March 7, 2012
slide-101
SLIDE 101

Aug ¡2011: ¡4th ¡team ¡wanted ¡both

Erlang ¡is ¡great Concurrency, ¡robustness Great ¡for ¡opera0on

Wednesday, March 7, 2012
slide-102
SLIDE 102

Aug ¡2011: ¡4th ¡team ¡wanted ¡both

Erlang ¡is ¡great Concurrency, ¡robustness Great ¡for ¡opera0on Ruby ¡is ¡great Concise, ¡expressive, ¡testable Great ¡for ¡development

Wednesday, March 7, 2012
slide-103
SLIDE 103

Aug ¡2011: ¡4th ¡team ¡wanted ¡both

Erlang ¡is ¡great Concurrency, ¡robustness Great ¡for ¡opera0on Ruby ¡is ¡great Concise, ¡expressive, ¡testable Great ¡for ¡development

Wednesday, March 7, 2012
slide-104
SLIDE 104

Aug ¡2011: ¡4th ¡team ¡wanted ¡both

Erlang ¡is ¡great Concurrency, ¡robustness Great ¡for ¡opera0on Ruby ¡is ¡great Concise, ¡expressive, ¡testable Great ¡for ¡development

Wednesday, March 7, 2012
slide-105
SLIDE 105

EvoluEon ¡IV: ¡The ¡best ¡out ¡of ¡two ¡worlds

Oct ¡2009 Jan ¡2010 Oct ¡2010 Aug ¡2011

Wednesday, March 7, 2012
slide-106
SLIDE 106

The ¡basic ¡setup ¡looks ¡exactly ¡like ¡before

Server session session session session Server session session session session Server session session session session S3

Wednesday, March 7, 2012
slide-107
SLIDE 107

Example ¡controller ¡in ¡Ruby

Wednesday, March 7, 2012
slide-108
SLIDE 108

Example ¡controller ¡in ¡Ruby

Wednesday, March 7, 2012
slide-109
SLIDE 109

Example ¡controller ¡in ¡Ruby

Wednesday, March 7, 2012
slide-110
SLIDE 110

Example ¡controller ¡in ¡Ruby

Wednesday, March 7, 2012
slide-111
SLIDE 111

Example ¡controller ¡in ¡Ruby

DSL-­‑like ¡definiEon ¡of ¡game ¡acEon

Wednesday, March 7, 2012
slide-112
SLIDE 112

Example ¡controller ¡in ¡Ruby

DSL-­‑like ¡definiEon ¡of ¡game ¡acEon Skinny ¡as ¡controllers ¡should ¡be

Wednesday, March 7, 2012
slide-113
SLIDE 113

Example ¡model ¡in ¡Ruby

Wednesday, March 7, 2012
slide-114
SLIDE 114

Example ¡model ¡in ¡Ruby

Wednesday, March 7, 2012
slide-115
SLIDE 115

Example ¡model ¡in ¡Ruby

Wednesday, March 7, 2012
slide-116
SLIDE 116

Example ¡model ¡in ¡Ruby

Wednesday, March 7, 2012
slide-117
SLIDE 117

Example ¡model ¡in ¡Ruby

Easily ¡unit ¡testable

Wednesday, March 7, 2012
slide-118
SLIDE 118

Example ¡model ¡in ¡Ruby

Easily ¡unit ¡testable Minimal ¡amount ¡of ¡code

Wednesday, March 7, 2012
slide-119
SLIDE 119

Bringing ¡2 ¡worlds ¡together

Server session session ... session

Wednesday, March 7, 2012
slide-120
SLIDE 120

Bringing ¡2 ¡worlds ¡together

Server session session ... session sender

Wednesday, March 7, 2012
slide-121
SLIDE 121

Bringing ¡2 ¡worlds ¡together

Server session session ... session Worker Worker Worker Worker Worker sender

Wednesday, March 7, 2012
slide-122
SLIDE 122

Bringing ¡2 ¡worlds ¡together

Server session session ... session receiver Worker Worker Worker Worker Worker sender

Wednesday, March 7, 2012
slide-123
SLIDE 123

Bringing ¡2 ¡worlds ¡together

Server session session ... session receiver Worker Worker Worker Worker Worker sender

Wednesday, March 7, 2012
slide-124
SLIDE 124

Bringing ¡2 ¡worlds ¡together

Server session session ... session receiver Worker Worker Worker Worker Worker sender

Wednesday, March 7, 2012
slide-125
SLIDE 125

Game ¡state

Game ¡state ¡is ¡split ¡in ¡mulEple ¡parts user, ¡map, ¡fruit_trees ¡etc.

Wednesday, March 7, 2012
slide-126
SLIDE 126

Game ¡state

Game ¡state ¡is ¡split ¡in ¡mulEple ¡parts user, ¡map, ¡fruit_trees ¡etc. Erlang ¡does ¡not ¡care ¡about ¡content Serialized ¡Ruby ¡objects

Wednesday, March 7, 2012
slide-127
SLIDE 127

Game ¡state

Game ¡state ¡is ¡split ¡in ¡mulEple ¡parts user, ¡map, ¡fruit_trees ¡etc. Erlang ¡does ¡not ¡care ¡about ¡content Serialized ¡Ruby ¡objects Erlang ¡does ¡know ¡mapping ¡of ¡state ¡parts ¡to ¡URLs Mapping ¡provided ¡by ¡Ruby ¡on ¡startup

Wednesday, March 7, 2012
slide-128
SLIDE 128

Looking ¡back ¡at ¡the ¡game ¡acEon

Wednesday, March 7, 2012
slide-129
SLIDE 129

Looking ¡back ¡at ¡the ¡game ¡acEon

Wednesday, March 7, 2012
slide-130
SLIDE 130

Looking ¡back ¡at ¡the ¡game ¡acEon

Mapping ¡of ¡state ¡parts ¡to ¡game ¡acEons

Wednesday, March 7, 2012
slide-131
SLIDE 131

Looking ¡back ¡at ¡the ¡game ¡acEon

Mapping ¡of ¡state ¡parts ¡to ¡game ¡acEons Worker ¡knows ¡mapping

Wednesday, March 7, 2012
slide-132
SLIDE 132

Looking ¡back ¡at ¡the ¡game ¡acEon

Mapping ¡of ¡state ¡parts ¡to ¡game ¡acEons Worker ¡knows ¡mapping Worker ¡pushes ¡mapping ¡to ¡Erlang ¡on ¡startup

Wednesday, March 7, 2012
slide-133
SLIDE 133

Looking ¡back ¡at ¡the ¡game ¡acEon

Mapping ¡of ¡state ¡parts ¡to ¡game ¡acEons Worker ¡knows ¡mapping Worker ¡pushes ¡mapping ¡to ¡Erlang ¡on ¡startup Erlang ¡can ¡query ¡mapping ¡if ¡needed

Wednesday, March 7, 2012
slide-134
SLIDE 134

NICE!

http://www.flickr.com/photos/aigle_dore/ Wednesday, March 7, 2012
slide-135
SLIDE 135

Architecture ¡EvoluEon ¡at ¡Wooga

The ¡Start: ¡Ruby The ¡Next ¡Step: ¡Erlang Best ¡of ¡Two ¡Worlds Company ¡Values

Wednesday, March 7, 2012
slide-136
SLIDE 136

Each ¡new ¡game ¡brought ¡us ¡innovaEon

Oct ¡2009 Jan ¡2010 Oct ¡2010 Aug ¡2011

Wednesday, March 7, 2012
slide-137
SLIDE 137

Small teams

  • ver

big teams

We’ve ¡learned ¡to ¡ ¡value

Wednesday, March 7, 2012
slide-138
SLIDE 138

Collaboration

  • ver

competition

We’ve ¡learned ¡to ¡ ¡value

Wednesday, March 7, 2012
slide-139
SLIDE 139

Generalists

  • ver

specialists

We’ve ¡learned ¡to ¡ ¡value

Wednesday, March 7, 2012
slide-140
SLIDE 140

Effort reduction

  • ver

cost reduction

We’ve ¡learned ¡to ¡ ¡value

Wednesday, March 7, 2012
slide-141
SLIDE 141

Innovation

  • ver

risk mitigation

We’ve ¡learned ¡to ¡ ¡value

Wednesday, March 7, 2012
slide-142
SLIDE 142

A ¡good ¡value ¡system

We’ve ¡learned ¡to ¡value Small ¡teams ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡over ¡ CollaboraEon ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡over Generalists ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡over Effort ¡reducEon ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡over InnovaEon ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡over Big ¡teams ¡ Compe00on Specialists Cost ¡reduc0on Risk ¡mi0ga0on

Wednesday, March 7, 2012
slide-143
SLIDE 143

It works!

Wednesday, March 7, 2012
slide-144
SLIDE 144

It works! Be fast, be bold!

Wednesday, March 7, 2012
slide-145
SLIDE 145

QuesEons? Jesper ¡Richter-­‑Reichhelm @jrirei slideshare.net/wooga wooga.com/jobs

Wednesday, March 7, 2012