Dot net in social gaming

3,881 views

Published on

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

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,881
On SlideShare
0
From Embeds
0
Number of Embeds
871
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Dot net in social gaming

  1. 1. .Net in Social Gamingby Yan Cui @theburningmonk theburningmonk.com
  2. 2. Name : Yan CuiIndustry : Social Gaming
  3. 3. • Social Gaming division of GameSys• .Net backend (mostly)• Amazon Web Services
  4. 4. • Top 30 grossing FB apps!• F# slots engine
  5. 5. Architecture Highlights
  6. 6. • Clients  Flash  iOS (objective-C & Lua)
  7. 7. • Web Servers  Written in C#  WCF with custom AMF binding  Hosted in Amazon EC2
  8. 8. • Messaging  Amazon SQS  Distributed  Highly scalable  Unordered delivery
  9. 9. • Monitoring  Method exec time/count  Error count  AOP to capture performance metrics  Amazon CloudWatch
  10. 10. • Slots Engine  Written in F#  The ‘brain’  Enforces game rules and maths model
  11. 11. • Persistence  Hot data  Cold data
  12. 12. Considerations
  13. 13. • Ease of use/maintenance• Cost• Speed• Ability to handle size• Ability to handle volume of transactions• Eventual/Strong consistency• Replication• ...
  14. 14. Choices (just to name a few...)
  15. 15. So many considerations...so many choices...
  16. 16. Different data = different requirements
  17. 17. Different data = different requirements
  18. 18. Polyglot Persistence!
  19. 19. • Amazon SimpleDB• Amazon DynamoDB• CouchBase• Amazon S3• MySql via Amazon RDS• Google High Replication Data Store• Google Cloud Storage
  20. 20. Scalability Challenge
  21. 21. • 150 million requests/day  15x StackOverflow!
  22. 22. • 10s of GBs of analytics data/day  Google BigQuery  A/B testing
  23. 23. • 2500 requests / second  100+ commodity servers  Stateless servers
  24. 24. • 15K IO ops / second  Protocol-Buffer  5x faster than BinaryFormatter  60% smaller payload
  25. 25. Where F# comes in
  26. 26. Special Symbol CollectablesAvg Wager Size Wager Size Web Server call
  27. 27. • Line Win  X number of matching symbols on adjacent columns  Positions have to be a ‘line’  Wild symbols substitute for other symbols
  28. 28. • Scatter Win  X number of matching symbols anywhere  Triggers bonus game
  29. 29. What’s the player’s What symbols should land? new avg wager? 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?
  30. 30. State representation
  31. 31. New avg wager Got a Collectable! A pay line win!
  32. 32. Bonus Game!Betting small reduces avg wager!
  33. 33. Use collectables
  34. 34. Representing Monopoly board
  35. 35. Collected in the bonus game. Gives player extra ‘lives’. And a pay line win! Houses = multiplier on wins GAME OVERCoin size broughtover from main game
  36. 36. Thank You! @theburningmonktheburningmonk.com
  37. 37. Bingo.nethttp://apps.facebook.com/ilovebingoSuper Fun Townhttp://apps.facebook.com/superfuntownJackpot Joy Slotshttp://apps.facebook.com/jackpotjoyslotsLucky Gem Casinohttp://apps.facebook.com/luckygemcasinoJackpot Joy Casinohttp://apps.facebook.com/jackpotjoycasino

×