ERLANG
LATEST VERSION &
OPENSOURCE PROJECTS
HELLO!
I am Akhil Agrawal
Doing Erlang development for last five years
Doing Ejabberd development for last six months now
Started BIZense in 2008 & Digikrit in 2015
Latest Version – 18
Highlights and summary of version 18 and
newer releases of Erlang
1
HIGHLIGHTS & SUMMARY
Erlang Public License changed to Apache
Public License v2
License Change
ssl3 & rc4 cipher default support removed to
prevent poodle vulnerability, additional key
exchange algorithms, other safety improvements
SSL/SSH Improvements
Performance improvments in timer
management, scheduler, erlang:make_ref
and persistent hashmaps for large maps.
Performance/Scalability
Improvements in time functionality &
management. erlang:now is deprecated,
timers api changes
Extended Time Functionality
Time Goes On - Referenced from http://learnyousomeerlang.com/time
After release 18, Erlang time divided into multiple components:
1. OS system time, also known as the POSIX time
2. OS Monotonic time; some operating systems provide it, fairly stable
when available
3. Erlang system time. It's the VM's take on POSIX time
4. Erlang monotonic time. Erlang's view of the OS monotonic time if
available or VM's own monotonic version of system time
5. Time offset; because the Erlang Monotonic time is a stable source of
authority, the Erlang system time will be calculated by having a
given offset relative to the Erlang monotonic time. The reason for
this is that it will allow Erlang to adjust the system time without
modifying the monotonic time frequency.
Time Correction
Before release 18, Erlang time works in one of two major
ways:
1. The operating system's clock, represented as a tuple
of the form {MegaSeconds, Seconds, MicroSeconds}
(os:timestamp())
2. The virtual machine's clock, represented as a tuple
of the form {MegaSeconds, Seconds, MicroSeconds}
(erlang:now(), auto-imported as now())
3. Fixed time offset calculated when vm starts
Time Changes – How to Survive Time Warps ?
Why was Time Warp needed ?
◉ Time correction was a compromise
between skewed clocks and
inaccurate clock frequencies
◉ To avoid breaking events, the clock
can only be corrected very slowly, so
we could have both inaccurate clocks
and inaccurate intervals for very long
periods of time
◉ People used erlang:now() when they
wanted monotonic and strictly
monotonic time (useful to order
events) or unique values
How to Survive Time Warps ?
◉ To find system time: erlang:system_time/0-1
◉ To measure time differences: call
erlang:monotonic_time/0-1 twice and
subtract them
◉ To define an absolute order between events
on a node:
erlang:unique_integer([monotonic])
◉ Measure time and make sure an absolute
order is defined: {erlang:monotonic_time(),
erlang:unique_integer([monotonic])}
◉ Create a unique number:
erlang:unique_integer([positive])
Opensource Projects
Overview of some of the popular opensource
projects written in Erlang
2
OPENSOURCE PROJECTS
ERLANG
Applications like RabbitMQ &
Ejabberd (used by Whatsapp)
Communication
Applications like yaws,
mochiweb, cowboy etc
Webservers
Projects like OTP and
applications like disco
Distributed
Applications like mnesia,
couchdb & riak
Databases
OTPOTP (Open Telephony Platform) is set of Erlang libraries & design principles
providing middleware to develop distributed systems
Includes distributed db, language interfaces, debugging & release tools
Why Erlang ?
Why choose Erlang for your next server side
application ?
3
WHY ERLANG ? Referenced from http://veldstra.org/whyerlang/
Lightweight Concurrency
Processes are very lightweight,
with only about 500 bytes of
overhead per-process. This means
that millions of processes can be
created, even on older computers.
Transparent Distribution
With the exception of timing all
operations in the distributed
system will work in exactly the
same way as they worked in a
single-node system.
Hot Code Replacement
In realtime control systems we
may not want or may never be
able to turn off the system to
perform upgrades & such systems
needs dynamic code upgrades.
Battle Proven
Erlang has been successfully used
in production systems for over 20
years (with reported uptimes of 9-
nines — that's 31ms of downtime
a year)
Soft Realtime Applications
Erlang was developed at Ericsson
and was designed from the ground
up for writing scalable, fault-
tolerant, distributed, non-stop,
soft-realtime applications.
Free, Opensource & Much More
Released under permissive open-
source license, cross platform
support to run on linux, osx,
windows, freebsd, solaris &
vxworks. Much more, explore.
2,000,000+
EJABBERD
Massive Scale – 2+ Million Concurrent Users on Single Node
https://blog.process-one.net/ejabberd-massive-scalability-1node-
2-million-concurrent-users/
SOME REFERENCES
◉ https://github.com/0xAX/erlang-bookmarks/wiki/Erlang-
bookmarks
◉ https://github.com/drobakowski/awesome-erlang
◉ https://github.com/uhub/awesome-erlang
◉ http://learnyousomeerlang.com/the-hitchhikers-guide-to-
concurrency
◉ https://github.com/erlang/otp
◉ http://erlang.org/doc/apps/erts/erts.pdf
◉ http://highscalability.com/blog/2014/2/26/the-whatsapp-
architecture-facebook-bought-for-19-billion.html
THANKS!
Any questions?
You can find me at
@digikrit / akhil@digikrit.com
Special thanks to all the people who made and released these awesome resources for free:
 Presentation template by SlidesCarnival
 Presentation models by SlideModel
 Erlang by Ericsson, Erlang projects by ProcessOne, Basho, Apache, Pivotal & others

Erlang latest version & opensource projects

  • 1.
  • 2.
    HELLO! I am AkhilAgrawal Doing Erlang development for last five years Doing Ejabberd development for last six months now Started BIZense in 2008 & Digikrit in 2015
  • 3.
    Latest Version –18 Highlights and summary of version 18 and newer releases of Erlang 1
  • 4.
    HIGHLIGHTS & SUMMARY ErlangPublic License changed to Apache Public License v2 License Change ssl3 & rc4 cipher default support removed to prevent poodle vulnerability, additional key exchange algorithms, other safety improvements SSL/SSH Improvements Performance improvments in timer management, scheduler, erlang:make_ref and persistent hashmaps for large maps. Performance/Scalability Improvements in time functionality & management. erlang:now is deprecated, timers api changes Extended Time Functionality
  • 6.
    Time Goes On- Referenced from http://learnyousomeerlang.com/time After release 18, Erlang time divided into multiple components: 1. OS system time, also known as the POSIX time 2. OS Monotonic time; some operating systems provide it, fairly stable when available 3. Erlang system time. It's the VM's take on POSIX time 4. Erlang monotonic time. Erlang's view of the OS monotonic time if available or VM's own monotonic version of system time 5. Time offset; because the Erlang Monotonic time is a stable source of authority, the Erlang system time will be calculated by having a given offset relative to the Erlang monotonic time. The reason for this is that it will allow Erlang to adjust the system time without modifying the monotonic time frequency. Time Correction Before release 18, Erlang time works in one of two major ways: 1. The operating system's clock, represented as a tuple of the form {MegaSeconds, Seconds, MicroSeconds} (os:timestamp()) 2. The virtual machine's clock, represented as a tuple of the form {MegaSeconds, Seconds, MicroSeconds} (erlang:now(), auto-imported as now()) 3. Fixed time offset calculated when vm starts
  • 7.
    Time Changes –How to Survive Time Warps ? Why was Time Warp needed ? ◉ Time correction was a compromise between skewed clocks and inaccurate clock frequencies ◉ To avoid breaking events, the clock can only be corrected very slowly, so we could have both inaccurate clocks and inaccurate intervals for very long periods of time ◉ People used erlang:now() when they wanted monotonic and strictly monotonic time (useful to order events) or unique values How to Survive Time Warps ? ◉ To find system time: erlang:system_time/0-1 ◉ To measure time differences: call erlang:monotonic_time/0-1 twice and subtract them ◉ To define an absolute order between events on a node: erlang:unique_integer([monotonic]) ◉ Measure time and make sure an absolute order is defined: {erlang:monotonic_time(), erlang:unique_integer([monotonic])} ◉ Create a unique number: erlang:unique_integer([positive])
  • 8.
    Opensource Projects Overview ofsome of the popular opensource projects written in Erlang 2
  • 9.
    OPENSOURCE PROJECTS ERLANG Applications likeRabbitMQ & Ejabberd (used by Whatsapp) Communication Applications like yaws, mochiweb, cowboy etc Webservers Projects like OTP and applications like disco Distributed Applications like mnesia, couchdb & riak Databases
  • 11.
    OTPOTP (Open TelephonyPlatform) is set of Erlang libraries & design principles providing middleware to develop distributed systems Includes distributed db, language interfaces, debugging & release tools
  • 13.
    Why Erlang ? Whychoose Erlang for your next server side application ? 3
  • 14.
    WHY ERLANG ?Referenced from http://veldstra.org/whyerlang/ Lightweight Concurrency Processes are very lightweight, with only about 500 bytes of overhead per-process. This means that millions of processes can be created, even on older computers. Transparent Distribution With the exception of timing all operations in the distributed system will work in exactly the same way as they worked in a single-node system. Hot Code Replacement In realtime control systems we may not want or may never be able to turn off the system to perform upgrades & such systems needs dynamic code upgrades. Battle Proven Erlang has been successfully used in production systems for over 20 years (with reported uptimes of 9- nines — that's 31ms of downtime a year) Soft Realtime Applications Erlang was developed at Ericsson and was designed from the ground up for writing scalable, fault- tolerant, distributed, non-stop, soft-realtime applications. Free, Opensource & Much More Released under permissive open- source license, cross platform support to run on linux, osx, windows, freebsd, solaris & vxworks. Much more, explore.
  • 15.
    2,000,000+ EJABBERD Massive Scale –2+ Million Concurrent Users on Single Node https://blog.process-one.net/ejabberd-massive-scalability-1node- 2-million-concurrent-users/
  • 16.
    SOME REFERENCES ◉ https://github.com/0xAX/erlang-bookmarks/wiki/Erlang- bookmarks ◉https://github.com/drobakowski/awesome-erlang ◉ https://github.com/uhub/awesome-erlang ◉ http://learnyousomeerlang.com/the-hitchhikers-guide-to- concurrency ◉ https://github.com/erlang/otp ◉ http://erlang.org/doc/apps/erts/erts.pdf ◉ http://highscalability.com/blog/2014/2/26/the-whatsapp- architecture-facebook-bought-for-19-billion.html
  • 17.
    THANKS! Any questions? You canfind me at @digikrit / akhil@digikrit.com Special thanks to all the people who made and released these awesome resources for free:  Presentation template by SlidesCarnival  Presentation models by SlideModel  Erlang by Ericsson, Erlang projects by ProcessOne, Basho, Apache, Pivotal & others