I don't use Java at all (too verbose for my tastes) so I may not be of much
help.

You could check to see how these guys are doing it:

http://code.google.com/p/datanucleus-appengine/source/browse/trunk/src/org/datanucleus/store/appengine/jdo/DatastoreJDOPersistenceManager.java

<http://code.google.com/p/datanucleus-appengine/source/browse/trunk/src/org/datanucleus/store/appengine/jdo/DatastoreJDOPersistenceManager.java>Just
look for the phrase "batch put" on that page.. maybe that will mean
something to you. (It could be totally useless.. but I can't tell.)

Though, it seems that Jason (Google) suggested over a year ago that JDO
would do batch putting in the "not-to-distant-future".. and that it was
serially doing the puts (like you noticed) at that time:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/64ae26c53a551055/f846369d2a7cc445?hl=en&lnk=gst&q=%22persisting+a+set+of+entities+using+JDO+or+JPA%22#f846369d2a7cc445

Unless there is some JDO method called "doSpecialGAEJDOBatchPersist()".. or
unless there is a particular way you need to call makePersistentAll() to
have it do a batch.. the Appengine team must have slipped on their
schedule.. over 12 months later is the "perfectly-distant-future" in my
opinion.

Can you show a simplified version of the code you are using to create a few
objects and batch persist them?  Here's a post from Ikai Lan mentioning
offhand that makePersistentAll does batch writes:

http://groups.google.com/group/google-appengine-java/msg/5d6f87bb68dc6962?hl=en

It just seems really odd that makePersistentAll() would still be doing the
puts serially...

Check the datanucleus page above.. their comments suggest that the batch put
method they use should work for new objects.. but not for updates.


On Thu, Sep 30, 2010 at 4:11 PM, Thomas Bean <[email protected]> wrote:

> Eli,
>
> Do you know how you can do batch writes with JDO objects?
>  PersistenceManager.makePersistentAll() just calls makePersistent on each
> object individually so it's not batched.
>
> I also tried calling DatastoreService.put() and passing a list of Entity
> objects.  The Entity objects were created from the Keys of the JDO objects I
> modified.  Calling put() wrote all 5 objects at once, but there was no
> linkage between the Entity and the JDO object.  So it wrote an "empty"
> object to the datastore during put() and wrote the modified JDO object out
> when the PersistenceManager was closed.
>
> Do you know how to make this work besides rewriting the app to not use JDO?
>  :)
>
> Thanks.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to