• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Toplink Caching with load balancing

 
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are using toplink 10.1.3 with Struts 1.1, we recently added a server for load balancing, but i am not sure if toplink caching needs to be turned off, because there are 2 servers which mean there would be 2 instances of toplink cache (!! i am not sure abt this) so if one instance of cache gets updated .. how abt other i am all confused abt this if i am thinking in right direction.
Can some one make it clear if toplink can handle caching even if there are multiple servers for load balancing of should i turn off the caching
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While I can't speak for Toplink for sure, but I expect there are similarities.

But there are two types of caching, the first is at the JPA EntityManager level. This will always be there, no turning this off.

Then there is another cache level that is more where you are at. Most of these caching solutions can work in a cluster (more than one machine) and has algorithms to handle how it copies or not data that changes on one server to get to the others.

Hope this helps clarify a little bit about what caches are there, and know that you aren't the first to have a cluster, and that the second cache providers have solutions that handle clusters.

Mark
 
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are several solutions to caching in a clustered environment in TopLink. The solution you use depends on how often your data is updated, how important performance caching is to you, and how important avoiding stale data is to you.

All TopLink caching options can be configured at the class level, so you can use different caching options for different classes depending on their requirements.

- If caching is not important to you, and avoiding stale data is, then you can turn the cache off, you do this by using an "isolated" cache in your TopLink descriptor.

- If caching is important to you, you can configure a coordinated cache for your cluster. This is configured through "RCM" in your TopLink session, and you can use either JMS, RMI or CORBA.

- Other options include using a cache invalidation policy to expire old data, or using refreshing queries to refresh data as required.
 
Your buns are mine! But you can have this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic