Concurrent Programming in ERLANG

Categories:

Recommended

Erlang is a declarative language for programming concurrent and distributed systems which was developed by the authors at the Ericsson and Ellemtel Computer Science Laboratories.

The development of Erlang started as an investigation into whether modern declarative programming paradigms could be used for programming large industrial telecommunications switching systems. It was soon realised that languages which were suitable for programming telecommunications systems were also suitable for a wide range of industrial embedded real-time control problems.

Many of the Erlang primitives provide solutions to problems which are commonly encountered when programming large concurrent real-time systems. The module system allows the structuring of very large programs into conceptually manageable units. Error detection mechanisms allow the construction of faulttolerant software. Code loading primitives allow code in a running system to be changed without stopping the system.

Erlang has a process-based model of concurrency. Concurrency is explicit and the user can precisely control which computations are performed sequentially and which are performed in parallel. Message passing between processes is asynchronous, that is, the sending process continues as soon as a message has been sent.

The only method by which Erlang processes can exchange data is message passing. This results in applications which can easily be distributed – an application written for a uniprocessor can easily be changed to run on a multiprocessor or network of uniprocessors. The language has built-in mechanisms for distributed programming which makes it easy to write applications which can run either on a single computer, or on a network of computers.

Variables in Erlang have the property of single assignment3 – once a value has been assigned to a variable this value can never be changed. This property has important consequences when debugging or transforming a program.

Programs are written entirely in terms of functions – function selection is made by pattern matching which leads to highly succinct programs.

The Erlang system has an inbuilt notion of time – the programmer can specify how long a process should wait for a message before taking some action. This allows the programming of real-time applications. Erlang is suitable for most soft real-time applications where response times are in the order of milliseconds.

Category:

Attribution

Joe Armstrong. Concurrent Programming in ERLANG. http://www.erlang.org/download/erlang-book-part1.pdf

VP Flipbook Maker

Make stunning flipbooks online. Create flipbooks for free with Visual Paradigm. Create online flipbooks, design, publish and share your flipbooks online, try it now!