SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Downloaden Sie, um offline zu lesen
what is a stack in IT? We're talking about a silo of dependencies, like a tower, with the end-user sitting at the top.
Material science and E&E engineering are the foundations near the bottom, which give us hardware. Hardware is hardly a
firm foundation... it changes very often, like the currents in the sea, and so we have software operating systems like
Windows, Linux, and Android to deal with the frequent changes - giving us a longer term "ground floor", or "floating
platform", upon which to base applications that provide value to end-users of IT. Most recently, distributed computing is
becoming very trendy - and you must be aware of salespeak like "cloud computing" and "data centres". Unfortunately,
although some significant work has been done, at the research level, on operating systems that tie many separate
computers together, there are no dominant solutions in this space - no solutions that have a level of acceptance that is
as widespread as any of the aforementioned operating systems. The most popular solutions are currently a thin layer,
called hypervisors, that fit between operating systems designed to work on single computers, and the many separate
computers that need to be made to work together. The operating system remains a "single machine" model, and so it almost
forces all application development to implement its own way of dealing with the coordination of work that needs to be
done among many computers. So let's say now, that you're a programmer who is quite flexible, and can learn to speak any
language you like, and you need to write an application that runs on many computers at the same time - an easy example
for this crowd is an application that needs to serve 100,000 complex webpages per second. You might ask yourself, "which
is the hardware or software machine that already knows how to deal with most of the knitty-gritty of getting this job
done?" Once you had an answer, you might then ask what language that software or hardware speaks, and then you would
learn that language, so that you could communicate with the hardware or software that already knows how to get the job
done. It turns out that Ericsson has continuously developed and maintained for over 20 years, a piece of software that is
very clever at solving this problem problem, of getting many pieces of hardware to work together on performing a single
job that helps some end-user. Ericsson calls this clever machine the "BEAM emulator", and it calls the framework for
working with the BEAM emulator, "the Open Telecoms Platform (OTP)". So BEAM is this smart machine, and OTP is a pattern
that BEAM uses to think about distributed computing problems. Now how do we humans talk to BEAM? We would normally use a
language called Erlang. This is why it is valuable to learn Erlang. (Zooming out for a second, let's remember that
languages don't do work - people, or machines, do work, and we only use languages to communicate with machines, as if
they are little people.) The rest of today's talk is going to briefly cover three topics: 1) how BEAM gets distributed
computing done, with the help of OTP, 2) how the Erlang language works, and 3) how Erlang or any other language is made
comprehensible to BEAM (technically: I'm talking about BEAM as a compilation target).
"stack"
I'm an end-user!
Hardware: the shifting sands
Operating Systems: a plea for sanity
Applications: I like to use it.
Virtualisation: you mean we still
have to use these mofos? (now: yes)
designers
falala!
fala..
er..
developers
FU
!!
finance / ops
we R
FU-ed.
investors
FFUU
!!!!
what is a stack in IT? We're talking about a silo of dependencies, like a tower, with the end-user sitting at the top.
Material science and E&E engineering are the foundations near the bottom, which give us hardware. Hardware is hardly a
firm foundation... it changes very often, like the currents in the sea, and so we have software operating systems like
Windows, Linux, and Android to deal with the frequent changes - giving us a longer term "ground floor", or "floating
platform", upon which to base applications that provide value to end-users of IT. Most recently, distributed computing is
becoming very trendy - and you must be aware of salespeak like "cloud computing" and "data centres". Unfortunately,
although some significant work has been done, at the research level, on operating systems that tie many separate
computers together, there are no dominant solutions in this space - no solutions that have a level of acceptance that is
as widespread as any of the aforementioned operating systems. The most popular solutions are currently a thin layer,
called hypervisors, that fit between operating systems designed to work on single computers, and the many separate
computers that need to be made to work together. The operating system remains a "single machine" model, and so it almost
forces all application development to implement its own way of dealing with the coordination of work that needs to be
done among many computers. So let's say now, that you're a programmer who is quite flexible, and can learn to speak any
language you like, and you need to write an application that runs on many computers at the same time - an easy example
for this crowd is an application that needs to serve 100,000 complex webpages per second. You might ask yourself, "which
is the hardware or software machine that already knows how to deal with most of the knitty-gritty of getting this job
done?" Once you had an answer, you might then ask what language that software or hardware speaks, and then you would
learn that language, so that you could communicate with the hardware or software that already knows how to get the job
done. It turns out that Ericsson has continuously developed and maintained for over 20 years, a piece of software that is
very clever at solving this problem problem, of getting many pieces of hardware to work together on performing a single
job that helps some end-user. Ericsson calls this clever machine the "BEAM emulator", and it calls the framework for
working with the BEAM emulator, "the Open Telecoms Platform (OTP)". So BEAM is this smart machine, and OTP is a pattern
that BEAM uses to think about distributed computing problems. Now how do we humans talk to BEAM? We would normally use a
language called Erlang. This is why it is valuable to learn Erlang. (Zooming out for a second, let's remember that
languages don't do work - people, or machines, do work, and we only use languages to communicate with machines, as if
they are little people.) The rest of today's talk is going to briefly cover three topics: 1) how BEAM gets distributed
computing done, with the help of OTP, 2) how the Erlang language works, and 3) how Erlang or any other language is made
comprehensible to BEAM (technically: I'm talking about BEAM as a compilation target).
re-stack?
I'm an end-user!
Applications: I like to use it.
A magic box, please?
(your fav. language / platform)
what is a stack in IT? We're talking about a silo of dependencies, like a tower, with the end-user sitting at the top.
Material science and E&E engineering are the foundations near the bottom, which give us hardware. Hardware is hardly a
firm foundation... it changes very often, like the currents in the sea, and so we have software operating systems like
Windows, Linux, and Android to deal with the frequent changes - giving us a longer term "ground floor", or "floating
platform", upon which to base applications that provide value to end-users of IT. Most recently, distributed computing is
becoming very trendy - and you must be aware of salespeak like "cloud computing" and "data centres". Unfortunately,
although some significant work has been done, at the research level, on operating systems that tie many separate
computers together, there are no dominant solutions in this space - no solutions that have a level of acceptance that is
as widespread as any of the aforementioned operating systems. The most popular solutions are currently a thin layer,
called hypervisors, that fit between operating systems designed to work on single computers, and the many separate
computers that need to be made to work together. The operating system remains a "single machine" model, and so it almost
forces all application development to implement its own way of dealing with the coordination of work that needs to be
done among many computers. So let's say now, that you're a programmer who is quite flexible, and can learn to speak any
language you like, and you need to write an application that runs on many computers at the same time - an easy example
for this crowd is an application that needs to serve 100,000 complex webpages per second. You might ask yourself, "which
is the hardware or software machine that already knows how to deal with most of the knitty-gritty of getting this job
done?" Once you had an answer, you might then ask what language that software or hardware speaks, and then you would
learn that language, so that you could communicate with the hardware or software that already knows how to get the job
done. It turns out that Ericsson has continuously developed and maintained for over 20 years, a piece of software that is
very clever at solving this problem problem, of getting many pieces of hardware to work together on performing a single
job that helps some end-user. Ericsson calls this clever machine the "BEAM emulator", and it calls the framework for
working with the BEAM emulator, "the Open Telecoms Platform (OTP)". So BEAM is this smart machine, and OTP is a pattern
that BEAM uses to think about distributed computing problems. Now how do we humans talk to BEAM? We would normally use a
language called Erlang. This is why it is valuable to learn Erlang. (Zooming out for a second, let's remember that
languages don't do work - people, or machines, do work, and we only use languages to communicate with machines, as if
they are little people.) The rest of today's talk is going to briefly cover three topics: 1) how BEAM gets distributed
computing done, with the help of OTP, 2) how the Erlang language works, and 3) how Erlang or any other language is made
comprehensible to BEAM (technically: I'm talking about BEAM as a compilation target).
Erlang/OTP?
I'm an end-user!
Applications: I like to use it.
A candidate for something that
doesn't exist yet?
OS: Hardware Abstraction
(logical
cores)
(RAM address
space)
a=>4
b=>?
c=>7
etc.
HEAP
|v|
|s|<=
|f|
|k|
|_|
STACK
An OS Process
assigned this
space...
Other OS
Processes...
(hardware
cores)
(hardware
RAM)
1. An Erlang "Node a.k.a. Emulator a.k.a. VM" runs as an OS process.
2. Internally it can manage '00s, '000s, or '000,000s of Erlang
processes.
3. Erlang
processes
are spawned
just by
passing
functions
into
spawn().
4. Each
Erlang
process has
its own
heap and
stack (implemented in the OS process's heap).
5. Erlang processes can talk to each other via
message passing (messages are copied between Erlang
processes' mailboxes).
6. Erlang processes can be organised
into supervision trees which provide
nodes with a framework for communal
living and dying (very biological).
7. Architectural
difference from e.g.
Node.js:
Preemptive
Multitasking of
Erlang Processes
(time sharing)
One Scheduler per
logical core
Other Erlang nodes... Other OS processes...
-module(dummy_module).
-compile(native).
-compile(export_all).
dummy_function()->
A = lala,
B = "lala",
C = [$l,97,$l,$a],
D = <<"lala">>,
E = <<$l,$a,$l,97>>,
F = 437947750258039476268479386,
G = (3.142 + 2), % 5.142
H = "la" ++ [$l] ++ [97], % "lala"
[1,2,3] == [ 1 | [2,3] ], % true
I = {a,b,{d,e}},
J = lists:reverse([1,2,3]), % [3,2,1]
K = fun()->{ok,[A,B,G]} end,
K.
% Then elsewhere, running
% X = dummy_module:dummy_function(),
% X().
% would return
% {ok, [lala,"lala",5.14199999... 5]}
% declares the module name
% targets MIs instead of byte codes
% declaring the interface
%function_name()->
% VariableA = atom,
% VariableB = "string",
% VariableC = ditto, with less sugar,
% VariableD = <<"binary">>,
% VariableE = ditto, with less sugar,
% VariableF = integer of any size,
% Dynamic typing: floats + ints
% Dynamic typing: strings
% list [ head | tail ] syntax
% VariableI = 3-tuple
% VariableJ = module:function() call
% VariableK = 1st-class fn, closure
% dummy_function() can return the
closure
% . ends dummy_function's declaration
language layer; basic data types, and syntax - don't try to remember it right now
POPULAR: "patten matching" basically means
that you can use wild-cards in switch-cases,
even for calling different branches of a
function.
compilation : script, to abstract format... which goes into the module "compile"
Erlang has "leex" and "yecc"
which do similar work, and
output "Abstract Formatted
Erlang", which is fairly
regular/readable, and
probably a good compilation
target for beginners (like
me).
There's also a lower-level
format called Core Erlang.
compilation : byte code and/or native code... what comes out of the "compile"
module
LLVM backend
is
experimental
, but FYI :)
Further reading (top picks):
- http://LearnYouSomeErlang.com
(easy, prosaic, illustrated intro to everything)
Search for it (or I can Dropbox the PDFs to you):
- Vorreuter's presentation on Hacking Erlang
(on compiling custom/other languages to Erlang's Abstract
Format)
- Zhang's 2011 thesis: Erlang on many cores
(for a readable description of BEAM internals)
- Erl-llvm thesis with the Greek cover page
(more on lower-level & native compilation)
- A study of ETS table implementation and performance
(alternativs to Erlang's built-in in-memory key-value-store
architecture/algorithms)
- Erlang-embedded whitepaper
(on getting a 3MB disk footprint, 16MB runtime)

Weitere Àhnliche Inhalte

Andere mochten auch (8)

Deep learning job pitch - personal bits
Deep learning job pitch - personal bitsDeep learning job pitch - personal bits
Deep learning job pitch - personal bits
 
A Docker Diagram
A Docker DiagramA Docker Diagram
A Docker Diagram
 
Principales puntos de los paradigmas emergentes
Principales puntos de los paradigmas emergentesPrincipales puntos de los paradigmas emergentes
Principales puntos de los paradigmas emergentes
 
Monolithic docker pattern
Monolithic docker patternMonolithic docker pattern
Monolithic docker pattern
 
OTP application (with gen server child) - simple example
OTP application (with gen server child) - simple exampleOTP application (with gen server child) - simple example
OTP application (with gen server child) - simple example
 
Power point , sofia b.
Power point , sofia b.Power point , sofia b.
Power point , sofia b.
 
A Software Problem (and a maybe-solution)
A Software Problem (and a maybe-solution)A Software Problem (and a maybe-solution)
A Software Problem (and a maybe-solution)
 
Enfermedad laboral diapositivas salud ocup....
Enfermedad laboral diapositivas salud ocup....Enfermedad laboral diapositivas salud ocup....
Enfermedad laboral diapositivas salud ocup....
 

Ähnlich wie ERTS diagram

The-Command-Line-Part-1-Slidebbbbbbbbbbbbbbbbs.pptx
The-Command-Line-Part-1-Slidebbbbbbbbbbbbbbbbs.pptxThe-Command-Line-Part-1-Slidebbbbbbbbbbbbbbbbs.pptx
The-Command-Line-Part-1-Slidebbbbbbbbbbbbbbbbs.pptx
alo154283
 
Multiuser Computer
Multiuser ComputerMultiuser Computer
Multiuser Computer
Vadim Salnikov
 
Software (fundamentals)
Software (fundamentals)Software (fundamentals)
Software (fundamentals)
JDoughty1
 
Introduction to Networking | Linux-Unix and System Administration | Docker an...
Introduction to Networking | Linux-Unix and System Administration | Docker an...Introduction to Networking | Linux-Unix and System Administration | Docker an...
Introduction to Networking | Linux-Unix and System Administration | Docker an...
andega
 
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdfAERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
ssuserb3a23b
 
Foss Presentation
Foss PresentationFoss Presentation
Foss Presentation
Ahmed Mekkawy
 

Ähnlich wie ERTS diagram (20)

The-Command-Line-Part-1-Slidebbbbbbbbbbbbbbbbs.pptx
The-Command-Line-Part-1-Slidebbbbbbbbbbbbbbbbs.pptxThe-Command-Line-Part-1-Slidebbbbbbbbbbbbbbbbs.pptx
The-Command-Line-Part-1-Slidebbbbbbbbbbbbbbbbs.pptx
 
Unit 1 computer concepts
Unit 1   computer conceptsUnit 1   computer concepts
Unit 1 computer concepts
 
History of computer software.
History of computer software.History of computer software.
History of computer software.
 
Multiuser Computer
Multiuser ComputerMultiuser Computer
Multiuser Computer
 
Software (fundamentals)
Software (fundamentals)Software (fundamentals)
Software (fundamentals)
 
What is a computer
What is a computerWhat is a computer
What is a computer
 
LESSON 1 ET WEEK 1 D1 - D4.pptx
LESSON 1 ET WEEK 1 D1 - D4.pptxLESSON 1 ET WEEK 1 D1 - D4.pptx
LESSON 1 ET WEEK 1 D1 - D4.pptx
 
Hci unit 1&amp; 2
Hci unit 1&amp; 2Hci unit 1&amp; 2
Hci unit 1&amp; 2
 
User Interface
User InterfaceUser Interface
User Interface
 
Information systems software
Information systems softwareInformation systems software
Information systems software
 
Interactive tools
Interactive toolsInteractive tools
Interactive tools
 
Introduction to Networking | Linux-Unix and System Administration | Docker an...
Introduction to Networking | Linux-Unix and System Administration | Docker an...Introduction to Networking | Linux-Unix and System Administration | Docker an...
Introduction to Networking | Linux-Unix and System Administration | Docker an...
 
Programming Merit Badge Slide Show
Programming Merit Badge Slide ShowProgramming Merit Badge Slide Show
Programming Merit Badge Slide Show
 
Computer notesx
Computer notesxComputer notesx
Computer notesx
 
R language
R languageR language
R language
 
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdfAERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
 
3-in-1 talk on Serverless Chatbots, Alexa skills & Voice UI best practices (t...
3-in-1 talk on Serverless Chatbots, Alexa skills & Voice UI best practices (t...3-in-1 talk on Serverless Chatbots, Alexa skills & Voice UI best practices (t...
3-in-1 talk on Serverless Chatbots, Alexa skills & Voice UI best practices (t...
 
rlanguage-201216152504.pptx
rlanguage-201216152504.pptxrlanguage-201216152504.pptx
rlanguage-201216152504.pptx
 
Foss Presentation
Foss PresentationFoss Presentation
Foss Presentation
 
Programming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages ConceptsProgramming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages Concepts
 

Mehr von YangJerng Hwa

What people think about Philosophers & Management Consultants
What people think about Philosophers & Management ConsultantsWhat people think about Philosophers & Management Consultants
What people think about Philosophers & Management Consultants
YangJerng Hwa
 

Mehr von YangJerng Hwa (14)

Structuring Marketing Teams
Structuring Marketing TeamsStructuring Marketing Teams
Structuring Marketing Teams
 
Architecturing the software stack at a small business
Architecturing the software stack at a small businessArchitecturing the software stack at a small business
Architecturing the software stack at a small business
 
Reactive datastore demo (2020 03-21)
Reactive datastore demo (2020 03-21)Reactive datastore demo (2020 03-21)
Reactive datastore demo (2020 03-21)
 
JavaScript - Promises study notes- 2019-11-30
JavaScript  - Promises study notes- 2019-11-30JavaScript  - Promises study notes- 2019-11-30
JavaScript - Promises study notes- 2019-11-30
 
2019 10-09 google ads analysis - eyeballing without proper math
2019 10-09 google ads analysis - eyeballing without proper math2019 10-09 google ads analysis - eyeballing without proper math
2019 10-09 google ads analysis - eyeballing without proper math
 
2019 malaysia car accident - total loss - diy third-party claim - simplifie...
2019   malaysia car accident - total loss - diy third-party claim - simplifie...2019   malaysia car accident - total loss - diy third-party claim - simplifie...
2019 malaysia car accident - total loss - diy third-party claim - simplifie...
 
2019 09 tech publishers in malaysia
2019 09 tech publishers in malaysia2019 09 tech publishers in malaysia
2019 09 tech publishers in malaysia
 
2019 09 web components
2019 09 web components2019 09 web components
2019 09 web components
 
Appendix - arc of development
Appendix  - arc of developmentAppendix  - arc of development
Appendix - arc of development
 
What people think about Philosophers & Management Consultants
What people think about Philosophers & Management ConsultantsWhat people think about Philosophers & Management Consultants
What people think about Philosophers & Management Consultants
 
Process for Terminating Employees in Malaysia
Process for Terminating Employees in MalaysiaProcess for Terminating Employees in Malaysia
Process for Terminating Employees in Malaysia
 
Pour-over Coffee with the EK43
Pour-over Coffee with the EK43Pour-over Coffee with the EK43
Pour-over Coffee with the EK43
 
Intro to Stock Trading for Programmers
Intro to Stock Trading for ProgrammersIntro to Stock Trading for Programmers
Intro to Stock Trading for Programmers
 
A Haphazard Petcha Kutcha
A Haphazard Petcha KutchaA Haphazard Petcha Kutcha
A Haphazard Petcha Kutcha
 

KĂŒrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

KĂŒrzlich hochgeladen (20)

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...
 
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
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

ERTS diagram

  • 1. what is a stack in IT? We're talking about a silo of dependencies, like a tower, with the end-user sitting at the top. Material science and E&E engineering are the foundations near the bottom, which give us hardware. Hardware is hardly a firm foundation... it changes very often, like the currents in the sea, and so we have software operating systems like Windows, Linux, and Android to deal with the frequent changes - giving us a longer term "ground floor", or "floating platform", upon which to base applications that provide value to end-users of IT. Most recently, distributed computing is becoming very trendy - and you must be aware of salespeak like "cloud computing" and "data centres". Unfortunately, although some significant work has been done, at the research level, on operating systems that tie many separate computers together, there are no dominant solutions in this space - no solutions that have a level of acceptance that is as widespread as any of the aforementioned operating systems. The most popular solutions are currently a thin layer, called hypervisors, that fit between operating systems designed to work on single computers, and the many separate computers that need to be made to work together. The operating system remains a "single machine" model, and so it almost forces all application development to implement its own way of dealing with the coordination of work that needs to be done among many computers. So let's say now, that you're a programmer who is quite flexible, and can learn to speak any language you like, and you need to write an application that runs on many computers at the same time - an easy example for this crowd is an application that needs to serve 100,000 complex webpages per second. You might ask yourself, "which is the hardware or software machine that already knows how to deal with most of the knitty-gritty of getting this job done?" Once you had an answer, you might then ask what language that software or hardware speaks, and then you would learn that language, so that you could communicate with the hardware or software that already knows how to get the job done. It turns out that Ericsson has continuously developed and maintained for over 20 years, a piece of software that is very clever at solving this problem problem, of getting many pieces of hardware to work together on performing a single job that helps some end-user. Ericsson calls this clever machine the "BEAM emulator", and it calls the framework for working with the BEAM emulator, "the Open Telecoms Platform (OTP)". So BEAM is this smart machine, and OTP is a pattern that BEAM uses to think about distributed computing problems. Now how do we humans talk to BEAM? We would normally use a language called Erlang. This is why it is valuable to learn Erlang. (Zooming out for a second, let's remember that languages don't do work - people, or machines, do work, and we only use languages to communicate with machines, as if they are little people.) The rest of today's talk is going to briefly cover three topics: 1) how BEAM gets distributed computing done, with the help of OTP, 2) how the Erlang language works, and 3) how Erlang or any other language is made comprehensible to BEAM (technically: I'm talking about BEAM as a compilation target). "stack" I'm an end-user! Hardware: the shifting sands Operating Systems: a plea for sanity Applications: I like to use it. Virtualisation: you mean we still have to use these mofos? (now: yes) designers falala! fala.. er.. developers FU !! finance / ops we R FU-ed. investors FFUU !!!!
  • 2. what is a stack in IT? We're talking about a silo of dependencies, like a tower, with the end-user sitting at the top. Material science and E&E engineering are the foundations near the bottom, which give us hardware. Hardware is hardly a firm foundation... it changes very often, like the currents in the sea, and so we have software operating systems like Windows, Linux, and Android to deal with the frequent changes - giving us a longer term "ground floor", or "floating platform", upon which to base applications that provide value to end-users of IT. Most recently, distributed computing is becoming very trendy - and you must be aware of salespeak like "cloud computing" and "data centres". Unfortunately, although some significant work has been done, at the research level, on operating systems that tie many separate computers together, there are no dominant solutions in this space - no solutions that have a level of acceptance that is as widespread as any of the aforementioned operating systems. The most popular solutions are currently a thin layer, called hypervisors, that fit between operating systems designed to work on single computers, and the many separate computers that need to be made to work together. The operating system remains a "single machine" model, and so it almost forces all application development to implement its own way of dealing with the coordination of work that needs to be done among many computers. So let's say now, that you're a programmer who is quite flexible, and can learn to speak any language you like, and you need to write an application that runs on many computers at the same time - an easy example for this crowd is an application that needs to serve 100,000 complex webpages per second. You might ask yourself, "which is the hardware or software machine that already knows how to deal with most of the knitty-gritty of getting this job done?" Once you had an answer, you might then ask what language that software or hardware speaks, and then you would learn that language, so that you could communicate with the hardware or software that already knows how to get the job done. It turns out that Ericsson has continuously developed and maintained for over 20 years, a piece of software that is very clever at solving this problem problem, of getting many pieces of hardware to work together on performing a single job that helps some end-user. Ericsson calls this clever machine the "BEAM emulator", and it calls the framework for working with the BEAM emulator, "the Open Telecoms Platform (OTP)". So BEAM is this smart machine, and OTP is a pattern that BEAM uses to think about distributed computing problems. Now how do we humans talk to BEAM? We would normally use a language called Erlang. This is why it is valuable to learn Erlang. (Zooming out for a second, let's remember that languages don't do work - people, or machines, do work, and we only use languages to communicate with machines, as if they are little people.) The rest of today's talk is going to briefly cover three topics: 1) how BEAM gets distributed computing done, with the help of OTP, 2) how the Erlang language works, and 3) how Erlang or any other language is made comprehensible to BEAM (technically: I'm talking about BEAM as a compilation target). re-stack? I'm an end-user! Applications: I like to use it. A magic box, please? (your fav. language / platform)
  • 3. what is a stack in IT? We're talking about a silo of dependencies, like a tower, with the end-user sitting at the top. Material science and E&E engineering are the foundations near the bottom, which give us hardware. Hardware is hardly a firm foundation... it changes very often, like the currents in the sea, and so we have software operating systems like Windows, Linux, and Android to deal with the frequent changes - giving us a longer term "ground floor", or "floating platform", upon which to base applications that provide value to end-users of IT. Most recently, distributed computing is becoming very trendy - and you must be aware of salespeak like "cloud computing" and "data centres". Unfortunately, although some significant work has been done, at the research level, on operating systems that tie many separate computers together, there are no dominant solutions in this space - no solutions that have a level of acceptance that is as widespread as any of the aforementioned operating systems. The most popular solutions are currently a thin layer, called hypervisors, that fit between operating systems designed to work on single computers, and the many separate computers that need to be made to work together. The operating system remains a "single machine" model, and so it almost forces all application development to implement its own way of dealing with the coordination of work that needs to be done among many computers. So let's say now, that you're a programmer who is quite flexible, and can learn to speak any language you like, and you need to write an application that runs on many computers at the same time - an easy example for this crowd is an application that needs to serve 100,000 complex webpages per second. You might ask yourself, "which is the hardware or software machine that already knows how to deal with most of the knitty-gritty of getting this job done?" Once you had an answer, you might then ask what language that software or hardware speaks, and then you would learn that language, so that you could communicate with the hardware or software that already knows how to get the job done. It turns out that Ericsson has continuously developed and maintained for over 20 years, a piece of software that is very clever at solving this problem problem, of getting many pieces of hardware to work together on performing a single job that helps some end-user. Ericsson calls this clever machine the "BEAM emulator", and it calls the framework for working with the BEAM emulator, "the Open Telecoms Platform (OTP)". So BEAM is this smart machine, and OTP is a pattern that BEAM uses to think about distributed computing problems. Now how do we humans talk to BEAM? We would normally use a language called Erlang. This is why it is valuable to learn Erlang. (Zooming out for a second, let's remember that languages don't do work - people, or machines, do work, and we only use languages to communicate with machines, as if they are little people.) The rest of today's talk is going to briefly cover three topics: 1) how BEAM gets distributed computing done, with the help of OTP, 2) how the Erlang language works, and 3) how Erlang or any other language is made comprehensible to BEAM (technically: I'm talking about BEAM as a compilation target). Erlang/OTP? I'm an end-user! Applications: I like to use it. A candidate for something that doesn't exist yet?
  • 4. OS: Hardware Abstraction (logical cores) (RAM address space) a=>4 b=>? c=>7 etc. HEAP |v| |s|<= |f| |k| |_| STACK An OS Process assigned this space... Other OS Processes... (hardware cores) (hardware RAM) 1. An Erlang "Node a.k.a. Emulator a.k.a. VM" runs as an OS process. 2. Internally it can manage '00s, '000s, or '000,000s of Erlang processes. 3. Erlang processes are spawned just by passing functions into spawn(). 4. Each Erlang process has its own heap and stack (implemented in the OS process's heap). 5. Erlang processes can talk to each other via message passing (messages are copied between Erlang processes' mailboxes). 6. Erlang processes can be organised into supervision trees which provide nodes with a framework for communal living and dying (very biological). 7. Architectural difference from e.g. Node.js: Preemptive Multitasking of Erlang Processes (time sharing) One Scheduler per logical core Other Erlang nodes... Other OS processes...
  • 5. -module(dummy_module). -compile(native). -compile(export_all). dummy_function()-> A = lala, B = "lala", C = [$l,97,$l,$a], D = <<"lala">>, E = <<$l,$a,$l,97>>, F = 437947750258039476268479386, G = (3.142 + 2), % 5.142 H = "la" ++ [$l] ++ [97], % "lala" [1,2,3] == [ 1 | [2,3] ], % true I = {a,b,{d,e}}, J = lists:reverse([1,2,3]), % [3,2,1] K = fun()->{ok,[A,B,G]} end, K. % Then elsewhere, running % X = dummy_module:dummy_function(), % X(). % would return % {ok, [lala,"lala",5.14199999... 5]} % declares the module name % targets MIs instead of byte codes % declaring the interface %function_name()-> % VariableA = atom, % VariableB = "string", % VariableC = ditto, with less sugar, % VariableD = <<"binary">>, % VariableE = ditto, with less sugar, % VariableF = integer of any size, % Dynamic typing: floats + ints % Dynamic typing: strings % list [ head | tail ] syntax % VariableI = 3-tuple % VariableJ = module:function() call % VariableK = 1st-class fn, closure % dummy_function() can return the closure % . ends dummy_function's declaration language layer; basic data types, and syntax - don't try to remember it right now POPULAR: "patten matching" basically means that you can use wild-cards in switch-cases, even for calling different branches of a function.
  • 6. compilation : script, to abstract format... which goes into the module "compile" Erlang has "leex" and "yecc" which do similar work, and output "Abstract Formatted Erlang", which is fairly regular/readable, and probably a good compilation target for beginners (like me). There's also a lower-level format called Core Erlang.
  • 7. compilation : byte code and/or native code... what comes out of the "compile" module LLVM backend is experimental , but FYI :)
  • 8. Further reading (top picks): - http://LearnYouSomeErlang.com (easy, prosaic, illustrated intro to everything) Search for it (or I can Dropbox the PDFs to you): - Vorreuter's presentation on Hacking Erlang (on compiling custom/other languages to Erlang's Abstract Format) - Zhang's 2011 thesis: Erlang on many cores (for a readable description of BEAM internals) - Erl-llvm thesis with the Greek cover page (more on lower-level & native compilation) - A study of ETS table implementation and performance (alternativs to Erlang's built-in in-memory key-value-store architecture/algorithms) - Erlang-embedded whitepaper (on getting a 3MB disk footprint, 16MB runtime)