Finite State Machines - Why the fear?
-
Upload
oscon-byrum -
Category
Technology
-
view
661 -
download
1
description
Transcript of Finite State Machines - Why the fear?
{
Erlang and gen_fsm
@dieswaytoofast (V.P. Ubiquiti Networks)
The Business
The Metrics
Phone Calls per Second
The Metrics
Phone Calls per Second
The Metrics
Simultaneous Phone Calls
The Metrics
Simultaneous Phone Calls
The Metrics
HTTP API requests
The Metrics
HTTP API requests
The Metrics
Self-hosted (kinda)
Voice Response
Call Handling
Call Routing
Call Handling
Self-hosted (kinda)
Bet the farm moment
Concurrency
The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf
Concurrency
Error encapsulation
The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf
Concurrency
Error encapsulation
Fault detection
The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf
Concurrency
Error encapsulation
Fault detection
Fault identification
The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf
Concurrency
Error encapsulation
Fault detection
Fault identification
Code upgrade
The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf
Concurrency
Error encapsulation
Fault detection
Fault identification
Code upgrade
Stable Storage
The Big SixFrom http://www.erlang.org/download/armstrong_thesis_2003.pdf
Erlang
Erlang
gen_server
Behaviours
gen_server
gen_tcp
Behaviours
gen_server
gen_tcp
gen_event
Behaviours
gen_server
gen_tcp
gen_event
gen_fsm
Behaviours
gen_server
gen_tcp
gen_event
gen_fsm
…
Behaviours
gen_server
gen_tcp
gen_event
gen_fsm
…
Behaviours
A System has States
Finite State Machines
A System has States
States transition
Finite State Machines
A System has States
States transition
Transitions are Atomic
Finite State Machines
A System has States
States transition
Transitions are Atomic
Events at Entry and Exit
Finite State Machines
Everything is an FSM
Finite State Machines
Everything is an FSM
Finite State Machines
Everything is an FSM
Finite State Machines
Voice Response
Finite State Machines
Voice Response
Finite State Machines
Voice Response
Finite State Machines
Encapsulation
Call Routing
Finite State Machines
Templates are your friend
So are BIG sheets of paper
Think “Real World”
The Bottom Line