SlideShare a Scribd company logo
1 of 33
Erlang for Five Nines bar camp Cork III Tamas Nagy [email_address] © 1999 – 2009 Erlang Training and Consulting Ltd
Contents ,[object Object],[object Object],[object Object],[object Object]
Erlang History: The Telecom Industry ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Access transport and switching networks Cellular PLMN PSTN/ ISDN Data/ IP Networks CATV Services Past  Single-service networks Clients/applications Present Multiservice networks/client server Backbone Network Access Access Access Content Content Control Communication applications Media Gateways
Erlang History 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 “ Find the right methods -  design by prototyping.” Mike Willliams, CS LAB Make mistakes on a small scale, not in a  production project. Mike Willliams It’s not good enough to have ideas – you must also be able to implement them to know  that they work Mike Willliams And the rest is history... Prototypes of Telecom applications First projects launched First products launched Major projects started OTP R1  released Released as Open Source Experiments started at the Computer Science Lab First Erlang Book Published First C-Based Virtual Machine
Erlang History And this is  just the beginning... “ Erlang is going to be a very important language. It could be the next Java.” Ralph Johnson Co-author, “Design Patterns” (the “Gang-of-Four book”) To build a large scale message handling system that really had to be up all the time, I would unhesitatingly choose Erlang…. Tim Bray Sun Microsystems … if we had to start again we  would probably use Erlang… Mike Shaver Mozilla Foundation 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 The Future January, 36,000 hits on erlang.org Bluetail AB  acquired for 152M USD August, 1 million hits on erlang.org Erlang R11 goes  multicore  The first  Erlang Factory Major new projects started within Ericsson ETC is  founded
Requests to erlang.org
Contents ,[object Object],[object Object],[object Object],[object Object]
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Functional programming  language High abstraction level Pattern matching Concise readable programs
Erlang Highlights: Factorial Factorial using Recursion n! = 1 n*(n-1)! n = 0 n   1 Definition -module(ex1). -export([factorial/1]). factorial(0) -> 1; factorial(N) when N >= 1 -> N * factorial(N-1). Implementation Eshell V5.0.1  (abort with ^G) 1> c(ex1). {ok,ex1} 2> ex1:factorial(6). 720
Erlang Highlights: High-level Constructs -define(IP_VERSION, 4). -define(IP_MIN_HDR_LEN, 5).  …… DgramSize = size(Dgram),  <<?IP_VERSION:4, HLen:4, SrvcType:8, TotLen:16, ID:16,    Flgs:3, FragOff:13, TTL:8, Proto:8,  HdrChkSum:16,    SrcIP:32, DestIP:32, Body/binary>> = Dgram, if (HLen >= 5) and (4*HLen =< DgramSize) -> OptsLen = 4*(HLen - ?IP_MIN_HDR_LEN), <<Opts:OptsLen/binary, Data/binary>> = Body, … ..  end. Parsing an IP Datagram using the Bit Syntax
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Either transparent or  explicit concurrency Light-weight processes Highly scalable
Erlang Highlights: Concurrency Creating a new process using spawn -module(ex3). -export([activity/3]). activity(Name,Pos,Size) -> ………… Pid = spawn(ex3,activity,[Joe,75,1024]) activity(Joe,75,1024)
Erlang Highlights: Concurrency 10 100 1,000 10,000 100,000 Number of processes 1 10 100 1,000 Microseconds/process erlang java C# Source: Joe Armstrong SICS Process creation time
Erlang Highlights: Concurrency Processes communicate by asynchronous  message passing Pid ! {data,12,13} receive {start} -> ……… {stop} -> ……… {data,X,Y} -> ……… end receive {start} -> ……… {stop} -> ……… {data,X,Y} -> ……… end
Erlang Highlights: Concurrency 10 100 1,000 10,000 100,000 Number of processes 1 10 1,000 100,000 Microseconds/message erlang java C# 10,000 100 1 Source: Joe Armstrong SICS Message passing times
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Response times in the order of milliseconds Per-process garbage collection
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Simple and consistent error recovery Supervision hierarchies &quot;Program for the correct case&quot;
Erlang Highlights: Robustness Robust systems can be built by layering “ Supervisors” “ Workers”
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Explicit or transparent  distribution Network-aware runtime system
Erlang Highlights: Distribution Erlang Run-Time System Erlang Run-Time System B ! Msg network C ! Msg
Erlang Highlights: Distribution loop() -> receive {From, {apply, M, F, A}} -> Answer = apply(M, F, A), From ! {rex, node(), Answer} loop(); _Other -> loop() end. {rex, Node} ! {self(), {apply, M, F, A}}, receive {rex, Node, What} -> What end {rex, Node} ! {self(), {apply, M, F, A}}, receive {rex, Node, What} -> What end {rex, Node} ! {self(), {apply, M, F, A}}, receive {rex, Node, What} -> What end loop() -> receive {From, {apply, M, F, A}} -> Answer = apply(M, F, A), From ! {rex, node(), Answer} loop(); _Other -> loop() end. loop() -> receive {From, {apply, M, F, A}} -> Answer = apply(M, F, A), From ! {rex, node(), Answer} loop(); _Other -> loop() end. loop() -> receive {From, {apply, M, F, A}} -> Answer = apply(M, F, A), From ! {rex, node(), Answer} loop(); _Other -> loop() end. Simple Remote Procedure Call
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Easily change code in a  running system Enables non-stop operation Simplifies testing
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],&quot;Ports&quot; to the outside world behave as Erlang processes
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Erlang runs on a Virtual  Machine ported to UNIX, Windows, VxWorks, OS X, … Supports heterogeneous networks.
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Symmetric multiprocessing  support. Takes full advantage  of multiple CPU  architectures.
Erlang SMP Erlang VM Scheduler run queue non-SMP VM Erlang VM Scheduler #2 run queue run queue run queue SMP VM Scheduler #1 Scheduler #N migration logic
Contents ,[object Object],[object Object],[object Object],[object Object]
Products: Ericsson AXD301 Switch ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Products: Ericsson AXD301 Switch ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Erlang: It’s Happening! Amazon  Simple DB Yahoo!  Delicious T-Mobile  WAP, SMS, IN services Facebook  Chat channel servers   Powerset/Microsoft  Key/Value store 37 Signals Backend servers
Erlang: It’s Happening! CouchDB   Distributed Robust  document database Wings 3D   3D modeller based on Nendo  YAWS   Yet Another Web Server RabbitMQ   High performance enterprise messaging Ejabberd   XMPP  instant messaging server
Questions
www.planeterlang.org www.trapexit.org www.erlang-factory.com www.erlang-consulting.com www.erlang.org

More Related Content

What's hot

Parallel program design
Parallel program designParallel program design
Parallel program designZongYing Lyu
 
Dive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingDive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingSaumil Shah
 
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5Jeff Larkin
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java WorkshopSimon Ritter
 
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Igalia
 
A closure ekon16
A closure ekon16A closure ekon16
A closure ekon16Max Kleiner
 
Metrics ekon 14_2_kleiner
Metrics ekon 14_2_kleinerMetrics ekon 14_2_kleiner
Metrics ekon 14_2_kleinerMax Kleiner
 
Return oriented programming
Return oriented programmingReturn oriented programming
Return oriented programminghybr1s
 
Use of an Oscilloscope - maXbox Starter33
Use of an Oscilloscope - maXbox Starter33Use of an Oscilloscope - maXbox Starter33
Use of an Oscilloscope - maXbox Starter33Max Kleiner
 
Virtual platform
Virtual platformVirtual platform
Virtual platformsean chen
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twistedsdsern
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthingtonoscon2007
 
Recursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, BangaloreRecursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, BangaloreBhasker Kode
 
Let it crash! The Erlang Approach to Building Reliable Services
Let it crash! The Erlang Approach to Building Reliable ServicesLet it crash! The Erlang Approach to Building Reliable Services
Let it crash! The Erlang Approach to Building Reliable ServicesBrian Troutwine
 
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Laterjohn-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types LaterPositive Hack Days
 
Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Max Kleiner
 

What's hot (20)

Parallel program design
Parallel program designParallel program design
Parallel program design
 
effective_r27
effective_r27effective_r27
effective_r27
 
Dive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingDive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented Programming
 
Klee introduction
Klee  introductionKlee  introduction
Klee introduction
 
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
Good news, everybody! Guile 2.2 performance notes (FOSDEM 2016)
 
A closure ekon16
A closure ekon16A closure ekon16
A closure ekon16
 
Metrics ekon 14_2_kleiner
Metrics ekon 14_2_kleinerMetrics ekon 14_2_kleiner
Metrics ekon 14_2_kleiner
 
Return oriented programming
Return oriented programmingReturn oriented programming
Return oriented programming
 
Use of an Oscilloscope - maXbox Starter33
Use of an Oscilloscope - maXbox Starter33Use of an Oscilloscope - maXbox Starter33
Use of an Oscilloscope - maXbox Starter33
 
Return oriented programming (ROP)
Return oriented programming (ROP)Return oriented programming (ROP)
Return oriented programming (ROP)
 
Virtual platform
Virtual platformVirtual platform
Virtual platform
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twisted
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthington
 
Recursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, BangaloreRecursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, Bangalore
 
An Introduction to OMNeT++ 5.1
An Introduction to OMNeT++ 5.1An Introduction to OMNeT++ 5.1
An Introduction to OMNeT++ 5.1
 
Let it crash! The Erlang Approach to Building Reliable Services
Let it crash! The Erlang Approach to Building Reliable ServicesLet it crash! The Erlang Approach to Building Reliable Services
Let it crash! The Erlang Approach to Building Reliable Services
 
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Laterjohn-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
 
Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475
 

Viewers also liked

Erlang vs. Java
Erlang vs. JavaErlang vs. Java
Erlang vs. JavaArtan Cami
 
The Erlang Programming Language
The Erlang Programming LanguageThe Erlang Programming Language
The Erlang Programming LanguageDennis Byrne
 
Thinking in a Highly Concurrent, Mostly-functional Language - Cesarini
Thinking in a Highly Concurrent, Mostly-functional Language - CesariniThinking in a Highly Concurrent, Mostly-functional Language - Cesarini
Thinking in a Highly Concurrent, Mostly-functional Language - CesariniCodemotion
 
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере NitrogenCodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере NitrogenCodeFest
 
C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...Gianluca Padovani
 
Erlang Concurrency
Erlang ConcurrencyErlang Concurrency
Erlang ConcurrencyBarry Ezell
 
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykLightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykElixir Club
 
The mystique of erlang
The mystique of erlangThe mystique of erlang
The mystique of erlangCarob Cherub
 
Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Dipti Borkar
 
Mydent -E health
Mydent -E healthMydent -E health
Mydent -E healthmydent1
 
Don L. Rondeau - Federal Air Marshall Letter of Appreciation
Don L. Rondeau - Federal Air Marshall Letter of Appreciation Don L. Rondeau - Federal Air Marshall Letter of Appreciation
Don L. Rondeau - Federal Air Marshall Letter of Appreciation Don L Rondeau
 
TAEE2012-Putting Fundmentals of Electronic Circuits Practices online
TAEE2012-Putting Fundmentals of Electronic Circuits Practices onlineTAEE2012-Putting Fundmentals of Electronic Circuits Practices online
TAEE2012-Putting Fundmentals of Electronic Circuits Practices onlineMohamed Tawfik
 
3 1 impatto_ambientale_vezzoli_2013-14
3 1 impatto_ambientale_vezzoli_2013-143 1 impatto_ambientale_vezzoli_2013-14
3 1 impatto_ambientale_vezzoli_2013-14LeNS_slide
 
Contratos y presupuestos en proyectos Drupal - Drupal Camp Spain 2014
Contratos y presupuestos en proyectos Drupal - Drupal Camp Spain 2014Contratos y presupuestos en proyectos Drupal - Drupal Camp Spain 2014
Contratos y presupuestos en proyectos Drupal - Drupal Camp Spain 2014Atenea tech
 
Adecuación. Berta.
Adecuación. Berta.Adecuación. Berta.
Adecuación. Berta.mvaldesr
 
Ss instruments & diagnostic sets (pdf)
Ss instruments & diagnostic sets (pdf)Ss instruments & diagnostic sets (pdf)
Ss instruments & diagnostic sets (pdf)Sarwar Son's®
 

Viewers also liked (20)

Erlang vs. Java
Erlang vs. JavaErlang vs. Java
Erlang vs. Java
 
The Erlang Programming Language
The Erlang Programming LanguageThe Erlang Programming Language
The Erlang Programming Language
 
Thinking in a Highly Concurrent, Mostly-functional Language - Cesarini
Thinking in a Highly Concurrent, Mostly-functional Language - CesariniThinking in a Highly Concurrent, Mostly-functional Language - Cesarini
Thinking in a Highly Concurrent, Mostly-functional Language - Cesarini
 
Erlang&rails
Erlang&railsErlang&rails
Erlang&rails
 
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере NitrogenCodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
CodeFest 2012. Трескин М. — Разработка Web-приложений на Comet-сервере Nitrogen
 
C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...C++ Actor Model - You’ve Got Mail ...
C++ Actor Model - You’ve Got Mail ...
 
Http streaming
Http streamingHttp streaming
Http streaming
 
Erlang Concurrency
Erlang ConcurrencyErlang Concurrency
Erlang Concurrency
 
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykLightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
 
The mystique of erlang
The mystique of erlangThe mystique of erlang
The mystique of erlang
 
Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0
 
Why erlang
Why erlangWhy erlang
Why erlang
 
Erlang on OSv
Erlang on OSvErlang on OSv
Erlang on OSv
 
Mydent -E health
Mydent -E healthMydent -E health
Mydent -E health
 
Don L. Rondeau - Federal Air Marshall Letter of Appreciation
Don L. Rondeau - Federal Air Marshall Letter of Appreciation Don L. Rondeau - Federal Air Marshall Letter of Appreciation
Don L. Rondeau - Federal Air Marshall Letter of Appreciation
 
TAEE2012-Putting Fundmentals of Electronic Circuits Practices online
TAEE2012-Putting Fundmentals of Electronic Circuits Practices onlineTAEE2012-Putting Fundmentals of Electronic Circuits Practices online
TAEE2012-Putting Fundmentals of Electronic Circuits Practices online
 
3 1 impatto_ambientale_vezzoli_2013-14
3 1 impatto_ambientale_vezzoli_2013-143 1 impatto_ambientale_vezzoli_2013-14
3 1 impatto_ambientale_vezzoli_2013-14
 
Contratos y presupuestos en proyectos Drupal - Drupal Camp Spain 2014
Contratos y presupuestos en proyectos Drupal - Drupal Camp Spain 2014Contratos y presupuestos en proyectos Drupal - Drupal Camp Spain 2014
Contratos y presupuestos en proyectos Drupal - Drupal Camp Spain 2014
 
Adecuación. Berta.
Adecuación. Berta.Adecuación. Berta.
Adecuación. Berta.
 
Ss instruments & diagnostic sets (pdf)
Ss instruments & diagnostic sets (pdf)Ss instruments & diagnostic sets (pdf)
Ss instruments & diagnostic sets (pdf)
 

Similar to Erlang For Five Nines

Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang FinalSinarShebl
 
Spark Summit EU talk by Sameer Agarwal
Spark Summit EU talk by Sameer AgarwalSpark Summit EU talk by Sameer Agarwal
Spark Summit EU talk by Sameer AgarwalSpark Summit
 
Erlang
ErlangErlang
ErlangESUG
 
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Intel® Software
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor ConcurrencyAlex Miller
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrongSentifi
 
Optimization in Programming languages
Optimization in Programming languagesOptimization in Programming languages
Optimization in Programming languagesAnkit Pandey
 
CV Espen Halsaa Albrektsen
CV Espen Halsaa AlbrektsenCV Espen Halsaa Albrektsen
CV Espen Halsaa Albrektsenespenalb
 
notesnet.dk - Eclipse Modelling Tools
notesnet.dk - Eclipse Modelling Toolsnotesnet.dk - Eclipse Modelling Tools
notesnet.dk - Eclipse Modelling ToolsTonny Madsen
 
Encrypted Traffic Mining
Encrypted Traffic MiningEncrypted Traffic Mining
Encrypted Traffic MiningHenry Huang
 
EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...
EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...
EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...Ákos Horváth
 
Deep Dive into Futures and the Parallel Programming Library
Deep Dive into Futures and the Parallel Programming LibraryDeep Dive into Futures and the Parallel Programming Library
Deep Dive into Futures and the Parallel Programming LibraryJim McKeeth
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Servicesmattjive
 
MX Sample Mounting – SPEL+ Presentation
MX Sample Mounting – SPEL+ PresentationMX Sample Mounting – SPEL+ Presentation
MX Sample Mounting – SPEL+ PresentationGautam Manoharan
 
byteLAKE's Alveo FPGA Solutions
byteLAKE's Alveo FPGA SolutionsbyteLAKE's Alveo FPGA Solutions
byteLAKE's Alveo FPGA SolutionsbyteLAKE
 

Similar to Erlang For Five Nines (20)

Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang Final
 
Erlang real time
Erlang real timeErlang real time
Erlang real time
 
Spark Summit EU talk by Sameer Agarwal
Spark Summit EU talk by Sameer AgarwalSpark Summit EU talk by Sameer Agarwal
Spark Summit EU talk by Sameer Agarwal
 
Erlang
ErlangErlang
Erlang
 
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor Concurrency
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrong
 
CV (eng) Thomas Lindström
CV (eng) Thomas LindströmCV (eng) Thomas Lindström
CV (eng) Thomas Lindström
 
Optimization in Programming languages
Optimization in Programming languagesOptimization in Programming languages
Optimization in Programming languages
 
CV Espen Halsaa Albrektsen
CV Espen Halsaa AlbrektsenCV Espen Halsaa Albrektsen
CV Espen Halsaa Albrektsen
 
notesnet.dk - Eclipse Modelling Tools
notesnet.dk - Eclipse Modelling Toolsnotesnet.dk - Eclipse Modelling Tools
notesnet.dk - Eclipse Modelling Tools
 
Encrypted Traffic Mining
Encrypted Traffic MiningEncrypted Traffic Mining
Encrypted Traffic Mining
 
EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...
EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...
EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...
 
Resume (1)
Resume (1)Resume (1)
Resume (1)
 
Erlang os
Erlang osErlang os
Erlang os
 
Deep Dive into Futures and the Parallel Programming Library
Deep Dive into Futures and the Parallel Programming LibraryDeep Dive into Futures and the Parallel Programming Library
Deep Dive into Futures and the Parallel Programming Library
 
Open Source XMPP for Cloud Services
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
 
MX Sample Mounting – SPEL+ Presentation
MX Sample Mounting – SPEL+ PresentationMX Sample Mounting – SPEL+ Presentation
MX Sample Mounting – SPEL+ Presentation
 
PrasadResume
PrasadResumePrasadResume
PrasadResume
 
byteLAKE's Alveo FPGA Solutions
byteLAKE's Alveo FPGA SolutionsbyteLAKE's Alveo FPGA Solutions
byteLAKE's Alveo FPGA Solutions
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Erlang For Five Nines

  • 1. Erlang for Five Nines bar camp Cork III Tamas Nagy [email_address] © 1999 – 2009 Erlang Training and Consulting Ltd
  • 2.
  • 3.
  • 4. Erlang History 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 “ Find the right methods - design by prototyping.” Mike Willliams, CS LAB Make mistakes on a small scale, not in a production project. Mike Willliams It’s not good enough to have ideas – you must also be able to implement them to know that they work Mike Willliams And the rest is history... Prototypes of Telecom applications First projects launched First products launched Major projects started OTP R1 released Released as Open Source Experiments started at the Computer Science Lab First Erlang Book Published First C-Based Virtual Machine
  • 5. Erlang History And this is just the beginning... “ Erlang is going to be a very important language. It could be the next Java.” Ralph Johnson Co-author, “Design Patterns” (the “Gang-of-Four book”) To build a large scale message handling system that really had to be up all the time, I would unhesitatingly choose Erlang…. Tim Bray Sun Microsystems … if we had to start again we would probably use Erlang… Mike Shaver Mozilla Foundation 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 The Future January, 36,000 hits on erlang.org Bluetail AB acquired for 152M USD August, 1 million hits on erlang.org Erlang R11 goes multicore The first Erlang Factory Major new projects started within Ericsson ETC is founded
  • 7.
  • 8.
  • 9. Erlang Highlights: Factorial Factorial using Recursion n! = 1 n*(n-1)! n = 0 n  1 Definition -module(ex1). -export([factorial/1]). factorial(0) -> 1; factorial(N) when N >= 1 -> N * factorial(N-1). Implementation Eshell V5.0.1 (abort with ^G) 1> c(ex1). {ok,ex1} 2> ex1:factorial(6). 720
  • 10. Erlang Highlights: High-level Constructs -define(IP_VERSION, 4). -define(IP_MIN_HDR_LEN, 5). …… DgramSize = size(Dgram), <<?IP_VERSION:4, HLen:4, SrvcType:8, TotLen:16, ID:16, Flgs:3, FragOff:13, TTL:8, Proto:8, HdrChkSum:16, SrcIP:32, DestIP:32, Body/binary>> = Dgram, if (HLen >= 5) and (4*HLen =< DgramSize) -> OptsLen = 4*(HLen - ?IP_MIN_HDR_LEN), <<Opts:OptsLen/binary, Data/binary>> = Body, … .. end. Parsing an IP Datagram using the Bit Syntax
  • 11.
  • 12. Erlang Highlights: Concurrency Creating a new process using spawn -module(ex3). -export([activity/3]). activity(Name,Pos,Size) -> ………… Pid = spawn(ex3,activity,[Joe,75,1024]) activity(Joe,75,1024)
  • 13. Erlang Highlights: Concurrency 10 100 1,000 10,000 100,000 Number of processes 1 10 100 1,000 Microseconds/process erlang java C# Source: Joe Armstrong SICS Process creation time
  • 14. Erlang Highlights: Concurrency Processes communicate by asynchronous message passing Pid ! {data,12,13} receive {start} -> ……… {stop} -> ……… {data,X,Y} -> ……… end receive {start} -> ……… {stop} -> ……… {data,X,Y} -> ……… end
  • 15. Erlang Highlights: Concurrency 10 100 1,000 10,000 100,000 Number of processes 1 10 1,000 100,000 Microseconds/message erlang java C# 10,000 100 1 Source: Joe Armstrong SICS Message passing times
  • 16.
  • 17.
  • 18. Erlang Highlights: Robustness Robust systems can be built by layering “ Supervisors” “ Workers”
  • 19.
  • 20. Erlang Highlights: Distribution Erlang Run-Time System Erlang Run-Time System B ! Msg network C ! Msg
  • 21. Erlang Highlights: Distribution loop() -> receive {From, {apply, M, F, A}} -> Answer = apply(M, F, A), From ! {rex, node(), Answer} loop(); _Other -> loop() end. {rex, Node} ! {self(), {apply, M, F, A}}, receive {rex, Node, What} -> What end {rex, Node} ! {self(), {apply, M, F, A}}, receive {rex, Node, What} -> What end {rex, Node} ! {self(), {apply, M, F, A}}, receive {rex, Node, What} -> What end loop() -> receive {From, {apply, M, F, A}} -> Answer = apply(M, F, A), From ! {rex, node(), Answer} loop(); _Other -> loop() end. loop() -> receive {From, {apply, M, F, A}} -> Answer = apply(M, F, A), From ! {rex, node(), Answer} loop(); _Other -> loop() end. loop() -> receive {From, {apply, M, F, A}} -> Answer = apply(M, F, A), From ! {rex, node(), Answer} loop(); _Other -> loop() end. Simple Remote Procedure Call
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Erlang SMP Erlang VM Scheduler run queue non-SMP VM Erlang VM Scheduler #2 run queue run queue run queue SMP VM Scheduler #1 Scheduler #N migration logic
  • 27.
  • 28.
  • 29.
  • 30. Erlang: It’s Happening! Amazon Simple DB Yahoo! Delicious T-Mobile WAP, SMS, IN services Facebook Chat channel servers Powerset/Microsoft Key/Value store 37 Signals Backend servers
  • 31. Erlang: It’s Happening! CouchDB Distributed Robust document database Wings 3D 3D modeller based on Nendo YAWS Yet Another Web Server RabbitMQ High performance enterprise messaging Ejabberd XMPP instant messaging server
  • 33. www.planeterlang.org www.trapexit.org www.erlang-factory.com www.erlang-consulting.com www.erlang.org

Editor's Notes

  1. This is the essential loop needed for an RPC server. The server receives requests from clients, uses apply to evaluate the requests and then returns the answer to the originator. This is a simplified solution where no error handling is done. The BIF node/0 returns the node name.
  2. Ulf Wiger, Ericsson AB 2009-01-16 ProTest - Property-Based Testing The non-SMP version of the Erlang virtual machine uses a cooperative reduction-counting scheduler with a single run queue (the run queue itself is partitioned according to priorities – ’low’, ’normal’, ’high’ and ’max’). Each runnable process gets a ”time slice” of 1000 reductions (1 reduction is basically one function call), but the time slice can be cut short if the process pauses to wait for a message (i.e. whenever a receive statement would block). There is also a yield() function, allowing processes to deliberately end the time slice. From an Erlang programmer’s perspective, the scheduling is preemptive, since it cannot be certain that it won’t be scheduled out at any given moment. In practice, it has been possible to stack the deck by calling yield() and then performing a sequence of calls that one wants to be ”atomic”. This is obviously questionable, and the practice has always been discouraged. Still, some programs have relied on the fact that the non-SMP scheduler was highly predictable – it was possible to ”know” that preemption wouldn’t occur at certain points in the code. (Another ”feature” was that the priorities ’high’ and ’max’ were strict – as long as there were runnable jobs on these priority levels, ’normal’ and ’low’ priority jobs would never get to execute. Partly for this reason, use of priorities is discourages in Erlang.)