Since Toplink Essentials does not support distributed caching, it will be problematic in a clustered environment. Am I right? Potentially you will get stale data out of the cache in some nodes in the cluster.
Does this mean Toplink Essentials is not ready for clustered deployment?
I heard that EclipseLink does support distributed caching through cache coordination. Can somebody please confirm?
Another issue that I'm trying to figure out is that: does toplink put java entities into the shared server cache and hands out references to client session? If it is true, it is different from the L2 cache in Hibernate. Hibernate's L2 cache holds so called "dehydrated" data. Copies of the data are handed out of the L2 cache and reconstructed into entities, which got passed into sessions.
I did some benchmarking in which a servlet simply calls a stateless session bean. The service bean simply reads some entities from DB, creates some new entities and then delete them. JMeter shows that Toplink Essentials outperforms Hibernate based JPA by a wide margin. I'm sure that Toplink's shared cache plays a large role into this. By default Hibernate does not have a L2 cache, which in essence corresponds to Toplink's shared server cache.
It seems that Toplink treats its shared server cache as a first class citizen while Hibernate treats L1 cache as first class and L2 second. This might explain why Toplink performs better, especially for read most data.
I've been using Hibernate for last 3 years. It is a great tool! But I'm now ready to give Toplink a try if it is indeed more performant.
I want something that guaranttee data consistency but also perform well. I feel that Hibernate's transaction based session design offers the former but its lack of tight integration with a L2 cache leads to suboptimal performance when compared to Toplink.
Any comments?
|