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 8929987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:47:14+00:00 2026-06-15T08:47:14+00:00

When retrieving rows from a Google AppEngine’s datastore, we would like to implement retrieval

  • 0

When retrieving rows from a Google AppEngine’s datastore, we would like to implement retrieval of all data of an entity type, with several, simultaneous, processes. The processes run asynchronously in back-end Python servers. The point would be to have each process retrieve a “chunk” of the whole data set, so that we can nearly-evenly distribute the load across all of them, like this:

    |_____|_____|_____|_____|_____|_____|_____|.....|_____|_____|
       p1   p2    p3     p4    p5    p6    p7         pk-1   pk

Where each pn is a process and all the entities are retrieved.

I think the way to enable this is to somehow say something like this (in Python):

chunk_size = num_entities / num_chunks
base_query = 'select * from entity offset %d limit %d'

for chunk in range(0, to = num_entities, step_by = chunk_size):

    cursor = get_cursor(base_query, offset = chunk, limit = chunk_size)

    while is_ready(cursor):
        do_task_with_data(cursor.next())

Where get_cursor would get a cursor from AppEngine which scrolls from results starting from the given offset. I am only including the limit argument here in case it helps, but it could also be enforced inside the while loop, for example. In any case, we would hopefully like to get a situation where queries are not O(n) with limit and offset (i.e. the last queries have to scroll through nearly all the data before fetching data).

Another option might be distributing entities based on some random value (which we do have), using a range of 0 -> 1 divided into chunk_num chunks.

It might even be possible to somehow get a data dump out of App Engine and then work on that (although due to size it would not be our first choice).

What would be a good way to achieve this? Is there a better way to solve this problem? Any ideas on this would be really appreciated.

  • 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-06-15T08:47:15+00:00Added an answer on June 15, 2026 at 8:47 am

    I think you’re pretty much describing what the mapreduce framework does.

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

Sidebar

Related Questions

I'm trying to declare an enum type based on data that I'm retrieving from
I am retrieving data from table but instead of all row, I want 20
I'm retrieving data from a MySQL table and displaying it on a webpage using
I'm writing a search engine in C#, retrieving rows from a SQL database. I'd
The problem is like this: I am retrieving latitude and longitude from a point
Which is the better way of retrieving multiple rows? select * from order_details where
I am retrieving rows from SQLite table, then dynamically creating an object, and then
testQuery() is the method I use to get all rows from table CATEGORIES public
I am retrieving data from a SQL table so I can display the result
In my php code, I am retrieving rows from a mySQL db and saving

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.