Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>dan wilkerson, simon goldsmith, et al. designed a thorough <a href="http://arxiv.org/abs/1106.3325" rel="nofollow">global transaction system</a> on top of app engine's local (per entity group) transactions. at a high level, it uses techniques similar to the GUID one you describe. dan dealt with "submarine writes," ie the transactions you describe that report failure but later surface as succeeded, as well as many other theoretical and practical details of the datastore. erick armbrust implemented dan's design in <a href="http://code.google.com/p/tapioca-orm/" rel="nofollow">tapioca-orm</a>.</p> <p>i don't necessarily recommend that you implement his design or use tapioca-orm, but you'd definitely be interested in the research.</p> <p>in response to your questions: plenty of people implement GAE apps that use the datastore without idempotency. it's only important when you need transactions with certain kinds of guarantees like the ones you describe. it's definitely important to understand when you do need them, but you often don't.</p> <p>the datastore is implemented on top of megastore, which is described in depth <a href="http://research.google.com/pubs/pub36971.html" rel="nofollow">in this paper</a>. in short, it uses <a href="http://en.wikipedia.org/wiki/Multiversion_concurrency_control" rel="nofollow">multi-version concurrency control</a> within each entity group and <a href="http://en.wikipedia.org/wiki/Paxos_%28computer_science%29" rel="nofollow">Paxos</a> for replication across datacenters, both of which can contribute to submarine writes. i don't know if there are public numbers on submarine write frequency in the datastore, but if there are, searches with these terms and on the datastore mailing lists should find them.</p> <p>amazon's S3 isn't really a comparable system; it's more of a CDN than a distributed database. amazon's SimpleDB is comparable. it originally only provided <a href="http://aws.amazon.com/simpledb/#eventually-consistent" rel="nofollow">eventual consistency</a>, and eventually added a very limited kind of transactions they call <a href="http://aws.amazon.com/simpledb/#consistent" rel="nofollow">conditional writes</a>, but it doesn't have true transactions. other NoSQL databases (redis, mongo, couchdb, etc.) have different variations on transactions and consistency.</p> <p>basically, there's always a tradeoff in distributed databases between scale, transaction breadth, and strength of consistency guarantees. this is best known by eric brewer's <a href="http://en.wikipedia.org/wiki/CAP_theorem" rel="nofollow">CAP theorem</a>, which says the three axes of the tradeoff are consistency, availability, and partition tolerance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload