SlideShare uma empresa Scribd logo
1 de 17
Erlang Essentials
                    Core Language Features of Interest



                      Excerpt From 12/4/08 Microsoft Presentation
                                 Slides by Dave Fayram
                                dfayram@microsoft.com



© 2008 Powerset
Erlang Basics

                  • A Functional Language
                   • Based around pattern matching, a total
                      lack of shared state, and a flexible
                      message passing system.
                   • Lightweight Processes are just tail-
                      recursive functions executing in parallel.


© 2008 Powerset
Erlang Example




© 2008 Powerset
Pattern Matching


                  • Erlang has no assignment.
                  • Every “=” statement forms a relationship.
                  • Type descriptions are also valid for pattern
                    matching.



© 2008 Powerset
Pattern Matching




© 2008 Powerset
Lightweight Processes

                  • Any function (named or anonymous) can
                    become a process.
                  • A process is simply a function executing in
                    parallel.
                  • Process semantics mirror function
                    semantics.


© 2008 Powerset
Lightweight Processes

                  • Extremely Efficient!
                   • Modern systems can accommodate
                     literally millions of Erlang processes.
                   • Erlang LWP can be run in parallel on
                     multiple CPUs.
                   • Programs heavily reliant on processes
                     tend to get free performance boosts.

© 2008 Powerset
Lightweight Processes




© 2008 Powerset
Lightweight Processes




© 2008 Powerset
Asynchronous Messages
                  • The “!” operator sends messages.
                   • Asynchronous, no guarantee of delivery.
                  • The “receive” statement matches messages.
                   • One call to receive, one message
                      removed from the process message
                      queue.
                   • Uses Pattern Matching to select messages
© 2008 Powerset
[target] ! [message]




© 2008 Powerset
Asynchronous Messages




© 2008 Powerset
Asynchronous Messages




© 2008 Powerset
Asynchronous Messages




© 2008 Powerset
Asynchronous Messages

                  • Erlang does not distinguish between “local”
                    processes and “remote” processes.
                  • This is the core of Erlang’s distributed
                    programming.
                  • Semantics are identical (already, no strong
                    guarantees of message delivery).


© 2008 Powerset
Asynchronous Messages




© 2008 Powerset
Asynchronous Messages




© 2008 Powerset

Mais conteúdo relacionado

Destaque

Erlang Practice
Erlang PracticeErlang Practice
Erlang Practice
litaocheng
 
An Erlang Game Stack
An Erlang Game StackAn Erlang Game Stack
An Erlang Game Stack
Eonblast
 
In Sync Consulting - Profile
In Sync Consulting - ProfileIn Sync Consulting - Profile
In Sync Consulting - Profile
renurag
 
Kenenisa
KenenisaKenenisa
Kenenisa
rgana
 
My Powerpoint
My PowerpointMy Powerpoint
My Powerpoint
Uruguayo
 

Destaque (20)

Intro to Erlang
Intro to ErlangIntro to Erlang
Intro to Erlang
 
Erlang For Five Nines
Erlang For Five NinesErlang For Five Nines
Erlang For Five Nines
 
An introduction to erlang
An introduction to erlangAn introduction to erlang
An introduction to erlang
 
Erlang Practice
Erlang PracticeErlang Practice
Erlang Practice
 
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
 
Erlang OTP
Erlang OTPErlang OTP
Erlang OTP
 
Intro To Erlang
Intro To ErlangIntro To Erlang
Intro To Erlang
 
Actors in erlang
Actors in erlangActors in erlang
Actors in erlang
 
An Erlang Game Stack
An Erlang Game StackAn Erlang Game Stack
An Erlang Game Stack
 
The Sociology of Nothingness: Challenges of Big Data
The Sociology of Nothingness: Challenges of Big DataThe Sociology of Nothingness: Challenges of Big Data
The Sociology of Nothingness: Challenges of Big Data
 
In Sync Consulting - Profile
In Sync Consulting - ProfileIn Sync Consulting - Profile
In Sync Consulting - Profile
 
Kenenisa
KenenisaKenenisa
Kenenisa
 
Guerrilla Readers - Portfolio
Guerrilla Readers - PortfolioGuerrilla Readers - Portfolio
Guerrilla Readers - Portfolio
 
Lourenza
LourenzaLourenza
Lourenza
 
Los gansos
Los gansosLos gansos
Los gansos
 
Santosh Cv
Santosh CvSantosh Cv
Santosh Cv
 
Burlata
BurlataBurlata
Burlata
 
Lapcodex Aviones 1
Lapcodex Aviones 1Lapcodex Aviones 1
Lapcodex Aviones 1
 
I Dream of Justice, I Dream of Change
I Dream of Justice, I Dream of ChangeI Dream of Justice, I Dream of Change
I Dream of Justice, I Dream of Change
 
My Powerpoint
My PowerpointMy Powerpoint
My Powerpoint
 

Semelhante a Introduction to Erlang

DejaVOO: A Regression Testing Tool for Java Software
DejaVOO: A Regression Testing Tool for Java SoftwareDejaVOO: A Regression Testing Tool for Java Software
DejaVOO: A Regression Testing Tool for Java Software
Manas Tungare
 
Erlang及其应用
Erlang及其应用Erlang及其应用
Erlang及其应用
Feng Yu
 
Pivotal Labs Open View Presentation Quality Assurance And Developer Testing
Pivotal Labs Open View Presentation Quality Assurance And Developer TestingPivotal Labs Open View Presentation Quality Assurance And Developer Testing
Pivotal Labs Open View Presentation Quality Assurance And Developer Testing
guestc8adce
 
Lotus Notes 8.5 version to version comparison
Lotus Notes 8.5 version to version comparisonLotus Notes 8.5 version to version comparison
Lotus Notes 8.5 version to version comparison
André van der Reep
 

Semelhante a Introduction to Erlang (18)

XS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM EnglishXS Japan 2008 Oracle VM English
XS Japan 2008 Oracle VM English
 
DejaVOO: A Regression Testing Tool for Java Software
DejaVOO: A Regression Testing Tool for Java SoftwareDejaVOO: A Regression Testing Tool for Java Software
DejaVOO: A Regression Testing Tool for Java Software
 
Erlang及其应用
Erlang及其应用Erlang及其应用
Erlang及其应用
 
XS Japan 2008 Oracle Japanese
XS Japan 2008 Oracle JapaneseXS Japan 2008 Oracle Japanese
XS Japan 2008 Oracle Japanese
 
Surviving The Downturn
Surviving The DownturnSurviving The Downturn
Surviving The Downturn
 
Pivotal Labs Open View Presentation Quality Assurance And Developer Testing
Pivotal Labs Open View Presentation Quality Assurance And Developer TestingPivotal Labs Open View Presentation Quality Assurance And Developer Testing
Pivotal Labs Open View Presentation Quality Assurance And Developer Testing
 
Rails Scala Citec Presentation
Rails Scala Citec PresentationRails Scala Citec Presentation
Rails Scala Citec Presentation
 
Groovy Testing Aug2009
Groovy Testing Aug2009Groovy Testing Aug2009
Groovy Testing Aug2009
 
Facilitating Rich Data Manipulation in BPEL using E4X
Facilitating Rich Data Manipulation in BPEL using E4XFacilitating Rich Data Manipulation in BPEL using E4X
Facilitating Rich Data Manipulation in BPEL using E4X
 
Groovy Testing Sep2009
Groovy Testing Sep2009Groovy Testing Sep2009
Groovy Testing Sep2009
 
Introduction To Perl - SpringPeople
Introduction To Perl - SpringPeopleIntroduction To Perl - SpringPeople
Introduction To Perl - SpringPeople
 
saurabh soni rac
saurabh soni racsaurabh soni rac
saurabh soni rac
 
introductiontoperl-springpeople-150605065831-lva1-app6891.pptx
introductiontoperl-springpeople-150605065831-lva1-app6891.pptxintroductiontoperl-springpeople-150605065831-lva1-app6891.pptx
introductiontoperl-springpeople-150605065831-lva1-app6891.pptx
 
Advanced MySQL Replication Architectures - Luis Soares
Advanced MySQL Replication Architectures - Luis SoaresAdvanced MySQL Replication Architectures - Luis Soares
Advanced MySQL Replication Architectures - Luis Soares
 
Erlang and Scalability
Erlang and ScalabilityErlang and Scalability
Erlang and Scalability
 
HowTo Build an OSGI EJB3 Server
HowTo Build an OSGI EJB3 ServerHowTo Build an OSGI EJB3 Server
HowTo Build an OSGI EJB3 Server
 
Lotus Notes 8.5 version to version comparison
Lotus Notes 8.5 version to version comparisonLotus Notes 8.5 version to version comparison
Lotus Notes 8.5 version to version comparison
 
Lotus Notes 8.5 version to version comparison
Lotus Notes 8.5 version to version comparisonLotus Notes 8.5 version to version comparison
Lotus Notes 8.5 version to version comparison
 

Último

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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?
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL 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...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Introduction to Erlang