2. What is ErlangErlang is a general-purpose programming language and runtime environment. Erlang has built-in support for concurrency, distribution and fault tolerance. Erlang is used in several large telecommunication systems from Ericsson.
3. What sort of applications is Erlang particularly suitable forDistributed, reliable, soft real concurrent systems.
Telecommunication systems, e.g. controlling a switch or converting protocols.
Servers for Internet applications, e.g. a mail transfer agent, an IMAP-4 server, an HTTP server or a wap stack
Telecommunication applications, e.g. handling mobility in a mobile network or providing unified messaging.
Database applications which require soft realtime behaviour.
Erlang is good at solving these sorts of problems because this is the problem domain it was originally designed for. Stating the above in terms of features:
Erlang provides a simple and powerful model for error containment and fault tolerance (supervised processes).
4. 续上页Concurrency and message passing are a fundamental to the language. Applications written in Erlang are often composed of hundreds or thousands of lightweight processes. Context switching between Erlang processes is typically one or two orders of magnitude cheaper than switching between threads in a C program.
Writing applications which are made of parts which execute on different machines (i.e. distributed applications) is easy. Erlang's distribution mechanisms are transparent: programs need not be aware that they are distributed.
The OTP libraries provide support for many common problems in networking and telecommunications systems.
The Erlang runtime environment (a virtual machine, much like the Java virtual machine) means that code compiled on one architecture runs anywhere. The runtime system also allows code in a running system to be updated without interrupting the program.
5. What is OTP?OTP (Open Telecom Platform) is a large collection of libraries for Erlang to do everything from compiling ASN.1 to providing a WWW server. Most projects using "Erlang" are actually using "Erlang/OTP", i.e. the language and the libraries. OTP is also open source.