users@glassfish.java.net

Re: Is Toplink Essentials caching good for clustered environments?

From: <glassfish_at_javadesktop.org>
Date: Sat, 13 Dec 2008 01:02:27 PST

A word to your benchmarks that show that Toplink outperforms Hibernate. You should really cautious with such benchmarks, often you just check how the default settings match your benchmark. I tried the same and got 30% faster Hibernate. That doesn't mean anything!

Check the parameters you can set. Cache sizes are very important, defaults are very important, too. It makes a big difference if you use optimistic or pessimistic locking. For Hibernate it makes a big difference which cache implementation you use...

For your cluster case, you might be ok with optimistic locking. This at least throws an exception if you want to modify a stale entity. It depends on your application if you can go with that, it's very fast and scales well. I would really check if I need a cluster if you have a common set of data used by all sessions. A cluster has the problem to distribute changes which usually costs lots of performance and adds network latency to every transaction. If you try to go the generic way, a solution that works in any case you probably notice that it is slow and doesn't scale very well.

I don't know about EclipseLink but the choice between Toplink and Hibernate I would prefer Hibernate. After some usage of Hibernate you might notice that it goes beyond the JPA, it has features which really make sense for OR mapping to a relational DB. It is mature!
[Message sent by forum member 'pinus' (pinus)]

http://forums.java.net/jive/thread.jspa?messageID=321564