One of the most powerful and unique features of Caché
is the ability to efficiently distribute data and application logic
among a number of server systems.
The underlying technology behind this feature is the Enterprise
Cache Protocol (ECP): a distributed data caching architecture that
manages the distribution of data and locks among a heterogeneous network
of server systems.
Unlike other multi-tier
architectures, ECP is
primarily a configuration option. That is, you do not have to use
special code or development techniques to create distributed database
applications. This provides several important advantages over other
Applications can scale down
well as up. An application that is truly scalable can run on small
systems as well as large using the same code base. With Caché
you can deploy small scale systems using a single server and deploy
the same application at large sites on multiple servers using ECP.
Applications are easier
Instead of worrying about scalability and infrastructure, application
developers can focus on core, customer-centric functionality.
Applications are reliable
automatically recovers from most runtime problems (such as planned
or unplanned system stoppages) with no user intervention.
This overview covers the following topics:
ECP provides the following features:
Besides providing a high degree of system availability, the
automatic behavior of ECP makes a system easier to manage. For example,
it is possible to take an ECP data server offline temporarily for
a software upgrade and restore it without having to perform any operations
on the ECP application server systems.
The primary reasons to use ECP are:
The architecture and operation of ECP is conceptually simple.
ECP provides a way to efficiently share data, locks, and executable
code among multiple Caché systems. Data and code are stored
remotely, but are cached locally to provide efficient access with
minimal network traffic.
To better understand how ECP works, it is first helpful to review
how databases, namespaces, and caching work in Caché.
Caché stores datapersistent multidimensional arrays
) as well as executable code
)in one or more
physical structures called databases
. A database
consists of one or more physical files stored in the local operating
system. A Caché system may (and usually does) have multiple
Each Caché system maintains a database cache
a local, shared memory buffer used to cache data retrieved
from the physical databases. This cache greatly reduces the amount
of costly I/O operations required to access data and provides many
of the performance benefits of Caché.
Caché applications access data by means of a namespace
. A namespace provides a logical view of data
(globals and routines) stored in one or more physical databases. A
Caché system may (and usually does) have multiple namespaces.
Caché maps the data visible in a logical
namespace to one or more physical
This mapping provides applications with a powerful mechanism for changing
an application’s physical deployment (which disk drives are
used, etc.) without changing application logic. This same mechanism,
in conjunction with ECP, is what makes it possible to redeploy applications
among multiple, networked systems with few or no application changes.
An ECP configuration consists of a number of Caché systems
that are visible to one another across a TCP/IP-based network. There
are two roles a Caché system can play in an ECP configuration:
A Caché system can simultaneously act as both an ECP
data server and an ECP application server. However, one Caché
instance cannot act as an ECP data server for the data it receives
as an application server of another ECP data server.
In an ECP configuration, each ECP data server
is responsible for the following:
Storing data in its local database.
Maintaining the coherency of the various ECP application
server system database caches so that application servers do not see
Managing the distribution of locks across the network.
Establishing connections to a specific ECP data server
whenever an application requests data that is stored on that server.
Monitoring the status of all connections to ECP data
servers. If a connection is broken, or encounters any trouble, the
ECP application server attempts to recover the connection.
Maintaining, in its cache, data retrieved across the
network. This cache greatly reduces the number of costly network operations
needed to access remote data.
ECP automatically establishes and maintains network connections
between application server and data server systems. If a connection
is broken, ECP automatically reestablishes the connection and restores
the operating state of the system, if possible.