Re: high-volume offline processing using cayenne?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Mar 02 2003 - 11:27:35 EST

  • Next message: Nanik Tolaram: "Re: Simple question"

    Hi Arndt,

    You might want to start posting to cayenne-devel mailing list instead of
    cayenne-user. The discussion we are having here is way beyond Cayenne
    User Guide ;-).

    Arndt Brenschede wrote:

    > Ok, for the prefetching I tried the idea of explicitly calling
    > a method to tell what I want to prefetch. I put these
    > 2 methods (for the toMany and the toOne) in a class
    > PrefetchHelper (->see attachment).
    >
    > PrefetchHelper.resolveToOneRelations(
    > DataContext context,
    > List objects,
    > String relName
    > );
    >
    > PrefetchHelper.resolveToManyRelations(
    > DataContext context,
    > List objects,
    > String relName
    > );

    Interesting that I used a very similar custom code on one of my
    projects. The fact that two people independently came to the same idea
    clearly indicates that our base prefetching API needs some more work.
    BTW, Craig, who is currently working on fixing prefetching bugs posted a
    comment to your message on Cayenne-devel, suggesting to add these
    methods to Cayenne (which we will most likely do soon):

        http://objectstyle.org/cayenne/lists/cayenne-devel/2003/03/0003.html

    > For keeping track of the objets in the context
    > I now tried the simpler solution of putting a
    > second map into ObjectStore. (->see patch)
    > The 2 Methods:
    >
    > - ObjectStore.startTrackingNewObjects();
    > - ObjectStore.unregisterNewObjects();
    >
    > Can be used to start filling this map
    > and to unregister the objects
    > (and the snapshots! see the bug-report...)
    > collected.

    Need to look at this some more to see where this fits in Cayenne.

    > With these 2 patches I get a streamlined
    > processing pipe with a throughput of many
    > objects per millisecond, which then is no
    > longer database-bounded, but limited by
    > the Java-Processing.

    Very cool. I am glad this worked out so well.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Mar 02 2003 - 11:29:03 EST