Subscribe to our Erlang Factory newsletter to receive the latest updates and news

Erjang - A JVM-based Erlang VM

Kresten Krab Thorup
Kresten Krab Thorup

Trifork
Over the last few years, I have been meeting "Erlang people" more and more often, and I was getting this clear impression that "you people" have some kind of magic ability to reason intuitively about concurrent systems in a way that I could not.  That bothered me, so I wanted to learn Erlang.  Being a language implementer, the most obvious way to do that is to just go ahead and implement an Erlang VM, right?  

The result of this "little exercise" is Erjang, an open-source JVM-based Erlang VM, which I think has potential to be useful as a means to push Erlang into new areas of application, help grow the Erlang community, and most importantly make all those Java-heads out there willing to learn how to do concurrency right. In this "brave new world" of networked services and multi-core everywhere, there are a lot of people who are challenged in providing even basic reliability, efficiency and correctness.  My hope is that Erjang's existence can influence some of those outside the Erlang community to do better.

In technical terms, Erjang reads .beam files and compiles them to Java's equivalent .class files which are then read into the running JVM.  It runs off a plain Erlang/OTP distribution - it only requires the beam files from there; Erjang itself is written in Java.  As off this writing, it can run some non-trivial erlang programs, but is not yet capable of booting OTP [will have to update this abstract as we go along - follow updates on my blog].  Comparing the BEAM virtual machine and Erjang, the most obvious differences are that (a) Erjang will not be able to provide [soft] real-time guarantees since it uses Java's garbage collector, and (b) it has limited support for native code and port drivers (other than file and network I/O).  The upside is the new ways this allows us to deploy Erlang systems.

In this presentation I will talk about how Erjang works, what behaviour to expect from Erlang programs running on top of Erjang, what I learned along the way, and demonstrate [live] that Erjang runs well enough to be obviously useful.


Erlang Gives You Superpowers

Jack Moffitt
Jack Moffitt

Whether you are using Erlang-powered applications or writing your own, Erlang and OTP can give you superpowers. My own discovery of these powers started when I needed a better XMPP server and led quickly to designing entire systems with Erlang. I will talk about how you can get your own superpower, my experiences with using Erlang superpowers (for good!), and show an example of how Erlang gives my own projects a competitive advantage.


Generic Load Regulation Framework for Erlang

Ulf Wiger
Ulf Wiger

Erlang Solutions
Although Telecoms, the domain for which Erlang was conceived, has strong and ubiquitous requirements on overload protection, the Erlang/OTP platform offers no unified approach to addressing the problem. The Erlang community mailing list frequently sports discussions on how to avoid overload situations in individual components and processes, indicating that such an approach would be welcome. As Telecoms migrated from carefully regulated single-service networks towards multimedia services on top of best-effort multi-service packet data backbones, much was learned about providing end-to-end quality of service with a network of loosely coupled components, with only basic means of prioritization and flow control. This talk explores the similarity of such networks with typical Erlang-based message-passing architectures, and argues that a robust way of managing high-load conditions is to regulate at the input edges of the system, and sampling known internal choke points in order to dynamically maintain optimum throughput. A selection of typical overload conditions are discussed, and a new load regulation framework -- JOBS -- is presented, together with examples of how such overload conditions can be mitigated.


Lisp Flavoured Erlang (LFE)

Robert Virding
Robert Virding

His talk will describe Lisp Flavoured Erlang which is another programming language running on the Erlang VM. LFE is a dialect of Lisp which has been designed around the properties of the VM and to be completely compatible with vanilla Erlang and OTP. It fully supports the Erlang concurrency and error handling model and can be used with all the OTP behaviours. Using Erjang, LFE brings both Lisp and and the Erlang concurrency model together to the JVM.

The language will be described using the properties of Erlang and the VM as a starting point and show how this has determined the language. I will also present some of the tools used in implementing LFE and discuss the more general problem of building DSLs on top of Erlang.


Membase NoSQL managed by Erlang

Matt Ingenthron
Matt Ingenthron

Membase, created by some of the top contributors to the memcached project, had a need for a distributed system when building the Membase NoSQL database.  The system had to ultra-reliable, portable, and easy to program.  By building on Erlang and OTP to manage the existing core runtime, we was able to quickly build a simple, fast, elastic NoSQL database.


Scaling Web Apps With RabbitMQ

Alvaro Videla
Alvaro Videla

TheNetCircle.com
In this talk I would like to discuss several messaging scenarios that can help scale our web applications. From using RabbitMQ as a simple "queue server" for running background CPU intensive tasks to implementing RPC over AMQP. See how message multicast can help to simplify the logic of your web app to make it scalable and fault tolerant. We'll see how to implement load balancing with RabbitMQ and how real time logging and monitoring has never been easier.


Teach an Old Dog new Tricks; Add a new Behaviour to Erlang/OTP

Jay Nelson
Jay Nelson

DuoMark International, Inc
This two part talk introduces OTP behaviours for beginning erlang
programmers, explaining OTP and the role of behaviours and how to add your own custom OTP-integrated behaviour.  Part two provides insights into the structure of the OTP source baseline, documentation, test_server, github and the OTP team so that you can contribute your new behaviour to the Erlang Open Source legacy.

You can view the slides from this talk here.