Functional programming for real world applications: monitoring and control of the UniBoard using Erlang

Harro Verkouter (Joint Institute for VLBI in Europe)


Abstract


The Erlang programming language has been around for over twenty years. It is a functional language with several useful features not generally found in others. Transparent and lock-free multi-core as well as multi-machine concurrency, fault tolerance, binary data encoding and decoding, hot code swapping and good support for I/O to allow communication with other systems are amongst its main features.

This is in direct contrast with other functional languages. Erlang's I/O model closely resembles procedural languages by allowing the Erlang runtime to be impure in this restricted subsystem, outside the user's control. User code remains pure: statements have no side effects, which allows for lock-free multi-processing.

Erlang has been designed from the start to be fault tolerant. Its designers realised this by providing an infrastructure which allows a system to recover from unexpected events by automatically restarting, or, in case of hardware failures, migrating services on-the-fly to redundant hardware.

The Joint Institute for VLBI in Europe (JIVE) is leading an international project called the UniBoard, that has designed and produced a generic, high-performance, FPGA-based computing platform for radio astronomy. The development at JIVE of a VLBI correlator based on this board is currently ongoing.

Each board is fitted with eight state-of-the-art FPGAs delivering in total 0.5 TFLOPS of processing power and 320Gbps aggregate I/O capacity. Each FPGA of each UniBoard can be controlled via its ethernet link. Multiple data sources send radio astronomical data to the UniBoard for processing. These nodes must also be controlled.

A number of programming languages and systems (Python, C, C++, Java) were carefully investigated to determine their suitability for the implementation of a UniBoard monitoring and control system (MAC). Although all programming languages obviously have their pros and cons, we found the number of built-in features and libraries it ships with, directly applicable to such an implementation, quite remarkable. After extensive tests of Erlang through a pilot project, the decision was made to use it for both the UniBoard MAC and an overall correlator control system.

In this talk I will give an outline of the UniBoard project and its results, and I will illustrate our experience with Erlang by describing one of the significant subsystems, the UniBoard MAC, which handles the concurrent control of multiple embedded systems.

Poster in PDF format

Paper ID: P158

Poster Instructions




Latest News

Quick links

ADASS XXI Conference Poster

Download the Official Conference Flyer:

JPG:   A4  A3

PDF (with printer marks):

8.5in x 11in  11in x 17in  A4  A3  A2