SlideShare a Scribd company logo
1 of 85
F# in Social Gaming
Yan Cui (@theburningmonk)
Who is Gamesys?

• Founded in 2001
• #1 in the UK

• Handle $5 Billion in turnover annually
• First company to launch real money gaming on Facebook

• Employ 1,000 globally
What is F#?
• Functional-first
• ML family of languages
• 1st class citizen on the .Net platform
– also supported by Mono
What is F#?
• Records
• Discriminated Unions
• MailboxProcessor (aka Agents)

• Computation Expressions (aka Workflows)
• Type Providers

• Quotations
• Units of Measure
Why F#?
• Time to Market
• Efficiency
• Correctness

• Complexity
Case Study #1

• Slots Engine
– Written in F#
– The ‘brain’
– Enforces game rules and maths model
Special Symbol
Avg Wager Size

Wager Size

Collectables

Web Server call
Winning at Slots
• 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’s the player’s
new avg wager?

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?
New avg wager

Got a Collectable!

A pay line win!
Bonus Game!

Betting small reduces avg wager!
Use collectables
Collected in the bonus game.
Gives player extra ‘lives’.

And a pay line win!
Houses = multiplier on wins
GAME OVER
Coin size brought
over from main game
Why F#?
• Time to Market
• Efficiency
• Correctness

• Complexity
Why F#?
• Record and Discriminated Unions
– Lightweight syntax for creating types and hierarchies
– Illegal states cannot be represented
– Immutable by default

• Pattern matching
– Clear and concise way to handle all branch conditions

• Unit of Measure
– Prevents a whole class of errors related to misuse of units
Case Study #2

• Stateful Server
– Actor-based architecture
Travel, Collect, Craft!
Trap Monsters
Stateful Server

EC2
Elastic Load Balancer

CloudFront
Server A

Server B
...

Auto scaling Group

S3
Stateful Server
• Need to ensure Server affinity
– All calls need to be routed to the affined server

• Need to balance load
– Session lengths vary greatly
– Some players are more active than others
– Need to avoid hot spots

• Need to avoid players hogging a server
– Need to be able to scale down!
Stateful Server
• Persist player state after short inactivity
• Move player to another server after persistence
Why Stateful Server?
• 500% efficiency increase
• 60% reduction in avg latency
• Fewer game servers

• No CouchBase cluster
• Huge saving on cost
The Actor Model
An actor is the fundamental unit of computation which
embodies the 3 things
• Processing
• Storage
• Communication
that are essential to computation.
-Carl Hewitt*
* http://bit.ly/HoNHbG
The Actor Model
• Everything is an actor
• An actor has a mailbox
• When an actor receives a message it can:
– Create new actors
– Send messages to actors it has addresses for
– Designate how to handle the next message it receives
Stateful Server
• Gatekeeper
– Manages the local list of active workers
– Spawns new workers

• Worker
– Manages the states for a player
– Optimistic locking
– Persist state after period of inactivity
Stateful Server
Asynchronous

Player B

Request Handlers

Player A
Gatekeeper

S3

Worker C
Worker B

Game Server
Stateful Server
Asynchronous

Worker A

Player A
Request Handlers

Player B

ok

Gatekeeper

S3

Worker C
Worker B

Game Server
Stateful Server
Asynchronous

Worker A

Player B

Request Handlers

Player A
Gatekeeper

S3

Worker C
Worker B

Game Server
Stateful Server
Asynchronous

Worker A

Player B

Request Handlers

Player A
Gatekeeper

Worker C

Game Server

S3
Stateful Server
Asynchronous

Worker A

Player B

Request Handlers

Player A
Gatekeeper

Worker C

Game Server

S3
MailboxProcessor<Message>
Async<Message option>
switch state
Why F#?
• Time to Market
• Efficiency
• Correctness

• Complexity
Why F#?
• Agents
– No locks
– Asynchronous message passing
– Each actor is self-contained and easier to reason with

• Pattern matching
– Clear and concise way to handle all branch conditions
Why F#?
• Async Workflows
– Non-blocking IO
– Convert synchronous code into asynchronous code with
minimal code changes
– Similar to C# 5’s async-await feature, but available in F#
since 2007!
Case Study #3

• Quests & Achievements
– Progress tied to most actions
– Avoid scripting
– Data driven
Caught a Gnome
Caught a Gnome

EXP

Item

Quest Progress

Gold
Caught a Gnome

EXP

Item

Gold

Level Up
Quest Progress

Quest Complete
Caught a Gnome

EXP

Item

Gold

Level Up
Quest Progress

New Quest

Quest Complete
Caught a Gnome

EXP

Item

Gold

Level Up
Quest Progress

New Quest

Quest Complete
Caught a Gnome

EXP

Item

Gold

Level Up
Quest Progress

Achievement
Progress

New Quest

Quest Complete
Caught a Gnome

EXP

Item

Gold

Level Up
Quest Progress

Achievement
Progress

New Quest

Achievement
Complete

Quest Complete
Caught a Gnome

EXP

Item

Gold

Level Up
Quest Progress

Achievement
Progress

New Quest

Achievement
Complete

Quest Complete
Quests & Achievements
• 100+ actions available in the game
– Most can be tied to quests/achievements
– Many yield rewards

• Triggered from different abstraction layers
– Level controller
– Trapping controller
– ...
Quests & Achievements
• Non-functional requirements
– Analytics tracking
– 3rd party reporting
– ...
Quests & Achievements
• Message broker pattern
• Something happened, it’s a FACT
–
–
–
–

Caught a Gnome
Received an item
Got some EXP
...
Queue
Caught Gnome

Trapping
Levelling
Quests
Achievements
Analytics
Partner
Reporting
Queue
Caught Gnome

Trapping

Process

Levelling

Ignore

Quests

Process

Achievements

Process

Analytics

Process

Partner
Reporting

Ignore
Queue
Caught Gnome
EXP
Item
Gold

Trapping
Levelling
Quests
Achievements
Analytics
Partner
Reporting
Queue
Caught Gnome
EXP
Item
Gold

Trapping
Levelling
Quests
Achievements
Analytics
Partner
Reporting
Queue
Caught Gnome
EXP
Item
Gold

Trapping

Ignore

Levelling

Process

Quests

Ignore

Achievements

Ignore

Analytics

Process

Partner
Reporting

Ignore
Queue
Caught Gnome
EXP
Item
Gold
Level Up

Trapping
Levelling
Quests
Achievements
Analytics
Partner
Reporting
Queue
Caught Gnome
EXP
Item
Gold
Level Up

Trapping
Levelling
Quests
Achievements
Analytics
Partner
Reporting
Message Broker Pattern
• Simple
• Flexible
• Extensible

• Requires many types of facts!
OK for small number of DU cases
Why F#?
• Time to Market
• Efficiency
• Correctness

• Complexity
Why F#?
• Discriminated Unions
– Saved days/weeks in writing and maintaining a very large
class hierarchy

• Pattern Matching
– Clear and concise way to handle all branch conditions
Case Study #4

• DynamoDB.SQL*
– SQL-like external DSL for working with Amazon DynamoDB
– Built on top of FParsec

* http://theburningmonk.github.io/DynamoDb.SQL
Amazon DynamoDB
• Fully managed NoSQL database
• Provisioned throughput
• Potentially infinitely scalable

• SSD-backed
• Fast, predictable performance

• Data replicated across data centres
Amazon DynamoDB
• Semi-schema
– Hash and Range key
– Local Secondary Index

• Supports both strong or eventual consistency
• Supports ‘query’ and ‘scan’ operations
• Supports parallel scans
Amazon DynamoDB
• API is cumbersome to use
– Non-trivial queries are hard to express
– .Net SDK doesn’t make it any easier...
– Need an easier way to query for data
DynamoDB.SQL
• Query with hash key only
SELECT Ticker, TimeStamp, Value FROM Prices
WHERE Ticker = “MSFT”
SELECT * FROM Prices WHERE Ticker = “MST”

• Query with hash and range key
SELECT * FROM Prices
WHERE Ticker = “MSFT”
AND TimeStamp BEGINS WITH “2013-10”
DynamoDB.SQL
• Ordering and Limiting number of results
SELECT * FROM Prices WHERE Ticker = “MSFT”
ORDER ASC
LIMIT 100

• Using eventual consistency and throttling
SELECT * FROM Prices WHERE Ticker = “MSFT”
WITH (NoConsistentRead, PageSize(10))
DynamoDB.SQL
• Counting without returning data
COUNT * FROM Prices WHERE Ticker = “MSFT”
COUNT * FROM Prices
WHERE Ticker = “MSFT”
AND TimeStamp BEGINS WITH “2013-10”
DynamoDB.SQL

Image by Mike Rohde
Why F#?
• Time to Market
• Efficiency
• Correctness

• Complexity
Why F#?
• Record and Discriminated Unions
– Lightweight syntax for creating types and hierarchies
– Illegal states cannot be represented
– Immutable by default

• Pattern matching
– Clear and concise way to handle all branch conditions
Why F#?
• Active Patterns
– Extends the power of pattern matching
– Composable

• Async Workflows
– Non-blocking IO
– Convert synchronous code into asynchronous code with
minimal code changes
– Similar to C# 5’s async-await feature, but available in F#
since 2007!
Thank You!
JackpotJoy Slots
http://apps.facebook.com/jackpotjoyslots

Bingo Lane
http://apps.facebook.com/bingolane

Here Be Monsters
http://apps.facebook.com/herebemonsters

Building a MMORPG
http://bit.ly/1hjqoL8
http://slidesha.re/18MD4XY

Google I/O 2013 – Here Be BigQuery
http://bit.ly/1fHjbce

More Related Content

What's hot

Flask, ArcPy, and You (Mike Davlantes)
Flask, ArcPy, and You (Mike Davlantes)Flask, ArcPy, and You (Mike Davlantes)
Flask, ArcPy, and You (Mike Davlantes)GIS Colorado
 
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at ScaleUsing AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at ScaleData Works MD
 
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBZapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBOren Eini
 
Gaming in the Cloud at Websummit Dublin
Gaming in the Cloud at Websummit DublinGaming in the Cloud at Websummit Dublin
Gaming in the Cloud at Websummit DublinIan Massingham
 
Torquebox rubyhoedown-2012
Torquebox rubyhoedown-2012Torquebox rubyhoedown-2012
Torquebox rubyhoedown-2012Lance Ball
 

What's hot (6)

DB2 SQL-Part-1
DB2 SQL-Part-1DB2 SQL-Part-1
DB2 SQL-Part-1
 
Flask, ArcPy, and You (Mike Davlantes)
Flask, ArcPy, and You (Mike Davlantes)Flask, ArcPy, and You (Mike Davlantes)
Flask, ArcPy, and You (Mike Davlantes)
 
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at ScaleUsing AWS, Terraform, and Ansible to Automate Splunk at Scale
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
 
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDBZapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
Zapping ever faster: how Zap sped up by two orders of magnitude using RavenDB
 
Gaming in the Cloud at Websummit Dublin
Gaming in the Cloud at Websummit DublinGaming in the Cloud at Websummit Dublin
Gaming in the Cloud at Websummit Dublin
 
Torquebox rubyhoedown-2012
Torquebox rubyhoedown-2012Torquebox rubyhoedown-2012
Torquebox rubyhoedown-2012
 

Viewers also liked

F# in real world (LambdaCon15)
F# in real world (LambdaCon15)F# in real world (LambdaCon15)
F# in real world (LambdaCon15)Yan Cui
 
F# in social gaming (CodeMash 15)
F# in social gaming (CodeMash 15)F# in social gaming (CodeMash 15)
F# in social gaming (CodeMash 15)Yan Cui
 
Tour of language landscape (katsconf)
Tour of language landscape (katsconf)Tour of language landscape (katsconf)
Tour of language landscape (katsconf)Yan Cui
 
My adventure with elm (LambdaCon15)
My adventure with elm (LambdaCon15)My adventure with elm (LambdaCon15)
My adventure with elm (LambdaCon15)Yan Cui
 
BigQuery in Social Gaming
BigQuery in Social GamingBigQuery in Social Gaming
BigQuery in Social GamingYan Cui
 
Introduction to Aspect Oriented Programming (DDD South West 4.0)
Introduction to Aspect Oriented Programming (DDD South West 4.0)Introduction to Aspect Oriented Programming (DDD South West 4.0)
Introduction to Aspect Oriented Programming (DDD South West 4.0)Yan Cui
 
Tour of language landscape (code.talks)
Tour of language landscape (code.talks)Tour of language landscape (code.talks)
Tour of language landscape (code.talks)Yan Cui
 
F# in the real world (CodeMotion Dubai)
F# in the real world (CodeMotion Dubai)F# in the real world (CodeMotion Dubai)
F# in the real world (CodeMotion Dubai)Yan Cui
 
F# in the Real World (DDD EA)
F# in the Real World (DDD EA)F# in the Real World (DDD EA)
F# in the Real World (DDD EA)Yan Cui
 
My adventure with Elm
My adventure with ElmMy adventure with Elm
My adventure with ElmYan Cui
 
Tour of language landscape
Tour of language landscapeTour of language landscape
Tour of language landscapeYan Cui
 
The future of paas is serverless
The future of paas is serverlessThe future of paas is serverless
The future of paas is serverlessYan Cui
 
Fear and loathing with APL (oredev)
Fear and loathing with APL (oredev)Fear and loathing with APL (oredev)
Fear and loathing with APL (oredev)Yan Cui
 
Tame cloud complexity with F#-powered DSLs
Tame cloud complexity with F#-powered DSLsTame cloud complexity with F#-powered DSLs
Tame cloud complexity with F#-powered DSLsYan Cui
 
Modelling game economy with neo4j Oredev
Modelling game economy with neo4j OredevModelling game economy with neo4j Oredev
Modelling game economy with neo4j OredevYan Cui
 
Tour of language landscape
Tour of language landscapeTour of language landscape
Tour of language landscapeYan Cui
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the TrenchesYan Cui
 
Modelling game economy with Neo4j
Modelling game economy with Neo4jModelling game economy with Neo4j
Modelling game economy with Neo4jYan Cui
 
Build reactive systems on lambda
Build reactive systems on lambdaBuild reactive systems on lambda
Build reactive systems on lambdaYan Cui
 
F# in the real world (NDC)
F# in the real world (NDC)F# in the real world (NDC)
F# in the real world (NDC)Yan Cui
 

Viewers also liked (20)

F# in real world (LambdaCon15)
F# in real world (LambdaCon15)F# in real world (LambdaCon15)
F# in real world (LambdaCon15)
 
F# in social gaming (CodeMash 15)
F# in social gaming (CodeMash 15)F# in social gaming (CodeMash 15)
F# in social gaming (CodeMash 15)
 
Tour of language landscape (katsconf)
Tour of language landscape (katsconf)Tour of language landscape (katsconf)
Tour of language landscape (katsconf)
 
My adventure with elm (LambdaCon15)
My adventure with elm (LambdaCon15)My adventure with elm (LambdaCon15)
My adventure with elm (LambdaCon15)
 
BigQuery in Social Gaming
BigQuery in Social GamingBigQuery in Social Gaming
BigQuery in Social Gaming
 
Introduction to Aspect Oriented Programming (DDD South West 4.0)
Introduction to Aspect Oriented Programming (DDD South West 4.0)Introduction to Aspect Oriented Programming (DDD South West 4.0)
Introduction to Aspect Oriented Programming (DDD South West 4.0)
 
Tour of language landscape (code.talks)
Tour of language landscape (code.talks)Tour of language landscape (code.talks)
Tour of language landscape (code.talks)
 
F# in the real world (CodeMotion Dubai)
F# in the real world (CodeMotion Dubai)F# in the real world (CodeMotion Dubai)
F# in the real world (CodeMotion Dubai)
 
F# in the Real World (DDD EA)
F# in the Real World (DDD EA)F# in the Real World (DDD EA)
F# in the Real World (DDD EA)
 
My adventure with Elm
My adventure with ElmMy adventure with Elm
My adventure with Elm
 
Tour of language landscape
Tour of language landscapeTour of language landscape
Tour of language landscape
 
The future of paas is serverless
The future of paas is serverlessThe future of paas is serverless
The future of paas is serverless
 
Fear and loathing with APL (oredev)
Fear and loathing with APL (oredev)Fear and loathing with APL (oredev)
Fear and loathing with APL (oredev)
 
Tame cloud complexity with F#-powered DSLs
Tame cloud complexity with F#-powered DSLsTame cloud complexity with F#-powered DSLs
Tame cloud complexity with F#-powered DSLs
 
Modelling game economy with neo4j Oredev
Modelling game economy with neo4j OredevModelling game economy with neo4j Oredev
Modelling game economy with neo4j Oredev
 
Tour of language landscape
Tour of language landscapeTour of language landscape
Tour of language landscape
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
 
Modelling game economy with Neo4j
Modelling game economy with Neo4jModelling game economy with Neo4j
Modelling game economy with Neo4j
 
Build reactive systems on lambda
Build reactive systems on lambdaBuild reactive systems on lambda
Build reactive systems on lambda
 
F# in the real world (NDC)
F# in the real world (NDC)F# in the real world (NDC)
F# in the real world (NDC)
 

Similar to F# in social gaming

(GAM404) Hunting Monsters in a Low-Latency Multiplayer Game on EC2
(GAM404) Hunting Monsters in a Low-Latency Multiplayer Game on EC2(GAM404) Hunting Monsters in a Low-Latency Multiplayer Game on EC2
(GAM404) Hunting Monsters in a Low-Latency Multiplayer Game on EC2Amazon Web Services
 
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...Amazon Web Services
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceESUG
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and AbstractionsMetosin Oy
 
Inside the IT Territory game server / Mark Lokshin (IT Territory)
Inside the IT Territory game server / Mark Lokshin (IT Territory)Inside the IT Territory game server / Mark Lokshin (IT Territory)
Inside the IT Territory game server / Mark Lokshin (IT Territory)DevGAMM Conference
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Peter Gfader
 
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012Eonblast
 
Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...
Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...
Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...Amazon Web Services Korea
 
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...Sencha
 
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesMalin Weiss
 
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSpeedment, Inc.
 
Design for scale
Design for scaleDesign for scale
Design for scaleDoug Lampe
 
Scaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per DayScaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per DayCarmine Paolino
 
Games with your head in the cloud
Games with your head in the cloudGames with your head in the cloud
Games with your head in the cloudJulien Ellie
 
F# Server-side programming
F# Server-side programmingF# Server-side programming
F# Server-side programming7sharp9
 
Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Fwdays
 
Supersize Your Production Pipe
Supersize Your Production PipeSupersize Your Production Pipe
Supersize Your Production Pipeslantsixgames
 
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5osa_ora
 
Cloud Connected Devices on a Global Scale (CPN303) | AWS re:Invent 2013
Cloud Connected Devices on a Global Scale (CPN303) | AWS re:Invent 2013Cloud Connected Devices on a Global Scale (CPN303) | AWS re:Invent 2013
Cloud Connected Devices on a Global Scale (CPN303) | AWS re:Invent 2013Amazon Web Services
 

Similar to F# in social gaming (20)

(GAM404) Hunting Monsters in a Low-Latency Multiplayer Game on EC2
(GAM404) Hunting Monsters in a Low-Latency Multiplayer Game on EC2(GAM404) Hunting Monsters in a Low-Latency Multiplayer Game on EC2
(GAM404) Hunting Monsters in a Low-Latency Multiplayer Game on EC2
 
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
AWS re:Invent 2016| GAM302 | Sony PlayStation: Breaking the Bandwidth Barrier...
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performance
 
Performance and Abstractions
Performance and AbstractionsPerformance and Abstractions
Performance and Abstractions
 
Inside the IT Territory game server / Mark Lokshin (IT Territory)
Inside the IT Territory game server / Mark Lokshin (IT Territory)Inside the IT Territory game server / Mark Lokshin (IT Territory)
Inside the IT Territory game server / Mark Lokshin (IT Territory)
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
 
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
 
Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...
Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...
Gam301 Real-Time Game Analytics with Amazon Redshift, Amazon Kinesis, and Ama...
 
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
SenchaCon 2016: How to Auto Generate a Back-end in Minutes - Per Minborg, Emi...
 
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
 
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in MinutesSenchaCon 2016 - How to Auto Generate a Back-end in Minutes
SenchaCon 2016 - How to Auto Generate a Back-end in Minutes
 
Design for scale
Design for scaleDesign for scale
Design for scale
 
Scaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per DayScaling Machine Learning Systems up to Billions of Predictions per Day
Scaling Machine Learning Systems up to Billions of Predictions per Day
 
Games with your head in the cloud
Games with your head in the cloudGames with your head in the cloud
Games with your head in the cloud
 
F# Server-side programming
F# Server-side programmingF# Server-side programming
F# Server-side programming
 
Scalable game-servers-tgc
Scalable game-servers-tgcScalable game-servers-tgc
Scalable game-servers-tgc
 
Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"Игорь Фесенко "Direction of C# as a High-Performance Language"
Игорь Фесенко "Direction of C# as a High-Performance Language"
 
Supersize Your Production Pipe
Supersize Your Production PipeSupersize Your Production Pipe
Supersize Your Production Pipe
 
Game Development Using HTML 5
Game Development Using HTML 5Game Development Using HTML 5
Game Development Using HTML 5
 
Cloud Connected Devices on a Global Scale (CPN303) | AWS re:Invent 2013
Cloud Connected Devices on a Global Scale (CPN303) | AWS re:Invent 2013Cloud Connected Devices on a Global Scale (CPN303) | AWS re:Invent 2013
Cloud Connected Devices on a Global Scale (CPN303) | AWS re:Invent 2013
 

More from Yan Cui

How to win the game of trade-offs
How to win the game of trade-offsHow to win the game of trade-offs
How to win the game of trade-offsYan Cui
 
How to choose the right messaging service
How to choose the right messaging serviceHow to choose the right messaging service
How to choose the right messaging serviceYan Cui
 
How to choose the right messaging service for your workload
How to choose the right messaging service for your workloadHow to choose the right messaging service for your workload
How to choose the right messaging service for your workloadYan Cui
 
Patterns and practices for building resilient serverless applications.pdf
Patterns and practices for building resilient serverless applications.pdfPatterns and practices for building resilient serverless applications.pdf
Patterns and practices for building resilient serverless applications.pdfYan Cui
 
Lambda and DynamoDB best practices
Lambda and DynamoDB best practicesLambda and DynamoDB best practices
Lambda and DynamoDB best practicesYan Cui
 
Lessons from running AppSync in prod
Lessons from running AppSync in prodLessons from running AppSync in prod
Lessons from running AppSync in prodYan Cui
 
Serverless observability - a hero's perspective
Serverless observability - a hero's perspectiveServerless observability - a hero's perspective
Serverless observability - a hero's perspectiveYan Cui
 
How to ship customer value faster with step functions
How to ship customer value faster with step functionsHow to ship customer value faster with step functions
How to ship customer value faster with step functionsYan Cui
 
How serverless changes the cost paradigm
How serverless changes the cost paradigmHow serverless changes the cost paradigm
How serverless changes the cost paradigmYan Cui
 
Why your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSyncWhy your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSyncYan Cui
 
Build social network in 4 weeks
Build social network in 4 weeksBuild social network in 4 weeks
Build social network in 4 weeksYan Cui
 
Patterns and practices for building resilient serverless applications
Patterns and practices for building resilient serverless applicationsPatterns and practices for building resilient serverless applications
Patterns and practices for building resilient serverless applicationsYan Cui
 
How to bring chaos engineering to serverless
How to bring chaos engineering to serverlessHow to bring chaos engineering to serverless
How to bring chaos engineering to serverlessYan Cui
 
Migrating existing monolith to serverless in 8 steps
Migrating existing monolith to serverless in 8 stepsMigrating existing monolith to serverless in 8 steps
Migrating existing monolith to serverless in 8 stepsYan Cui
 
Building a social network in under 4 weeks with Serverless and GraphQL
Building a social network in under 4 weeks with Serverless and GraphQLBuilding a social network in under 4 weeks with Serverless and GraphQL
Building a social network in under 4 weeks with Serverless and GraphQLYan Cui
 
FinDev as a business advantage in the post covid19 economy
FinDev as a business advantage in the post covid19 economyFinDev as a business advantage in the post covid19 economy
FinDev as a business advantage in the post covid19 economyYan Cui
 
How to improve lambda cold starts
How to improve lambda cold startsHow to improve lambda cold starts
How to improve lambda cold startsYan Cui
 
What can you do with lambda in 2020
What can you do with lambda in 2020What can you do with lambda in 2020
What can you do with lambda in 2020Yan Cui
 
A chaos experiment a day, keeping the outage away
A chaos experiment a day, keeping the outage awayA chaos experiment a day, keeping the outage away
A chaos experiment a day, keeping the outage awayYan Cui
 
How to debug slow lambda response times
How to debug slow lambda response timesHow to debug slow lambda response times
How to debug slow lambda response timesYan Cui
 

More from Yan Cui (20)

How to win the game of trade-offs
How to win the game of trade-offsHow to win the game of trade-offs
How to win the game of trade-offs
 
How to choose the right messaging service
How to choose the right messaging serviceHow to choose the right messaging service
How to choose the right messaging service
 
How to choose the right messaging service for your workload
How to choose the right messaging service for your workloadHow to choose the right messaging service for your workload
How to choose the right messaging service for your workload
 
Patterns and practices for building resilient serverless applications.pdf
Patterns and practices for building resilient serverless applications.pdfPatterns and practices for building resilient serverless applications.pdf
Patterns and practices for building resilient serverless applications.pdf
 
Lambda and DynamoDB best practices
Lambda and DynamoDB best practicesLambda and DynamoDB best practices
Lambda and DynamoDB best practices
 
Lessons from running AppSync in prod
Lessons from running AppSync in prodLessons from running AppSync in prod
Lessons from running AppSync in prod
 
Serverless observability - a hero's perspective
Serverless observability - a hero's perspectiveServerless observability - a hero's perspective
Serverless observability - a hero's perspective
 
How to ship customer value faster with step functions
How to ship customer value faster with step functionsHow to ship customer value faster with step functions
How to ship customer value faster with step functions
 
How serverless changes the cost paradigm
How serverless changes the cost paradigmHow serverless changes the cost paradigm
How serverless changes the cost paradigm
 
Why your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSyncWhy your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSync
 
Build social network in 4 weeks
Build social network in 4 weeksBuild social network in 4 weeks
Build social network in 4 weeks
 
Patterns and practices for building resilient serverless applications
Patterns and practices for building resilient serverless applicationsPatterns and practices for building resilient serverless applications
Patterns and practices for building resilient serverless applications
 
How to bring chaos engineering to serverless
How to bring chaos engineering to serverlessHow to bring chaos engineering to serverless
How to bring chaos engineering to serverless
 
Migrating existing monolith to serverless in 8 steps
Migrating existing monolith to serverless in 8 stepsMigrating existing monolith to serverless in 8 steps
Migrating existing monolith to serverless in 8 steps
 
Building a social network in under 4 weeks with Serverless and GraphQL
Building a social network in under 4 weeks with Serverless and GraphQLBuilding a social network in under 4 weeks with Serverless and GraphQL
Building a social network in under 4 weeks with Serverless and GraphQL
 
FinDev as a business advantage in the post covid19 economy
FinDev as a business advantage in the post covid19 economyFinDev as a business advantage in the post covid19 economy
FinDev as a business advantage in the post covid19 economy
 
How to improve lambda cold starts
How to improve lambda cold startsHow to improve lambda cold starts
How to improve lambda cold starts
 
What can you do with lambda in 2020
What can you do with lambda in 2020What can you do with lambda in 2020
What can you do with lambda in 2020
 
A chaos experiment a day, keeping the outage away
A chaos experiment a day, keeping the outage awayA chaos experiment a day, keeping the outage away
A chaos experiment a day, keeping the outage away
 
How to debug slow lambda response times
How to debug slow lambda response timesHow to debug slow lambda response times
How to debug slow lambda response times
 

Recently uploaded

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

F# in social gaming

Editor's Notes

  1. TODO: mention algebraic data types in relation to DU
  2. The biggest advantage of programming with the Actor model, for me, is the fact that each actor is self-contained and implements an explicit protocol, hence making them very easy to reason with and often it’s possible to look at the code and know that there’s obviously no defect rather than no obvious defect, and that distinction is important.The only operation with the inbox which requires synchronization (as far as I know) is with selective receive using inbox.Scan, otherwise, it’s inherently single-threaded inside the body of an agent (a property of the Actor model).
  3. This is where DU and pattern matching saved me days and possibly even weeks in writing and maintaining the infrastructure that powers our quest and achievement system.
  4. Mention other approaches such as using ActivePatterns with pattern matching, FsLex and FsYacc (lexer and parser generation tools), etc.
  5. * Strong consistency, atomic counters