0
Erlangin 10 minutes        Maria Stylianou         November 19th, 2012    Scientific Writing and Communication
Outline● What is Erlang● What Erlang offers● Concurrent Programming● Four things to remember!                             2
What is Erlang (1/4)       "The world is concurrent.  Things in the world dont share data.  Things communicate with messag...
What is Erlang (2/4)● Type: Programming Language● Date of Birth: ~1986● Place of Birth: Ericsson, Sweden● Father: Joe Arms...
What is Erlang (3/4)● Functional Programming Language   i++● OS Independent● Actor Model                               ?  ...
What is Erlang (3/4)● Functional Programming Language   i++● OS Independent● Actor Model                                ? ...
What is Erlang (4/4)● Build real-time systems   ○ scalable   ○ highly available   ○ reliable● Built-in support for   ○ con...
What Erlang offersAmong many others...● Sequential Programming● Concurrent Programming                           7
Concurrent Programming● Process Creation● Process Communication● Timeouts● Fault Tolerance                          8
Concurrent                     ProcessProgramming                    CreationLight weight processes-module(say).     % say...
Concurrent                     ProcessProgramming                    CreationLight weight processes-module(say).     % say...
Concurrent           ProcessProgramming          Communication     Asynchronous Message Passing            "Send and Pray"...
ConcurrentProgramming            TimeoutsTo avoid locking processes        A                     B   B! {msg, [1,2]}     r...
Concurrent                FaultProgramming               Tolerance● Exits● Exit signals     A                      B      ...
Four Things to remember!Erlangs Most Valuable Characteristics   1   Concurrency   2   Scalability   3   High Performance  ...
http://learnyousomeerlang.com   14
References1. Erlang/OTP, http://www.erlang.se2. Erlang programming language, http://www.erlang.org3. Learn you some Erlang...
Erlangin 10 minutes        Maria Stylianou         November 19th, 2012    Scientific Writing and Communication
Upcoming SlideShare
Loading in...5
×

Erlang in 10 minutes

1,131

Published on

A short presentation about Erlang, specifically designed for concurrency characteristics.
For the course: Scientific Writing and Communication (KTH Royal Institute of Technology)

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,131
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
24
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Erlang in 10 minutes"

  1. 1. Erlangin 10 minutes Maria Stylianou November 19th, 2012 Scientific Writing and Communication
  2. 2. Outline● What is Erlang● What Erlang offers● Concurrent Programming● Four things to remember! 2
  3. 3. What is Erlang (1/4) "The world is concurrent. Things in the world dont share data. Things communicate with messages. Things fail. " - Joe Armstrong 3
  4. 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. 5. What is Erlang (3/4)● Functional Programming Language i++● OS Independent● Actor Model ? spawn A1:6 A1:5 A2:1 5
  6. 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. 7. What is Erlang (4/4)● Build real-time systems ○ scalable ○ highly available ○ reliable● Built-in support for ○ concurrency ○ distribution ○ fault tolerance 6
  8. 8. What Erlang offersAmong many others...● Sequential Programming● Concurrent Programming 7
  9. 9. Concurrent Programming● Process Creation● Process Communication● Timeouts● Fault Tolerance 8
  10. 10. Concurrent ProcessProgramming CreationLight weight processes-module(say). % say.erl-export([start/0, say_something/2]).say_something(What, 0) -> Pattern Matching done;say_something(What, Times) -> if-then-else io:format("~p~n", [What]), say_something(What, Times - 1).start() -> spawn(say, say_something, [emdc, 3]), Create 2 spawn(say, say_something, [rocks, 3]). processes 9
  11. 11. Concurrent ProcessProgramming CreationLight weight processes-module(say). % say.erl-export([start/0, say_something/2]).say_something(What, 0) -> Pattern Matching done;say_something(What, Times) -> if-then-else io:format("~p~n", [What]), say_something(What, Times - 1).start() -> spawn(say, say_something, [emdc, 3]), Create 2 spawn(say, say_something, [rocks, 3]). processes 9
  12. 12. Concurrent ProcessProgramming Communication Asynchronous Message Passing "Send and Pray" A B B! {msg, [1,2]} receive {msg, List} -> handle(List) end. 10
  13. 13. ConcurrentProgramming TimeoutsTo avoid locking processes A B B! {msg, [1,2]} receive {msg, List} -> handle(List) after 1000 -> handle_timeout() end. 11
  14. 14. Concurrent FaultProgramming Tolerance● Exits● Exit signals A B link(A) link● Trapping Exits A B process_flag(trap_exit, true) 12
  15. 15. Four Things to remember!Erlangs Most Valuable Characteristics 1 Concurrency 2 Scalability 3 High Performance 4 Fault Tolerance 13
  16. 16. http://learnyousomeerlang.com 14
  17. 17. References1. Erlang/OTP, http://www.erlang.se2. Erlang programming language, http://www.erlang.org3. Learn you some Erlang, http://learnyousomeerlang.com4. Joe Armstrong, "Programming Erlang, Software for a Concurrent World" 15
  18. 18. Erlangin 10 minutes Maria Stylianou November 19th, 2012 Scientific Writing and Communication
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×