Erlang on Cloud

1-click AWS Deployment    1-click Azure Deployment

Overview

Erlang is a programming language and runtime environment. Erlang has built-in support for concurrency, delivery and responsibility acceptance. Erlang is used in several large telecommunication systems from Ericsson. Erlang is accessible as an open source from http://www.erlang.org.

Erlang is a programming language that was formed at the Ericsson Computer Science Laboratory by Joe Armstrong and his team. It was released under an open source license in 1998. Erlang was originally designed for implementing telecom switching systems, i.e. for building large and complex systems which need to be reliable and to perform in a predictable way .It may be characterized as a concurrent functional programming language that has been used to create soft real-time systems with various amount of code. Erlang comes with the Open Telecom Platform which provides a rich set of libraries supporting the development of distributed, dynamically evolvable applications.

Erlang is also a development environment as a whole. The code is compiled to bytecode and runs inside a virtual machine. So Erlang, much like Java and kids with ADD, can run anywhere. The standard distribution includes (among others) development tools (compiler, debugger, profiler, test framework), the Open Telecom Platform (OTP) Framework, a web server, a parser generator, and the mnesia database, a key-value storage system able to replicate itself on many servers, supporting nested transactions and letting you store any kind of Erlang data.

The VM and the libraries also allow you to update the code of a running system without interrupting any program, distribute your code with ease on many computers and manage errors and faults in a simple but powerful manner

The design goals of Erlang are reflection of its initial application area

  • concurrency – thousands of events, such as phone calls, happen and should be processed simultaneously;
  • robustness – Uptime in telecommunications is a lot more important than domains such as Web/Online services. Thus, an error in one part of the application must be caught and handled so that it does not interrupt other parts of the applications. Preferably, there should be no errors at all.
  • • distribution – the system should be distributed over several computers, either due to the intended features of the application, or for robustness or efficiency.

The following key features of the language follow in the train of the above considerations:

  • functional programming style with strict evaluation, single assignment, and dynamic typing;
  • message passing paradigm for concurrency;
  • error recovery;
  • hot code replacement.

OTP

OTP (Open Telecom Platform) is a large collection of libraries for Erlang to do everything from compiling ASN.1 to providing a WWW server. Most projects using “Erlang” are actually using “Erlang/OTP”, i.e. the language and the libraries. OTP is also open source.

  What sort of applications is Erlang particularly suitable for?

Distributed, reliable, soft real-time concurrent systems.

  • Telecommunication systems, e.g. controlling a switch or converting protocols.
  • Servers for Internet applications, e.g. a mail transfer agent, an IMAP-4 server, an HTTP server or a WAP Stack.
  • Telecommunication applications, e.g. handling mobility in a mobile network or providing unified messaging.
  • Database applications which require soft realtime behaviour.

Erlang is good at solving these sorts of problems because this is the problem domain it was originally designed for. Stating the above in terms of features:

  • Erlang provides a simple and powerful model for error containment and fault tolerance (supervised processes).
  • Concurrency and message passing are a fundamental to the language. Applications written in Erlang are often composed of hundreds or thousands of lightweight processes. Context switching between Erlang processes is typically one or two orders of magnitude cheaper than switching between threads in a C program.
  • Writing applications which are made of parts which execute on different machines (i.e. distributed applications) is easy. Erlang’s distribution mechanisms are transparent: programs need not be aware that they are distributed.
  • The OTP libraries provide support for many common problems in networking and telecommunications systems.
  • The Erlang runtime environment (a virtual machine, much like the Java virtual machine) means that code compiled on one architecture runs anywhere. The runtime system also allows code in a running system to be updated without interrupting the program.

 Erlang is not particularly suitable for?

People use Erlang for all sorts of surprising things, for instance to communicate with X11 at the protocol level, but, there are some common situations where Erlang is not likely to be the language of choice.

The most common class of ‘less suitable’ problems is characterised by performance being a prime requirement and constant-factors having a large effect on performance. Typical examples are image processing, signal processing, sorting large volumes of data and low-level protocol termination.

Another class of problem is characterised by a wide interface to existing C code. A typical example is implementing operating system device drivers.

Large systems developed using Erlang make heavy use of C for low-level code, leaving Erlang to manage the parts which tend to be complex in other languages, like controlling systems spread across several machines and implementing complex protocol logic.

 Who uses Erlang for product development?

The largest user of Erlang is Ericsson. Ericsson use it to write software used in telecommunications systems. Many (dozens) projects have used it, a particularly large one is the extremely scaleable AXD301 ATM switch. AXD301 has several hundred people working on it and the code volume has reached about 850 kloc of Erlang (and 1 Mloc of C/C++).

A few of the other companies using Erlang are

  • 2600Hz(VoIP platform)
  • AdRoll(Real-time bidding, ad serving)
  • Bluetab Solutions(Event data collection)
  • Corelatus(Signalling in telecommunications networks)
  • net (in Latvian)(Web Services)
  • EE (British mobile operator, previously T-Mobile and one2one)(advanced call control services)
  • Facebook(Facebook chat backend)
  • Finnish Meteorological Institute(Data acquisition and real-time monitoring)
  • Gambit Research(High frequency trading in sports betting markets)
  • IDT corp.(Real-time least-cost routing expert systems)
  • (Electronic financial instrument exchange software)
  • Klarna(Electronic payment systems)
  • Lindenbaum(Large scale voice conferencing)
  • Mitel(VoIP Services)
  • Mobilearts(GSM and UMTS services)
  • Netkit Solutions(Network Equipment Monitoring and Operations Support Systems)
  • Process-one(Jabber Messaging)
  • Quviq(Software Test Tool)
  • RabbitMQ(AMQP Enterprise Messaging)
  • RAD(SSL accelerator, previously owned by Nortel, Alteon and Bluetail)
  • Smarkets(Betting exchange and prediction market)
  • Telia(a telecomms operator)
  • Vail Systems(Interactive Voice Response systems)
  • Wavenet(SS7 and IVR applications)
  • Whatsapp(Messaging for smartphones)

Who uses Erlang for research and teaching?

  • Ben-Gurion University(Israel) in the Communication Systems Engineering Department.
  • Chalmers Tekniska Högskola, Gothenburg, Sweden.
  • Costa Rican Institute of Technology.
  • Heriot-Watt Universityin the UK.
  • Iligan Institute of Technology of the Mindanao State Universityin the Philippines.
  • IT University of Gothenburgin Gothenburg, Sweden.
  • KTHin Stockholm.
  • Kurgan State Universityin Russia.
  • The Royal Melbourne Institute of Technologyin Australia.
  • Technion—Israel Institute of Technology (Electrical Engineering Faculty).
  • Technische Universität Kaiserslauternin Germany, for research and in their distributed systems source.
  • Tecnológico de Monterrey, Campus Estado de Méxicoin the Programming Languages course.
  • Tufts University, USA, in the Concurrent Programming
  • University of A Coruñain Spain.
  • The University of Kentin the UK
  • University of Sheffield in the UK
  • University of Sydney, in a distributed stream processing engine.
  • University of Zagreb in Croatia, in the Concurrent Programming course and also for research.
  • Uppsala University in Sweden is home to the HiPE

Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang’s runtime system has built-in support for concurrency, distribution and fault tolerance.

The term Erlang is used interchangeably with Erlang/OTP, or OTP, which consists of the Erlang runtime system, a number of ready-to-use components mainly written in Erlang, and a set of design principles for Erlang programs.

The Erlang runtime system is known for its designs that are well suited for systems with the following characteristics:

  • Distributed
  • Fault-tolerant
  • Soft real-time
  • Highly available, non-stop applications
  • Hot swapping, where code can be changed without stopping a system.

FEATURES

AWS

Azure

Google

Video

Erlang on Cloud