Saving using now() and not

35 views
Skip to first unread message

Eurig Jones

unread,
Apr 29, 2013, 2:39:03 PM4/29/13
to objectify...@googlegroups.com
Hey,

I'm using a TaskQueue to save about a 100 entities per task.

Currently using the now() method to do this. If I were to asynchronously save without now() to speed up the process, what would happen exactly if there was a problem with persisting?

Thanks

Mat Jaggard

unread,
Apr 29, 2013, 5:26:08 PM4/29/13
to objectify...@googlegroups.com

If you don't do the now() it's done by GAE at the end of the request. So the speed is no different for requests that only do one save or that send all the requests first and then do the now() on all the Future's.

--
You received this message because you are subscribed to the Google Groups "objectify-appengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appen...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Eurig Jones

unread,
Apr 30, 2013, 1:10:53 AM4/30/13
to objectify...@googlegroups.com
Ok. I thought it was done asynchronously on another thread. So it's still done synchronously, but just at the end of a request.

The documentation states that it is done asynchronously so I was thinking it would be done on another thread.

Thanks


On Tuesday, 30 April 2013 00:26:08 UTC+3, Mat Jaggard wrote:

If you don't do the now() it's done by GAE at the end of the request. So the speed is no different for requests that only do one save or that send all the requests first and then do the now() on all the Future's.

Hey,

I'm using a TaskQueue to save about a 100 entities per task.

Currently using the now() method to do this. If I were to asynchronously save without now() to speed up the process, what would happen exactly if there was a problem with persisting?

Thanks

--
You received this message because you are subscribed to the Google Groups "objectify-appengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appengine+unsub...@googlegroups.com.

Jeff Schnitzer

unread,
Apr 30, 2013, 2:35:22 AM4/30/13
to objectify...@googlegroups.com
For all we know, it might be done on another thread. It's either that or the RPC uses NIO. The implementation is hidden behind the ApiProxy and not known outside of google.

Nevertheless, all async operations are completed at the end of a request. Furthermore, all async datastore operations started in a transaction are completed at the end of that transaction.

Jeff


To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appen...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages