School of Computing

Erlang master classes

These three Master Classes in Erlang will show you how Erlang can be used in practice to solve larger problems. We have chosen to give examples that provide 'capstones' for different aspects of Erlang: functional programming, concurrent programming and larger-scale programming with OTP.

The master classes are presented by Joe Armstrong, Ericsson AB and KTH, Stockholm, and one of the inventors of Erlang; Francesco Cesarini, CTO and founder of Erlang Solutions Ltd; and Simon Thompson, functional programming teacher and researcher at the University of Kent. Each Master Class ends with a discussion between the three presenters on some of the issues raised by the Master Class.

 

Filming of the Erlang master classes

Content Block Header Image

Francesco Cesarini, Simon Thompson and Joe Armstrong film a disscussion video

 

Kent Master Classes



To celebrate the university's 50th anniversary, it has funded Beacon Projects that will both highlight the university's successes and point to where it might go in the future. Our K-MOOCs Beacon Project aims to highlight our strengths in Erlang and functional programming by developing online learning materials and courses, including these Master Classes. These Master Classes give an opportunity to explore how concepts are used in the 'real world', with contributions not just from leading academics but also from our partners within business, government and industry. The Master Classes go beyond an introductory presentation of ideas to include larger scale examples and case studies.

The Master Classes are multi-purpose. As well as being stand alone presentations, they fit into an introductory online course (or MOOC) by giving capstones to sections of the course. The classes and MOOC materials are also usuable in campus-based programmes, as well as stand alone. These particular Master Classes form a component of our pilot MOOC in 'Functional Programming with Erlang'.

 

Functional Programming, with Simon Thompson


In this first master class we look at language processing in general, and in particular we focus on processing arithmetical expressions in a language like Erlang; of course, this is a model for processing all sorts of other languages: XML, domain-specific languages, test and “make” systems and so on. Once a representation is established, we show how this representation can be interpreted, or compiled and run on a virtual machine. Expressions can also be simplified symbolically, as well as converted to and from a textual form.

Simon Thompson

Simon Thompson portrait

Simon is Professor of Logic and Computation at the University of Kent. He has been a teacher and researcher in functional programming for most of his career. Recent research has concentrated on refactoring programs in Erlang and Haskell, and he is the author of textbooks on Erlang (with Francesco), Haskell, Miranda and type theory.

Videos:

Playlist of all Master class 1 videos

Introduction to language processing
Representing structured data
Using recursion: pretty printing
Evaluation expressions
Compiling and running on a virtual machine
Parsing
Simplification
Discussion

Supporting resources:

expr.erl

back to top

Concurrent Programming, with Joe Armstrong


Erlang is best known for its “share nothing” concurrency model that supports separate lightweight processes that communicate by message passing. This master class shows how sequential code – from the expression example – can be made concurrent. Building on this is a discussion of patterns for systems built on communicating processes. Erlang is built to be fault tolerant, and its “let if fail” philosophy is supported by its approach to process errors. Key to the successful use of Erlang in practice is the recognition that many of the components that programmers naturally build – for example servers – follow a similar pattern, and this is illustrated by making a more generic version of the calculator, serving as a bridge to the final master class.

Joe Armstrong

Joe Armstrong portrait

Joe is one of the “gang of three” Erlang inventors, and a champion of the Erlang approach to programming large complex systems. He has worked for Ericsson, as well as in startups, and is also professor at KTH, Stockholm. He is the author of Programming Erlang (2ed).

Videos:

Playlist of all Master class 2 videos

Turning sequential code into concurrent code
Abstracting patterns of concurrency
Handling errors
The road to generics
Client-server: name-server and resolver
Discussion

Supporting resources:

calc.erl
gen_server_lite.erl
client1.erl
lecture2.erl
counter0.erl
par_server.erl
counter1.erl
server1.erl
demo1.erl
triv_tcp_fac_client.erl
demo1_1.erl
triv_tcp_fac_server.erl
demo2.erl
triv_tcp_name_server.erl
demo2_1.erl
triv_tcp_resolver.erl
elib.erl

back to top

OTP Behaviours and Releases, with Francesco Cesarini


There is a lot more to Erlang than the language – there is a wide ecosystem of tools, for example – but the key productivity tool is OTP (the Open Telecom Platform), which provides generic behaviours, such as a generic server, that can be used again and again with no changes to the generic part. This is explored in depth in this master class, and it is shown how, together with supervision, OTP provides the behaviours from which complex systems can be built quickly and reliably. These systems are packaged as applications and releases, and an overview of these completes the final master class.

Francesco Cesarini

Francesco Cesarini portrait

Francesco is founder and Technical Director of Erlang Solutions Ltd, the company focused on building scalable, reliable systems based on Erlang/OTP. ESL is based in the UK and has branches in Sweden, Poland, Hungary, USA and Argentina. Francesco is also author (with Simon) of Erlang Programming and the forthcoming Designing for Scalability with Erlang/OTP with Steve Vinoski.

Videos:

Playlist of all Master class 3 videos

Client-servers
What’s in a message?
Generic servers
Supervisors
Applications
Discussion

Supporting resources:

General:
calc_gen.erl
expr.erl
client1.erl
server1.erl

Applications:
calc.erl
calc_sup.erl
calc_app.erl
expr.erl

Behaviours:
calc.erl
expr.erl

Gen_servers:
calc.erl
expr.erl

Server:
calc.erl
server.erl
expr.erl

Supervisors:
calc.erl
expr.erl
calc_sup.erl

School of Computing, University of Kent, Canterbury, Kent, CT2 7NF

Enquiries: +44 (0)1227 824180 or contact us.

Last Updated: 01/07/2015