Google AppEngine server instance clock synchronization -


i came across following paragraph in appengine documentation query cursors:

an interesting application of cursors monitor entities unseen changes. if app sets timestamp property current date , time every time entity changes, app can use query sorted timestamp property, ascending, datastore cursor check when entities moved end of result list. if entity's timestamp updated, query cursor returns updated entity. if no entities updated since last time query performed, no results returned, , cursor not move.

for work reliably, there have sort of guarantees clock synchronization across different server instances. otherwise following scenario:

  1. server instance 1 (fast clock) saves update time-stamp 1000.
  2. client asks updates , finds 1 update.
  3. server instance 2 (slow clock) saves update time-stamp 950.
  4. client asks updates , not find update time-stamp didn't increase.

as far understood, there never such clock synchronization guarantees. did change???

update:

i realized if clocks sync'ed perfectly, approach might miss results due eventual consistency of queries. if later update ends getting committed before earlier update , makes simultaneous query while earlier 1 doesn't, hide earlier update. or missing something?

the docs found on clock , google cloud platform, here , here. according first link post, instances synced using ntp service, , it's done you.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -