SlideShare a Scribd company logo
Study of Erlang for Building Real-Time Systems By Dinesh Rajpoot Roll no. 09305043 Under the guidance of  Prof. Kavi Arya August  20, 2010
Outline ,[object Object]
Erlang Highlights
Declarative
Concurrency
Fault-tolerant
Hot Code Swapping
Multi Core Programming Applications of Erlang ,[object Object]
Challenges and Solutions
Case Study(Adaptive Cruise Control)
Conclusion and Future Work
References,[object Object]
Declarative Concentrate on “What” rather  than  “How”. The programs are concise. qsort([])               ->  []; qsort([Pivot|T]) ->  qsort([X || X <- T, X =< Pivot]) ++ [Pivot] ++  qsort([X || X <- T, X > Pivot]). Programs are readable and easy to maintain. It increases productivity.
Concurrency Each concurrent  activity is called “process”. Processes  don’t share data. Processes belong to language not operating system. Processes communicate through “message passing”not shared memory. Less  process creation and message passing time.
Concurrency Create  a  process Pid = spawn(Module, fun, [Arguments]) Send and receive Pid ! message       receive             message1  -> actions1; 		message2 -> actions2; 		…… 		after   Time -> time out actions; 	 end.
An example 	-module(echo). 	-export([start/0, loop/o]). 	start() ->  Pid = spawn (echo, loop, [ ] ), Pid ! { self (), hello}, 	   receive  	         { Pid, Msg } -> io:format ( “~w~n”, [Msg]) 	  end, Pid ! stop. loop() ->     receive        { From, Msg } -> 	From ! { self(), Msg}, 	loop();    stop -> true    end. {<0.1.0>, hello} {<0.1.0>, hello} shell Pid {<0.2.0>, hello} stop <0.1.0> <0.2.0>
1,000 erlang java C# 100 Microseconds/process 10 1 10 100 1,000 10,000 100,000 Number of processes Process creation times (LOG/LOG scale) > 200,000processes Source: Joe Armstrong SICS
100,000 erlang java 10,000 C# 1,000 Microseconds/message 100 10 1 1 10 100 1,000 10,000 100,000 Number of processes Message passing times (LOG/LOG scale) > 200,000processes Source: Joe Armstrong SICS
Fault Tolerant ,[object Object],            {‘EXIT’, Pid, Reason}                                                        {‘EXIT’, Pid, Reason}                    {‘EXIT’, Pid, Reason}
Hot Code Swapping Embedded  systems  are reactive. How can I update my system without shutting down? In Erlang , we can change code on-the-fly.  We can keep 2 version of same module running.

More Related Content

What's hot

Parallelising Dynamic Programming
Parallelising Dynamic ProgrammingParallelising Dynamic Programming
Parallelising Dynamic Programming
Raphael Reitzig
 
QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?
Edward Willink
 
08. graph traversal
08. graph traversal08. graph traversal
08. graph traversal
Onkar Nath Sharma
 
Introduction To Algorithms
Introduction To AlgorithmsIntroduction To Algorithms
Introduction To Algorithms
KM Bappi
 
01. introduction to C++
01. introduction to C++01. introduction to C++
01. introduction to C++
Haresh Jaiswal
 
Symbolic mathematics
Symbolic mathematicsSymbolic mathematics
Symbolic mathematics
FranklinChibuike1
 
A General Framework for Electronic Circuit Verification
A General Framework for Electronic Circuit VerificationA General Framework for Electronic Circuit Verification
A General Framework for Electronic Circuit Verification
IRJET Journal
 
The OCLforUML Profile
The OCLforUML ProfileThe OCLforUML Profile
The OCLforUML Profile
Edward Willink
 
Arduino Programming
Arduino ProgrammingArduino Programming
Arduino Programming
Dr Karthikeyan Periasamy
 
OCL 2.4. (... 2.5)
OCL 2.4. (... 2.5)OCL 2.4. (... 2.5)
OCL 2.4. (... 2.5)
Edward Willink
 
Safe navigation in OCL
Safe navigation in OCLSafe navigation in OCL
Safe navigation in OCL
Edward Willink
 
Bakery algorithm
Bakery algorithmBakery algorithm
Bakery algorithm
Um e Farwa
 
Algo analysis
Algo analysisAlgo analysis
Algo analysis
Shakila Mahjabin
 
Python in a physics lab
Python in a physics labPython in a physics lab
Python in a physics lab
Gergely Imreh
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and Debugging
Edward Willink
 
Principal source of optimization in compiler design
Principal source of optimization in compiler designPrincipal source of optimization in compiler design
Principal source of optimization in compiler design
Rajkumar R
 
Ppt on fft
Ppt on fftPpt on fft
Ppt on fft
kiranrockz
 
OCL Integration and Code Generation
OCL Integration and Code GenerationOCL Integration and Code Generation
OCL Integration and Code Generation
Edward Willink
 

What's hot (20)

Parallelising Dynamic Programming
Parallelising Dynamic ProgrammingParallelising Dynamic Programming
Parallelising Dynamic Programming
 
QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?
 
08. graph traversal
08. graph traversal08. graph traversal
08. graph traversal
 
Introduction To Algorithms
Introduction To AlgorithmsIntroduction To Algorithms
Introduction To Algorithms
 
01. introduction to C++
01. introduction to C++01. introduction to C++
01. introduction to C++
 
Symbolic mathematics
Symbolic mathematicsSymbolic mathematics
Symbolic mathematics
 
A General Framework for Electronic Circuit Verification
A General Framework for Electronic Circuit VerificationA General Framework for Electronic Circuit Verification
A General Framework for Electronic Circuit Verification
 
The OCLforUML Profile
The OCLforUML ProfileThe OCLforUML Profile
The OCLforUML Profile
 
Arduino Programming
Arduino ProgrammingArduino Programming
Arduino Programming
 
OCL 2.4. (... 2.5)
OCL 2.4. (... 2.5)OCL 2.4. (... 2.5)
OCL 2.4. (... 2.5)
 
Safe navigation in OCL
Safe navigation in OCLSafe navigation in OCL
Safe navigation in OCL
 
Bakery algorithm
Bakery algorithmBakery algorithm
Bakery algorithm
 
Algo analysis
Algo analysisAlgo analysis
Algo analysis
 
Aligning OCL and UML
Aligning OCL and UMLAligning OCL and UML
Aligning OCL and UML
 
Python in a physics lab
Python in a physics labPython in a physics lab
Python in a physics lab
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and Debugging
 
Principal source of optimization in compiler design
Principal source of optimization in compiler designPrincipal source of optimization in compiler design
Principal source of optimization in compiler design
 
Functional coverages
Functional coveragesFunctional coverages
Functional coverages
 
Ppt on fft
Ppt on fftPpt on fft
Ppt on fft
 
OCL Integration and Code Generation
OCL Integration and Code GenerationOCL Integration and Code Generation
OCL Integration and Code Generation
 

Similar to Erlang real time

Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang FinalSinarShebl
 
Erlang For Five Nines
Erlang For Five NinesErlang For Five Nines
Erlang For Five Nines
Barcamp Cork
 
maXbox Starter 45 Robotics
maXbox Starter 45 RoboticsmaXbox Starter 45 Robotics
maXbox Starter 45 Robotics
Max Kleiner
 
Compiler optimizations based on call-graph flattening
Compiler optimizations based on call-graph flatteningCompiler optimizations based on call-graph flattening
Compiler optimizations based on call-graph flattening
CAFxX
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Jorisimec.archive
 
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
 
An introduction to erlang
An introduction to erlangAn introduction to erlang
An introduction to erlang
Mirko Bonadei
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor Concurrency
Alex Miller
 
The Role Of Software And Hardware As A Common Part Of The...
The Role Of Software And Hardware As A Common Part Of The...The Role Of Software And Hardware As A Common Part Of The...
The Role Of Software And Hardware As A Common Part Of The...
Sheena Crouch
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Maarten Balliauw
 
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
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
Fastly
 
Optimization in Programming languages
Optimization in Programming languagesOptimization in Programming languages
Optimization in Programming languages
Ankit Pandey
 
CP4151 Advanced data structures and algorithms
CP4151 Advanced data structures and algorithmsCP4151 Advanced data structures and algorithms
CP4151 Advanced data structures and algorithms
Sheba41
 
Start with swift
Start with swiftStart with swift
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrongSentifi
 
Integrating Cloud Services in Behaviour Programming for Autonomous Robots
Integrating Cloud Services in Behaviour  Programming for Autonomous RobotsIntegrating Cloud Services in Behaviour  Programming for Autonomous Robots
Integrating Cloud Services in Behaviour Programming for Autonomous Robots
Corrado Santoro
 
Secure Programming Language Cs
Secure Programming Language CsSecure Programming Language Cs
Secure Programming Language Cs
IJRES Journal
 

Similar to Erlang real time (20)

Erlang OTP
Erlang OTPErlang OTP
Erlang OTP
 
Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang Final
 
Erlang For Five Nines
Erlang For Five NinesErlang For Five Nines
Erlang For Five Nines
 
maXbox Starter 45 Robotics
maXbox Starter 45 RoboticsmaXbox Starter 45 Robotics
maXbox Starter 45 Robotics
 
Compiler optimizations based on call-graph flattening
Compiler optimizations based on call-graph flatteningCompiler optimizations based on call-graph flattening
Compiler optimizations based on call-graph flattening
 
Foundations of Programming Part I
Foundations of Programming Part IFoundations of Programming Part I
Foundations of Programming Part I
 
20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris20081114 Friday Food iLabt Bart Joris
20081114 Friday Food iLabt Bart Joris
 
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
 
An introduction to erlang
An introduction to erlangAn introduction to erlang
An introduction to erlang
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor Concurrency
 
The Role Of Software And Hardware As A Common Part Of The...
The Role Of Software And Hardware As A Common Part Of The...The Role Of Software And Hardware As A Common Part Of The...
The Role Of Software And Hardware As A Common Part Of The...
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
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...
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Optimization in Programming languages
Optimization in Programming languagesOptimization in Programming languages
Optimization in Programming languages
 
CP4151 Advanced data structures and algorithms
CP4151 Advanced data structures and algorithmsCP4151 Advanced data structures and algorithms
CP4151 Advanced data structures and algorithms
 
Start with swift
Start with swiftStart with swift
Start with swift
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrong
 
Integrating Cloud Services in Behaviour Programming for Autonomous Robots
Integrating Cloud Services in Behaviour  Programming for Autonomous RobotsIntegrating Cloud Services in Behaviour  Programming for Autonomous Robots
Integrating Cloud Services in Behaviour Programming for Autonomous Robots
 
Secure Programming Language Cs
Secure Programming Language CsSecure Programming Language Cs
Secure Programming Language Cs
 

More from Akshar Desai

Kakodkar committeereport 05132011
Kakodkar committeereport 05132011Kakodkar committeereport 05132011
Kakodkar committeereport 05132011Akshar Desai
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractionsAkshar Desai
 
Android and Hard Real Time
Android and Hard Real TimeAndroid and Hard Real Time
Android and Hard Real TimeAkshar Desai
 
Making a screencast for CS308 project setup
Making a screencast for CS308 project setupMaking a screencast for CS308 project setup
Making a screencast for CS308 project setupAkshar Desai
 
Template for cs308 project setup screencast
Template for cs308 project setup screencastTemplate for cs308 project setup screencast
Template for cs308 project setup screencastAkshar Desai
 
Scratch: Programming for everyone
Scratch: Programming for everyoneScratch: Programming for everyone
Scratch: Programming for everyone
Akshar Desai
 

More from Akshar Desai (6)

Kakodkar committeereport 05132011
Kakodkar committeereport 05132011Kakodkar committeereport 05132011
Kakodkar committeereport 05132011
 
E yantra robot abstractions
E yantra robot abstractionsE yantra robot abstractions
E yantra robot abstractions
 
Android and Hard Real Time
Android and Hard Real TimeAndroid and Hard Real Time
Android and Hard Real Time
 
Making a screencast for CS308 project setup
Making a screencast for CS308 project setupMaking a screencast for CS308 project setup
Making a screencast for CS308 project setup
 
Template for cs308 project setup screencast
Template for cs308 project setup screencastTemplate for cs308 project setup screencast
Template for cs308 project setup screencast
 
Scratch: Programming for everyone
Scratch: Programming for everyoneScratch: Programming for everyone
Scratch: Programming for everyone
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Erlang real time

  • 1. Study of Erlang for Building Real-Time Systems By Dinesh Rajpoot Roll no. 09305043 Under the guidance of Prof. Kavi Arya August 20, 2010
  • 2.
  • 8.
  • 12.
  • 13. Declarative Concentrate on “What” rather than “How”. The programs are concise. qsort([]) -> []; qsort([Pivot|T]) -> qsort([X || X <- T, X =< Pivot]) ++ [Pivot] ++ qsort([X || X <- T, X > Pivot]). Programs are readable and easy to maintain. It increases productivity.
  • 14. Concurrency Each concurrent activity is called “process”. Processes don’t share data. Processes belong to language not operating system. Processes communicate through “message passing”not shared memory. Less process creation and message passing time.
  • 15. Concurrency Create a process Pid = spawn(Module, fun, [Arguments]) Send and receive Pid ! message receive message1 -> actions1; message2 -> actions2; …… after Time -> time out actions; end.
  • 16. An example -module(echo). -export([start/0, loop/o]). start() -> Pid = spawn (echo, loop, [ ] ), Pid ! { self (), hello}, receive { Pid, Msg } -> io:format ( “~w~n”, [Msg]) end, Pid ! stop. loop() -> receive { From, Msg } -> From ! { self(), Msg}, loop(); stop -> true end. {<0.1.0>, hello} {<0.1.0>, hello} shell Pid {<0.2.0>, hello} stop <0.1.0> <0.2.0>
  • 17. 1,000 erlang java C# 100 Microseconds/process 10 1 10 100 1,000 10,000 100,000 Number of processes Process creation times (LOG/LOG scale) > 200,000processes Source: Joe Armstrong SICS
  • 18. 100,000 erlang java 10,000 C# 1,000 Microseconds/message 100 10 1 1 10 100 1,000 10,000 100,000 Number of processes Message passing times (LOG/LOG scale) > 200,000processes Source: Joe Armstrong SICS
  • 19.
  • 20. Hot Code Swapping Embedded systems are reactive. How can I update my system without shutting down? In Erlang , we can change code on-the-fly. We can keep 2 version of same module running.
  • 21. Multi-core Programming How to achieve? Use lots of processes. Avoid side effects. Avoid sequential bottleneck. Write “small message, big computation”. What is special about Erlang? Message passing system. No mutable data structure = No lock. No mutable data structure = Easy to parallelize.
  • 22. Applications of Erlang Erlang is useful when applications are concurrent, distributed and soft-real time. It is used in telecommunication systems from Ericsson. Some other commercial applications are: Facebook uses Erlang to power the backend of its chat service, handling more than 100 million active users. Mobile arts (GSM and UMTS services) T-Mobile uses Erlang in its SMS and authentication systems.
  • 24. Challenges & Solutions Challenges Erlang can’t directly interact with hardware. Erlang can’t be converted into it’s equivalent C code. Communication latency between PC and Firebird-V. Solutions Use C as middle-layer between Erlang and Micro-controller. Use PC as master and Firebird as slave mode. We can use small, low cost, fan-less processor and run Erlang on it.
  • 25. Case Study Adaptive Cruise Control Robot will follow white line while maintaining safe distance from other robots. Robot using FireBird V (8051 micro-controller) Sensors using Whiteline sensors(Left, Middle, Right) Front sharp sensor
  • 26. Communication Model Erlang PC Micro-controller read_sensor Sensing value C program Actuating Take corrective measure
  • 27. Conclusion & Future Work Programs in functional languages are concise and readable. Concurrency model of Erlang helps in making concurrent programs without worrying about deadlocks. We have seen the possibility of implementing robotic system using Erlang. Since concurrency is crucial in building autonomous robotics applications, Erlang can be used in building such applications.
  • 28. References Joe Armstrong “Programming Erlang”, May 2007 John Hughes "Why Functional programming Matters", 1984, revised in 1989 and 1990. Francesco Cesarini and Simon Thompson, "Erlang Programming, O'Reilly, June 2009 . Philip wadler "Functional Programming in the Real World“ http://homepages.inf.ed.ac.uk/wadler/realworld/ . Video lectures by Erlang- Training Consultancy