Does RPC object block response until async operations finish?

45 views
Skip to first unread message

keakon lolicon

unread,
Sep 13, 2011, 4:06:28 AM9/13/11
to Google App Engine
Hi Google guys,

I just did a test of async db and memcache operations.
I put or deleted 100 entities and immediately returned.
The async operation call took only 0.01s, the sync one took 0.2s, but both of their total response time in the backend log was over 200ms, and I could also feel the latency was longer than a no-op request.

So I think before the server sending respond to browser, the RPC object will wait its async operations to finish or get error.
Does it mean if I don't care whether the operation is successful (like updating a counter), I can do an async call without waiting it by myself?

----------
keakon

My blog(Chinese): www.keakon.net

Nick Johnson

unread,
Sep 15, 2011, 2:26:12 AM9/15/11
to google-a...@googlegroups.com
Hi Keakon,

Yes, the instance will wait for all pending RPCs to complete before returning the response. Asynchronous RPCs are useful in that they allow you to do other work while the RPC runs.

-Nick Johnson

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



--
Nick Johnson, Developer Programs Engineer, App Engine


keakon lolicon

unread,
Sep 15, 2011, 6:22:33 AM9/15/11
to google-a...@googlegroups.com
Hi Nick,

Thanks for your explain.

----------
keakon

My blog(Chinese): www.keakon.net



Reply all
Reply to author
Forward
0 new messages