FrankWang wrote:
Thanks for quick reply. By "Web Farm", HERE I mean Clustered J2EE containers and mutliple instances of Hibernate are used to do persistence with J2EE containers. I'm kind of confused on how multiple instances of Hibernate synchronize their cache with one another. Also, How stable is the farm? Does it perform well?
"multiple instances of Hibernate" - sounds wrong, as in your understanding sounds wrong, Hibernate is not another service you run on a host to do a job. Its a API library thats behaves more like a transparent layer between application code and database. So it binds tightly with application code more so than any other part of the system.
Hibernate does have a plugable caching mechnism, the implementation maybe clusterable (for example JBoss Cache). Your workload may benifit, or it may not, your application design might need to be modified to a) fix it to work in clustered environments, b) to do things differently to get higher thoughtput, latency, whatever you goal is. YMMV.
AFAIK the only parts of a J2EE architecture in a multi-container environment that affect Hibernate are:
* Transaction Management
* 2nd level cache function
The whole point of a J2EE layer archetecture is that each sub-system level can make garuntees and contracts with the other parts it works with. This means you have to design things a certain way, and use certain patterns, this may not always be how the lazy programmer wants to implement things. But doing so means you get less of a headache when you scale up.
Which means there should be no need to be too confused exactly how every detail works after you have correctly configured, setup and assembled your system(s) piece by piece.
If you really want to know, then many of the clusterable features make use of ethernet broadcast/multicast to communicate, sometimes it happens on port 8823 and sometimes using jumbo frames. Every third wednesday a earth moon earth bounce is tried and if it works the ethernet takes the day off and a wet piece of string is used. I hope my other paragraphs were more helpful at explaining an answer to your broad question than the mumbo jumbo in this one. :-)
I'm sorry I can't help you on the answer you're really asking, my J2EE infrastructure is not so grand :( but its getting bigger. But your questions are somewhat "How long is a piece of string?", I'm pretty sure I've read some case studys on the technology and implementations but I dont have links to hand and in anycase they dont mean a lite with your own projects the only way to getting a proper answer is to implement and test your own workload.
At 210 transactions per second (my last 24hrs average) it works for me. YMMV