1 Introduction
1.1 Erlang and OTP
Erlang is a general-purpose programming language with built-in support for concurrency, distribution and fault tolerance.
OTP (Open Telecom Platform) is aimed at providing time-saving and flexible development for robust, adaptable telecom systems. It consists of an Erlang runtime system, a number of ready-to-use components mainly written in Erlang, and a set of design principles for Erlang programs. Since Erlang and OTP are closely interconnected the term Erlang/OTP is normally used instead of OTP.
1.2 Erlang/OTP
The Erlang runtime system (ERTS) is made up of an emulator running on top of the host operating system, a kernel providing low-level services such as distribution and I/O handling, and a standard library containing a large number of re-usable modules. An introduction to ERTS can be found in chapter 2 "Getting started with Erlang". Full documentation can be found in the part of the documentation about "ERTS and the Basic Applications".
The OTP design principles provides the user with a way to structure the system based on a concept called application. An OTP application is a way to package a system component and is either a set of library modules or a supervision tree. A supervision tree is a hierarchical tree of processes used to program fault-tolerant systems. The processes are easiest implemented using behavior modules which are formalizations of design patterns. The standard library includes behavior modules for supervisors, servers, state machines and generic event handlers. In chapter 4 "OTP Design Principles" the design principles are explained in detail.
The OTP components can be divided into six categories:
- Basic Applications - Basic Erlang/OTP functionality.
compiler
A byte code compiler for Erlang which produces highly compact code.
kernel
Functionality necessary to run Erlang/OTP itself.
sasl
(System Architecture Support Libraries) A set of tools for code replacement and alarm handling etc.
stdlib
The standard library.
- Operations and Maintenance - OAM both of the system developed by the user and of Erlang/OTP itself.
eva
A multi-featured event and alarm handler.
mesh
A measurement handler application.
os_mon
A monitor which allows inspection of the underlying operating system.
snmp
SNMP support including a MIB compiler and tools for creating SNMP agents.
- Interface and Communication - Interoperability and protocols support.
asn1
Support for ASN.1.
erl_interface
Low level interface to C.
jinterface
Low level interface to Java.
gs
A graphics system used to write platform independent user interfaces.
inets
A set of services such as a web server and a FTP client.
comet
A library that enables Erlang/OTP to call COM objects on windows
ssl
Secure Socket Layer (SSL),interface to UNIX BSD sockets
crypto
Cryptographical support
- Database Management.
mnemosyne
Query language support for Mnesia DBMS.
mnesia
A heavy duty real-time distributed database.
mnesia_session
A foreign language interface to Mnesia DBMS.
odbc
ODBC database interface.
- CORBA services and IDL compiler.
cosEvent
Orber OMG Event Service.
cosTransactions
Orber OMG Transaction Service.
cosNotification
Orber OMG Notification Service.
cosTime
Orber OMG Timer and TimerEvent Services.
ic
IDL compiler
orber
A CORBA object request broker.
- Tools.
appmon
A utility used to view OTP applications.
debugger
For debugging and testing of Erlang programs.
parsetools
A set of parsing and lexical analysis tools.
pman
A process manager used to inspect the state of an Erlang/OTP system.
runtime_tools
Tools to include in a production system.
toolbar
A tool bar simplifying access to the Erlang/OTP tools.
tools
A set of programming tools including a coverage analyzer etc.
tv
An ETS and Mnesia graphical table visualizer.
1.3 Scope and Purpose
This documentation describes the Erlang runtime system, the OTP applications and the OTP design principles. It assumes that the reader is familiar with the Erlang programming language and does not explain how to program in Erlang. The language is described in Concurrent Programming in Erlang, 2nd Edition, ISBN 0-13-508301-X.
1.4 About the Erlang/OTP Documentation
1.4.1 Structure of this Book
The documentation is divided into eight parts. This book, Erlang 5.0/OTP R7 System Documentation, EN/LZT 108 4095 R1, is the starting point of the documentation and contains information about the Erlang programming language and runtime system, the OTP design principles, and how to install and configure Erlang/OTP.
- Chapter 2: "Getting Started with Erlang" describes the Erlang runtime system and introduces the reader to tools such as the compiler and debugger.
- Chapter 3: "Erlang Extensions Since 4.4" lists all extensions added to the Erlang programming languages since the latest version of the book Concurrent Programming in ERLANG.
- Chapter 4: "OTP Design Principles" describes a way to structure Erlang code in terms of applications and supervision trees. The standard behaviors are described and examples illustrate how to apply these behaviors to typical applications.
- Chapter 5: "Installation Guide"gives guidelines on how to install Erlang/OTP on UNIX or Windows.
- Chapter 6: "System Principles" describes the strategies and options, which are available to start an Erlang/OTP system. This chapter also provides a brief description of the applications included in an Erla ng/OTP system.
- Chapter 7: "Embedded Systems" is a supplement to "Installation Guide". t describes issues that are specific for running Erlang/OTP on an embedded system.
- Chapter 8: "Operation and Management Principles" describes the model for operation and maintenance of sub-systems.
- Chapter 9: "Tutorial" gives an orientation of the different interoperability mechanism, which can be used when integrating an Erlang program with a program written in an other programming language.
1.4.2 Structure of the Total Documentation
The remaining seven books in the total documentation set contain User's Guides and Reference manuals for the OTP applications.
- Erlang 5.0/OTP R7 Run-Time System and Basic Applications, EN/LZT 108 4106 R1
Contents:
- Erlang/OTP Run-Time System (ERTS)
- System Architecture Support Libraries (SASL)
- Kernel
- Compiler
- Erlang 5.0/OTP R7 Standard Library, EN/LZT 108 4107 R1
- Erlang 5.0/OTP R7 Database Applications, EN/LZT 108 194 R3
Contents:
- Mnesia
- Mnesia Session
- Mnemosyne
- Open DataBase Connectivity (ODBC)
- Erlang 5.0/OTP R7 Object Request Broker, Services and IDL Compiler, EN/LZT 151 810 R2
Contents:
- Orber
- cosEvent
- cosTransactions
- cosNotification
- cosTime
- IC
- Erlang 5.0/OTP R7 Interface and Communication Applications, EN/LZT 108 4110 R1
Contents:
- Abstract Syntax Notification One (ASN1)
- Erl Interface
- jinterface Package
- Graphics System (GS)
- Inets
- Comet
- Secure Socket Layer (SSL)
- Crypto
- Erlang 5.0/OTP R7 Operation and Maintenance Applications, EN/LZT 108 4108 R1
Contents:
- Event and Alarm Handler (EVA)
- Measurement Handler (MESH)
- Simple network Management Protocol (SNMP)
- Operation System Monitor (OS_MON)
- Erlang 5.0/OTP R7 Tool Applications, EN/LZT 108 4109 R1
Contents:
- Debugger
- Process Manager (PMAN)
- Toolbar
- Tools
- Table Visulizer (TV)
- Application Monitor
- Parcetools
- Runtime Tools
1.5 Typographical Conventions
The following typographical conventions are used in the documentation.
Convention Where used command To show menu selections and equivalent command line entries.
To show keyboard entries at system prompts.code
To highlight Erlang code, module and function names, arguments, variables, and file names. Examples of typographical conventions.