{"id":103,"date":"2003-03-10T02:02:00","date_gmt":"2003-03-10T06:02:00","guid":{"rendered":"http:\/\/www.markbaker.ca\/wp\/?p=210"},"modified":"2003-03-10T02:02:00","modified_gmt":"2003-03-10T06:02:00","slug":"sam-tongue-in-cheek-on-concurrency","status":"publish","type":"post","link":"http:\/\/www.markbaker.ca\/blog\/2003\/03\/sam-tongue-in-cheek-on-concurrency\/","title":{"rendered":"Sam tongue-in-cheek on concurrency"},"content":{"rendered":"<p>A <a href=\"http:\/\/www.intertwingly.net\/blog\/1255.html\">funny addendum from Sam<\/a> on\nthe topic of concurrent updates with REST;<\/p>\n\n<blockquote>\n<p>Obviously, Clemens hasn&#8217;t heard about the\n<a href=\"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html#sec14.21\">expires<\/a>\nheader.  All you have to do is predict with 100% accuracy when the next POST or DELETE request is going to come in, and all caches will remain perfectly in synch.<\/p>\n<p>It is just a <a href=\"http:\/\/info.astrian.net\/jargon\/terms\/s\/SMOP.html\">SMOP<\/a>.<\/p>\n<\/blockquote>\n\n<p>Heh, exactly.  Some might call this a bug, I call it a feature.  There is no\nrequirement in REST that all layers have a consistent view of the state of a\nresource, as to do so would be to reduce scalability.  It&#8217;s basically just\nrecognizing that perfect data consistency in the face of latency and trust\nboundaries, is impossible.  The best one can do (addendum; well close to it) is to make explicit, at the\ntime the representation is transferred, the <em>expectations<\/em> about the\ndurability of the data.  As I mentioned previously, architectural styles that\ntransfer serialized objects (the whole object, not just the state) can address\nthe issue of latency, by moving the encapsulating code along with the data.  But\nthis is done at the cost of visibility, which means that it likely won&#8217;t cross\ntrust boundaries.<\/p>","protected":false},"excerpt":{"rendered":"A funny addendum from Sam on the topic of concurrent updates with REST; Obviously, Clemens hasn&#8217;t heard about the expires header. All you have to do is predict with 100% accuracy when the next POST or DELETE request is going to come in, and all caches will remain perfectly in synch. It is just a [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-103","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/comments?post=103"}],"version-history":[{"count":0,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/103\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/media?parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/categories?post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/tags?post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}