Hi Hibernate community,
I'm relatively new to Hibernate but I'm facing "non standard" problem. A lot of blogs, books and tutorials speak about Hibernate-Spring-[Insert your Web framework here]. But my concern is a bit different, my web framework can simulate a "connected Mode" with Ajax and Reverse Ajax. Like googleDoc, this allows to build "nearly realtime" application : a user modification on an element is immediately seen by another user.
Like an heavy client in a Client/Server architecture, I'm searching patterns, advices and tips to make use of Hibernate in this situation.
Actually I'm using the classic 3-Tiers pattern : DAO - Service - Presentation, with an open Session in view pattern and some helper classes to perform automatic reassociations.
My first idea is to add a fourth layer between Service and Presentation to make another "Entity" cache shared by all users (actually we have the Hibernate Session cache wich is associated to a single HTTPsession ). The first user which select an element add it in this cache where the second user can retreive the *same* reference so modifications made by the two users will be shared...
I am right ? Where Can I find further informations ? Is there an option to make an application scoped cache instead of session scoped ?
Thanks in advance,
See you soon
|