Revisited 3.2

This commit is contained in:
Niklas Landin 2011-05-12 20:06:49 +02:00
parent cac015a6d1
commit 27f2bdc4dc

View file

@ -3749,8 +3749,8 @@ name "sec:The-usage-of-erlang"
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
Erlang was designed by Ericsson, beginning in 1986, for the purpose of creating Erlang was designed by Ericsson, beginning in 1986, for creating concurrent
concurrent applications and improving telecom software. applications and improving telecom software.
Features essential for the telecom industry to achieve high availability Features essential for the telecom industry to achieve high availability
in telecom switches were added to the language. in telecom switches were added to the language.
\begin_inset ERT \begin_inset ERT
@ -3762,7 +3762,7 @@ status open
\backslash \backslash
nomenclature{ nomenclature{
\backslash \backslash
textbf{Mutex}}{A construct for achieving mutial exclusion, used to avoid textbf{Mutex}}{A construct for achieving mutual exclusion, used to avoid
simultaneous access to shared resources in computer systems} simultaneous access to shared resources in computer systems}
\end_layout \end_layout
@ -3807,10 +3807,10 @@ Processes in Erlang are also called
Light Weight Processes. Light Weight Processes.
\emph default \emph default
The Erlang processes are very cheaply created. The Erlang processes are inexpensive to create.
Processes exist within an Erlang machine, or Erlang node. Processes exist within an Erlang machine, or Erlang node.
The Erlang machine has its own scheduler and does not rely on the operating The Erlang machine has its own scheduler and does not rely on the operating
system's scheduler, this is a main reason of Erlang's capability of running system's scheduler, this is one main reason of Erlang's capability of running
many concurrent processes many concurrent processes
\begin_inset CommandInset citation \begin_inset CommandInset citation
LatexCommand citet LatexCommand citet
@ -3830,12 +3830,12 @@ The strong isolation of Erlang processes make them ideal for multi-core
which computer the process runs on, is not important when communicating which computer the process runs on, is not important when communicating
with the process. with the process.
Processes can communicate regardless of whether they run on the same system Processes can communicate regardless of whether they run on the same system
of not, transparently. or not, transparently.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
The distributed nature of Erlang is something the GGS makes use of when The distributed nature of Erlang is something the GGS makes use of, when
scaling across several computers in order to achieve higher performance. scaling across several computers to achieve higher performance.
The distribution is also important in creating redundancy. The distribution is also important in creating redundancy.
Erlang promotes a non-defensive programming style in which processes are Erlang promotes a non-defensive programming style in which processes are
allowed to crash and be restarted in favor of having the processes recover allowed to crash and be restarted in favor of having the processes recover
@ -3868,10 +3868,10 @@ s (Native implemented functions)
. .
\emph default \emph default
Through ports communication can take place much in the same way communication Through ports communication can take place in a similar way communication
is performed over sockets. is performed over sockets.
NIFs are called like any other functions without any difference to the NIFs are called like any other functions without any difference to the
caller but are implemented in C. caller but they are implemented in C.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -3954,7 +3954,7 @@ behaviors
\begin_layout Standard \begin_layout Standard
The GGS makes heavy use of the behaviors supplied in the OTP. The GGS makes heavy use of the behaviors supplied in the OTP.
The behaviors impose a programming style suitable for distributed and concurren The behaviors impose a programming style suitable for distributed and concurren
t applications, perfectly suitable for the GGS. t applications.
In particular, the GGS uses the following behaviors: In particular, the GGS uses the following behaviors:
\end_layout \end_layout
@ -3967,7 +3967,7 @@ supervisor
Supervisors are used when monitoring processes in the Erlang system. Supervisors are used when monitoring processes in the Erlang system.
When a process exits wrongfully, the supervisor monitoring the process When a process exits wrongfully, the supervisor monitoring the process
in question decides which action to take. in question decides which action to take.
In the GGS, the most common action is simply to restart the faulting process. In the GGS, the most common action is to restart the faulting process.
A more thorough discussion on supervisors can be found in section A more thorough discussion on supervisors can be found in section
\begin_inset CommandInset ref \begin_inset CommandInset ref
LatexCommand ref LatexCommand ref
@ -3999,8 +3999,8 @@ gen_server
increasing the usefulness of the server process. increasing the usefulness of the server process.
There are many gen_servers in the GGS, it is the most widely used behavior There are many gen_servers in the GGS, it is the most widely used behavior
in the project. in the project.
In addition to introducing a state to the server, the gen_server behavior Besides introducing a state to the server, the gen_server behavior also
also imposes patterns for synchronous and asynchronous communication between imposes patterns for synchronous and asynchronous communication between
other gen_servers and other OTP behaviors. other gen_servers and other OTP behaviors.
\end_layout \end_layout
@ -4016,8 +4016,8 @@ gen_fsm
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
In addition to supplying behaviors, the OTP also has a style for packaging Besides supplying behaviors, the OTP also has a style for packaging and
and running Erlang applications. running Erlang applications.
By packaging the GGS as an By packaging the GGS as an
\emph on \emph on
application application
@ -4034,7 +4034,7 @@ status open
\backslash \backslash
nomenclature{ nomenclature{
\backslash \backslash
textbf{Application}}{A way of packaging Erlang software in a uniform way} textbf{Application}}{A way of packaging Erlang software in an uniform way}
\end_layout \end_layout
\end_inset \end_inset