A short presentation about Erlang, specifically designed for concurrency characteristics.
For the course: Scientific Writing and Communication (KTH Royal Institute of Technology)
08448380779 Call Girls In Civil Lines Women Seeking Men
Erlang in 10 minutes
1. Erlang
in 10 minutes
Maria Stylianou
November 19th, 2012
Scientific Writing and Communication
2. Outline
● What is Erlang
● What Erlang offers
● Concurrent Programming
● Four things to remember!
2
3. What is Erlang (1/4)
"The world is concurrent.
Things in the world don't share data.
Things communicate with messages.
Things fail. "
- Joe Armstrong
3
4. What is Erlang (2/4)
● Type: Programming Language
● Date of Birth: ~1986
● Place of Birth: Ericsson, Sweden
● Father: Joe Armstrong
● Aim of Existence:
Target robust apps
in telecom world
4
5. What is Erlang (3/4)
● Functional Programming Language i++
● OS Independent
● Actor Model
?
spawn
A1:6
A1:5 A2:1
5
6. What is Erlang (3/4)
● Functional Programming Language i++
● OS Independent
● Actor Model
?
spawn
A1:6
A1:5 A2:1
msg
msg
msg
msg
5
7. What is Erlang (4/4)
● Build real-time systems
○ scalable
○ highly available
○ reliable
● Built-in support for
○ concurrency
○ distribution
○ fault tolerance
6
12. Concurrent Process
Programming Communication
Asynchronous Message Passing
"Send and Pray"
A B
B! {msg, [1,2]} receive
{msg, List} ->
handle(List)
end.
10
13. Concurrent
Programming Timeouts
To avoid locking processes
A B
B! {msg, [1,2]} receive
{msg, List} ->
handle(List)
after 1000 ->
handle_timeout()
end.
11
14. Concurrent Fault
Programming Tolerance
● Exits
● Exit signals
A B link(A)
link
● Trapping Exits
A B
process_flag(trap_exit, true)
12
15. Four Things to remember!
Erlang's Most Valuable Characteristics
1 Concurrency
2 Scalability
3 High Performance
4 Fault Tolerance
13