For the wizard, using an entity group will give you strong consistency. Use
ancestor query or plain old fetch (get) by key to get strongly consistent
results.

In general, query public data using regular (eventually consistent) queries.
Merge in the user's own, just committed, data.

Most of the time you're probably only dealing with 100s of milliseconds or a
few seconds.

Fred on my Android.
On Sep 3, 2011 2:47 AM, "NM" <nirmallya.mukher...@gmail.com> wrote:
> In case of a wizard based interface with multiple steps where users
> provide data at every step we have to ensure that we work off session
> data. By and large we can conclude that the following design in the
> application will help alleviate the eventual read consistency scenario
> in HR which is not a problem in M/S.
> 1. If the appointment (or any object) is created/updated in step 1 it
> also needs to go in the user session (I am a Java developer)
> 2. Step 2 gets the appointments (or any object collection) from the
> data store and checks if the object created in step 1 is present. If
> not add it in the collection manually
> 3. Pass it on to the JSP for display
>
> We have to live with the fact that all appointments will not show if
> the calendar is global where appointments created by multiple users
> need to be displayed.
>
> I was also wondering if Bigtable/Datanucleus can let the program know
> the newly generated PK like a traditional relational database. If we
> can get the PK then the process of checking the collection becomes
> simple in addition to other benefits of knowing the PK after insert.
>
> Finally how much latency are we really talking about between the last
> write and the consistent read?
>
> On Sep 2, 10:11 pm, Fred Sauer <fre...@google.com> wrote:
>> On Fri, Sep 2, 2011 at 12:18 AM, NM <nirmallya.mukher...@gmail.com>
wrote:
>> > Here is a usecase that may support M/S over HRD.
>>
>> > I have a form where we capture appointment information such as date,
time
>> > and some other details. Upon a successful save the resulting page is a
>> > calendar view that needs to read all appointments including this newly
>> > created appointment.
>>
>> > Given this and eventual consistency mode of HRD the calendar at times
does
>> > not show the newly saved appointment. When I refresh the screen after a
few
>> > seconds it does; obviously by then the data would have replicated. This
is
>> > obviously not an issue with M/S.
>>
>> > Thoughts?
>>
>> The calendar times you are querying are all for one user, you could put
the
>> calendar entities in a single entity group and then use an ancestor
query,
>> which will return consistent results.
>>
>> If you need to query across entity groups, but still want the calendar
entry
>> you just saved to be included in the results, then the recommended
approach
>> is:
>> - Perform your cross entity group query in the normal way
>> - In your application code, insert the just inserted entity into the
result
>> set if it's not there
>> - Show the user the merged result set
>>
>> You can store away or track the "just inserted calender entity" in a
cookie,
>> in a url / form parameter, in memcache, or in an HTTP session object
(Java).
>>
>> Fred
>>
>> >  --
>> > You received this message because you are subscribed to the Google
Groups
>> > "Google App Engine" group.
>> > To view this discussion on the web visit
>> >https://groups.google.com/d/msg/google-appengine/-/lC6R_999_vQJ.
>>
>> > To post to this group, send email to google-appengine@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-appengine+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/google-appengine?hl=en.
>>
>> --
>> Fred Sauer
>> Developer Advocate
>> Google Inc.
>> 1600 Amphitheatre Parkway
>> Mountain View, CA 94043
>> fre...@google.com
>
> --
> 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-appengine@googlegroups.com.
> To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.
>

-- 
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-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to