SlideShare uma empresa Scribd logo
1 de 20
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.

Mais conteúdo relacionado

Mais procurados

Parallelising Dynamic Programming
Parallelising Dynamic ProgrammingParallelising Dynamic Programming
Parallelising Dynamic ProgrammingRaphael 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
 
Introduction To Algorithms
Introduction To AlgorithmsIntroduction To Algorithms
Introduction To AlgorithmsKM Bappi
 
01. introduction to C++
01. introduction to C++01. introduction to C++
01. introduction to C++Haresh Jaiswal
 
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 VerificationIRJET Journal
 
Safe navigation in OCL
Safe navigation in OCLSafe navigation in OCL
Safe navigation in OCLEdward Willink
 
Bakery algorithm
Bakery algorithmBakery algorithm
Bakery algorithmUm e Farwa
 
Python in a physics lab
Python in a physics labPython in a physics lab
Python in a physics labGergely Imreh
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEdward 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 designRajkumar R
 
OCL Integration and Code Generation
OCL Integration and Code GenerationOCL Integration and Code Generation
OCL Integration and Code GenerationEdward Willink
 

Mais procurados (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
 

Semelhante a 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 NinesBarcamp Cork
 
maXbox Starter 45 Robotics
maXbox Starter 45 RoboticsmaXbox Starter 45 Robotics
maXbox Starter 45 RoboticsMax 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 flatteningCAFxX
 
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 erlangMirko Bonadei
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor ConcurrencyAlex 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 AnalysisFastly
 
Optimization in Programming languages
Optimization in Programming languagesOptimization in Programming languages
Optimization in Programming languagesAnkit Pandey
 
CP4151 Advanced data structures and algorithms
CP4151 Advanced data structures and algorithmsCP4151 Advanced data structures and algorithms
CP4151 Advanced data structures and algorithmsSheba41
 
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 RobotsCorrado Santoro
 
Secure Programming Language Cs
Secure Programming Language CsSecure Programming Language Cs
Secure Programming Language CsIJRES Journal
 

Semelhante a 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
 

Mais de 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 everyoneAkshar Desai
 

Mais de 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
 

Último

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Último (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 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