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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:47:00+00:00 2026-06-13T13:47:00+00:00

I want to run over this plan I have for achieving strong consistency with

  • 0

I want to run over this plan I have for achieving strong consistency with my GAE structure. Currently, here’s what I have (it’s really simple, I promise):

You have a Class (Class meaning Classroom not a programming “class”) model and an Assignment model and also a User model. Now, a Class has an integer list property called memberIds, which is an indexed list of User ids. A class also has a string list of Assignment ids.

Anytime a new Assignment is created, its respective Class entity is also updated and adds the new Assignment id to its list.

What I want to do is get new Assignments for a user. What I do is query for all Classes where memberId = currentUserId. Each Class I get back has a list of assignment ids. I use those ids to get their respective Assignments by key. After months with this data model, I just realized that I might not get strong consistency with this (for the Class query part).

If user A posts an assignment (which consequently updates ClassA), user B who checks in for new assignments a fraction of a second later might not yet see the updated changes to ClassA (right?).

This is undesired. One solution would be to user ancestor queries, but that is not possible in my case, and entity groups are limited to 1 write per second, and I’m not sure if that’s enough for my case.

So here’s what I figured: anytime a new assignment is posted, we do this:

  • Get the respective Class entity
  • add the assignment id to the Class
  • get the ids of all this Class’s members
  • fetch all users who are members, by keys
  • a User entity has a list of Classes that the user is a member of. (A LocalStructuredProperty, sort of like a dictionary:{“classId” : “242”, “hasNewAssignment” : “Yes”} ). We flag that class as hasNewAssignment =
    YES
  • Now when a user wants to get new assignments, instead of querying for groups that have a new assignment and which I am a member of, I
    check the User objects list of Classes and check which classes have
    new assignments.
  • I retrieve those classes by key (strongly consistent so far, right?)
  • I check the assignments list of the classes and I retrieve all assignments by key.

So throughout this process, I’ve never queried. All results should be strongly consistent, right? Is this a good solution? Am I overcomplicating things? Are my read/write costs skyrocketing with this? What do you think?

  • 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-13T13:47:02+00:00Added an answer on June 13, 2026 at 1:47 pm

    Queries are not strongly consistent. Gets are strongly consistent.

    I think you did the right thing:

    1. Your access is strongly consistent.
    2. Your reads will be cheaper: one get is half cheaper as then query that returns one entity.
    3. You writes will be more expensive: you also need to update all User entities.

    So the cost depends on your usage pattern: how many assignment reads do you have vs new assignment creation.

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

Sidebar

Related Questions

I have written php program and uploaded on server. I want run this program
I have started a bounty for this question ...because I really want the community's
I want to automate a fairly simple task. For this I have written a
I have a list of regular expressions I want to run over a single
I have a sprite and i want run some animations, but over the sprite
Why this code don't work,when i want run this code vwd 2008 express show
Want to run javascript function from parent window in child window Example I have
I want to run this on my table: ALTER TABLE table_name MODIFY col_name VARCHAR(255)
I want to run a query over a table in SQL Server to save
I run over Items collection and want to build TextBox but I get the

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.