Re: AW: Enterprise using WO

"Andrus Adamchik" <[email protected]>
Newsgroups gmane.comp.web.webobjects.general
Message-ID <[email protected]>
Hi there!

Pirmin Braun wrote:
> You need 20000 records to produce the response? This must either be a
> very large response or it is something computed.

Or it triggers an event across more than one VM, not all of them are
servlet container (but some are).

> I wouldn't design an
> interactive application to process 20000 records on each mouseclick.
> Rather I'd present results, that are computed every minute or so by an
> instance running in batch mode.

Now multiply this by a few hundred thousands of users in the system, every
one needing her own unique (though intersecting) data set, and also by a
dozen VMs. Believe me the system was rather pragmatic a well designed. It
would use an occasional stored procedure of offline batch processing when
it was possible. But this is just one example...

> The so much feared "trip to the database" isn't that long as
> it used to be when EOF was invented. The cacheing of EOF isn't needed
> any more. We haven't experienced any performance drawback from kicking
> out the whole EOF stuff. Instead live has become more pleasant without
> uniqing and cacheing. Maybe because our software is database centric in
> the first place and not so much OO.

Good luck!

What you are suggesting here I would call a "naive ORM" approach. "Naive"
is not meant as an offense, this is just the right word for it. In fact I
do use it myself whenever I can.

What I disagree with is that the fact that this simplifies and speeds up a
certain class of applications somehow implies that it can be used as a
generic ORM solution. (Unless ALL your application logic is implemented as
stored procedures at the db level, but this is a totally different story
and has nothing to do with this discussion).

So here is another story...

Being burnt by EOF synchronizatons issues in the past, I designed Cayenne
1.0 with a similar approach in mind (less or no cache in the Java layer).
All was nice and clean, any cached data was grabage collected when each
session timed out, sessions across VMs behaved the same way as sessions
within the same VM. Win-win solution, right?

Wrong. Once Cayenne started gaining wider acceptance and people started
implementing real multiuser applications with it, I quickly got a bunch of
complaints about stale data ... Thing were even worse than EOF, as stale
data problems would emerge even when you deloy on a single VM. I got tired
from telling people "just refetch your data". This just wasn't practical.

So we hand no choice but to move from "naive ORM" to "real ORM" in Cayenne
1.1. Now Cayenne allows three levels of caching - "naive", "single vm" and
"cross vm". All three are configurable via CayenneModeler GUI - a nice
twist compared to EOF -
http://objectstyle.org/cayenne/userguide/design/caching.html



Andrus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.