From: Gavin K. <Gav...@ex...> - 2002-12-05 02:36:16
|
> 2) What was the process by which Gavin gained sufficient=20 > confidence in JCS to include it in Hibernate? Christian Muenier has done quite a lot of research and testing with JCS and it was him who recommended use of JCS in Hibernate. He has implied to me (privately) that he does not fully trust JCS distributed caching. > 3) Why does Gavin indicate that JCS can't be used in a=20 > clustered read-write environment, in contradiction to the JCS=20 > documentation? Firstly, please understand that Hibernate is geared towards highly transactional systems and is very very fussy about ensuring that transaction isolation is always preserved. JCS distributed caching was not designed with this kind of usage in mind. Secondly, to support that kind of strict transaction isolation, Hibernate sits some metadata in on top of the cached object. The way this is done is *not* safe for use with a distributed cache. Now, I fully understand that not all applications require this=20 level of transaction isolation and it sounds like your application=20 is one of those. Its quite easy to add a new caching strategy that=20 implements read-write caching with weaker isolation semantics. (This should not take much development effort on your part.) =20 > 4) If we were able to commit to using Hibernate in a=20 > read-only fashion and doing our data writing some other way,=20 > changing the data out from under Hibernate, which various=20 > legacy admin tools will do anyway, does this change the=20 > preference profile between Hibernate's session-level cache=20 > vs. JCS? If so, how? Oh...nothing so extreme as that! All you would need is two session factories, one with no cache, one with a read-only cache (and a sufficiently short timeout) ... you don't need To scrap Hibernate all together! But the correct solution is simply to add a new implementation of=20 CacheConcurrencyStrategy. > The bottom line, quite frankly, is that we're nervous about=20 > relying on JCS in the absence of some reassurances about its=20 > maturity and use in the real world, as JCS is clearly=20 > attempting to solve difficult engineering issues, and this=20 Hibernate has a pluggable caching architecture, though that's not currently exposed to the user. If this is a critical issue for you, you should probably spend a little while investigating other cache implementations. It would *not* be difficult to plug them into Hibernate. Gavin ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |