I am new to Infinispan and am trying to figure out if we can use this technology in our particular use case below. Any hints or help would be very much appreciated.
Our use case is a currrent JBoss/JPA(Hibernate with EHCache for 2nd level caching) based application with an RDBMS as SoR. The 2nd level cache is currently used for read-only configuration data and is local only in a clustered environment. As part of updating to JBoss AS 6 the plan was to switch to Infinispan as 2nd level cache and to use replicated cache with invalidation for some read-mostly data.
For performance issues we also need to handle caching of potentially large data sets that can be frequently updated (mostly trade related data). For this last part we could use 2nd level cache and query caching, but we are considering moving caching of these outside JPA 2nd level caching. These caches could be loaded with current active data (subset) from the DB at a session start and would either be the SoR for these data intra-session or need to be synchronized with updates via JPA during the session. We don't need to worry about updates to the data outside (directly in DB or other applications).
The thought is to have a separate replicated cache with possibly different keys/grouping than the entities and that can be queried intra-session without hitting the DB. I guess it could either be in the same VM as JBoss or dedicated VM outside. I have been trying to read a bit in the Infinispan documentation but I can't figure out the best way to solve this in a reliable and efficient way without affecting too much of the existing code and DB structure. I will be playing a little bit with Infinispan, but would appreciate if anyone could give me some hints if you have been thinking about the same use case. Things that I am a bit confused about is the usage of the "remote second level cache" in this case, and also about how to handle synchronization with the DB (through JPA) in case the cache is the SoR intra-session (will I for instance have to write a new Cache Loader/Store?).