ATG Cache Using JBOSS Data Grid/Infinispan
ATG Cache Using JBOSS Data Grid/Infinispan
As performance is really important in retail Or web commerce applications, the caching plays an important role in improve the performance. ATG Commerce servers are loaded with lot of components and functionality. And top of that, repository caching will increase enormous memory consumption on ATG JVM’s. Hence, externalizing this cache is an important aspect to reduce the memory foot prints and also reduce the overall load on ATG servers.
JBoss data grid internally uses infinispan cache stores to handle the data. On top of infinispan, JDG has provided some more wrappers to include grid features like map/reduce and search functionalities.
Infinispan an open source version of JBoss Data Grid
Infinispan works in 4 caching modes.
· Distribution Mode (Preferred)
Where Distributed caching is more appropriate in most of the scenarios. And Replication mode provides an very high available cluster and consumes huge RAM .
ATG and JBoss Data Grid Integration
JBoss Data Grid/Infinispan works with TCP connections (at Base) between the clusters nodes. And it depends on “Jgroups” as the communication configuration to form the Clusters. Jgroups will use TCP Or UDP to form clusters.
Cache grid Cluster
Using JBoss Cache Servers (Preferred)
· Hotrod is an effective protocol to communicate with JBOSS data grids.
· Clients like ATG App servers can connect to data grids using hotrod protocol.
· We can host a cluster of cache servers using JBoss infinispan servers. These servers can form a cluster using “Jgroups” module which part of JBoss inbuilt modules.
4. These jboss cache instances are deployed in a domain, so that they can be managed and configured accordingly.
5. And jgroups use the multicast discovery protocols to find and add related cache instances to a cluster.
6. Each JBoss cache server instance start an individual embedded infinispan instance and form a cluster with rest of the instances.
7. An integrated dashboard is available to check the health and performance of cluster. This dashboard can be used to configure Or fine tune the cache stores installed as part of data grids.
The following diagram depicts the 4 cache server instances On 2 hosts And an inbuilt load balancer and A controller.
Using embedded Jar files
The above described clustered configuration can be achieved by embedded cache application instances. Multiple instances of a simple embedded cache applications are started to form a cluster. These instances use Jgroups to communicate and form a cluster.
This grid can be formed on any application servers independent of JBoss
However, JBoss servers provide an integrated dashboard as part of JBoss admin console. This console will not be available in embedded cache clusters.
ATG Servers to Data grid
ATG Servers communicating to data grid using hotrod protocol (Preferred)
1. ATG App serves use HotRod protocol to communicate with Infinispan data grid as depicted in following diagram
2. This type of communication is essentially powerful if both client and server are JVM based.
3. Here ATG Server can establish a communication with cache grid over HotRod protocol.
Repository Cache ingestion into data grid
ATG Repositories can externalize its caches to Data grids.
1. A complete data refresh can be performed on daily basis/weekly basis by using ATG Scheduler. This activity can be triggered at an off peak time to refresh complete cache data.
2. This is just to maintain consistence across DB and cache grids.
ATG Servers Communicating over REST HTTP
1. Infinispan data grid also exposes REST end points to communicate over HTTP.
2. Here, the client can be in any language. And any client can connect to infinispan data grids over http.
3. This may increase HTTP communication protocol overhead.
4. And also Object serialization and deserialization is an extra activity as part of this communication.
1. Fire a search query to endeca to fetch the relevant product id’s.
2. Get the complete product data from cache grid using product id’s.
3. Aggregate the product data and send it to Search/PLP pages.
The above search result set can be used to display PDP or else we can re-fetch again from cache grid to paint in PDP
It is better to rely on existing database to get the product details.
*Note: JBoss Data Grid is the licensed version of Infinispan Cache Grid.