{"id":376,"date":"2004-05-18T21:14:00","date_gmt":"2004-05-19T01:14:00","guid":{"rendered":"http:\/\/www.markbaker.ca\/wp\/?p=370"},"modified":"2004-05-18T21:14:00","modified_gmt":"2004-05-19T01:14:00","slug":"processthis-and-other-uniform-semantics","status":"publish","type":"post","link":"http:\/\/www.markbaker.ca\/blog\/2004\/05\/processthis-and-other-uniform-semantics\/","title":{"rendered":"&#34;processThis&#34; and other uniform semantics"},"content":{"rendered":"<p>Savas posted a good\n<a href=\"http:\/\/savas.parastatidis.name\/2004\/05\/13\/77a477d7-73b3-4136-8e8b-83e4397d9aed.aspx\">state-of-the-conversation post<\/a> upon his return,\nso I&#8217;ll respond to it.  I still hope to respond to his\n<a href=\"http:\/\/savas.parastatidis.name\/2004\/04\/29\/54ae8b22-2911-4b92-bf8c-b4293f1441f2.aspx\">earlier response to a question of mine<\/a>,\nin what will likely end up being a mini treatise on state and\nstate references.  But that&#8217;ll have to wait.<\/p>\n\n<blockquote>\nI am now thinking that it is time to explore whether it would be possible to take the &#8220;processThis&#8221; idea to a next level. First, we really need to change the name; perhaps something like &#8220;processDocument&#8221; or &#8220;processMessage&#8221;; I like the latter better.\n<\/blockquote>\n\n<p>I could live with either, but I&#8217;d prefer &#8220;processDocument&#8221; since it&#8217;s\nmore specific.  &#8220;processMessage&#8221; could include the processing of a document\n(i.e. a chunk of state), or the processing of an explicit request for some\naction to occur.  To my mind, &#8220;processDocument&#8221; suggests the former, which\nis what we all seem to want; state transfer.<\/p>\n\n<blockquote>\nThen, we need to demonstrate that we are not that far really from REST and, in fact, the REST approach can be seen as a subset of our model where the protocol verbs are effectively modelled as a submission of documents to the &#8220;processMessage&#8221; abstract operation.\n<\/blockquote>\n\n<p>Yes, you really aren&#8217;t very far from REST.  Your architectural style\n<em>seems<\/em> to be state transfer based, which is awesome.  I say &#8220;seems&#8221;,\nbecause Jim&#8217;s response to Matt Garland&#8217;s\n<a href=\"http:\/\/www.geekaboo.net\/blog\/archives\/2004\/04\/26\/6\">suggestion for\nhow queries should be done<\/a> suggested that he supported a non-state-transfer\napproach to querying.  Which brings us to &#8230;<\/p>\n\n<blockquote>\nThis last observation answers Mark&#8217;s point about the semantics of GET in this post. The semantics of GET can be captured through an appropriate SOAP message. An HTTP request-response pattern can also be described as a message exchange pattern in which the receiver of the request will send a message to the &#8220;processMessage&#8221; operation of the sender.\n<\/blockquote>\n\n<p>I think this is an absolutely critical point to the understanding of REST,\nor at least how it relates to the style you promote.  But I think you&#8217;ve got it\nwrong there Savas, on two counts.<\/p>\n\n<p>Second point first; I think the comparison between HTTP request\/response and\n&#8220;processMessage&#8221; is incorrect; the comparison should be between HTTP POST and\n&#8220;processMessage&#8221;.  That is, if you take away all the HTTP operations except POST, what\nyou&#8217;ve got remaining is an application protocol with a single explicit (though it\ncould just as well be implicit) operation which is semantically identical to a\nstate-transfer semantic, which I understand processWhatever to be.<\/p>\n\n<p>Second, though related, I&#8217;m certain that query semantics cannot be captured\nby an &#8220;appropriate SOAP message&#8221;.  Consider that for any SOAP query document you\ncan construct, I can present a SOAP service which simply adds that document to a\nqueue (just as an example), and returns a success bit (e.g. an HTTP 204 message) with\nno other information.  What this means then, is that a service which does respond to\nthe query, is actually presenting a different abstraction than the one which places\nit in the queue.  In other words, the query service isn&#8217;t using &#8220;processMessage&#8221;\nsemantics.  To query, you need a query semantic.  And if you&#8217;ve got a uniform\ndocument submission semantic in processMessage, then why not a uniform query\nsemantic?  In my view, that should be the &#8220;next level&#8221; we take; it need not be\nfull REST, of course, just an, IMO, superior style than what&#8217;s there now.<\/p>\n\n<p>I&#8217;ll leave it at that for now, I think.  The state issue needs to be\naddressed as I mentioned, but I think it can be decoupled from this argument.<\/p>\n\n<p>P.S. enough of the love-in, ok guys?  I&#8217;ve got a rep to maintain. 8-)<\/p>","protected":false},"excerpt":{"rendered":"Savas posted a good state-of-the-conversation post upon his return, so I&#8217;ll respond to it. I still hope to respond to his earlier response to a question of mine, in what will likely end up being a mini treatise on state and state references. But that&#8217;ll have to wait. I am now thinking that it is [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26],"class_list":["post-376","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-soap"],"_links":{"self":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/376","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=376"}],"version-history":[{"count":0,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/376\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/media?parent=376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/categories?post=376"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.markbaker.ca\/blog\/wp-json\/wp\/v2\/tags?post=376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}