49
.Net in Social Gaming Yan Cui by theburningmonk.com @theburningmonk

Dot net in social gaming

  • Upload
    yan-cui

  • View
    3.519

  • Download
    0

Embed Size (px)

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

Citation preview

Page 1: Dot net in social gaming

.Net in Social Gaming

Yan Cuibytheburningmonk.com@theburningmonk

Page 2: Dot net in social gaming

Name : Yan Cui

Industry : Social Gaming

Page 3: Dot net in social gaming
Page 4: Dot net in social gaming

• Social Gaming division of GameSys

• .Net backend (mostly)

• Amazon Web Services

Page 5: Dot net in social gaming
Page 6: Dot net in social gaming

• Top 30 grossing FB apps!

• F# slots engine

Page 7: Dot net in social gaming

Architecture Highlights

Page 8: Dot net in social gaming

• Clients

Flash

iOS (objective-C & Lua)

Page 9: Dot net in social gaming

• Web Servers

Written in C#

WCF with custom AMF binding

Hosted in Amazon EC2

Page 10: Dot net in social gaming

• Messaging

Amazon SQS

Distributed

Highly scalable

Unordered delivery

Page 11: Dot net in social gaming

• Monitoring

Method exec time/count

Error count

AOP to capture performance metrics

Amazon CloudWatch

Page 12: Dot net in social gaming
Page 13: Dot net in social gaming
Page 14: Dot net in social gaming

• Slots Engine

Written in F#

The ‘brain’

Enforces game rules and maths model

Page 15: Dot net in social gaming

• Persistence

Hot data

Cold data

Page 16: Dot net in social gaming

Considerations

Page 17: Dot net in social gaming

• Ease of use/maintenance

• Cost

• Speed

• Ability to handle size

• Ability to handle volume of transactions

• Eventual/Strong consistency

• Replication

• ...

Page 18: Dot net in social gaming

Choices (just to name a few...)

Page 19: Dot net in social gaming
Page 20: Dot net in social gaming

So many considerations...

so many choices...

Page 21: Dot net in social gaming

Different data = different requirements

Page 22: Dot net in social gaming

Different data = different requirements

Page 23: Dot net in social gaming

Polyglot Persistence!

Page 24: Dot net in social gaming

• Amazon SimpleDB

• Amazon DynamoDB

• CouchBase

• Amazon S3

• MySql via Amazon RDS

• Google High Replication Data Store

• Google Cloud Storage

Page 25: Dot net in social gaming

Scalability Challenge

Page 26: Dot net in social gaming
Page 27: Dot net in social gaming

• 150 million requests/day

15x StackOverflow!

Page 28: Dot net in social gaming

• 10s of GBs of analytics data/day

Google BigQuery

A/B testing

Page 29: Dot net in social gaming

• 2500 requests / second

100+ commodity servers

Stateless servers

Page 30: Dot net in social gaming

• 15K IO ops / second

Protocol-Buffer

5x faster than BinaryFormatter

60% smaller payload

Page 31: Dot net in social gaming

Where F# comes in

Page 32: Dot net in social gaming

Collectables

Wager Size

Special Symbol

Avg Wager Size

Web Server call

Page 33: Dot net in social gaming

• Line Win

X number of matching symbols on

adjacent columns

Positions have to be a ‘line’

Wild symbols substitute for other symbols

Page 34: Dot net in social gaming

• Scatter Win

X number of matching symbols anywhere

Triggers bonus game

Page 35: Dot net in social gaming

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?

Page 36: Dot net in social gaming

State representation

Page 37: Dot net in social gaming
Page 38: Dot net in social gaming

New avg wager Got a Collectable!

A pay line win!

Page 39: Dot net in social gaming

Betting small reduces avg wager!

Bonus Game!

Page 40: Dot net in social gaming

Use collectables

Page 41: Dot net in social gaming

Representing Monopoly board

Page 42: Dot net in social gaming
Page 43: Dot net in social gaming

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’.

Page 44: Dot net in social gaming
Page 45: Dot net in social gaming
Page 46: Dot net in social gaming
Page 47: Dot net in social gaming
Page 48: Dot net in social gaming

Thank You!

@theburningmonktheburningmonk.com

Page 49: Dot net in social gaming

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