SlideShare a Scribd company logo
@michaelneale
www.CloudBees.com
@michaelneale
github.com/michaelneale
currently: trying to make less reliable things more
reliable.
Some things we use to get it done:
- scala (back end apps)
- ruby (chef, rails, proxymachine, lots)
- java (jenkins and plugins)
- erlang (ā€œagentsā€ and lots more..)
Exceptions. Errors.
What The Hell Is That Process Doing?
and how it relates to..
On Call PTSD
Exception handling is wrong...
But it seems harmless...
Osdc 2011 michael_neale
Osdc 2011 michael_neale
Erlang says no no no...
Question: a process on server not responding
Answer:
1) panic
2) take time thinking about underlying cause
3) bounce the bastard and pray **
FACT: Answer#3 will often work so well, you
often don’t really spend time to think about
doing #2**



** FibreError?
Osdc 2011 michael_neale
Imagine a programming environment:
 - unlimited process spawning
 - concurrency someone else’s problem
 - don’t try to handle errors - let it fail
Erlang
Built for stability, and not bothering me.
Anything else is gravy


I wasn’t an erlang programmer
Process isolation
- it works so well
- nothing shared
- has worked so well for so long with OSes
- in erlang - each ā€˜process’ is like a process !
nginx    Example: My Host OS

     haproxy               Erlang process

                         supervisor
                            ...
                       p1         p999



Each: own heap, garbage collector
Erlang is:
- A vm based runtime (light !)
- language with prolog heritage (!)
- compiler
- interpreter
- debug tools - batteries included
- OTP - an application (server?) platform
Erlang is:
- Not OO
- no shared state **
- state kept in ā€œterm storesā€ - mini DBs
- processes easy to hot swap
- Quasi functional programming
    (immutable variables, higher order)
- distributed (if you want)
Osdc 2011 michael_neale
Osdc 2011 michael_neale
Osdc 2011 michael_neale
OTP
- Open Telecommunications Platform
- not about telco !
- network stacks/apis, supervisor trees
- toolkit for reliable servers (middleware)
- behaviours
Osdc 2011 michael_neale
Osdc 2011 michael_neale
Osdc 2011 michael_neale
State in erlang




files
         Host + real kernel
                        Erlang process

DETS                supervisor
             ...
ETS                p1                    p999



              Send                       Receive
Erlang processes, like OS processes


- Can only send messages to each other
- Can fail independently
- Can be restarted, safely, independently
- Easy to write apps for - Old School !
Better


- Tiny overhead (can have 100K+ of them !)
- perfect for supervisory agents
- distribute: run on every box if you like !
- lots of processes == lots of concurrency
- if you need to block, block !
Have used erlang for


- Supervisory agents - controllers
- Autoscaling services (realtime data analytics)
- misc backend systems
- fun command line tools !
- is ā€œliteā€ VM (startup, footprint)
Supervisor configuration


- Declare rules for restarting, failure
- So you don’t have to intervene !
- can hot reload changes
- can have dependent processes
Restart just busted process
Program 1 (module with behaviour)
Program 2 (module with behaviour)
Anyway, that is why we use Erlang, also...
- RabbitMQ
- Riak (nosql DB)
- CouchDB (nosql DB)
- Probably your telephone exchange
Alternative approaches:
- Use ā€œnativeā€ with daemontools/monit etc
- Akka (Scala) has similar supervisor
- library for your favourite language
- ephemeral ā€œstate lessā€ apps
- Write software without bugs
- Or just restart everything 400 times a day
What is not awesome:
- OTP boiler plate
- VM not as fast as some
- No one seems to like the language
- tools? IDEs?
Thank you

More Related Content

PPSX
Async-await best practices in 10 minutes
Paulo Morgado
Ā 
PDF
Ansible
TizianoPerrucci
Ā 
PPTX
Async in .NET
RTigger
Ā 
PPTX
End to-end async and await
vfabro
Ā 
PPTX
C# 5 deep drive into asynchronous programming
Praveen Prajapati
Ā 
PPTX
CTU June 2011 - C# 5.0 - ASYNC & Await
Spiffy
Ā 
PPTX
Async Programming in C# 5
Pratik Khasnabis
Ā 
PPTX
Asynchronous Programming in ASP.NET
Chris Dufour
Ā 
Async-await best practices in 10 minutes
Paulo Morgado
Ā 
Ansible
TizianoPerrucci
Ā 
Async in .NET
RTigger
Ā 
End to-end async and await
vfabro
Ā 
C# 5 deep drive into asynchronous programming
Praveen Prajapati
Ā 
CTU June 2011 - C# 5.0 - ASYNC & Await
Spiffy
Ā 
Async Programming in C# 5
Pratik Khasnabis
Ā 
Asynchronous Programming in ASP.NET
Chris Dufour
Ā 

What's hot (19)

PPTX
Application Profiling for Memory and Performance
pradeepfn
Ā 
PPTX
Async and Await on the Server
Doug Jones
Ā 
PPTX
Task parallel library presentation
ahmed sayed
Ā 
PDF
Debugging ansible modules
aleonhardt
Ā 
PDF
Cassandra: Not Just NoSQL, It's MoSQL
Eric Evans
Ā 
PDF
Celery introduction
Ionel Mărieș Cristian
Ā 
PPTX
Testing in Scala. Adform Research
Vasil Remeniuk
Ā 
PPTX
Ansible: What, Why & How
Alfonso Cabrera
Ā 
PPTX
Spark intro by Adform Research
Vasil Remeniuk
Ā 
PDF
Play Framework
Eduard Tudenhoefner
Ā 
PDF
Gabriele Santomaggio - Inside Elixir/Erlang - Codemotion Milan 2018
Codemotion
Ā 
PDF
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Alex Balhatchet
Ā 
PPTX
Automating Perl deployments with Hudson
nachbaur
Ā 
PPTX
Async/Await
Jeff Hart
Ā 
PDF
Open stack and_vagrant-os-meetup-2015
yfauser
Ā 
PPTX
Coroutines in Kotlin
Jemo Mgebrishvili
Ā 
PDF
The art of concurrent programming
Iskren Chernev
Ā 
PDF
Gatling @ Scala.Io 2013
slandelle
Ā 
PPTX
Async await
Jeff Hart
Ā 
Application Profiling for Memory and Performance
pradeepfn
Ā 
Async and Await on the Server
Doug Jones
Ā 
Task parallel library presentation
ahmed sayed
Ā 
Debugging ansible modules
aleonhardt
Ā 
Cassandra: Not Just NoSQL, It's MoSQL
Eric Evans
Ā 
Celery introduction
Ionel Mărieș Cristian
Ā 
Testing in Scala. Adform Research
Vasil Remeniuk
Ā 
Ansible: What, Why & How
Alfonso Cabrera
Ā 
Spark intro by Adform Research
Vasil Remeniuk
Ā 
Play Framework
Eduard Tudenhoefner
Ā 
Gabriele Santomaggio - Inside Elixir/Erlang - Codemotion Milan 2018
Codemotion
Ā 
Continuous testing and deployment in Perl (London.pm Technical Meeting Octobe...
Alex Balhatchet
Ā 
Automating Perl deployments with Hudson
nachbaur
Ā 
Async/Await
Jeff Hart
Ā 
Open stack and_vagrant-os-meetup-2015
yfauser
Ā 
Coroutines in Kotlin
Jemo Mgebrishvili
Ā 
The art of concurrent programming
Iskren Chernev
Ā 
Gatling @ Scala.Io 2013
slandelle
Ā 
Async await
Jeff Hart
Ā 
Ad

Viewers also liked (7)

PPTX
č£é£¾čØ­čØˆ
姝妤 陳
Ā 
PDF
Errors and handling them. YOW nights Sydney 2011
Michael Neale
Ā 
PDF
Devoxx 2014 michael_neale
Michael Neale
Ā 
KEY
Scala sydoct2011
Michael Neale
Ā 
PDF
Cors michael
Michael Neale
Ā 
PPTX
Legal counsel it_cv
Legal_Counsel_IT
Ā 
PDF
Cross site calls with javascript - the right way with CORS
Michael Neale
Ā 
č£é£¾čØ­čØˆ
姝妤 陳
Ā 
Errors and handling them. YOW nights Sydney 2011
Michael Neale
Ā 
Devoxx 2014 michael_neale
Michael Neale
Ā 
Scala sydoct2011
Michael Neale
Ā 
Cors michael
Michael Neale
Ā 
Legal counsel it_cv
Legal_Counsel_IT
Ā 
Cross site calls with javascript - the right way with CORS
Michael Neale
Ā 
Ad

Similar to Osdc 2011 michael_neale (20)

PPT
Erlang OTP
Zvi Avraham
Ā 
PDF
FunctionalConf '16 Robert Virding Erlang Ecosystem
Robert Virding
Ā 
PDF
Erlang factory SF 2011 "Erlang and the big switch in social games"
Paolo Negri
Ā 
PDF
Erlang, the big switch in social games
Wooga
Ā 
PDF
Erlang - Concurrent Language for Concurrent World
Zvi Avraham
Ā 
PPT
The Erlang Programming Language
Dennis Byrne
Ā 
PDF
Erlang from behing the trenches by Francesco Cesarini
Naresh Jain
Ā 
PDF
Error Handling Done Differently
CloudBees
Ā 
ODP
An introduction to erlang
Mirko Bonadei
Ā 
PPS
Disrupt
guest6b7220
Ā 
PPS
Erlang plus BDB: Disrupting the Conventional Web Wisdom
guest3933de
Ā 
PPT
Erlang For Five Nines
Barcamp Cork
Ā 
PDF
Let it crash! The Erlang Approach to Building Reliable Services
Brian Troutwine
Ā 
PDF
Erlang Lightning Talk
GiltTech
Ā 
PPTX
Erlang real time
Akshar Desai
Ā 
PDF
You shall not get excited
x697272
Ā 
PDF
Erlang: Software for a Concurrent world
Arjan
Ā 
PDF
Introduction to Erlang Part 2
Dmitry Zinoviev
Ā 
PDF
Introduction To Distributed Erlang
David Dossot
Ā 
PDF
Why Erlang? - Bar Camp Atlanta 2008
boorad
Ā 
Erlang OTP
Zvi Avraham
Ā 
FunctionalConf '16 Robert Virding Erlang Ecosystem
Robert Virding
Ā 
Erlang factory SF 2011 "Erlang and the big switch in social games"
Paolo Negri
Ā 
Erlang, the big switch in social games
Wooga
Ā 
Erlang - Concurrent Language for Concurrent World
Zvi Avraham
Ā 
The Erlang Programming Language
Dennis Byrne
Ā 
Erlang from behing the trenches by Francesco Cesarini
Naresh Jain
Ā 
Error Handling Done Differently
CloudBees
Ā 
An introduction to erlang
Mirko Bonadei
Ā 
Disrupt
guest6b7220
Ā 
Erlang plus BDB: Disrupting the Conventional Web Wisdom
guest3933de
Ā 
Erlang For Five Nines
Barcamp Cork
Ā 
Let it crash! The Erlang Approach to Building Reliable Services
Brian Troutwine
Ā 
Erlang Lightning Talk
GiltTech
Ā 
Erlang real time
Akshar Desai
Ā 
You shall not get excited
x697272
Ā 
Erlang: Software for a Concurrent world
Arjan
Ā 
Introduction to Erlang Part 2
Dmitry Zinoviev
Ā 
Introduction To Distributed Erlang
David Dossot
Ā 
Why Erlang? - Bar Camp Atlanta 2008
boorad
Ā 

More from Michael Neale (11)

PDF
Jenkins X intro (from google app dev conference)
Michael Neale
Ā 
PDF
Cd syd
Michael Neale
Ā 
PDF
Microservices and functional programming
Michael Neale
Ā 
KEY
Java one 2011_michaelneale
Michael Neale
Ā 
KEY
Sjug aug 2010_cloud
Michael Neale
Ā 
KEY
SJUG March 2010 Restful design
Michael Neale
Ā 
PPT
On Scala Slides - OSDC 2009
Michael Neale
Ā 
PPT
Osdc Complex Event Processing
Michael Neale
Ā 
PDF
Scala Sjug 09
Michael Neale
Ā 
PDF
Jaoo Michael Neale 09
Michael Neale
Ā 
PDF
Osdc Michael Neale 2008
Michael Neale
Ā 
Jenkins X intro (from google app dev conference)
Michael Neale
Ā 
Cd syd
Michael Neale
Ā 
Microservices and functional programming
Michael Neale
Ā 
Java one 2011_michaelneale
Michael Neale
Ā 
Sjug aug 2010_cloud
Michael Neale
Ā 
SJUG March 2010 Restful design
Michael Neale
Ā 
On Scala Slides - OSDC 2009
Michael Neale
Ā 
Osdc Complex Event Processing
Michael Neale
Ā 
Scala Sjug 09
Michael Neale
Ā 
Jaoo Michael Neale 09
Michael Neale
Ā 
Osdc Michael Neale 2008
Michael Neale
Ā 

Recently uploaded (20)

PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
Ā 
PDF
Software Development Methodologies in 2025
KodekX
Ā 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
Ā 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
Ā 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
Ā 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
Ā 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
Ā 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
Ā 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
Ā 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
Ā 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
Ā 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
Ā 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
Ā 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
Ā 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
Ā 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
Ā 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
Ā 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
Ā 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
Ā 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
Ā 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
Ā 
Software Development Methodologies in 2025
KodekX
Ā 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
Ā 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
Ā 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
Ā 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
Ā 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
Ā 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
Ā 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
Ā 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
Ā 
Brief History of Internet - Early Days of Internet
sutharharshit158
Ā 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
Ā 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
Ā 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
Ā 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
Ā 
The Future of AI & Machine Learning.pptx
pritsen4700
Ā 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
Ā 
Simple and concise overview about Quantum computing..pptx
mughal641
Ā 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
Ā 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
Ā 

Osdc 2011 michael_neale

  • 2. @michaelneale github.com/michaelneale currently: trying to make less reliable things more reliable.
  • 3. Some things we use to get it done: - scala (back end apps) - ruby (chef, rails, proxymachine, lots) - java (jenkins and plugins) - erlang (ā€œagentsā€ and lots more..)
  • 4. Exceptions. Errors. What The Hell Is That Process Doing? and how it relates to..
  • 7. But it seems harmless...
  • 10. Erlang says no no no...
  • 11. Question: a process on server not responding Answer: 1) panic 2) take time thinking about underlying cause 3) bounce the bastard and pray **
  • 12. FACT: Answer#3 will often work so well, you often don’t really spend time to think about doing #2** ** FibreError?
  • 14. Imagine a programming environment: - unlimited process spawning - concurrency someone else’s problem - don’t try to handle errors - let it fail
  • 15. Erlang Built for stability, and not bothering me. Anything else is gravy I wasn’t an erlang programmer
  • 16. Process isolation - it works so well - nothing shared - has worked so well for so long with OSes - in erlang - each ā€˜process’ is like a process !
  • 17. nginx Example: My Host OS haproxy Erlang process supervisor ... p1 p999 Each: own heap, garbage collector
  • 18. Erlang is: - A vm based runtime (light !) - language with prolog heritage (!) - compiler - interpreter - debug tools - batteries included - OTP - an application (server?) platform
  • 19. Erlang is: - Not OO - no shared state ** - state kept in ā€œterm storesā€ - mini DBs - processes easy to hot swap - Quasi functional programming (immutable variables, higher order) - distributed (if you want)
  • 23. OTP - Open Telecommunications Platform - not about telco ! - network stacks/apis, supervisor trees - toolkit for reliable servers (middleware) - behaviours
  • 27. State in erlang files Host + real kernel Erlang process DETS supervisor ... ETS p1 p999 Send Receive
  • 28. Erlang processes, like OS processes - Can only send messages to each other - Can fail independently - Can be restarted, safely, independently - Easy to write apps for - Old School !
  • 29. Better - Tiny overhead (can have 100K+ of them !) - perfect for supervisory agents - distribute: run on every box if you like ! - lots of processes == lots of concurrency - if you need to block, block !
  • 30. Have used erlang for - Supervisory agents - controllers - Autoscaling services (realtime data analytics) - misc backend systems - fun command line tools ! - is ā€œliteā€ VM (startup, footprint)
  • 31. Supervisor configuration - Declare rules for restarting, failure - So you don’t have to intervene ! - can hot reload changes - can have dependent processes
  • 33. Program 1 (module with behaviour)
  • 34. Program 2 (module with behaviour)
  • 35. Anyway, that is why we use Erlang, also... - RabbitMQ - Riak (nosql DB) - CouchDB (nosql DB) - Probably your telephone exchange
  • 36. Alternative approaches: - Use ā€œnativeā€ with daemontools/monit etc - Akka (Scala) has similar supervisor - library for your favourite language - ephemeral ā€œstate lessā€ apps - Write software without bugs - Or just restart everything 400 times a day
  • 37. What is not awesome: - OTP boiler plate - VM not as fast as some - No one seems to like the language - tools? IDEs?

Editor's Notes