Databases Reference
In-Depth Information
What is OTP?
OTP is a large collection of open source function modules used by Erlang applica-
tions. OTP originally stood for Open Telecom Platform, which tells you that Erlang was
designed for running high-availability telephone switches that needed to run without
interruption. Today OTP is used for many applications outside the telephone industry,
so the letters OTP are used without reference to the telecommunications industry.
Together, Erlang and the OTP modules provide the following features to application
developers:
Isolation —An error in one part of the system will have minimum impact on
other parts of the system. You won't have errors like Java NullPointerExceptions
( NPE s) that crash your JVM .
Redundancy and automatic failover (supervision) —If one component fails, another
component can step in to replace its role in the system.
Failure detection —The system can quickly detect failures and take action when
errors are detected. This includes advanced alerting and notification tools.
Fault identification —Erlang has tools to identify where faults occur and inte-
grated tools to look for root causes of the fault.
Live software updates —Erlang has methods for software updates without shutting
down a system. This is like a version of the Java OSGi framework to enable
remote installation, startup, stopping, updating, and uninstalling of new mod-
ules and functions without a reboot. This is a key feature missing from many
NoSQL systems that need to run nonstop.
Redundant storage —Although not part of the standard OTP modules, Erlang can
be configured to use additional modules to store data on multiple locations if
hard drives fail.
Because it's based around the actor model and messaging, Erlang has inherent scale-
out properties that come for free. As a result, these features don't need to be added to
your code. You get high availability and scalability just by using the Erlang infrastruc-
ture. Figure 10.15 shows how Erlang components fit together.
Erlang puts the agent model at the core of its own virtual machine. In order to have
consistent and scalable properties, all Erlang libraries need to be built on this
C or other language
Erlang applications
Figure 10.15 The Erlang application runs on a
series of services such as the Mnesia
database, Standard Authentication and
Security Layer (SASL) components, monitoring
agents, and web servers. These services make
calls to standardized OTP libraries that call the
Erlang runtime system. Programs written in
other languages don't have the same support
that Erlang applications have.
Mnesia
DBMS
SNMP
agents
Web
SASL
server
OTP modules
Erlang runtime system
Operating system
Search WWH ::




Custom Search