Universal Cache Getting Started : solidDB® Universal Cache : Universal Cache features and functionality : Collocating applications with the cache with SMA and LLA
  
Collocating applications with the cache with SMA and LLA
You can magnify the advantage of a cache database by collocating your application with the cache database. By using shared memory access (SMA) or linked library access (LLA) , you can link the application with the solidDB® server code and avoid any interprocess communications. With SMA and LLA, the resulting response times can be an order of magnitude (or more) shorter than those achieved with the network-based access to the backend database.
Disk-based databases are often accessed from separate client computers through a network, and data must be read from an external storage device (for example, a hard disk drive or a solid state drive) before it can be accessed by the application. Although advanced caching algorithms exist to store frequently used data in the database main memory (often referred to as a buffer pool), there is no guarantee that the requested data page will be available in the buffer pool at access time – therefore, a disk I/O operation is needed. Moreover, database durability requirements often dictate that log records are synchronously written to the storage device prior to any database updates being committed, thus introducing additional performance impact on the transaction response time seen by the application.
By using the SMA and LLA access methods available with solidDB®, the Universal Cache system can collocate the data with the application. The combined cost of accessing data from the solidDB® in-memory engine collocated with the application is significantly lower than accessing the data from the backend database server. All expensive access paths (network and synchronous disk access) can be removed.
SMA and LLA are implemented as library files that contain a complete copy of the solidDB® server in a library form.
Shared memory access (SMA)
With SMA, multiple applications can be linked to a dynamic driver library that contains the full database server functionality. This means that the applications ODBC or JDBC requests are processed almost fully in the application process space, without a need for a context switch among processes. To facilitate the processing of a common database, the driver has access to a shared memory segment initialized by the server.
Linked library access (LLA)
With LLA, an application links to a static library or a dynamic library that contains the full database server functionality. This means solidDB® runs in the same executable with the application, eliminating the need to transfer data through the network.
The SMA and LLA servers can also handle requests from remote applications which connect to the server through communications protocols such as TCP/IP. The remote applications see the SMA or LLA server as similar to any other solidDB® server; the collocated applications see a faster, more precisely controllable version of the solidDB® server.
See also
Universal Cache features and functionality