Progress DataXtend
SOLUTIONS
PRODUCTS
SERVICES
CUSTOMERS
PARTNERS
RESOURCES
SUPPORT
NEWS & EVENTS
ABOUT US

Print Version

Intelligent Data Caching

Caching in the application server tier is widely accepted as a best practice for reducing database bottlenecks. By satisfying a large portion of client requests from cached data, an application saves an extra network bounce (to the database) and relieves the load on the database, allowing it to more efficiently handle the critical operations that modify the data set. Progress® DataXtend™ CE can help.

While relational databases can be highly optimized and efficient, they simply were not designed to handle the high volumes of traffic generated in many enterprise systems. The limited number of connections places a threshold on the number of requests that can be handled concurrently. When all connections are in use, incoming requests are blocked. The locks required during updates can cause additional delays.

Intelligent Data Caching:
Delivering Value by Optimizing Performance

This subject covers the following topics:

Why Not Implement Caching or Buy it as an Add-On?

With data caching you have two choices, build or buy. Building a caching system has disadvantages similar to writing your own data access: it siphons resources away from the development of your business-specific logic and it requires starting from scratch—incurring design, development, and testing overhead.

There are several different approaches to caching objects in an application. Some caches present data in structures that mirror the database's rows, columns, and tables, thus exposing the details of the database schema to the application code. Other caches treat objects as opaque data, which makes it impossible for the cache to understand and manage relationships between objects. These straightforward approaches generally work best for applications dealing with simple data that does not change frequently.

Both home-grown and most purchased data caching services are usually designed to handle read-only or predictably changing data. When data changes predictably, an application can easily refresh the cache periodically to ensure that all clients have accurate information. But when information changes unpredictably, the burden falls on the developer to synchronize data. This is a difficult problem that is just too complex to address on an application-by-application basis. The difficulty of synchronizing data increases exponentially as application servers are clustered to support more clients or higher availability.

Take DataXtend CE for a 30-day test drive.

What Makes the DataXtend CE Cache Intelligent?

Rather than restricting caching to read-only data or maintaining separate views of volatile data, DataXtend CE provides a multi-threaded shared cache for each server process. As users update data, DataXtend CE creates an isolated transactional cache for each. The changes are invisible to other users until the transaction commits. Upon commit, DataXtend CE updates the shared cache with the freshest information.

DataXtend CE's intelligent data caching offers a unique combination of features to support applications with complex object models and/or high request rates:

  • Code-free cache management: DataXtend CE's object relational mapping classes are closely coupled with the cache, so that objects are automatically instantiated in the cache whenever they are accessed by the application. Developers do not have to manually track or code which objects must be cached, when they should be cached, or when they should be cleared from the cache.
  • True object-oriented paradigm: The intelligent cache represents the application object model while enforcing the constraints of the database schema. This ensures that DataXtend CE materializes exactly one cache object for each row that it loads from the database. Developers do not need intimate knowledge of the database schema nor do they need to actively manage data integrity.
  • Safe, concurrent access: A multi-threaded application can simultaneously read and/or update a cache object; DataXtend CE ensures data integrity of the object and avoids supplying stale versions of the object to the application's threads. Applications can handle more client requests with the same amount of database connections.
  • Dynamic relationship caching: Intelligent data caching stores not just the values of object attributes, but also the relationship between objects. By caching relationships, DataXtend CE can dramatically reduce the number of expensive join queries performed by the database, resulting in a corresponding improvement in performance.

While most applications perform well with the intelligent cache's default settings, every application has its own data access patterns. DataXtend CE advanced cache management service and database tuning features (such as cache indexing, lazy loading, and database write policies) are configurable and do not require code changes or recompilation.

Because of its tight integration with the data model, DataXtend CE caching is nearly transparent. An application can control which objects stay in the cache and which are cleared when not in use. Requests for application data can specify whether the data should be retrieved from the cache or the database. The following illustration shows how caching works when DataXtend CE is integrated with a J2EE application server.

O R Mapping and Integrated Data Caching graphic
Figure 1: Java Virtual Machine

How Does DataXtend CE Cache Objects?

An object does not exist in either cache (shared or transactional) until DataXtend CE receives a request for that object. The first invocation on a mapping object causes DataXtend CE to do the following:

  • Check to see if the operation is performed inside of or outside of a transaction;
  • Retrieve the appropriate data from the database;
  • Place the data in the appropriate cache (shared or transactional).

Requests in a transactional context populate a transactional cache, one cache per transaction scope. Reads outside of a transaction populate the shared cache. DataXtend CE performs the following when a transaction commits (these actions are atomic; all occur or none):

  • Updates the database with any objects that changed;
  • Commits the transaction in the database;
  • Updates the shared cache with any changed objects;
  • Destroys the transactional cache and its contents;
  • If you are synchronizing caches, sends the cache synchronization messages.

DataXtend CE uses the primary key of each object to identify it. This prevents the server from duplicating objects in the cache and supports find-by-key functionality.

You may also be interested in:

> OR Mapping
> Cache Clustering
> DataXtend CE
> Download DataXtend CE
> Data Integration Resource Center
> Partner Programs

Contact us to gain more insight and to learn more about the products and technologies from Progress Software.