Hi David,

David Keyes wrote:
> It is unclear to me from the OJB documentation whether the default
> distributed caching mechanism in OJB guarantees consistency.  For example,
> if I have cache A and cache B, on separate JVMs, both hitting the same
> database, does OJB guarantee consistency betwixt the two caches (assuming
> that all configuration elements are identical an A and B)?
> 

This is a tough question. OJB uses a cache invalidation mechanism. that 
is if OJB running cache A detects that an object X in A has been updated 
all other caches in the OJB cluster (in this case only B) are informed 
to remove X from to perform a proper sync with the DB on the next access 
to X.

This mechanism is not implemented on the cache level, but is provided by 
methods at our PersistenceBroker kernel level.

This mechanism works as long A can perform a remote call to B. If this 
is not possible (say because of a networking problem) the caches can't 
be synchronized.
So if everything runs normal OJB can guarantee cache consistency. If 
something extraordinary happens (like a broken wiring or hub) OJB cannot 
guarantee anything!

This is true for commercial solutions too !

> I know that JCS does NOT guarantee lateral cache consistency.  Hybernate
> uses JCS, and therefore, since we need cache consistency accros clustered
> environments, Hybernate is out.  

I don't know the Hibernate solution. OJB does provide several cache 
implemenation and also a JCS based one. As mentioned our solution is 
implemented above the cache level. Thus our cache synchronization also 
works with a JCS cache.

> OJB documentation seems to suggest that it
> maintains cache consistency but never specifically states that it can
> guarantee it.

Correct. What kind of guarantee do you expect? If you read the Apache 
license you will find the following part stating the legal situation:

  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.

cheers,
Thomas




> Thanks in advance.
> 
> Dave Keyes
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to