cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Baldwin <jfbald...@earthlink.net>
Subject Re: lazy loading (slightly OT but still pretty important)
Date Fri, 30 Mar 2012 15:16:26 GMT
OK, I am getting confused as to the subject that we are arguing.  My interest is specifically
with the thesis and conclusion:

>>> Cayenne doesn't care about staleness. ... If data isn't available yet, just load
it - and accept the risk that the application may now be working with partly stale, partly
current data.


My comment (with warning that I have not made rigorous tests), is that if Cayenne is recognizing
data that has been externally changed (i.e. not via Cayenne front door). If it can do this,
then it does seem to have supporting behavior for addressing "staleness". What the details
of that behavior are, I do not know.  It does seem that the behavior is present though.

Am I missing something?
Joe





On Mar 30, 2012, at 9:53 AM, Durchholz, Joachim wrote:

>>> Cayenne doesn't care about staleness. It's the application's
>>> task to ensure that Pojo networks are updated to the current
>>> DB state at the beginning of an application-side transaction.
>>> If data isn't available yet, just load it - and accept the
>>> risk that the application may now be working with partly
>>> stale, partly current data.
>> 
>> Are you sure that this is correct?
> 
> I'm not, I'm just inferring that from the fact that
> a) Cayenne is recreating connections as needed, so it cannot rely on transactional repeatable-read
properties and
> b) assuming that rechecking all cached records for being up-to-date whenever anything
else is loaded or stored.
> 
>> And in the critical data, Cayenne is able to present the
>> DBClient modified data immediately.
> 
> This may be a side effect of having a webapp.
> It might be reloading all data on each request (that's what webapps often do). Or it
might be refreshing all relevant data on each request.
> 
>> For the most part, I have seen that the *default* Cayenne
>> behavior handles the "stale" issue pretty well.  (This is,
>> if changing data directly in the database, and then having
>> Cayenne immediately display it via a webpage is an
>> appropriate black-box test)
> 
> If that works without explicit programming, that would be awesome!
> But how would Cayenne achieve that and still have reasonable performance?


Mime
View raw message