Managing EOF caching
Managing EOF caching
- Subject: Managing EOF caching
- From: Dave Rathnow <email@hidden>
- Date: Tue, 17 Jan 2006 10:07:41 -0700
Title: Managing EOF caching
We have an application that processes well data that is reported at regular and irregular
reporting periods. The bulk of the data arrives in the morning within a two hour window. The
application is headless, that is, it has no UI.
When we first wrote the program we were having problems with running out of memory and
the simplest solution we found was to periodically dispose of the editing context and then
nuke all snapshots from the EODatabase object. This solved the memory problems but of
course we lost the advantage of any EOF caching. Unfortunately, we are now at a point where
we are falling too far behind during busy periods so we have to revisit the problem and find
a better solution.
This application is one part of a bigger system and it's primary job is to process incoming data
according to a set of business rule. The processing involves fectching object from the DB and
creating other objects that are then stored in the DB and consumed by other applications in the
system. Most of the fetched objects should stay in memory since they will likely be used in the
future to process data from the same location. Other objects could probably be nuked after a
period of time. The newly created objects are not required and could be released as soon as they
are saved to the DB.
I've been playing around with different optimization strategies including batch fetching but the one
that seems to work the best is to save all inserted objects in my EC before I call saveChanges and
then nuke the snapshots from the EODatabase after the saveChanges has finished. My overall memory
requirements have increased but they seem to level out at an acceptable level.
So here are my question:
1. Does anyone have some ideas how to handle this type of caching requirements? Is there
another/better approach or different solution?
2. Assuming what I'm doing is an acceptable approach, can I control how long objects are cached
by EOF and what objects are cached?
3. Does nuking snapshots in the way I'm doing it have an bad side effects.
Thanks,
Dave.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden