[Developers] Unique timestamps?

Jonathan W. Lowe jlowe at giswebsite.com
Fri Feb 1 16:04:59 UTC 2008


In coding a replication routine between Freebase and a remote database,
I've been relying on the many timestamps associated with topics and
links to order the processes, and have assumed that these timestamps are
unique across all of Freebase.  So far, my routine hasn't encountered
any instances of simultaneous events, but I'd like to turn my assumption
into certainty.

Seems like the answer has to be that all timestamps are forced to be
unique in order to avoid transactional collisions. For instance, there
must be some mechanism, even a random choice, that deals with the
(however unlikely) scenario in which one user tries to adds a link to
one topic at exactly the same instant another user unwittingly attempts
to delete that same topic.  In such a scenario, would Freebase
arbitrarily designate one of these two write queries as the first,
perform its transaction, then evaluate the second write query based in
part on the outcome of the chosen first query?

There must be a clever MQL query that would answer this unique timestamp
question.  If only I were a clever boy.  :(

Thanks,
Jonathan

----------------
Jonathan W. Lowe
Giswebsite LLP
London, UK
http://www.giswebsite.com



More information about the Developers mailing list