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

  • SEARCH
  • Home
  • 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 564363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:45:30+00:00 2026-05-13T12:45:30+00:00

I’ve built something on Google App Engine that acts as a backend for an

  • 0

I’ve built something on Google App Engine that acts as a backend for an iPhone app. In the app, there are interactions that are pushed out to social networks via their APIs. So the typical workflow is like this:

  1. User uses the iPhone app to do “something”
  2. App Engine app is alerted via HTTP
  3. App Engine alerts social network that user did “something.” If the user were to check their profile on that network, their activity via the app would be displayed. So, as far as the user is concerned, what they did probably worked.
  4. App Engine needs to do some persistence on its own, but when it tries, a DatastoreTimeException is thrown. And now the data is in a funky state.

So what’s a good way to handle this? By nature of the problem I’d love to wrap it in a “transaction”, but there’s no way to roll back what got sent to the Social Network. So, I’m thinking more along the lines of how do you handle a DatastoreTimeException? Should I just wrap it in a try block and give it another go? Is it a better idea to show the user an error, and then when they try again, “skip” the social network interaction so that it isn’t pushed out twice? Is there another idea that I’m not thinking of here?

  • 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-13T12:45:31+00:00Added an answer on May 13, 2026 at 12:45 pm

    http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/DatastoreTimeoutException.html

    “This can happen when you attempt to put, get, or delete too many entities or an entity with too many properties, or if the datastore is overloaded or having trouble.”

    If you’re seeing the exception frequently, I expect it’s because the datastore operation is too big, so retrying isn’t really going to help. If you’re just coding defensively against the risk that the exception might be thrown, then you could try it again (perhaps by queueing a task that will do so. But if you can’t hit datastore, who’s to say you can queue a task?)

    If you want to be bulletproof robust, and you can ensure that the operation you perform on the social network is idempotent (can be repeated), then:

    • Make a note to yourself that you need to perform the social network operation.
    • If the note failed to store, abort and return failure.
    • Otherwise, attempt the social network operation.
    • If successful, remove the note.
    • Have some kind of task or loop to retry any remaining notes in future.

    Of course you have to be a bit cautious about the response code you give back to the iPhone client, since success can take a long time – longer than the duration of the request made by the iPhone app. So you want your app engine request to be idempotent too, and you probably want some kind of cancel.

    If all you get from the social network is success or failure, and if successful the operation must not be repeated, then you’re in trouble. That’s a rubbish API to offer on the web, since just because a web server sends you a successful response doesn’t mean you received it, so there is sometimes no way for the caller to know that they’ve succeeded even though success creates responsibilities. But it happens.

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

Sidebar

Ask A Question

Stats

  • Questions 493k
  • Answers 493k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Since you're bypassing your hibernate altogether, you have to implement/configure… May 16, 2026 at 10:51 am
  • Editorial Team
    Editorial Team added an answer It seems when working Locally, LightSwitch uses SQL Server Express.… May 16, 2026 at 10:51 am
  • Editorial Team
    Editorial Team added an answer From Python 3.0 on all strings are unicode by default,… May 16, 2026 at 10:51 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti

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.