Introduction
Data caching is a very important consideration for J2EE applications. Data caching limits the number of remote invocations in distributed applications and improves performance of web applications by reducing the number of calls to the persistent data stores. Even though caching improves performance and makes your architecture work, it can, in fact, complicate design and introduce such complexities as concurrent code and cluster-wide synchronization.Once it has been decided that data caching is an integral part of the architecture, choosing the right caching solution can prove to be difficult. There is always an option to implement a caching solution from scratch. This approach can have its advantages, but will inevitably affect the project's cost and timeline. Another solution is to choose one of the open-source caching products. When choosing a caching solution, the following questions should be considered:
- Does caching solution provide easy integration with an ORM product?
It should be easy to integrate the caching product with some of the popular ORM products such as Hibernate or Toplink. The domain objects are POJOS map to RDBMS entities and cached in memory, thereby reducing network traffic to the RDBMS. - Does caching solution provide presentation layer caching?
The cache product should provide HTTP response/JSP caching on the presentation layer. - Does caching solution allow storage of objects in memory and disk?
In case the memory capacity is full, the cache product should evict objects to a local disk. - Is it easy to use?
A cache product should expose minimum API for the client to use. - Does it support distributed cache?
A cache within each JVM needs to be coordinated in a clustered environment. - Does it allow sharing of objects with a JVM?
All the application threads within a JVM should be able to access the same instance of an object in a cache. - Is cache invalidation supported?
The caching product should provide a facility to invalidate a cache or a cache group. Cache invalidation should be coordinated in a distributed cache. - What is the availability level?
The cache maintains a local copy; some operations can continue even if the original source is unavailable. - Is it scaleable?
In a distributed cache, multiple copies of a cache are available across processes. Thus, the scalability of the server is improved. - Is it easy to maintain?
The cache product should have proper logging facilities in order to debug the code. - Does it adherence to standards?
JCache is the standard; in other words, the JSR 107 caching service was born out of the JCP process. If the cache supports the standard, a client can have unified access to the cache.
Available Open-Source Solutions
Against the backdrop of the requirements mentioned above, you will evaluate the various products that cache Java objects. The most important features of the various products are mentioned below.http://java-source.net/open-source/cache-solutions
No comments:
Post a Comment