{"id":2053,"date":"2016-02-10T00:04:13","date_gmt":"2016-02-10T04:04:13","guid":{"rendered":"http:\/\/www.markbaker.ca\/blog\/?p=2053"},"modified":"2016-02-10T00:04:13","modified_gmt":"2016-02-10T04:04:13","slug":"note-on-state-and-self-description","status":"publish","type":"post","link":"http:\/\/www.markbaker.ca\/blog\/2016\/02\/note-on-state-and-self-description\/","title":{"rendered":"Your bidecadal note on state and self-description"},"content":{"rendered":"<em><strong>Tap, Tap<\/strong><\/em>. Is this thing on?\r\n\r\nSo if you&#8217;ve read this blog at all in the past, you know that this topic pops up every so often. That would be because it&#8217;s difficult.\r\n\r\nThe context for this instance of the discussion is a <a href=\"https:\/\/twitter.com\/dret\/status\/696851491190022145\">Twitter thread<\/a> started by Erik\r\n\r\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">let&#39;s say your JSON-LD takes over the world. how does the context URI provider cope\/scale? anybody thinking about non-<a href=\"https:\/\/twitter.com\/hashtag\/HTTP?src=hash&amp;ref_src=twsrc%5Etfw\">#HTTP<\/a> context URIs?<\/p>&mdash; Erik Wilde (@dret) <a href=\"https:\/\/twitter.com\/dret\/status\/696851491190022145?ref_src=twsrc%5Etfw\">February 9, 2016<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\r\n\r\nI argue that what Erik called &#8220;by value&#8221; semantics, violates REST&#8217;s stateless constraint (and therefore self-description, as stateless is a sub-constraint). This is because the constraint is <a href=\"https:\/\/www.ics.uci.edu\/~fielding\/pubs\/dissertation\/rest_arch_style.htm#sec_5_1_3\">defined<\/a> as;\r\n\r\n<blockquote>\r\n[&#8230;] each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server\r\n<\/blockquote>\r\n\r\nAnd this leads us to look at a sample document, a JSON-LD document with an @context declaration as a message, and how we determine what that message means. Using the example from the front of the JSON-LD site;\r\n\r\n<pre>\r\n{\r\n  \"@context\": \"http:\/\/json-ld.org\/contexts\/person.jsonld\",\r\n  \"@id\": \"http:\/\/dbpedia.org\/resource\/John_Lennon\",\r\n  \"name\": \"John Lennon\",\r\n  \"born\": \"1940-10-09\",\r\n  \"spouse\": \"http:\/\/dbpedia.org\/resource\/Cynthia_Lennon\"\r\n}\r\n<\/pre>\r\n\r\n&#8230; sending this to someone is intended to communicate a set of RDF triples, including this one, where the &#8220;name&#8221; string is supposed to expand to the full FOAF name property URI;\r\n\r\n<blockquote>\r\n&lt;http:\/\/dbpedia.org\/resource\/John_Lennon&gt; &lt;http:\/\/xmlns.com\/foaf\/0.1\/name&gt; &#8220;John Lennon&#8221; .\r\n<\/blockquote>\r\n\r\nSo to even &#8220;<em>understand<\/em>&#8221; the request, we need to resolve the @context URI to receive additional information. Therefore, stateful, and also not self-descriptive.\r\n\r\nAnother way to look at this is from an archivist POV. If I store that JSON-LD document away for 10 years, restore it, and try to understand it what it meant, can I? Obviously in this case you&#8217;d need for that resolved document to have not changed in ways which change the meaning of our JSON-LD document. For example, by not re-binding &#8220;name&#8221; to rdfs:label.","protected":false},"excerpt":{"rendered":"Tap, Tap. Is this thing on? So if you&#8217;ve read this blog at all in the past, you know that this topic pops up every so often. That would be because it&#8217;s difficult. The context for this instance of the discussion is a Twitter thread started by Erik let&#39;s say your JSON-LD takes over the [&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-2053","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/2053","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=2053"}],"version-history":[{"count":0,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/2053\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/media?parent=2053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/categories?post=2053"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/tags?post=2053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}