T1129

Erlang Basics

The course is organized into 5 sections, dealing with different knowledge areas. Each section is sub-divided into chapters, where each chapter deals with a specific topic. Each chapter ends with one or more practical programming assignments. Each assignment is, most of the time, independent of other assignments.

Objectives:

  • Understand sufficiently of both theory and practice of the Erlang programming language to be able to participate in an Erlang programming project.
  • Know how to program in sequential Erlang using primitive types, lists, recursion and pattern matching.
  • Know how to write concurrent programs in Erlang using processes, message passing and links.
  • Understand the principles behind designing fault-tolerant applications in Erlang.
  • Understand the basics of OTP programming in Erlang.
  • Understand how to design distributed systems in Erlang.
  • Understand the pitfalls of the language in order to avoid crashing systems.
  • Knowledge of team programming practices such as unit testing and generated documentation.
  • Familiarity of a modern IDE for Erlang such as Eclipse with the erlIDE plugin.

Course outline:

Section 1 - Sequential programming in Erlang

Introduction to Erlang and functional programming

  • The evolution of programming languages and how Erlang fit into the big picture
  • A short introduction to functional programming
  • The history and background of Erlang
  • An overview of Erlang
  • Some demo Erlang programs

Sequential programming

  • Program and source organization
  • Compilation
  • Basic types, functions, BIFs
  • Recursion as the primary control structure
  • Pattern matching
  • Don't care variables
  • Guards
  • Modules
  • Records
  • How the language Erlang compares to the language Java

Functional programming

  • Closures
  • Higher-order functions
  • Map and reduce
  • List comprehension

Section 2 - Concurrent programming in Erlang

Brief concurrency theory

  • What do we mean with concurrency
  • The concept of process / thread
  • The problem of shared state
  • State synchronization and event synchronization
  • Message passing models

Concurrent programming

  • The Erlang way of concurrency - copy everything and share nothing
  • Processes in Erlang
  • Message passing in Erlang
  • Guards and pattern matching of messages
  • Timeouts
  • Process loop idiom

Fault tolerant programming

  • Process links and exit signals
  • Exceptions
  • Process supervision and supervisor hierarchies

Section 3 - Professional programming in Erlang

The Erlang Environment

  • Code path
  • Libraries
  • Command line arguments

The pre-processor

  • Constant macros
  • Function macros
  • Conditional compilation
  • Includes

Program documentation

  • Writing source documentation with EDoc tags
  • Generating documentation

Test oriented programming

  • Unit testing and usage of EUnit
  • Fixtures and asserts

Anti-patterns and coding idioms

  • A discussion of several harmful coding idioms/patterns regarding their structures, consequences and how to avoid them.
  • Parameter hazard, uncontrolled recursion, ping-pong recursion, unbounded asynchronous message passing, uncaught messages, zombie processes, massive data copying.

Section 4 - Communicative programming in Erlang

Communicative programming

File I/O

  • Reading and writing files
  • Typical file access patterns

Operating systems I/O

  • Erlang ports

Network I/O

  • Simple TCP socket programming

Distributed programming

  • What do we mean by distribution
  • Named nodes and cookies
  • Distributed message passing
  • The port mapper daemon
  • Realizing RPC in Erlang

Section 5 - OTP programming in Erlang

  • OTP Overview
  • OTP Components
  • OTP Supervisors
  • OTP Applications

Fakta

Kurs
T1129
Längd
5 dagar
Pris
25.950 kr (exkl. moms)

Stockholm

Bookmark and Share

Förkunskaper

Working knowledge in how to write programs in languages like Java, C++ or similar.

Kursmaterial

Course slides plus “Erlang Programming - A Concurrent Approach to Software Development”, written by Francesco Cesarini and Simon Thompson (ISBN 10: 0-596-51818-8).

Kontakta oss
för mer information:

08 - 587 116 10 (Stockholm)
031 - 773 07 90 (Göteborg)
040-662 20 60 (Malmö)
info@informator.se