dot net in social gaming

Post on 09-Jul-2015

3.521 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

In this talk, I share some insight into how GameSys uses a polyglot stack evolving around .net to build our games and the different kind of scalability and big data challenges we have to face. The recording of the talk can be found on SkillsMatter website : http://skillsmatter.com/podcast/home/dotnet-in-social-gaming8207/js-1603

TRANSCRIPT

.Net in Social Gaming

Yan Cuibytheburningmonk.com@theburningmonk

Name : Yan Cui

Industry : Social Gaming

• Social Gaming division of GameSys

• .Net backend (mostly)

• Amazon Web Services

• Top 30 grossing FB apps!

• F# slots engine

Architecture Highlights

• Clients

Flash

iOS (objective-C & Lua)

• Web Servers

Written in C#

WCF with custom AMF binding

Hosted in Amazon EC2

• Messaging

Amazon SQS

Distributed

Highly scalable

Unordered delivery

• Monitoring

Method exec time/count

Error count

AOP to capture performance metrics

Amazon CloudWatch

• Slots Engine

Written in F#

The ‘brain’

Enforces game rules and maths model

• Persistence

Hot data

Cold data

Considerations

• Ease of use/maintenance

• Cost

• Speed

• Ability to handle size

• Ability to handle volume of transactions

• Eventual/Strong consistency

• Replication

• ...

Choices (just to name a few...)

So many considerations...

so many choices...

Different data = different requirements

Different data = different requirements

Polyglot Persistence!

• Amazon SimpleDB

• Amazon DynamoDB

• CouchBase

• Amazon S3

• MySql via Amazon RDS

• Google High Replication Data Store

• Google Cloud Storage

Scalability Challenge

• 150 million requests/day

15x StackOverflow!

• 10s of GBs of analytics data/day

Google BigQuery

A/B testing

• 2500 requests / second

100+ commodity servers

Stateless servers

• 15K IO ops / second

Protocol-Buffer

5x faster than BinaryFormatter

60% smaller payload

Where F# comes in

Collectables

Wager Size

Special Symbol

Avg Wager Size

Web Server call

• Line Win

X number of matching symbols on

adjacent columns

Positions have to be a ‘line’

Wild symbols substitute for other symbols

• Scatter Win

X number of matching symbols anywhere

Triggers bonus game

What symbols should land?What lines did the player bet on?How much did the player wager?

Did the player win anything?Any special symbol wins?

Should the player receive collectables?

What’s the player’s new avg wager?

State representation

New avg wager Got a Collectable!

A pay line win!

Betting small reduces avg wager!

Bonus Game!

Use collectables

Representing Monopoly board

And a pay line win!

Coin size brought over from main game

Houses = multiplier on wins

GAME OVER

Collected in the bonus game.Gives player extra ‘lives’.

Thank You!

@theburningmonktheburningmonk.com

Bingo.nethttp://apps.facebook.com/ilovebingo

Super Fun Townhttp://apps.facebook.com/superfuntown

Jackpot Joy Slotshttp://apps.facebook.com/jackpotjoyslots

Lucky Gem Casinohttp://apps.facebook.com/luckygemcasino

Jackpot Joy Casinohttp://apps.facebook.com/jackpotjoycasino

top related