SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
www.erlang-solutions.com
Pilgrim's Progress to
the Promised Land
Robert Virding
www.erlang-solutions.com
2
You have heard the Prophets and their followers
extolling Erlang/Elixir as the true path to the Promised
Land of concurrent, fault-tolerant and scalable
systems and have decided to make the pilgrimage.
The Pilgrimage to the Promised Land
www.erlang-solutions.com
Are You Following the
Right Prophets?
www.erlang-solutions.com
4
Have you chosen the right path?
Is Erlang/Elixir the right language/system for you?
Are You Following the Right Prophets?
www.erlang-solutions.com
5
‣Handling of a very large number of concurrent activities
‣Actions must be performed at a certain point in time or within a certain time
‣System distributed over several computers
‣Interaction with hardware
‣Very large software systems
‣Complex functionality such as feature interaction
‣Continuous operation over many years
‣Software maintenance (reconfiguration etc.) without stopping the system
‣Stringent quality and reliability requirements
‣Fault tolerance both to hardware failures and software errors
Bjarne Däcker, November 2000 - Licentiate Thesis
Are You Following the Right Prophets?
‣Handling of a very large number of concurrent activities
‣Actions must be performed at a certain point in time or within a certain time
‣System distributed over several computers
‣Interaction with hardware
‣Very large software systems
‣Complex functionality such as feature interaction
‣Continuous operation over many years
‣Software maintenance (reconfiguration etc.) without stopping the system
‣Stringent quality and reliability requirements
‣Fault tolerance both to hardware failures and software errors
Bjarne Däcker, November 2000 - Licentiate Thesis
Not just telecom
www.erlang-solutions.com
6
Erlang/OTP, and hence Elixir, are designed for systems with
properties:
▸ Lightweight, massive concurrency
▸ Fault-tolerance must be provided
▸ Timing constraints
▸ Continuous operation for a long time
▸ Continuous maintenance/evolution of the system
▸ Distributed systems
Are You Following the Right Prophets?
www.erlang-solutions.com
7
Erlang/OTP and Elixir are not good for systems with:
▸ Heavy number crunching
▸ Global, shared, mutable data
▸ ...
Are You Following the Right Prophets?
BUT
we are good at interacting with other systems
www.erlang-solutions.com
The Joy of the First
Experiment
www.erlang-solutions.com
9
You have downloaded the system, used the tools and
have written your first simple Erlang or Elixir server or
Phoenix webpage, and it works.
The Joy of the First Experiment
www.erlang-solutions.com
The Village of
Confusion
www.erlang-solutions.com
11
Yes, your system is working but behaving strangely.
Did you really listen to the prophets when they were
describing the language/system?
The Village of Confusion
www.erlang-solutions.com
12
▸ Elixir may look like Ruby, but it is not Ruby
▸ Erlang/Elixir is not OO
▸ Erlang/Elixir has "strange" handling of data
▸ Erlang/Elixir has "strange" way of building systems
The Village of Confusion
www.erlang-solutions.com
The Hill of Functional
www.erlang-solutions.com
14
There is now a hill we must climb to gain
understanding of the language. It is not high.
The Hill of Functional
www.erlang-solutions.com
15
Erlang/Elixir are functional languages with:
▸ Immutable data
▸ Pattern matching
▸ Recursion
▸ ...
The Hill of Functional
www.erlang-solutions.com
The Mountain of
Concurrency
www.erlang-solutions.com
17
There is now a mountain we must climb to start
gaining understanding of building systems. It is not
high though the path may feel different.
The Mountain of Concurrency
www.erlang-solutions.com
18
Erlang/Elixir has a different way of structuring systems:
▸ Isolated processes
▸ No sharing of data
▸ No global data
▸ Communication through asynchronous messages
▸ We aren't scared of creating lots of processes
▸ We aren't scared of crashing things
The Mountain of Concurrency
www.erlang-solutions.com
The Mist of
Frameworks
www.erlang-solutions.com
20
Using frameworks and tools can create a deep mist
which we need to make our way through as we build
our system.
The Mist of Frameworks
www.erlang-solutions.com
21
Frameworks can help by
▸ Encapsulating behaviour
▸ Hiding boilerplate code
▸ Providing default handling
▸ Hiding internal system structure
The Mist of Frameworks
BUT
This can make it difficult to understand what is going on.
Especially when things go wrong, or if I need to combine this
framework with another one.
www.erlang-solutions.com
The Marsh of Fault-
Tolerant Systems
www.erlang-solutions.com
23
There is a big marsh which we need to make our way
through by building a fault-tolerant system. There are
many paths but we need to pick the best one
The Marsh of Fault-Tolerant Systems
www.erlang-solutions.com
24
The path of OTP is the obvious choice:
▸ It was designed to support building fault-tolerant systems
▸ Many of things we have probably already used are part of OTP
▸ The underlying system is built on it.
▸ Elixir already extensively uses it and has extended it
▸ OTP is extensible when necessary
The Marsh of Fault-Tolerant Systems
BUT
It does require thinking about how your should behave WHEN
things go wrong
www.erlang-solutions.com
The Double-Edged
Sword of
Metaprogramming
www.erlang-solutions.com
26
You have been carrying the Sword of
Metaprogramming and already used its effects without
realising its power. It has the power to do both good,
and EVIL.
The Double-Edged Sword of Metaprogramming
www.erlang-solutions.com
27
Macros are a powerful tool which lets you build code at runtime
▸ Used wisely they can really be helpful
▸ Used unwisely they can lead to totally incomprehensible code
▸ You are already using macros:
▹ defmodule, def and defp
▸ Remember when macros are evaluated

- they run at compile-time
The Double-Edged Sword of Metaprogramming
www.erlang-solutions.com
The Language Heaven
is Multilingual
www.erlang-solutions.com
29
On your travels you have probably heard tales that the
Language Heaven of the Promised Land is multilingual
and that there is squabbling between the language
gods and between their followers.
DON'T DESPAIR!
The Language Heaven is Multilingual
www.erlang-solutions.com
30
The Language Heaven is Multilingual
By following "the rules" the
languages openly interact with, and
support, each other making the
whole system more powerful than
any individual language can ever be
The Language Heaven of the
Promised Land is really the ERLANG
ECOSYSTEM with all the languages
built/running on top of the BEAM,
Erlang and OTP.
www.erlang-solutions.com
31
The Language Heaven is Multilingual
The whole system can
interact with other
systems
www.erlang-solutions.com
The Pool of
Introspection
www.erlang-solutions.com
33
Sit by the pool and in the reflections of its waters look
inside your system while it runs, introspect and gain
understanding.
The Pool of Introspection
www.erlang-solutions.com
34
There are a number of tools that allow you to introspect running
systems:
▸ Observer - part of the standard release
▸ Dbg - part of the standard release
▸ Recon - common 3rd party
▸ Redbug - common 3rd party
▸ WombatOAM - commercial product
These work in Erlang but the mapping to Elixir is very
straightforward.
The Pool of Introspection
www.erlang-solutions.com
The Joy of Arrival
www.erlang-solutions.com
36
You have built your first REAL system and it works. It
can handle all the load, survive errors and just keep
going.
Rejoice, and realise the path wasn't really as difficult as
it at first seemed.
The Joy of Arrival
www.erlang-solutions.com
Robert Virding
rvirding@gmail.com
robert.virding@erlang-solutions.com
@rvirding

Contenu connexe

Similaire à Pilgrim's Progress to the Promised Land by Robert Virding

Distributed Erlang Systems In Operation
Distributed Erlang Systems In OperationDistributed Erlang Systems In Operation
Distributed Erlang Systems In Operation
Andy Gross
 
DevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesDevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 Slides
Alex Cruise
 

Similaire à Pilgrim's Progress to the Promised Land by Robert Virding (20)

From Objective-C to Swift
From Objective-C to SwiftFrom Objective-C to Swift
From Objective-C to Swift
 
Let it crash! The Erlang Approach to Building Reliable Services
Let it crash! The Erlang Approach to Building Reliable ServicesLet it crash! The Erlang Approach to Building Reliable Services
Let it crash! The Erlang Approach to Building Reliable Services
 
Repeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirRepeating History...On Purpose...with Elixir
Repeating History...On Purpose...with Elixir
 
The computer science behind a modern disributed data store
The computer science behind a modern disributed data storeThe computer science behind a modern disributed data store
The computer science behind a modern disributed data store
 
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...OSDC 2018 | The Computer science behind a modern distributed data store by Ma...
OSDC 2018 | The Computer science behind a modern distributed data store by Ma...
 
Bioinformatics
BioinformaticsBioinformatics
Bioinformatics
 
Dev Environments: The Next Generation
Dev Environments: The Next GenerationDev Environments: The Next Generation
Dev Environments: The Next Generation
 
Distributed Erlang Systems In Operation
Distributed Erlang Systems In OperationDistributed Erlang Systems In Operation
Distributed Erlang Systems In Operation
 
Distributed computing for new bloods
Distributed computing for new bloodsDistributed computing for new bloods
Distributed computing for new bloods
 
Vert.x
Vert.xVert.x
Vert.x
 
Phoenix for Rubyists
Phoenix for RubyistsPhoenix for Rubyists
Phoenix for Rubyists
 
Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)
 
The Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms ProgrammingThe Art of Evolutionary Algorithms Programming
The Art of Evolutionary Algorithms Programming
 
DevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesDevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 Slides
 
Foss Presentation
Foss PresentationFoss Presentation
Foss Presentation
 
PHP, AWS, and Sleep - Hampton Roads DevFest 2016
PHP, AWS, and Sleep - Hampton Roads DevFest 2016PHP, AWS, and Sleep - Hampton Roads DevFest 2016
PHP, AWS, and Sleep - Hampton Roads DevFest 2016
 
From a web application to a distributed system
From a web application to a distributed systemFrom a web application to a distributed system
From a web application to a distributed system
 
How to build an admin guy
How to build an admin guyHow to build an admin guy
How to build an admin guy
 
Osdc 2011 michael_neale
Osdc 2011 michael_nealeOsdc 2011 michael_neale
Osdc 2011 michael_neale
 
OpenSolaris Server
OpenSolaris ServerOpenSolaris Server
OpenSolaris Server
 

Plus de Naresh Jain

Organizational Resilience
Organizational ResilienceOrganizational Resilience
Organizational Resilience
Naresh Jain
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
Naresh Jain
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
Naresh Jain
 

Plus de Naresh Jain (20)

Problem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary DesignProblem Solving Techniques For Evolutionary Design
Problem Solving Techniques For Evolutionary Design
 
Agile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome NoteAgile India 2019 Conference Welcome Note
Agile India 2019 Conference Welcome Note
 
Organizational Resilience
Organizational ResilienceOrganizational Resilience
Organizational Resilience
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
 
Agile India 2018 Conference Summary
Agile India 2018 Conference SummaryAgile India 2018 Conference Summary
Agile India 2018 Conference Summary
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Agile India 2018 Conference
Agile India 2018 ConferenceAgile India 2018 Conference
Agile India 2018 Conference
 
Concurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco CesariniConcurrent languages are Functional by Francesco Cesarini
Concurrent languages are Functional by Francesco Cesarini
 
Erlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco CesariniErlang from behing the trenches by Francesco Cesarini
Erlang from behing the trenches by Francesco Cesarini
 
Anatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur DatarAnatomy of an eCommerce Search Engine by Mayur Datar
Anatomy of an eCommerce Search Engine by Mayur Datar
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile App
 
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to ProdTowards FutureOps: Stable, Repeatable environments from Dev to Prod
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
 
Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas Value Driven Development by Dave Thomas
Value Driven Development by Dave Thomas
 
No Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKennaNo Silver Bullets in Functional Programming by Brian McKenna
No Silver Bullets in Functional Programming by Brian McKenna
 
Functional Programming Conference 2016
Functional Programming Conference 2016Functional Programming Conference 2016
Functional Programming Conference 2016
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
 
The Eclipse Way
The Eclipse WayThe Eclipse Way
The Eclipse Way
 
Unleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDTUnleashing the Power of Automated Refactoring with JDT
Unleashing the Power of Automated Refactoring with JDT
 
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo KimGetting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
Getting2Alpha: Turbo-charge your product with Game Thinking by Amy Jo Kim
 

Dernier

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Dernier (20)

Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

Pilgrim's Progress to the Promised Land by Robert Virding