17
ERLANG LATEST VERSION & OPENSOURCE PROJECTS

Erlang latest version & opensource projects

Embed Size (px)

Citation preview

Page 1: Erlang latest version & opensource projects

ERLANG LATEST VERSION &

OPENSOURCE PROJECTS

Page 2: Erlang latest version & opensource projects

HELLO!I am Akhil Agrawal

Doing Erlang development for last five yearsDoing Ejabberd development for last six months now

Started BIZense in 2008 & Digikrit in 2015

Page 3: Erlang latest version & opensource projects

Latest Version – 18Highlights and summary of version 18 and

newer releases of Erlang1

Page 4: Erlang latest version & opensource projects

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 ImprovementsPerformance 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

Page 5: Erlang latest version & opensource projects
Page 6: Erlang latest version & opensource projects

Time Goes On - Referenced from http://learnyousomeerlang.com/timeAfter release 18, Erlang time divided into multiple components:1. OS system time, also known as the POSIX time2. OS Monotonic time; some operating systems provide it, fairly stable

when available3. Erlang system time. It's the VM's take on POSIX time4. Erlang monotonic time. Erlang's view of the OS monotonic time if

available or VM's own monotonic version of system time5. 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

Page 7: Erlang latest version & opensource projects

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])

Page 8: Erlang latest version & opensource projects

Opensource Projects

Overview of some of the popular opensource projects written in Erlang

2

Page 9: Erlang latest version & opensource projects

OPENSOURCE PROJECTS

ERLANG

Some very popular in

NOSQL world

Most popular

applicatio

n for E

rlang

Most suited for

distributed projects

Embeddable

webservers in 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

Page 10: Erlang latest version & opensource projects
Page 11: Erlang latest version & opensource projects

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

Page 12: Erlang latest version & opensource projects
Page 13: Erlang latest version & opensource projects

Why Erlang ?Why choose Erlang for your next server side

application ?3

Page 14: Erlang latest version & opensource projects

WHY ERLANG ? Referenced from http://veldstra.org/whyerlang/

Lightweight ConcurrencyProcesses 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 DistributionWith 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 ReplacementIn 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 ProvenErlang 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 ApplicationsErlang 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 MoreReleased under permissive open-source license, cross platform support to run on linux, osx, windows, freebsd, solaris & vxworks. Much more, explore.

Page 15: Erlang latest version & opensource projects

2,000,000+

EJABBERDMassive Scale – 2+ Million Concurrent Users on Single Node

https://blog.process-one.net/ejabberd-massive-scalability-1node-2-million-concurrent-users/

Page 16: Erlang latest version & opensource projects

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

Page 17: Erlang latest version & opensource projects

THANKS!

Any questions?You can find me at

@digikrit / [email protected]

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