SlideShare a Scribd company logo
1 of 49
Erlang Open Telecom Platform EAB/UPD/S Ulf Wiger
Contents ,[object Object],[object Object],[object Object],[object Object],[object Object]
History of Erlang 1984-86: Experiments programming POTS with  several languages 1998: Open Source Erlang 1987: Early Erlang Prototype projects 1991: First fast implementation 1993: Distributed Erlang 1995: Several new projects 1996: Open Telecom Platform AXD and GPRS started How to design SW for future telecoms systems?
Erlang “Hello World” program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Erlang Data Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Erlang Data Types (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pattern Matching and Single Assignment
List Operations
List Operations (2)
List Comprehensions
Anonymous Functions
Functions (cont.)
Erlang Highlights ,[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 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Solid concurrency model Scales to handle complex concurrency Simple abstractions Examples...
Erlang Example 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 Example 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 Examples 4 Concurrency - Finite State Machine ringing_B_side(PidA) -> receive {lim, offhook} ->   lim:stop_ringing(),   PidA ! {hc, {connect, self()}},   speech(PidA); {hc, {cancel, PidA}} ->   cancel(PidA); {lim, {digit, _Digit}} ->   ringing_B_side(PidA); {hc, {request_connection, Pid}} ->   Pid ! {hc, {reject, self()}},   ringing_B_side(PidA) after 30000 ->   cancel(PidA) end. Selective receive True encapsulation of sub-states Optional timeout Asynchronous send
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Lightweight processes Fast message passing Response times in the order of milliseconds efficient garbage collection Numbers...
Process creation times (LOG/LOG scale) Source: Joe Armstrong SICS > 200,000 processes 10 100 1,000 10,000 100,000 Number of processes 1 10 100 1,000 Microseconds/process erlang java C#
Message passing times (LOG/LOG scale) Source: Joe Armstrong SICS > 200,000 processes 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
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Simple and consistent error recovery Supervision hierarchies "Program for the correct case" Examples...
Erlang Example Cooperating processes may be linked together using spawn_link(…,…,…) or link(Pid)
Erlang Example When a process terminates, an exit signal is sent to all linked processes …  and the termination is propagated
Erlang Example Exit signals can be trapped and received as messages receive {‘EXIT’,Pid,...}  -> ... end process_flag(trap_exit,true), ...
Erlang Example Robust systems can be  built by layering “ Supervisors” “ Workers”
Error-handling -- Language Safety ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Concurrency & Fault Tolerance were designed into the language from the start!
Debugging and Profiling Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[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],Explicit or transparent distribution Network-aware runtime system Examples...
Transparent Distribution Erlang Run-Time System Erlang Run-Time System B ! Msg network C ! Msg Message passing between processes in different computer  is just as easy as between processes in the same computer A B C
Simple RPC loop() -> receive {From, {apply, M, F, A}} -> Answer = (catch 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 = (catch apply(M, F, A)), From ! {rex, node(), Answer} loop(); _Other -> loop() end. loop() -> receive {From, {apply, M, F, A}} -> Answer = (catch apply(M, F, A)), From ! {rex, node(), Answer} loop(); _Other -> loop() end. loop() -> receive {From, {apply, M, F, A}} -> Answer = (catch apply(M, F, A)), From ! {rex, node(), Answer} loop(); _Other -> loop() end.
Erlang Highlights ,[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 Examples...
Erlang Example Version 1 Version 2 change_code
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],"Ports" to the outside world behave as Erlang processes (c.f. UML ports) Examples...
Erlang Example Port External process Port ! {self(), {command, [1,2,3]}}
Erlang Example Port External process receive   {Port, {data, Info}}  -> end A port can use e.g. a  TCP, UDP, SSL socket, UNIX pipe, or custom transport (e.g. SAAL)
Erlang Highlights ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Erlang runs on any UNIX, Windows, VxWorks, OSE Delta Supports heterogeneous networks Illustration...
Systems Overview OTP Components Standard Libraries Erlang Run-Time System Hardware and Operating System Applications written in Erlang Applications written in C, C++ or Java
Erlang/OTP (Open Telecom Platform) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
OTP Behaviors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Using Erlang as a Test Tool Language ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Experiences from Erlang in Large Projects ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Erlang-based Products as of today ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Downloads since Open Source Launch ’98 Grouping: 6 months
Example Products: Outside Ericsson ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example Products: Open Source ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example Products: Open Source ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Erlang  good fit  for: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Erlang  not so good  for: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Questions?

More Related Content

What's hot

Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Winl xf
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Softwarel xf
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systemsl xf
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with ErlangMaxim Kharchenko
 
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...siouxhotornot
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthingtonoscon2007
 
Parallel program design
Parallel program designParallel program design
Parallel program designZongYing Lyu
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsElixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsBenjamin Tan
 
Event Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQEvent Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQLuke Luo
 
Runtime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for SmalltalkRuntime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for SmalltalkESUG
 
Basic buffer overflow part1
Basic buffer overflow part1Basic buffer overflow part1
Basic buffer overflow part1Payampardaz
 
Planet of the AOPs
Planet of the AOPsPlanet of the AOPs
Planet of the AOPsJames Ward
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionCherryBerry2
 
Intro to OpenMP
Intro to OpenMPIntro to OpenMP
Intro to OpenMPjbp4444
 

What's hot (20)

Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Win
 
Comparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms SoftwareComparing Cpp And Erlang For Motorola Telecoms Software
Comparing Cpp And Erlang For Motorola Telecoms Software
 
Improving Robustness In Distributed Systems
Improving Robustness In Distributed SystemsImproving Robustness In Distributed Systems
Improving Robustness In Distributed Systems
 
Erlang
ErlangErlang
Erlang
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
 
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
 
Os Worthington
Os WorthingtonOs Worthington
Os Worthington
 
Parallel program design
Parallel program designParallel program design
Parallel program design
 
Klee introduction
Klee  introductionKlee  introduction
Klee introduction
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsElixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
 
OIVM
OIVMOIVM
OIVM
 
Event Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQEvent Driven with LibUV and ZeroMQ
Event Driven with LibUV and ZeroMQ
 
Runtime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for SmalltalkRuntime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for Smalltalk
 
OpenMP And C++
OpenMP And C++OpenMP And C++
OpenMP And C++
 
Basic buffer overflow part1
Basic buffer overflow part1Basic buffer overflow part1
Basic buffer overflow part1
 
Planet of the AOPs
Planet of the AOPsPlanet of the AOPs
Planet of the AOPs
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
 
effective_r27
effective_r27effective_r27
effective_r27
 
Eclipse OCL Summary
Eclipse OCL SummaryEclipse OCL Summary
Eclipse OCL Summary
 
Intro to OpenMP
Intro to OpenMPIntro to OpenMP
Intro to OpenMP
 

Viewers also liked

The mystique of erlang
The mystique of erlangThe mystique of erlang
The mystique of erlangCarob Cherub
 
Erlang Practice
Erlang PracticeErlang Practice
Erlang Practicelitaocheng
 
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...Stefan Richter
 
learn you some erlang - chap 9 to chap10
learn you some erlang - chap 9 to chap10learn you some erlang - chap 9 to chap10
learn you some erlang - chap 9 to chap10경미 김
 
Building a Network IP Camera using Erlang
Building a Network IP Camera using ErlangBuilding a Network IP Camera using Erlang
Building a Network IP Camera using ErlangFrank Hunleth
 
Intro To Erlang
Intro To ErlangIntro To Erlang
Intro To Erlangasceth
 
A web app in pure Clojure
A web app in pure ClojureA web app in pure Clojure
A web app in pure ClojureDane Schneider
 
An Erlang Game Stack
An Erlang Game StackAn Erlang Game Stack
An Erlang Game StackEonblast
 
Afinal, o que é Docker? (Webinar Umbler)
Afinal, o que é Docker? (Webinar Umbler)Afinal, o que é Docker? (Webinar Umbler)
Afinal, o que é Docker? (Webinar Umbler)Wellington Silva
 
Microservices in GO lang
Microservices in GO langMicroservices in GO lang
Microservices in GO langSHAKIL AKHTAR
 
Erlang/OTP for Rubyists
Erlang/OTP for RubyistsErlang/OTP for Rubyists
Erlang/OTP for RubyistsSean Cribbs
 
Missatgeria
MissatgeriaMissatgeria
Missatgeriapinetons
 
Erlang Workshop at Dyncon 2011
Erlang Workshop at Dyncon 2011Erlang Workshop at Dyncon 2011
Erlang Workshop at Dyncon 2011Adam Lindberg
 
Riak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared StateRiak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared StateRusty Klophaus
 
Introduction to Erlang/OTP
Introduction to Erlang/OTPIntroduction to Erlang/OTP
Introduction to Erlang/OTPJordi Llonch
 
Distributed Erlang Systems In Operation
Distributed Erlang Systems In OperationDistributed Erlang Systems In Operation
Distributed Erlang Systems In OperationAndy Gross
 
東京Node学園#8 Let It Crash!?
東京Node学園#8 Let It Crash!?東京Node学園#8 Let It Crash!?
東京Node学園#8 Let It Crash!?koichik
 
Riak - From Small to Large
Riak - From Small to LargeRiak - From Small to Large
Riak - From Small to LargeRusty Klophaus
 
Concurrency in Elixir with OTP
Concurrency in Elixir with OTPConcurrency in Elixir with OTP
Concurrency in Elixir with OTPJustin Reese
 

Viewers also liked (20)

The mystique of erlang
The mystique of erlangThe mystique of erlang
The mystique of erlang
 
Introduction to Erlang
Introduction to ErlangIntroduction to Erlang
Introduction to Erlang
 
Erlang Practice
Erlang PracticeErlang Practice
Erlang Practice
 
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
Using Clojure, NoSQL Databases and Functional-Style JavaScript to Write Gext-...
 
learn you some erlang - chap 9 to chap10
learn you some erlang - chap 9 to chap10learn you some erlang - chap 9 to chap10
learn you some erlang - chap 9 to chap10
 
Building a Network IP Camera using Erlang
Building a Network IP Camera using ErlangBuilding a Network IP Camera using Erlang
Building a Network IP Camera using Erlang
 
Intro To Erlang
Intro To ErlangIntro To Erlang
Intro To Erlang
 
A web app in pure Clojure
A web app in pure ClojureA web app in pure Clojure
A web app in pure Clojure
 
An Erlang Game Stack
An Erlang Game StackAn Erlang Game Stack
An Erlang Game Stack
 
Afinal, o que é Docker? (Webinar Umbler)
Afinal, o que é Docker? (Webinar Umbler)Afinal, o que é Docker? (Webinar Umbler)
Afinal, o que é Docker? (Webinar Umbler)
 
Microservices in GO lang
Microservices in GO langMicroservices in GO lang
Microservices in GO lang
 
Erlang/OTP for Rubyists
Erlang/OTP for RubyistsErlang/OTP for Rubyists
Erlang/OTP for Rubyists
 
Missatgeria
MissatgeriaMissatgeria
Missatgeria
 
Erlang Workshop at Dyncon 2011
Erlang Workshop at Dyncon 2011Erlang Workshop at Dyncon 2011
Erlang Workshop at Dyncon 2011
 
Riak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared StateRiak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared State
 
Introduction to Erlang/OTP
Introduction to Erlang/OTPIntroduction to Erlang/OTP
Introduction to Erlang/OTP
 
Distributed Erlang Systems In Operation
Distributed Erlang Systems In OperationDistributed Erlang Systems In Operation
Distributed Erlang Systems In Operation
 
東京Node学園#8 Let It Crash!?
東京Node学園#8 Let It Crash!?東京Node学園#8 Let It Crash!?
東京Node学園#8 Let It Crash!?
 
Riak - From Small to Large
Riak - From Small to LargeRiak - From Small to Large
Riak - From Small to Large
 
Concurrency in Elixir with OTP
Concurrency in Elixir with OTPConcurrency in Elixir with OTP
Concurrency in Elixir with OTP
 

Similar to Erlang OTP

Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang FinalSinarShebl
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrongSentifi
 
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIPhpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIMarcelo Gornstein
 
Virtual platform
Virtual platformVirtual platform
Virtual platformsean chen
 
Joe armstrong erlanga_languageforprogrammingreliablesystems
Joe armstrong erlanga_languageforprogrammingreliablesystemsJoe armstrong erlanga_languageforprogrammingreliablesystems
Joe armstrong erlanga_languageforprogrammingreliablesystemsSentifi
 
10 years in Network Protocol testing L2 L3 L4-L7 Tcl Python Manual and Automa...
10 years in Network Protocol testing L2 L3 L4-L7 Tcl Python Manual and Automa...10 years in Network Protocol testing L2 L3 L4-L7 Tcl Python Manual and Automa...
10 years in Network Protocol testing L2 L3 L4-L7 Tcl Python Manual and Automa...Mullaiselvan Mohan
 
Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Anil Madhavapeddy
 
Easy enterprise application integration with RabbitMQ and AMQP
Easy enterprise application integration with RabbitMQ and AMQPEasy enterprise application integration with RabbitMQ and AMQP
Easy enterprise application integration with RabbitMQ and AMQPRabbit MQ
 
Migration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsMigration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsZvi Avraham
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -evechiportal
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Jorisimec.archive
 
Elixir and elm
Elixir and elmElixir and elm
Elixir and elmMix & Go
 
Erlang及其应用
Erlang及其应用Erlang及其应用
Erlang及其应用Feng Yu
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnelukdpe
 
Continuous Application with Structured Streaming 2.0
Continuous Application with Structured Streaming 2.0Continuous Application with Structured Streaming 2.0
Continuous Application with Structured Streaming 2.0Anyscale
 

Similar to Erlang OTP (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
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrong
 
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIPhpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
 
Virtual platform
Virtual platformVirtual platform
Virtual platform
 
Joe armstrong erlanga_languageforprogrammingreliablesystems
Joe armstrong erlanga_languageforprogrammingreliablesystemsJoe armstrong erlanga_languageforprogrammingreliablesystems
Joe armstrong erlanga_languageforprogrammingreliablesystems
 
erlang 101
erlang 101erlang 101
erlang 101
 
10 years in Network Protocol testing L2 L3 L4-L7 Tcl Python Manual and Automa...
10 years in Network Protocol testing L2 L3 L4-L7 Tcl Python Manual and Automa...10 years in Network Protocol testing L2 L3 L4-L7 Tcl Python Manual and Automa...
10 years in Network Protocol testing L2 L3 L4-L7 Tcl Python Manual and Automa...
 
Ui disk & terminal drivers
Ui disk & terminal driversUi disk & terminal drivers
Ui disk & terminal drivers
 
Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)
 
Easy enterprise application integration with RabbitMQ and AMQP
Easy enterprise application integration with RabbitMQ and AMQPEasy enterprise application integration with RabbitMQ and AMQP
Easy enterprise application integration with RabbitMQ and AMQP
 
Migration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsMigration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming Models
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
Elixir and elm
Elixir and elmElixir and elm
Elixir and elm
 
1230 Rtf Final
1230 Rtf Final1230 Rtf Final
1230 Rtf Final
 
Java introduction
Java introductionJava introduction
Java introduction
 
Erlang及其应用
Erlang及其应用Erlang及其应用
Erlang及其应用
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnel
 
Continuous Application with Structured Streaming 2.0
Continuous Application with Structured Streaming 2.0Continuous Application with Structured Streaming 2.0
Continuous Application with Structured Streaming 2.0
 

More from Zvi Avraham

Data isn't the new Oil - it's a new Asset Class!
Data isn't the new Oil - it's a new Asset Class!Data isn't the new Oil - it's a new Asset Class!
Data isn't the new Oil - it's a new Asset Class!Zvi Avraham
 
Functional APIs with Absinthe GraphQL
Functional APIs with Absinthe GraphQLFunctional APIs with Absinthe GraphQL
Functional APIs with Absinthe GraphQLZvi Avraham
 
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Zvi Avraham
 
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...Zvi Avraham
 
Cloud Computing: AWS for Lean Startups
Cloud Computing: AWS for Lean StartupsCloud Computing: AWS for Lean Startups
Cloud Computing: AWS for Lean StartupsZvi Avraham
 

More from Zvi Avraham (8)

Data isn't the new Oil - it's a new Asset Class!
Data isn't the new Oil - it's a new Asset Class!Data isn't the new Oil - it's a new Asset Class!
Data isn't the new Oil - it's a new Asset Class!
 
Functional APIs with Absinthe GraphQL
Functional APIs with Absinthe GraphQLFunctional APIs with Absinthe GraphQL
Functional APIs with Absinthe GraphQL
 
Limited supply
Limited supplyLimited supply
Limited supply
 
TimeSpaceDB
TimeSpaceDBTimeSpaceDB
TimeSpaceDB
 
Erlang on OSv
Erlang on OSvErlang on OSv
Erlang on OSv
 
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
Ethereum VM and DSLs for Smart Contracts (updated on May 12th 2015)
 
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
 
Cloud Computing: AWS for Lean Startups
Cloud Computing: AWS for Lean StartupsCloud Computing: AWS for Lean Startups
Cloud Computing: AWS for Lean Startups
 

Recently uploaded

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Erlang OTP

  • 1. Erlang Open Telecom Platform EAB/UPD/S Ulf Wiger
  • 2.
  • 3. History of Erlang 1984-86: Experiments programming POTS with several languages 1998: Open Source Erlang 1987: Early Erlang Prototype projects 1991: First fast implementation 1993: Distributed Erlang 1995: Several new projects 1996: Open Telecom Platform AXD and GPRS started How to design SW for future telecoms systems?
  • 4.
  • 5.
  • 6.
  • 7. Pattern Matching and Single Assignment
  • 13.
  • 14.
  • 15. Erlang Example 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)
  • 16. Erlang Example Processes communicate by asynchronous message passing Pid ! {data,12,13} receive {start} -> ……… {stop} -> ……… {data,X,Y} -> ……… end receive {start} -> ……… {stop} -> ……… {data,X,Y} -> ……… end
  • 17. Erlang Examples 4 Concurrency - Finite State Machine ringing_B_side(PidA) -> receive {lim, offhook} -> lim:stop_ringing(), PidA ! {hc, {connect, self()}}, speech(PidA); {hc, {cancel, PidA}} -> cancel(PidA); {lim, {digit, _Digit}} -> ringing_B_side(PidA); {hc, {request_connection, Pid}} -> Pid ! {hc, {reject, self()}}, ringing_B_side(PidA) after 30000 -> cancel(PidA) end. Selective receive True encapsulation of sub-states Optional timeout Asynchronous send
  • 18.
  • 19. Process creation times (LOG/LOG scale) Source: Joe Armstrong SICS > 200,000 processes 10 100 1,000 10,000 100,000 Number of processes 1 10 100 1,000 Microseconds/process erlang java C#
  • 20. Message passing times (LOG/LOG scale) Source: Joe Armstrong SICS > 200,000 processes 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
  • 21.
  • 22. Erlang Example Cooperating processes may be linked together using spawn_link(…,…,…) or link(Pid)
  • 23. Erlang Example When a process terminates, an exit signal is sent to all linked processes … and the termination is propagated
  • 24. Erlang Example Exit signals can be trapped and received as messages receive {‘EXIT’,Pid,...} -> ... end process_flag(trap_exit,true), ...
  • 25. Erlang Example Robust systems can be built by layering “ Supervisors” “ Workers”
  • 26.
  • 27.
  • 28.
  • 29. Transparent Distribution Erlang Run-Time System Erlang Run-Time System B ! Msg network C ! Msg Message passing between processes in different computer is just as easy as between processes in the same computer A B C
  • 30. Simple RPC loop() -> receive {From, {apply, M, F, A}} -> Answer = (catch 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 = (catch apply(M, F, A)), From ! {rex, node(), Answer} loop(); _Other -> loop() end. loop() -> receive {From, {apply, M, F, A}} -> Answer = (catch apply(M, F, A)), From ! {rex, node(), Answer} loop(); _Other -> loop() end. loop() -> receive {From, {apply, M, F, A}} -> Answer = (catch apply(M, F, A)), From ! {rex, node(), Answer} loop(); _Other -> loop() end.
  • 31.
  • 32. Erlang Example Version 1 Version 2 change_code
  • 33.
  • 34. Erlang Example Port External process Port ! {self(), {command, [1,2,3]}}
  • 35. Erlang Example Port External process receive {Port, {data, Info}} -> end A port can use e.g. a TCP, UDP, SSL socket, UNIX pipe, or custom transport (e.g. SAAL)
  • 36.
  • 37. Systems Overview OTP Components Standard Libraries Erlang Run-Time System Hardware and Operating System Applications written in Erlang Applications written in C, C++ or Java
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43. Downloads since Open Source Launch ’98 Grouping: 6 months
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.

Editor's Notes

  1. 2003-12-01 Rev PA1
  2. 2003-12-01 Rev PA1
  3. 2003-12-01 Rev PA1
  4. 2003-12-01 Rev PA1
  5. 2003-12-01 Rev PA1
  6. 2003-12-01 Rev PA1
  7. 2003-12-01 Rev PA1
  8. 2003-12-01 Rev PA1
  9. 2003-12-01 Rev PA1
  10. 2003-12-01 Rev PA1
  11. 2003-12-01 Rev PA1
  12. 2003-12-01 Rev PA1
  13. 2003-12-01 Rev PA1
  14. 2003-12-01 Rev PA1
  15. 2003-12-01 Rev PA1 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.
  16. 2003-12-01 Rev PA1
  17. 2003-12-01 Rev PA1
  18. 2003-12-01 Rev PA1
  19. 2003-12-01 Rev PA1
  20. 2003-12-01 Rev PA1
  21. 2003-12-01 Rev PA1
  22. 2003-12-01 Rev PA1
  23. 2003-12-01 Rev PA1
  24. 2003-12-01 Rev PA1