SlideShare a Scribd company logo
{
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
x 1000
 Simultaneous Phone Calls
The Metrics
 Simultaneous Phone Calls
The Metrics
x 10,000
 HTTP API requests
The Metrics
 HTTP API requests
The Metrics
x ∞
 Self-hosted (kinda)
 Voice Response
Call Handling
init
Setup Call
Get Caller
Name
Play Transfer
Message
Got Caller
Name
Dial
 Call Routing
Call Handling
dial_in
Check
Blacklist
get_endpoint conference Play Error
Hangupauto_attendant
dial_in_fml conference
init
Check node
Check
Blacklist
Cancelled Blacklisted Next Endpoint Collections Unknown
Move node
Auto Attendant FML Voicemail FaxConference
 Self-hosted (kinda)
Bet the farm moment
ERLANG!!!
 Concurrency
The Big Six
From http://www.erlang.org/download/armstrong_thesis_2003.pdf
 Concurrency
 Error encapsulation
The Big Six
From http://www.erlang.org/download/armstrong_thesis_2003.pdf
 Concurrency
 Error encapsulation
 Fault detection
The Big Six
From http://www.erlang.org/download/armstrong_thesis_2003.pdf
 Concurrency
 Error encapsulation
 Fault detection
 Fault identification
The Big Six
From http://www.erlang.org/download/armstrong_thesis_2003.pdf
 Concurrency
 Error encapsulation
 Fault detection
 Fault identification
 Code upgrade
The Big Six
From http://www.erlang.org/download/armstrong_thesis_2003.pdf
 Concurrency
 Error encapsulation
 Fault detection
 Fault identification
 Code upgrade
 Stable Storage
The Big Six
From http://www.erlang.org/download/armstrong_thesis_2003.pdf
Erlang
Concurrency Hell
My Blue Heaven My Blue Heaven
Erlang
Concurrency Hell
My Blue Heaven
Deep Problems
My Blue Heaven
Deep Problems
 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
asleepStart
out of
bed
Coffee!!
 A System has States
 States transition
Finite State Machines
asleepStart
out of
bed
Coffee!!
 A System has States
 States transition
 Transitions are Atomic
Finite State Machines
asleepStart
out of
bed
Coffee!!
NOTHING HERE
 A System has States
 States transition
 Transitions are Atomic
 Events at Entry and Exit
Finite State Machines
asleepStart
out of
bed
Riiiiiiiiing Brush Teeth
Coffee!!
asleepStart
out of
bed
Coffee!!
asleepStart
out of
bed
Riiiiiiiiing Brush Teeth
Coffee!!
asleepStart
out of
bed
Riiiiiiiiing Brush Teeth
Coffee!!
asleepStart
out of
bed
Coffee!!
asleepStart
out of
bed
Riiiiiiiiing Brush Teeth
Coffee!!
HUH?
asleepStart
out of
bed
Riiiiiiiiing Brush Teeth
Coffee!!
asleepStart
out of
bed
Riiiiiiiiing Brush Teeth
Coffee!!
W
00t!
Un-
Auth
Start
Token
Req.
Stop
Un-
Auth
Start
Token
Req.
Stop
Get
Request
Token
Get
Access
Token
Request
Token
Access
Token
Un-
Auth
Start
Token
Req.
Stop
Get
Request
Token
Get
Access
Token
Request
Token
Access
Token
Un-
Auth
Start
Token
Req.
Stop
Get
Request
Token
Get
Access
Token
Request
Token
Access
Token
Un-
Auth
Start
Token
Req.
Stop
Get
Request
Token
Get
Access
Token
Request
Token
Access
Token
Un-
Auth
Start
Token
Req.
Stop
Get
Request
Token
Get
Access
Token
Request
Token
Access
Token
Un-
Auth
Start
Token
Req.
Stop
Get
Request
Token
Get
Access
Token
Request
Token
Access
Token
Un-
Auth
Start
Token
Req.
Stop
Get
Request
Token
Get
Access
Token
Request
Token
Access
Token
Un-
Auth
Start
Token
Req.
Stop
Get
Request
Token
Get
Access
Token
Request
Token
Access
Token
 Everything is an FSM
Finite State Machines
 Everything is an FSM
Finite State Machines
COM
PLEXITY?
 Everything is an FSM
Finite State Machines
ENCAPSULATION!
 Voice Response
Finite State Machines
init
Setup Call
Get Caller
Name
Play Transfer
Message
Got Caller
Name
Dial
 Voice Response
Finite State Machines
init
Setup Call
Get Caller
Name
Play Transfer
Message
Got Caller
Name
Dial
 Voice Response
Finite State Machines
init
Setup Call
Get Caller
Name
Play Transfer
Message
Got Caller
Name
Dial
ENCAPSULATION!
Encapsulation
Concurrency Hell
My Blue Heaven
Deep Problems
My Blue Heaven
Deep Problems
 Call Routing
Finite State Machines
dial_in
Check
Blacklist
get_endpoint conference Play Error
Hangupauto_attendant
dial_in_fml conference
init
Check node
Check
Blacklist
Cancelled Blacklisted Next Endpoint Collections Unknown
Move node
Auto Attendant FML Voicemail FaxConference
 Templates are your friend
 So are BIG sheets of paper
 Think “Real World”
The Bottom Line
Finite State Machines - Why the fear?

More Related Content

Viewers also liked

Temática del blog
Temática del blogTemática del blog
Temática del blogmmartinez126
 
Marlon ernesto
Marlon ernestoMarlon ernesto
Marlon ernesto
Marlon Melara
 
Capítulo 4 libro zacatollan una hist... copia
Capítulo 4 libro zacatollan una hist...   copiaCapítulo 4 libro zacatollan una hist...   copia
Capítulo 4 libro zacatollan una hist... copia
Cesar Adame
 
NUBE ELECTRÓNICA
NUBE ELECTRÓNICANUBE ELECTRÓNICA
NUBE ELECTRÓNICA
LUISRUBINOS
 
Untitled presentation
Untitled presentationUntitled presentation
Untitled presentationjuantoro527
 
Presentacion enviroo institucional_abril2012
Presentacion enviroo institucional_abril2012Presentacion enviroo institucional_abril2012
Presentacion enviroo institucional_abril2012enviroo
 
Mito ediporeyequipo2
Mito ediporeyequipo2Mito ediporeyequipo2
Mito ediporeyequipo2CARMENALBAMTZ
 
La guitarra
La guitarraLa guitarra
La guitarra
Felipe Olaya Ospina
 
ORACIONES AL PADRE
ORACIONES AL PADREORACIONES AL PADRE
ORACIONES AL PADRE
Jorge Enrique Carrera Chong
 
12 errores con hijos
12 errores con hijos12 errores con hijos
12 errores con hijos
Víctor Alonso
 
Curso comunicación y marketing
Curso comunicación y marketingCurso comunicación y marketing
Curso comunicación y marketing
APFOS
 
Clase demostrativa
Clase demostrativaClase demostrativa
Clase demostrativaLeo Tuqueres
 
Kiss and say.....pps by d.
Kiss and say.....pps by d.Kiss and say.....pps by d.
Kiss and say.....pps by d.
D. Ynoche
 

Viewers also liked (16)

Temática del blog
Temática del blogTemática del blog
Temática del blog
 
Marlon ernesto
Marlon ernestoMarlon ernesto
Marlon ernesto
 
Emprendimiento pg 59
Emprendimiento pg 59Emprendimiento pg 59
Emprendimiento pg 59
 
Capítulo 4 libro zacatollan una hist... copia
Capítulo 4 libro zacatollan una hist...   copiaCapítulo 4 libro zacatollan una hist...   copia
Capítulo 4 libro zacatollan una hist... copia
 
NUBE ELECTRÓNICA
NUBE ELECTRÓNICANUBE ELECTRÓNICA
NUBE ELECTRÓNICA
 
Untitled presentation
Untitled presentationUntitled presentation
Untitled presentation
 
Presentacion enviroo institucional_abril2012
Presentacion enviroo institucional_abril2012Presentacion enviroo institucional_abril2012
Presentacion enviroo institucional_abril2012
 
Precio
PrecioPrecio
Precio
 
Mito ediporeyequipo2
Mito ediporeyequipo2Mito ediporeyequipo2
Mito ediporeyequipo2
 
La guitarra
La guitarraLa guitarra
La guitarra
 
ORACIONES AL PADRE
ORACIONES AL PADREORACIONES AL PADRE
ORACIONES AL PADRE
 
web 1.0 vs web 2.0
web 1.0 vs web 2.0web 1.0 vs web 2.0
web 1.0 vs web 2.0
 
12 errores con hijos
12 errores con hijos12 errores con hijos
12 errores con hijos
 
Curso comunicación y marketing
Curso comunicación y marketingCurso comunicación y marketing
Curso comunicación y marketing
 
Clase demostrativa
Clase demostrativaClase demostrativa
Clase demostrativa
 
Kiss and say.....pps by d.
Kiss and say.....pps by d.Kiss and say.....pps by d.
Kiss and say.....pps by d.
 

More from OSCON Byrum

OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom FifieldOSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON Byrum
 
Protecting Open Innovation with the Defensive Patent License
Protecting Open Innovation with the Defensive Patent LicenseProtecting Open Innovation with the Defensive Patent License
Protecting Open Innovation with the Defensive Patent License
OSCON Byrum
 
Using Cascalog to build an app with City of Palo Alto Open Data
Using Cascalog to build an app with City of Palo Alto Open DataUsing Cascalog to build an app with City of Palo Alto Open Data
Using Cascalog to build an app with City of Palo Alto Open Data
OSCON Byrum
 
How we built our community using Github - Uri Cohen
How we built our community using Github - Uri CohenHow we built our community using Github - Uri Cohen
How we built our community using Github - Uri Cohen
OSCON Byrum
 
The Vanishing Pattern: from iterators to generators in Python
The Vanishing Pattern: from iterators to generators in PythonThe Vanishing Pattern: from iterators to generators in Python
The Vanishing Pattern: from iterators to generators in Python
OSCON Byrum
 
Distributed Coordination with Python
Distributed Coordination with PythonDistributed Coordination with Python
Distributed Coordination with Python
OSCON Byrum
 
An overview of open source in East Asia (China, Japan, Korea)
An overview of open source in East Asia (China, Japan, Korea)An overview of open source in East Asia (China, Japan, Korea)
An overview of open source in East Asia (China, Japan, Korea)
OSCON Byrum
 
Oscon 2013 Jesse Anderson
Oscon 2013 Jesse AndersonOscon 2013 Jesse Anderson
Oscon 2013 Jesse Anderson
OSCON Byrum
 
US Patriot Act OSCON2012 David Mertz
US Patriot Act OSCON2012 David MertzUS Patriot Act OSCON2012 David Mertz
US Patriot Act OSCON2012 David Mertz
OSCON Byrum
 
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
OSCON Byrum
 
Big Data for each one of us
Big Data for each one of usBig Data for each one of us
Big Data for each one of usOSCON Byrum
 
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
OSCON Byrum
 
Declarative web data visualization using ClojureScript
Declarative web data visualization using ClojureScriptDeclarative web data visualization using ClojureScript
Declarative web data visualization using ClojureScriptOSCON Byrum
 
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
Using and Building Open Source in Google Corporate Engineering - Justin McWil...Using and Building Open Source in Google Corporate Engineering - Justin McWil...
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
OSCON Byrum
 
A Look at the Network: Searching for Truth in Distributed Applications
A Look at the Network: Searching for Truth in Distributed ApplicationsA Look at the Network: Searching for Truth in Distributed Applications
A Look at the Network: Searching for Truth in Distributed Applications
OSCON Byrum
 
Life After Sharding: Monitoring and Management of a Complex Data Cloud
Life After Sharding: Monitoring and Management of a Complex Data CloudLife After Sharding: Monitoring and Management of a Complex Data Cloud
Life After Sharding: Monitoring and Management of a Complex Data Cloud
OSCON Byrum
 
Faster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesFaster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypes
OSCON Byrum
 
Comparing open source private cloud platforms
Comparing open source private cloud platformsComparing open source private cloud platforms
Comparing open source private cloud platforms
OSCON Byrum
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
OSCON Byrum
 
Building an Ecosystem of FLOSS to Educate Students with Disabilities
Building an Ecosystem of FLOSS to Educate Students with DisabilitiesBuilding an Ecosystem of FLOSS to Educate Students with Disabilities
Building an Ecosystem of FLOSS to Educate Students with Disabilities
OSCON Byrum
 

More from OSCON Byrum (20)

OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom FifieldOSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
OSCON 2013 - Planning an OpenStack Cloud - Tom Fifield
 
Protecting Open Innovation with the Defensive Patent License
Protecting Open Innovation with the Defensive Patent LicenseProtecting Open Innovation with the Defensive Patent License
Protecting Open Innovation with the Defensive Patent License
 
Using Cascalog to build an app with City of Palo Alto Open Data
Using Cascalog to build an app with City of Palo Alto Open DataUsing Cascalog to build an app with City of Palo Alto Open Data
Using Cascalog to build an app with City of Palo Alto Open Data
 
How we built our community using Github - Uri Cohen
How we built our community using Github - Uri CohenHow we built our community using Github - Uri Cohen
How we built our community using Github - Uri Cohen
 
The Vanishing Pattern: from iterators to generators in Python
The Vanishing Pattern: from iterators to generators in PythonThe Vanishing Pattern: from iterators to generators in Python
The Vanishing Pattern: from iterators to generators in Python
 
Distributed Coordination with Python
Distributed Coordination with PythonDistributed Coordination with Python
Distributed Coordination with Python
 
An overview of open source in East Asia (China, Japan, Korea)
An overview of open source in East Asia (China, Japan, Korea)An overview of open source in East Asia (China, Japan, Korea)
An overview of open source in East Asia (China, Japan, Korea)
 
Oscon 2013 Jesse Anderson
Oscon 2013 Jesse AndersonOscon 2013 Jesse Anderson
Oscon 2013 Jesse Anderson
 
US Patriot Act OSCON2012 David Mertz
US Patriot Act OSCON2012 David MertzUS Patriot Act OSCON2012 David Mertz
US Patriot Act OSCON2012 David Mertz
 
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
OSCON 2012 US Patriot Act Implications for Cloud Computing - Diane Mueller, A...
 
Big Data for each one of us
Big Data for each one of usBig Data for each one of us
Big Data for each one of us
 
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
BodyTrack: Open Source Tools for Health Empowerment through Self-Tracking
 
Declarative web data visualization using ClojureScript
Declarative web data visualization using ClojureScriptDeclarative web data visualization using ClojureScript
Declarative web data visualization using ClojureScript
 
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
Using and Building Open Source in Google Corporate Engineering - Justin McWil...Using and Building Open Source in Google Corporate Engineering - Justin McWil...
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
 
A Look at the Network: Searching for Truth in Distributed Applications
A Look at the Network: Searching for Truth in Distributed ApplicationsA Look at the Network: Searching for Truth in Distributed Applications
A Look at the Network: Searching for Truth in Distributed Applications
 
Life After Sharding: Monitoring and Management of a Complex Data Cloud
Life After Sharding: Monitoring and Management of a Complex Data CloudLife After Sharding: Monitoring and Management of a Complex Data Cloud
Life After Sharding: Monitoring and Management of a Complex Data Cloud
 
Faster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypesFaster! Faster! Accelerate your business with blazing prototypes
Faster! Faster! Accelerate your business with blazing prototypes
 
Comparing open source private cloud platforms
Comparing open source private cloud platformsComparing open source private cloud platforms
Comparing open source private cloud platforms
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
 
Building an Ecosystem of FLOSS to Educate Students with Disabilities
Building an Ecosystem of FLOSS to Educate Students with DisabilitiesBuilding an Ecosystem of FLOSS to Educate Students with Disabilities
Building an Ecosystem of FLOSS to Educate Students with Disabilities
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 

Finite State Machines - Why the fear?

Editor's Notes

  1. So, I started a phone company. It was a great thing. Phones make people happy, right?
  2. Yeah. Kids. Don’t do this at home. Don’t start a phone company.
  3. But I did. Hosted phone services for SMBs. Vonage for small businesses. In the cloud. Awesome
  4. 3 orders of magnitude
  5. 4 orders of magnitude
  6. Infinity!
  7. Houston – we have a problem
  8. Consider the simplest case of handling a call
  9. It actually gets a lot more complex
  10. And eventually, a *lot* more complex
  11. To put it differently,It was a “bet the farm” moment
  12. And it basically involved a lot of beer
  13. And we rewrote the whole damn thing in Erlang. WhyErlang? Well, Fault Tolerance, basicallyAnd oh, I’m not putting Kirk up there. That’s too obvious.
  14. The Six Essential Characteristics of a Fault Tolerant System
  15. The Six Essential Characteristics of a Fault Tolerant System
  16. The Six Essential Characteristics of a Fault Tolerant System
  17. The Six Essential Characteristics of a Fault Tolerant System
  18. The Six Essential Characteristics of a Fault Tolerant System
  19. The Six Essential Characteristics of a Fault Tolerant System
  20. ‘Distributed’ problems mean you spend a huge chunk of your time dealing with theadminstrivia of distribution.With erlang you get that for free!
  21. Ok, not really true. You still have to deal with ‘deep problems’ (hard core parallelization issues, etc.)But you’d have to deal with that anyhow!
  22. Implement the server part of a client/server relationship
  23. Talk to tcp over sockets
  24. Event handling
  25. Finite state machines
  26. And a bunch more (gen_udp, gen_utp!, etc.)
  27. But, we’re talking about Finite State Machines
  28. Lets talk about FSMs
  29. Putting this into practice, here is some code
  30. A system has states
  31. When certain events show up
  32. You do something
  33. And transition to the next state
  34. Wait, WHUT? Where did the “events” come from?
  35. I’m glad you asked  more code
  36. And thusly an event is sent
  37. Voila, an ErlangFSM
  38. 2.0 is anightmare; Stick w/ 1.0
  39. A system has states
  40. Events and transitions
  41. The code
  42. The states
  43. When you receive an event
  44. try to do something
  45. If it works go to the next state
  46. If it fails, go to a differen state
  47. Thusly
  48. And now for the events
  49. But wait! What if you walk out partway?
  50. So, a wee bit triclyhere -
  51. We have a timeout
  52. And it tells you where to go after the timeout
  53. And, you’re done.
  54. Lets look at this as a ‘real world” thingy
  55. But, you say, BUT, what about the complexity of dealing with FSMs? They’re big! And unweildy!
  56. Nah. They aren’t. Not in Erlang
  57. Remember this? It was a PITA? Actually, a small part of a PITA?
  58. But each one is tightly encapsulated, and clean.It’s the Erlang Way
  59. But each one is tightly encapsulated, and clean.It’s the Erlang Way
  60. My fanciful slides are actually real. This actually happens.
  61. And it’s the same for everything else I showed. FSMs of FSMs.
  62. An FSM of FSMs of FSMsBuilding these out “correctly”, in real time, is (was!) trivial
  63. “Real World”  Business Rules can help. (VM,syncrhonziation)