Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7631093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:15:56+00:00 2026-05-31T06:15:56+00:00

I recently replaced many sycnronous db.put calls in an appengine app w/ the async

  • 0

I recently replaced many sycnronous db.put calls in an appengine app w/ the async calls. I don’t need to use this data for the rest of the request, so initially I was just calling the put_async function in a fire-and-forget manner. Then I came across this post on SO:
Appengine: put_async doesn't work (at least in the development server)? , and the response from an app engine engineer saying you have to call wait or get_result on the async object to guarantee it’s written.

So in my testing all the put_async calls were working fine, but I wanted to be sure so I added a global module with a variable that I access across all other modules and store the async ref in every time a call was made to put_async in the app. ie:
APP_GLOBALS.async_db_calls.append( db.put_async( whatever_db_model ) )

Then I registered a shutdown function with atexit that iterates over all the asycn calls for this request and calls wait() on them to guarantee they were written to the datastore.

This works but I noticed an extreme slowdown in performance after this change… Does anybody have any insights on this, or know a better way to go about using the asycncalls for write without having the shutdown function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:15:57+00:00Added an answer on May 31, 2026 at 6:15 am

    The NDB API has features that will greatly assist you with this. However, you will always have to wait for the RPC calls to finish before the request is finished, this is not something you can avoid. Calling the *_async counterparts of the datastore API does not let you do work outside of requests.

    http://code.google.com/appengine/docs/python/ndb/async.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently participated a project that replaced a mainframe system with a web (asp.net
Recently I asked this question: Find Common Values in several arrays, or lists VB.NET
Recently I am having many problem with typedef and incomplete type when I changed
I've recently started to use gRaphael for my graphing needs and am pretty impressed
I need help, I'm new to the WCF world having recently made the transition
I do not know how many faces this problem. If I do programming in
In a project, I recently replaced a simple form-based file upload with SWFUpload. When
Recently, I worked with a paint project. First of all ,I need to select
I was recently asked if I could code a simple IPhone/IPad app that: Checks
It has recently been mentioned to be that our method of inserting data into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.