Top Banner
Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect [email protected] Bwin poker - a real world example
17

Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect [email protected] Bwin poker - a real world example.

Dec 18, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Large-Scale Distributed Systems

Henrik LagercrantzSenior Systems [email protected]

Bwin poker - a real world example

Page 2: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Agenda

•About bwin Games and online poker

•Challenges in a large-scale distributed system

•The P5 poker engine

•Q&A

Page 3: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

bwin Games

•Online gaming

•Subsidiary of bwin AG

•~400 employees in Sthlm

•Focus on online poker

Page 4: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Online Poker

Page 5: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Some Numbers

•14 million registered customers

•45k players online at peak

•800k player sessions per day

•7 million poker rounds played per day

•28 million poker hands dealt per day

Page 6: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Complexity

Page 7: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

The Domain Model

Poker

NetworkOperator

Poker Round

PokerRing Game

PokerTournament

PokerLobby

NetworkGames

Gaming Portal

SkillGames

CasinoGames

PokerTable

Player

Wallet

OtherGames

Payment Provider

Game Round

GameRound

*

**

* *

*

*

*

**

*

1

1* *

1

LegendNetwork

Poker

Outside main domain

Operator

3rd Party Games

Page 8: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Handshake Quiz

Request req = awaitRequest()

boolean auth = authenticate(req)

if (auth)

send(new LoginOk())

activateEncryption()

else

send(new LoginFailed())

send(new LoginRequest(“apa”))

LoginResponse resp = awaitResponse()

if (isLoginOk(resp))

activateEncryption()

send(new Message(“hello!”))

else

print(“doh!”)

The ServerThe Client

What’s wrong with this code?

Page 9: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Requirements

•Handle 100k concurrent players

•99.9% availability

•Wide range of integration scenarios

•Operator diversification

•High security standards

•Support regulatory constraints

•Highly maintainable

•…

Page 10: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

CAP Theorem

•Consistency

•Availability

•Partition-tolerance

Page 11: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Functional Decomposition

Page 12: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Start decomposing…

•Find a table

•View ongoing games

•Play poker

•Chat

•Process completed rounds

•Route client/server communication

•Register for a tournament

•Create & schedule a new tournament

•…

Page 13: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

P5 System Overview

Gaming Frontend Proxy

PokerGame Engine

ChatServer

... ...Gaming

FrontendService Registry

GameHistory

Poker Core Poker Add-on

TournamentScheduler

HandProcessor

TournamentPlanner

TournamentOrganizer

TransactionSystem

PlayerInformation

OperatorInformation

BouncerOnlineFraud

...

...

Stats

Gaming Backend

Gaming Frontend

Ga

tew

ay

P5

PlatformOPAPI

PokerOPAPI

OIQ

PokerBackoffice

PlatformBackoffice

Backoffice Op. Integration

Platform

CustomIntegration

Layer

PokerSupport

Tools

Poker Client

Page 14: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

History Service Example

Page 15: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Q&A

Page 16: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

Summary

•Differentiate between essential complexity and accidental complexity!

•Functional decomposition is key!

•Understand the problem domain

•CAP theorem – “it’s a trade-off”

Page 17: Large-Scale Distributed Systems Henrik Lagercrantz Senior Systems Architect henrik.lagercrantz@bwin.org Bwin poker - a real world example.

http://bwingames.se

Henrik LagercrantzSenior Systems [email protected]

For questions regarding internship, thesis work, etc, contact Jonas Rundberg [email protected]

Also feel free to send me (Henrik) email if you have any questions/thoughts/ideas around the technical stuff – [email protected]