SlideShare a Scribd company logo
Lessons	
  	
  From	
  	
  Erlang
Michał	
  Ślaski	
  	
  	
  	
  @michalslaski	
  
!
!
!
	
  	
  	
  4Developers,	
  20.04.2015
Erlang	
  timeline	
  and	
  my	
  background
Erlang	
  timeline	
  and	
  my	
  background
Started	
  out	
  in	
  the	
  Ericsson	
  software	
  lab	
  1987	
  (!)
Erlang	
  timeline	
  and	
  my	
  background
Started	
  out	
  in	
  the	
  Ericsson	
  software	
  lab	
  1987	
  (!)
• I	
  was	
  six	
  years	
  old

Erlang	
  timeline	
  and	
  my	
  background
Started	
  out	
  in	
  the	
  Ericsson	
  software	
  lab	
  1987	
  (!)
• I	
  was	
  six	
  years	
  old

Released	
  as	
  open	
  source	
  in	
  1998
Erlang	
  timeline	
  and	
  my	
  background
Started	
  out	
  in	
  the	
  Ericsson	
  software	
  lab	
  1987	
  (!)
• I	
  was	
  six	
  years	
  old

Released	
  as	
  open	
  source	
  in	
  1998
• I	
  started	
  computer	
  science	
  at	
  AGH	
  2	
  years	
  later

Erlang	
  timeline	
  and	
  my	
  background
Started	
  out	
  in	
  the	
  Ericsson	
  software	
  lab	
  1987	
  (!)
• I	
  was	
  six	
  years	
  old

Released	
  as	
  open	
  source	
  in	
  1998
• I	
  started	
  computer	
  science	
  at	
  AGH	
  2	
  years	
  later

Gains	
  SMP	
  support	
  in	
  2005
Erlang	
  timeline	
  and	
  my	
  background
Started	
  out	
  in	
  the	
  Ericsson	
  software	
  lab	
  1987	
  (!)
• I	
  was	
  six	
  years	
  old

Released	
  as	
  open	
  source	
  in	
  1998
• I	
  started	
  computer	
  science	
  at	
  AGH	
  2	
  years	
  later

Gains	
  SMP	
  support	
  in	
  2005
• I	
  just	
  graduated	
  and	
  joined	
  Erlang	
  Solutions
Maintenance	
  vs.	
  Development
Maintenance	
  vs.	
  Development
Maintenance	
  may	
  span	
  for	
  20	
  years,

whereas	
  development	
  may	
  be	
  1-­‐2	
  years.	
  	
  
!
!
!
!
!
!
!
!
!
Schach,	
  R.,	
  Software	
  Engineering

Fourth	
  Edition,	
  McGraw-­‐Hill,	
  Boston,	
  MA	
  1999

Erlang	
  properties
Erlang	
  properties
OTP	
  behaviours	
  
• set	
  of	
  design	
  patterns	
  
• client-­‐server,	
  fsm,	
  supervisor	
  
• application,	
  release

Erlang	
  properties
OTP	
  behaviours	
  
• set	
  of	
  design	
  patterns	
  
• client-­‐server,	
  fsm,	
  supervisor	
  
• application,	
  release

What	
  for?	
  
• consistent	
  maintenance	
  procedures	
  
• one	
  tar	
  ball	
  artefact
Erlang	
  OTP	
  releases
$ ls -l ../abacus.tar
-rw-r--r-- 1 ms staff 12331520 Oct 31 12:01 abacus.tar
!
$ ls -1
bin
erts-6.1
lib
releases
!
$ ./bin/abacus
Erlang/OTP 17 [erts-6.1] [smp:4:4] 

[async-threads:10] [kernel-poll:false]
!
Eshell V6.1 (abort with ^G)
(abacus@127.0.0.1)1>
github.com/michalslaski/erlang-­‐workshop
Erlang	
  properties
Erlang	
  properties
Robustness	
  
• simple	
  and	
  consistent	
  error	
  recovery	
  
• supervision	
  hierarchies	
  
• program	
  for	
  the	
  correct	
  case	
  
• let	
  it	
  crash

Erlang	
  properties
Robustness	
  
• simple	
  and	
  consistent	
  error	
  recovery	
  
• supervision	
  hierarchies	
  
• program	
  for	
  the	
  correct	
  case	
  
• let	
  it	
  crash

What	
  for?	
  
• resilient	
  to	
  bugs	
  and	
  failures
Erlang	
  properties	
  -­‐	
  supervision	
  tree
Erlang	
  properties	
  -­‐	
  supervision	
  tree
Erlang	
  properties	
  -­‐	
  supervision	
  tree
Erlang	
  properties	
  -­‐	
  supervision	
  tree
supervisor
Erlang	
  properties	
  -­‐	
  supervision	
  tree
supervisor
worker
Erlang	
  properties	
  -­‐	
  supervision	
  tree
supervisor
worker
Erlang	
  properties	
  -­‐	
  supervision	
  tree
supervisor
worker
Erlang	
  properties	
  -­‐	
  supervision	
  tree
supervisor
worker
Erlang	
  properties
Erlang	
  properties
Distribution	
  
• explicit	
  or	
  transparent	
  distribution	
  
• network-­‐aware	
  runtime	
  system

Erlang	
  properties
Distribution	
  
• explicit	
  or	
  transparent	
  distribution	
  
• network-­‐aware	
  runtime	
  system

What	
  for?	
  
• remote	
  Erlang	
  shell	
  (REPL)	
  
• remote	
  observing	
  tools
Erlang	
  properties	
  -­‐	
  distribution
Erlang	
  properties	
  -­‐	
  distribution
cat
Erlang	
  properties	
  -­‐	
  distribution
cat
flea
Erlang	
  properties	
  -­‐	
  distribution
cat
flea
nodes() =
[cat@home, flea@home]
Erlang	
  properties	
  -­‐	
  distribution
cat dog
flea bird
nodes() =
[cat@home, flea@home]
Erlang	
  properties	
  -­‐	
  distribution
cat dog
flea bird
nodes() =
[cat@home, flea@home]
nodes() =
[dog@home, bird@home]
Erlang	
  properties	
  -­‐	
  distribution
cat dog
flea bird
nodes() =
[cat@home, flea@home]
nodes() =
[dog@home, bird@home]
Erlang	
  properties	
  -­‐	
  distribution
cat dog
flea bird
nodes() =
[cat@home, flea@home, dog@work, bird@work]
entop	
  vs.	
  top
entop	
  vs.	
  top
entop	
  vs.	
  top
https://github.com/mazenharake/entop
Erlang	
  properties
Erlang	
  properties
Hot	
  code	
  loading	
  
• easily	
  change	
  code	
  in	
  a	
  running	
  system	
  
• enables	
  non-­‐stop	
  operation	
  
• simplifies	
  testing

Erlang	
  properties
Hot	
  code	
  loading	
  
• easily	
  change	
  code	
  in	
  a	
  running	
  system	
  
• enables	
  non-­‐stop	
  operation	
  
• simplifies	
  testing

What	
  for?	
  
• shorter	
  development	
  cycle	
  
• non-­‐stop	
  operations
Erlang	
  properties
Erlang	
  properties
Tracing	
  in	
  Erlang	
  VM	
  
• Tracing	
  is	
  turned	
  on/off	
  per	
  process	
  
• function	
  calls,	
  message	
  passing,	
  GC,	
  scheduler

Erlang	
  properties
Tracing	
  in	
  Erlang	
  VM	
  
• Tracing	
  is	
  turned	
  on/off	
  per	
  process	
  
• function	
  calls,	
  message	
  passing,	
  GC,	
  scheduler

What	
  for?	
  
• live	
  debugging	
  
• no	
  need	
  to	
  instrument	
  code	
  and	
  recompile
Erlang	
  tracing
courtesy	
  of	
  Mats	
  Cronqvist
Erlang	
  tracing	
  calls
Erlang	
  tracing	
  calls
redbug	
  -­‐	
  github.com/massemanet/eper	
  
• tracing	
  tool	
  built	
  on	
  top	
  of	
  erlang:trace/3
Erlang	
  tracing	
  calls
redbug	
  -­‐	
  github.com/massemanet/eper	
  
• tracing	
  tool	
  built	
  on	
  top	
  of	
  erlang:trace/3
1> redbug:start("lists:seq(X,Y) -> return").
{30,1}!
2> lists:seq(1,5).!
[1,2,3,4,5]!
!
% 12:32:17 <0.32.0>({erlang,apply,2})!
% lists:seq(1, 5)!
!
% 12:32:17 <0.32.0>({erlang,apply,2})!
% lists:seq/2 -> [1,2,3,4,5]
Flame	
  Graphs	
  for	
  Erlang	
  -­‐	
  eflame
Flame	
  Graphs	
  for	
  Erlang	
  -­‐	
  eflame
github.com/proger/eflame	
  
• as	
  stacks	
  are	
  collected	
  through	
  tracing,

blocking	
  calls	
  are	
  noticed	
  and	
  are	
  drawn	
  in	
  blue
Flame	
  Graphs	
  for	
  Erlang	
  -­‐	
  eflame
github.com/proger/eflame	
  
• as	
  stacks	
  are	
  collected	
  through	
  tracing,

blocking	
  calls	
  are	
  noticed	
  and	
  are	
  drawn	
  in	
  blue
What’s	
  next?
Erlang	
  the	
  Movie
Erlang	
  the	
  Movie
Erlang	
  the	
  Movie	
  II
Erlang	
  the	
  Movie	
  II
Open	
  source	
  projects
Open	
  source	
  projects
• RabbitMQ	
  message	
  broker	
  

Open	
  source	
  projects
• RabbitMQ	
  message	
  broker	
  

• MongooseIM	
  XMPP	
  server

Open	
  source	
  projects
• RabbitMQ	
  message	
  broker	
  

• MongooseIM	
  XMPP	
  server

• Riak	
  database

Open	
  source	
  projects
• RabbitMQ	
  message	
  broker	
  

• MongooseIM	
  XMPP	
  server

• Riak	
  database

• CouchDB	
  database
Erlang	
  Community
Erlang	
  Community
Erlang	
  Central	
  
• www.erlangcentral.org

Erlang	
  Community
Erlang	
  Central	
  
• www.erlangcentral.org

Erlang	
  User	
  Conference	
  
• Stockholm,	
  June	
  2015
Erlang	
  Community
Erlang	
  Central	
  
• www.erlangcentral.org

Erlang	
  User	
  Conference	
  
• Stockholm,	
  June	
  2015
Erlang	
  Community
Erlang	
  Central	
  
• www.erlangcentral.org

Erlang	
  User	
  Conference	
  
• Stockholm,	
  June	
  2015
Lambda	
  Academy	
  
• lambdaacademy.org,	
  March-­‐June	
  2015
Questions?
!
Michał	
  Ślaski	
  	
  	
  	
  	
  @michalslaski

More Related Content

PDF
Habitat Service Discovery
KEY
Rails is Secure
PDF
Big data made easy with a Spark
KEY
PL/Parrot San Francisco Perl Mongers 2010/05/25
PDF
Александр Воронов | Building CLI with Swift
PPTX
4 yarova sara
DOCX
Metacognición vi
PDF
Ensayos clinicos 2004-insp
Habitat Service Discovery
Rails is Secure
Big data made easy with a Spark
PL/Parrot San Francisco Perl Mongers 2010/05/25
Александр Воронов | Building CLI with Swift
4 yarova sara
Metacognición vi
Ensayos clinicos 2004-insp

Viewers also liked (16)

PPT
Mitos tic
PPTX
Sociedad de la información
PDF
Effects of PAHs on Human Health
PPTX
Boise State Blackboard Conference -- Building Learning Community
PPTX
La computadora
PPTX
Antivirus
PDF
Manipulación de imagen 1
PDF
Courrier au maire sur le stade arnauné 25 03 16
PPT
суффиксы причастий
PPT
Cancer consideration 2
PDF
Territorios inteligentes orientados al desarrollo del turismo f
PDF
Sociologie 2
ODP
MITOS DE LA SOCIEDAD DE LA INFORMACIÓN.
PPT
Cancer consideration 3
Mitos tic
Sociedad de la información
Effects of PAHs on Human Health
Boise State Blackboard Conference -- Building Learning Community
La computadora
Antivirus
Manipulación de imagen 1
Courrier au maire sur le stade arnauné 25 03 16
суффиксы причастий
Cancer consideration 2
Territorios inteligentes orientados al desarrollo del turismo f
Sociologie 2
MITOS DE LA SOCIEDAD DE LA INFORMACIÓN.
Cancer consideration 3
Ad

Similar to 4Developers 2015: Lessons for Erlang VM - Michał Ślaski (20)

PDF
SE2016 Exotic Valerii Vasylkov "Erlang. Measurements and benefits"
PDF
Valerii Vasylkov Erlang. measurements and benefits.
PDF
NDC London 2014: Erlang Patterns Matching Business Needs
PDF
Erlang factory SF 2011 "Erlang and the big switch in social games"
PDF
Erlang, the big switch in social games
PDF
Erlang from behing the trenches by Francesco Cesarini
PPT
Erlang OTP
PPTX
Erlang os
PPTX
Erlang latest version & opensource projects
PPT
Erlang For Five Nines
KEY
Osdc 2011 michael_neale
PDF
A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013
PDF
Erlang Developments: The Good, The Bad and The Ugly
PDF
Erlang - Concurrent Language for Concurrent World
PPS
Disrupt
PPS
Erlang plus BDB: Disrupting the Conventional Web Wisdom
PPT
The Erlang Programming Language
ODP
An introduction to erlang
PDF
"erlang, webmail and hibari" at Rakuten tech talk
PDF
Erlang
SE2016 Exotic Valerii Vasylkov "Erlang. Measurements and benefits"
Valerii Vasylkov Erlang. measurements and benefits.
NDC London 2014: Erlang Patterns Matching Business Needs
Erlang factory SF 2011 "Erlang and the big switch in social games"
Erlang, the big switch in social games
Erlang from behing the trenches by Francesco Cesarini
Erlang OTP
Erlang os
Erlang latest version & opensource projects
Erlang For Five Nines
Osdc 2011 michael_neale
A Beginners Guide to Erlang_Erlang Factory Lite_Munich 2013
Erlang Developments: The Good, The Bad and The Ugly
Erlang - Concurrent Language for Concurrent World
Disrupt
Erlang plus BDB: Disrupting the Conventional Web Wisdom
The Erlang Programming Language
An introduction to erlang
"erlang, webmail and hibari" at Rakuten tech talk
Erlang
Ad

Recently uploaded (20)

PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
Weekly report ppt - harsh dattuprasad patel.pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Nekopoi APK 2025 free lastest update
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
iTop VPN Crack Latest Version Full Key 2025
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Complete Guide to Website Development in Malaysia for SMEs
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Patient Appointment Booking in Odoo with online payment
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Designing Intelligence for the Shop Floor.pdf
Weekly report ppt - harsh dattuprasad patel.pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development
Wondershare Filmora 15 Crack With Activation Key [2025
Design an Analysis of Algorithms II-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 41
wealthsignaloriginal-com-DS-text-... (1).pdf
Why Generative AI is the Future of Content, Code & Creativity?
Nekopoi APK 2025 free lastest update
Monitoring Stack: Grafana, Loki & Promtail
iTop VPN Crack Latest Version Full Key 2025
Operating system designcfffgfgggggggvggggggggg
Complete Guide to Website Development in Malaysia for SMEs

4Developers 2015: Lessons for Erlang VM - Michał Ślaski