cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durchholz, Joachim" <Joachim.Durchh...@hennig-fahrzeugteile.de>
Subject RE: lazy loading (slightly OT but still pretty important)
Date Fri, 30 Mar 2012 13:53:08 GMT
>> 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