2. Erlang
• The world is concurrent
• Things in the world don’t share state
• Things communicate through messages
• Things fail
2
- Joe Armstrong
3. Presentation Title - Classification
What is Erlang
3
• Created and maintained by Ericsson (now open source)
• Functional, single assignment, strict evaluation, dynamic typing
• Actor model, concurrent oriented, fault tolerant, soft-real-time
• Light weight processes that communicate using message passing
(You can have several processes in one OS/Java thread)
• Erlang started life as modified prolog
• Erlang shell, escript and compiled .beam bytecode
5. What is Elixir
1) A Ruby like language for the Erlang VM
5
BEAM
2) Seamless Erlang integration: zero-penalty
Erlang function calls (and vice
versa)
3) Meta programming via macros and a
first-class AST (Abstract syntax tree)
4) Polymorphism via protocols inspired by
Clojure
10. Atoms and variables
• An atom is global constant starting with
lower case char
• A variable starts with a capital char and is
called a variable since it can be bound or
unbound. Once the variable is bound it
can never change.
10
18. OTP
(Open Telecom Platform)
1.Mostly used by finance sector, so it just called OTP now
2.Contains a set of behaviours
4.The standard Erlang/OTP behaviours are:
18
1.gen_server
1. For implementing the server of a client-server
relation.
2.gen_fsm
1. For implementing finite state machines.
3.gen_event
1. For implementing event handling functionality.
4.supervisor
1. For implementing a supervisor in a supervision tree.
20. Rebar
• Rebar is an Erlang build tool that makes it
easy to compile and test Erlang
applications, port drivers and releases.
• Contains templates for OTP development
20