"bwin - p5 a future proof poker platform"

90
Architectural Complexity Lessons from the bwin P5 Poker System Presented by: Henrik “Henke” Lagercrantz & Gerold “Cactus” Kathan QCon London 2010, March 10 2010

Upload: gerold-kathan

Post on 22-Jan-2018

1.677 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: "Bwin - P5 a future proof Poker platform"

Architectural Complexity

Lessons from the bwin P5 Poker System Presented by: Henrik “Henke” Lagercrantz & Gerold “Cactus” Kathan QCon London 2010, March 10 2010

Page 2: "Bwin - P5 a future proof Poker platform"

Online Poker • Functional Requirements in the Poker domain are well-

understood and therefore EASY to implement

• However, there are a series of Non-Functional

requirements that complicate the implementation of

Online Poker

Page 3: "Bwin - P5 a future proof Poker platform"

extreme performance

Page 4: "Bwin - P5 a future proof Poker platform"

massive stability

Page 5: "Bwin - P5 a future proof Poker platform"

immediate time2market

Page 6: "Bwin - P5 a future proof Poker platform"

infinite flexibility

Page 7: "Bwin - P5 a future proof Poker platform"

seamless integration

Page 8: "Bwin - P5 a future proof Poker platform"

maximum cost efficiency

Page 9: "Bwin - P5 a future proof Poker platform"

superior quality

Page 10: "Bwin - P5 a future proof Poker platform"

cosy customer experience

Page 11: "Bwin - P5 a future proof Poker platform"

customer care friendly

Page 12: "Bwin - P5 a future proof Poker platform"

tons of real money

Page 13: "Bwin - P5 a future proof Poker platform"

real-time transactions

Page 14: "Bwin - P5 a future proof Poker platform"

ultimate security

Page 15: "Bwin - P5 a future proof Poker platform"

fraud detection

Page 16: "Bwin - P5 a future proof Poker platform"

auditable compliance

Page 17: "Bwin - P5 a future proof Poker platform"

global reach

Page 18: "Bwin - P5 a future proof Poker platform"

organizational scaling

Page 19: "Bwin - P5 a future proof Poker platform"

operational excellence

Page 20: "Bwin - P5 a future proof Poker platform"

pervasive monitoring

Page 21: "Bwin - P5 a future proof Poker platform"

fully automated processes

Page 22: "Bwin - P5 a future proof Poker platform"

e-commerce

shop has to deal with those issues.....

hold on

every serious

Page 23: "Bwin - P5 a future proof Poker platform"
Page 24: "Bwin - P5 a future proof Poker platform"
Page 25: "Bwin - P5 a future proof Poker platform"
Page 26: "Bwin - P5 a future proof Poker platform"
Page 27: "Bwin - P5 a future proof Poker platform"
Page 28: "Bwin - P5 a future proof Poker platform"
Page 29: "Bwin - P5 a future proof Poker platform"
Page 30: "Bwin - P5 a future proof Poker platform"
Page 31: "Bwin - P5 a future proof Poker platform"
Page 32: "Bwin - P5 a future proof Poker platform"
Page 33: "Bwin - P5 a future proof Poker platform"
Page 34: "Bwin - P5 a future proof Poker platform"
Page 35: "Bwin - P5 a future proof Poker platform"

...getting

COMPLEX ?

who are those guys ?

Page 36: "Bwin - P5 a future proof Poker platform"

The Speakers

Cactus

"...guys, what is the real problem

you want to solve here ?"

Henke

“I would prefer the correct

solution over the simple one"

Page 37: "Bwin - P5 a future proof Poker platform"

P5 HISTORY

P4 ?

Page 38: "Bwin - P5 a future proof Poker platform"

What was P4?

• P4 = Poker v4

• Ran from 2002 to 2008...it worked!

But...we had performance issues, that we fixed...

• Then the UIGEA happened...and we turned to Europe...

REGULATION!!

Page 39: "Bwin - P5 a future proof Poker platform"

REGULATION

• Non-compliance = NOT OPTIONAL!

• „Weird‟ regulations/requirements

• Implementation on P4

= IMPRACTICAL for multiple markets

Page 40: "Bwin - P5 a future proof Poker platform"
Page 41: "Bwin - P5 a future proof Poker platform"

NEW Build = P5

Page 42: "Bwin - P5 a future proof Poker platform"

2007 challenging project ahead...

Page 43: "Bwin - P5 a future proof Poker platform"

business

drivers

Page 44: "Bwin - P5 a future proof Poker platform"

Support the widest range of gaming

regulatory requirements

Page 45: "Bwin - P5 a future proof Poker platform"

Build a poker platform with a highly customizable client.

Page 46: "Bwin - P5 a future proof Poker platform"

Enable a wide range of new games, business models, and integration scenarios

Page 47: "Bwin - P5 a future proof Poker platform"

Build the world‟s most scalable and cost-efficient poker platform.

Page 48: "Bwin - P5 a future proof Poker platform"
Page 49: "Bwin - P5 a future proof Poker platform"

we took a step back...

Page 50: "Bwin - P5 a future proof Poker platform"

we couldfeel the complexity of P4 ...

Page 51: "Bwin - P5 a future proof Poker platform"

But it looks simple?

Page 52: "Bwin - P5 a future proof Poker platform"

we looked inside the simple boxes ...

Page 53: "Bwin - P5 a future proof Poker platform"

Buuuuh ......... good old legacy mess

Page 54: "Bwin - P5 a future proof Poker platform"

we learned to

differentiate...

Page 55: "Bwin - P5 a future proof Poker platform"

Hello!!

Accidental

Complexity

Page 56: "Bwin - P5 a future proof Poker platform"

Essential Complexity

Page 57: "Bwin - P5 a future proof Poker platform"

E

=

m

Page 58: "Bwin - P5 a future proof Poker platform"

“In the presence of essential complexity, establishing simplicity

in one part of a system requires trading off complexity in another”

– Grady Booch, IT Guru

Page 59: "Bwin - P5 a future proof Poker platform"

P5 Architecture

WTF is that?

Page 60: "Bwin - P5 a future proof Poker platform"

KEY Principles

• Modularisation

• Asynchronous Integration

• Abstraction

• Encapsulation

Page 61: "Bwin - P5 a future proof Poker platform"

Eventual

Consistency

Page 62: "Bwin - P5 a future proof Poker platform"

“Those are my principles, and if you don't like them...

well, I have others” - Groucho Marx

Page 63: "Bwin - P5 a future proof Poker platform"

too much fluffy stuff already… details pleeese!

Page 64: "Bwin - P5 a future proof Poker platform"
Page 65: "Bwin - P5 a future proof Poker platform"

Sorryabout that ...

…let’s look at an Example instead

Page 66: "Bwin - P5 a future proof Poker platform"
Page 67: "Bwin - P5 a future proof Poker platform"

Original Setup

reads writes

WriterReader

History StorageService

DB

Page 68: "Bwin - P5 a future proof Poker platform"

Availability

Flexibility

Performance

Consistency

Page 69: "Bwin - P5 a future proof Poker platform"

Availability

Flexibility

Performance

Consistency

Page 70: "Bwin - P5 a future proof Poker platform"

Relational Data Model

defines

depends on

WriterReader

writesreads

History StorageService

DB

Page 71: "Bwin - P5 a future proof Poker platform"
Page 72: "Bwin - P5 a future proof Poker platform"

Time to Modularize…

Audit ServiceHistory Storage

Service

DB Became

History Service

DB

Page 73: "Bwin - P5 a future proof Poker platform"

reads writesfetches

Relational Data Model

defines translates

WriterReader

Audit ServiceHistory Service

DB

Page 74: "Bwin - P5 a future proof Poker platform"

High Performance

WriterAudit Service

LB

Continuous Availability

Page 75: "Bwin - P5 a future proof Poker platform"

Consistency

Flexibility

Reader

Audit ServiceHistory Service

DB

Page 76: "Bwin - P5 a future proof Poker platform"

Busting a CAP (theorem)

High Performance

Continuous Availability

Flexibility

Consistency

Eventual Consistency

Page 77: "Bwin - P5 a future proof Poker platform"

WriterReader

History StorageService

DB

Page 78: "Bwin - P5 a future proof Poker platform"

Writer

LB

Audit ServiceReader

History Service

DB

Page 79: "Bwin - P5 a future proof Poker platform"

fine ...

Page 80: "Bwin - P5 a future proof Poker platform"

recap...

short

Page 81: "Bwin - P5 a future proof Poker platform"

poker system

we did a big rewrite of our

Page 82: "Bwin - P5 a future proof Poker platform"

we won't do it again ;-)

Page 83: "Bwin - P5 a future proof Poker platform"

we learned our lessons !

Page 84: "Bwin - P5 a future proof Poker platform"

the essential complexity !

do not try to escape

Page 85: "Bwin - P5 a future proof Poker platform"

architect it !

Page 86: "Bwin - P5 a future proof Poker platform"

resistance is futile

Page 87: "Bwin - P5 a future proof Poker platform"

any questions ?

Page 88: "Bwin - P5 a future proof Poker platform"

you remember the cat ...

Page 90: "Bwin - P5 a future proof Poker platform"

Embrace Essentíal Complexity. Architect it !