<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-11628709</id><updated>2012-02-18T03:55:36.705-05:00</updated><title type='text'>Chuck Hinson</title><subtitle type='html'>Observations, questions and musings related to my life in the software industry.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11628709.post-4425294435076423260</id><published>2011-07-01T13:48:00.001-04:00</published><updated>2011-07-01T16:05:03.970-04:00</updated><title type='text'>Recursive queries from a custom validator</title><content type='html'>Just spent the morning tracking down a stack overflow while trying to implement a grails custom validator.&lt;br /&gt;&lt;br /&gt;I have a domain class that has a parent/child relationship with itself (instance form a tree). When I update instances, I need to make sure that I haven't created a cycle (the instance has itself as its own parent/ancestor)&lt;br /&gt;&lt;br /&gt;To do this, I created a custom validator to check that the object doesnt have itself as its own parent and that its parent is not also a child/descendent&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;class Afsc &lt;br /&gt;{&lt;br /&gt;&amp;nbsp; String id &lt;br /&gt;&amp;nbsp; String code &lt;br /&gt;&amp;nbsp; Afsc parent  &lt;br /&gt;&lt;br /&gt;&amp;nbsp; def afscService &lt;br /&gt;&amp;nbsp; def sessionFactory&lt;br /&gt;&amp;nbsp; ...&lt;br /&gt;&amp;nbsp; static constraints = {&lt;br /&gt;&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;&amp;nbsp; &amp;nbsp; parent (nullable: true, validator: { val, obj -&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (obj.id &amp;amp;&amp;amp; (val?.id == obj.id)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || obj.afscService.getChild(obj, val.code)) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 'AFSC.cannot.be.cyclic'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; })&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;...&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;The fun part is that getChild() does a recursive search checking to see that the instance doesnt have its parent as a child:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: java"&gt;&amp;nbsp; def getChild(parent, targetCode) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; def children = Afsc.findAllByParent(parent)&lt;br /&gt;&amp;nbsp; &amp;nbsp; def child = children.find {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; it.code == targetCode&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; if (!child) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; children.each {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; child = child ?: getChild(it,targetCode)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; return child&lt;br /&gt;&amp;nbsp; }&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;When I tried this, I started getting stack overflow exceptions. &amp;nbsp;Long story short, it turns out that using &amp;nbsp;&lt;i&gt;findAllByParent()&amp;nbsp;&lt;/i&gt;causes hibernate to flush changes before executing the query. &amp;nbsp;Well, guess what happens when changes are flushed? &amp;nbsp;That's right - the validator gets called. &amp;nbsp;Which calls &lt;i&gt;getChild()&lt;/i&gt;. &amp;nbsp;Which calls &lt;i&gt;findAllByParent()&lt;/i&gt;. &amp;nbsp;Which causes a flush. &amp;nbsp;Which gives us infinite recursion and a stack overflow.&lt;br /&gt;&lt;br /&gt;Once I figured out what was going on, it wasnt too hard to find the solution - tell grails/hibernate not to automatically flush changes:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: csharp"&gt;&amp;nbsp; &amp;nbsp; parent (nullable: true, validator: { val, obj -&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (obj.id &amp;amp;&amp;amp; val) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (val.id == obj.id) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 'AFSC.cannot.be.cyclic'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def originalFlushMode = obj.sessionFactory.currentSession.flushMode&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; obj.sessionFactory.currentSession.flushMode = org.hibernate.FlushMode.MANUAL&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (obj.afscService.getChild(obj, val.code)) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 'AFSC.cannot.be.cyclic'&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch(Exception e) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return e.getMessage()&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; obj.sessionFactory.currentSession.flushMode = originalFlushMode&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; })&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-4425294435076423260?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/4425294435076423260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=4425294435076423260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/4425294435076423260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/4425294435076423260'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2011/07/recursive-queries-from-custom-validator.html' title='Recursive queries from a custom validator'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-6046539174348989789</id><published>2010-09-28T23:34:00.000-04:00</published><updated>2010-09-28T23:34:39.801-04:00</updated><title type='text'>The Windows Way vs the Unix Way</title><content type='html'>A colleague comparing VCS systems commented that while TFS includes pretty good bug and issue tracking components, systems like Git and Mercurial have to to be combined with Trac or Bugzilla to get the same set of functionality. &amp;nbsp; As I was reading his comments, it struck me that this was another great example of the Windows Way vs the Unix Way.&lt;br /&gt;&lt;br /&gt;The Unix way is to have lots of small focused tools that do one thing well and that can be plugged together in any combination that meets your particular needs. &amp;nbsp;Often, there are multiple tools that do approximately the same thing, but in slightly different ways, each convenient to a particular set of needs. &amp;nbsp;This leads to highly tuned solutions - you can pick exactly the right set of tools that both solve your problem and fit best with your environment. &amp;nbsp;The down-side to this is that you need to be skilled in knowing how to fit the right pieces together. &amp;nbsp;Knowing which tools are best suited to your environment takes a good bit of experience - but once you have a solution, it fits like a glove.&lt;br /&gt;&lt;br /&gt;The Windows way is pretty much the opposite. &amp;nbsp;The Windows Way is to construct a single monolithic piece of software that solves a whole general class of problems. &amp;nbsp;The great thing about this approach is that there's no assembly required. &amp;nbsp;You dont need to know about lots of different tools and how to make them all work together - you just need to know that one tool. &amp;nbsp;And because you only need to know one, you can get to be pretty knowledgeable about it. &amp;nbsp;The downside to this, of course, is that while general solutions can usually do a lot of things, they often do none of them well. &amp;nbsp;General purpose solutions have to make assumptions about the context is which they will be used, and if you deviate from those assumptions, the solution&amp;nbsp;doesn't&amp;nbsp;operate as efficiently as it could.&lt;br /&gt;&lt;br /&gt;So is one better than the other? &amp;nbsp;Not really. &amp;nbsp;At least not without having more context. &amp;nbsp;Sometimes a general purpose solution is sufficient. &amp;nbsp;Other times, you need the&amp;nbsp;flexibility to be able to create a highly specific solution. &amp;nbsp;The trick is to know when each is appropriate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-6046539174348989789?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/6046539174348989789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=6046539174348989789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/6046539174348989789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/6046539174348989789'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2010/09/windows-way-vs-unix-way.html' title='The Windows Way vs the Unix Way'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-1211934889130149894</id><published>2007-05-08T23:43:00.002-04:00</published><updated>2010-09-28T23:45:25.306-04:00</updated><title type='text'>Serendipity</title><content type='html'>"Engineer for serendipity."&lt;br /&gt;&lt;br /&gt;--Roy Fielding&lt;br /&gt;&lt;br /&gt;[http://tech.groups.yahoo.com/group/rest-discuss/message/8343]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-1211934889130149894?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/1211934889130149894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=1211934889130149894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/1211934889130149894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/1211934889130149894'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2007/05/serendipity.html' title='Serendipity'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-1112354591518581182</id><published>2007-02-28T23:08:00.001-05:00</published><updated>2010-09-28T23:46:15.648-04:00</updated><title type='text'>WSEC</title><content type='html'>So, earlier I had said that I wasn't really interested in going to the W3C Web of Services Workshop.  It ended up that someone else couldn't go, and since I was curious to hear reactions to some of the stuff being presented on day 2, I decided to go ahead and go.&lt;br /&gt;&lt;br /&gt;I'm glad I went.  There was a lot of good and interesting discussion.  I don't think any of the world's problems were solved and I don't think anybody changed their minds about Web Services - although there did seem to be a lot of agreement that REST is good and worth investing time in.&lt;br /&gt;&lt;br /&gt;One of the recurring topics was the uniform interface - it seems some people get it and others don't.  It always seem to end up in an argument about dispatching - either you do it at the operation level or you do it at the message type level.  If I define operations, they're strongly typed and I know exactly what kind of data I'll be getting.  If I only have one operation that has to handle different kinds of data, then how do I know what to do with the data - I have to write a big if-statement to figure out how to handle the data.  How is that an improvement?  Arent you just pushing the dispatching to a different place?&lt;br /&gt;&lt;br /&gt;And that's the wrong thing to focus on.  I stumbled on this as I was trying to explain to my very dyed-in-the-wool WS-* coworker why the uniform interface is useful.  I finally made progress with the following.&lt;br /&gt;&lt;br /&gt;Imagine I have a printer with an embedded web server.  The printer makes available a web service with associated WSDL that define an operation called getPrinterStatus, and that operation returns an xml document of a type we'll just call DeviceInfo.  If I'm writing a client to retrieve the printer's status, I pull in the WSDL generate the stub code and fill in the business logic.  Now I can monitor the status of the printer.&lt;br /&gt;&lt;br /&gt;Now imagine that some time later, I purchase a copy machine.  This copier also has an embedded web server and makes available a web service. The web service has a number of operations, but one of them is getDeviceInfo, and that operation also happens to return an xml document that has the same format as what the printer returns - DeviceInfo.&lt;br /&gt;&lt;br /&gt;If I now want my printer monitor client to also be able to monitor my copier, I have to modify the client's code - I have to pull in the copier's WSDL, generate the stubs for its operations and then I can get the DeviceInfo document for the copier.&lt;br /&gt;&lt;br /&gt;Now back up and imagine that each of those devices had used HTTP GET in a RESTful way.  Because my printer monitor client knows how to handle documents of type DeviceInfo, all I have to do is tell it what the appropriate URI is for each of my devices - I don't have to change any software.  Now, instead of only being able to interact with my printer, my client software can interact with any resource that produces DeviceInfo documents in response to a HTTP GET. For free.&lt;br /&gt;&lt;br /&gt;I could hear the light bulb click on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-1112354591518581182?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/1112354591518581182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=1112354591518581182' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/1112354591518581182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/1112354591518581182'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2007/02/wsec.html' title='WSEC'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-6428122900386248893</id><published>2007-02-06T21:57:00.001-05:00</published><updated>2010-09-28T23:46:46.607-04:00</updated><title type='text'>Hot vs Cold</title><content type='html'>Every winter,  there are people who say they'd rather be too hot than too cold.  And every summer, there are people who say they'd rather be too cold than too hot.  And I'm pretty sure that some of those people say different things depending on the season.&lt;br /&gt;&lt;br /&gt;Right now, I know I'd rather be too hot than too cold.  Problem is, I'm concerned that I might have a seasonal opinion - but I really can't remember what I thought when it was actually hot out.  I'm pretty certain I face this same dilemma every year, and probably twice a year (but I can't remember for sure).&lt;br /&gt;&lt;br /&gt;So this year, I'm going to do something about it - I'm writing down my winter-time position on the hot vs cold debate: I prefer heat to cold.&lt;br /&gt;&lt;br /&gt;Now, I just have to remember to check back when it's really hot out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-6428122900386248893?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/6428122900386248893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=6428122900386248893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/6428122900386248893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/6428122900386248893'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2007/02/hot-vs-cold.html' title='Hot vs Cold'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-3001497992040332089</id><published>2007-01-28T22:58:00.001-05:00</published><updated>2010-09-28T23:47:06.231-04:00</updated><title type='text'>Catching Up</title><content type='html'>So much for practicing writing - well, at least not here.  I have, however, been doing quite a bit of writing at work lately,  some of which is the basis for &lt;a href="http://www.w3.org/2007/01/wos-papers/gestalt"&gt;this position paper&lt;/a&gt; for the &lt;a href="http://www.w3.org/2007/01/wos-ec-program.html"&gt;W3C Workshop on Web of Services for Enterprise Computing&lt;/a&gt;.   If I'm lucky, maybe I'll finally get to meet fellow RESTafarian &lt;a href="http://www.markbaker.ca/blog/"&gt;Mark Baker&lt;/a&gt; who's also presenting &lt;a href="http://www.w3.org/2007/01/wos-papers/coactus"&gt;something&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Although I contributed to the position paper (somewhat unwittingly), at this point I'm not sure I'm  looking forward to going to the workshop.  In fact, if you'd asked me before our paper was submitted whether I was interested in attending such a workshop, my response would have been something along the lines of "why would I want to work to improve something (WS-*) that I'd prefer to see fade away?"&lt;br /&gt;&lt;br /&gt;The project I'm on now is a research-oriented project for a military customer where we're looking at SOA, ESBs and Web Services (among other things).  In a nutshell, we're supposed to help our customer figure out whether or not this SOA stuff and its corresponding technologies (which in their eyes is WS-*) will actually work and be useful for their purposes.  The downside is that I'm working with stuff that I don't really believe in (the WS-* part, not the SOA part).  The upside is that I have the opportunity to point out the failings as I see them (and the customer actually seems willing to listen).&lt;br /&gt;&lt;br /&gt;Our team pretty much covers the spectrum from WS-* on one end to REST on the other (that's me), so we occasionally have some spirited debates.&lt;br /&gt;&lt;br /&gt;For the last few months, we've been looking at service discovery, trying to really focus in on what service discovery is and why you might need it.  You see, the military is in the midst of an effort to get themselves some SOA goodness and they're cranking out the architectural guidelines and building themselves some infrastructure to support all these new services that'll be part of their SOA.  One piece of that infrastructure is discovery.&lt;br /&gt;&lt;br /&gt;Apparently, there's some debate as to what discovery is. If you ask one group (apparently the majority), they claim it means content discovery - being able to discover information (i.e., search) - and that if you squint the right way, services are just information sources whose output can be treated as content.  However, there's another group that believes there's a fundamental distinction between services and content and that the two require different approaches for  discovery.&lt;br /&gt;&lt;br /&gt;So we've been looking at service discovery and asking lots of questions -  like what's the difference between design-time and run-time discovery, and is there really a need for such a thing?  It's been kind of frustrating, because any time we talk to people about it, they either just point to UDDI, or they start talking about all the cools things you could do if you could discover arbitrary services at runtime.  Unfortunately, there are never any real details as to how any of this would actually work.  And worse, when we ask for real-world scenarios where this would be useful, we either get more hand-waving, or something that would require a whole lot more AI than the industry's currently able to muster.&lt;br /&gt;&lt;br /&gt;We've managed to make some progress - to the point where I've managed to formulate a somewhat coherent picture of service discovery in my head; and over the last month, I've tried to put some of it on paper.  Mind you, none of it's earth-shattering; just a healthy dose of reasoning about the needs of design-time discovery and run-time discovery and some thoughts about the sort of environment in which run-time discovery would actually make sense.&lt;br /&gt;&lt;br /&gt;One conclusion we've drawn is that (assuming run-time discovery is actually a useful thing), what's currently out there in terms of tools, technologies, and specifications probably isn't sufficient - especially not in the military world.  Problem is, at this point, I have no idea what would be needed.  My esteemed colleague (author of our position paper, and solidly in the WS-* camp) has decided this gap should be addressed by the W3C - and thus the position paper. Me - I'm not so sure.  I'm not even convinced there's a real need for run-time discovery - at least not as an infrastructure service.&lt;br /&gt;&lt;br /&gt;Thus, my conundrum - I may have make a case for something I'm not even sure is a problem, and I have to do it at a workshop that I'd otherwise have no interest in.  Oh well, if I do go, at least I'll finally get to meet a bunch of cool people - like Mark, Noah and Dave - whose writings I've followed in such august places as the &lt;a href="http://www.w3.org/2001/tag/"&gt;W3C TAG&lt;/a&gt; mailing list or the &lt;a href="http://groups.yahoo.com/group/rest-discuss/"&gt;REST-discuss&lt;/a&gt; group.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(Let's see if I can do another one of these without waiting another two years.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-3001497992040332089?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/3001497992040332089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=3001497992040332089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/3001497992040332089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/3001497992040332089'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2007/01/catching-up.html' title='Catching Up'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-111405194862085694</id><published>2005-04-20T22:13:00.001-04:00</published><updated>2010-09-28T23:47:30.782-04:00</updated><title type='text'>Respresentational State</title><content type='html'>I was just reading a page on RESTWiki about &lt;a href="http://rest.blueoxen.net/cgi-bin/wiki.pl?HowSoapComparesToRest"&gt;HowSoapComparesToRest&lt;/a&gt;.  Despite the title, about half the page is devoted to a discussion of what the State in REpresentational &lt;span style="font-weight: bold;"&gt;State &lt;/span&gt;Transfer is. &lt;br /&gt;&lt;br /&gt;Reading through that discussion and seeing people trying to get a handle on what resource's state is transferred when you do a POST to certain kinds of resources or the fact that you might transfer the state of a resource that has no name, I suddenly had the thought that its not so important to know what state is -- its what it's not that's important. In fact, its really not so much about the state at all -- its about the representation. In a RESTful system, (in a very general sense) you dont move objects (resources) around, you move facsimiles (representations) of those objects (resources) around.&lt;br /&gt;&lt;br /&gt;Why is this important? I'm not sure I know at this point. I just know that after several years of thinking and reading about REST, this is the first time I've thought about it this way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-111405194862085694?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/111405194862085694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=111405194862085694' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111405194862085694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111405194862085694'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2005/04/respresentational-state.html' title='Respresentational State'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-111264648448951553</id><published>2005-04-04T16:27:00.001-04:00</published><updated>2010-09-28T23:47:57.088-04:00</updated><title type='text'>REST v WS-*:  Compare and contrast</title><content type='html'>I've been spending a lot of time looking for information that compares and/or contrasts WS-* with REST. As I go, I've been accumulating links here and there, saving them in various places (bookmarks in my browser, on the desktop, and at bloglines), but this weekend, I decided that it was about time I got with the program and availed myself of the services offered at &lt;a href="http://del.icio.us/"&gt;del.icio.us&lt;/a&gt;. Once I'd gotten an account set up and had moved over all my bookmarks I had lying around in varoius places, I spent a good deal of time Sunday perusing a few email threads over on the &lt;a href="http://lists.w3.org/Archives/Public/www-ws-arch/"&gt;ws-arch mail archives&lt;/a&gt; and a few more over in the &lt;a href="http://lists.xml.org/archives/xml-dev/"&gt;xml-dev archives&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As I find things that appear to be of the REST vs. WS-* ilk, I'll add them to the &lt;a href="http://del.icio.us/tag/restvsoap"&gt;restvsoap &lt;/a&gt;tag that I set up on del.icio.us. I'm hoping that at least a few other people notice the tag and are able to add some useful pointers as well. I'll try to limit myself to using the restvsoap tag only for things that have useful comparisons rather than just being flame-fests; hopefully others will do the same.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-111264648448951553?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/111264648448951553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=111264648448951553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111264648448951553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111264648448951553'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2005/04/rest-v-ws-compare-and-contrast.html' title='REST v WS-*:  Compare and contrast'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-111198359379726866</id><published>2005-03-28T19:39:00.001-05:00</published><updated>2010-09-28T23:48:19.155-04:00</updated><title type='text'>Parallel Universe</title><content type='html'>I've reached the chapter that talks about WS-Addressing and the WS-Resource Framework (chapter 8 in &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0672326418/104-3444935-4311956"&gt;Building Web Services with Java&lt;/a&gt;). Apart from having a hard time getting my ahead around the authors' concepts of stateful and stateless resources, I couldn't help but feel like I was traveling through a parallel universe. I was left with the impression that the whole WS-Resource framework is an attempt to duplicate what we already have in the existing web - but crammed inside of the WS-* world and using none of the existing mechanics already available. It's as if their charter was to reinvent the web without using any of the existing technologies - and to make sure it doesnt interoperate with the existing web.&lt;br /&gt;&lt;br /&gt;I've also noticed that as I've been reading I keep finding myself wishing that some of the things in WS-* could be extracted and applied to a more RESTful environment. In particular, I keep wondering whether having something like WSDL would be useful.&lt;br /&gt;&lt;br /&gt;Let's say that I have a real estate 'application' that deals with real estate listings. A listing resource has state that includes things like an address, a listing agent, a homeowner, a description, a listing status and a unique identifier. In order for client software to effectively use my 'application', I need to be able to define how the client can interact with resources of this type (e.g., listing resources). It seems to me that in order to construct a client that can interact with a particular type of resource, I need to know the following things:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;the resource's state or data model; i.e., what elements make up a listing resource's state (I guess this would essentially be a type definition)&lt;/li&gt;&lt;li&gt;a list of valid transformations that can be applied to a listing resource; i.e., what parts of the resource's state can I change, and how do I go about effecting those changes&lt;/li&gt;&lt;li&gt;a definition of valid values for the various parts of the resource's state (maybe this is really part of the data model)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;For web services, this kind of stuff appears to be mostly defined via WSDL. But if I want something more RESTful, I'm not sure what the answer might be. For that matter, I'm not even sure I'm asking the right question.&lt;br /&gt;&lt;br /&gt;I'm pretty sure that the first and last items are reasonable things to want. Its the middle one that I'm not so sure of. I can't help but think that I'm effectively trying to define new operations that can be performed on a resource, and that would seem to violate the constrained interface.&lt;br /&gt;&lt;br /&gt;I did look at &lt;a href="http://www.markbaker.ca/2003/05/RDF-Forms/"&gt;RDF Forms&lt;/a&gt;, but I'm not sure whether that's what I want or not. It seems like something is missing, but maybe I'm just making it more complicated than it needs to be&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-111198359379726866?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/111198359379726866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=111198359379726866' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111198359379726866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111198359379726866'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2005/03/parallel-universe.html' title='Parallel Universe'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-111180948976749262</id><published>2005-03-25T22:38:00.000-05:00</published><updated>2005-03-27T22:39:42.273-05:00</updated><title type='text'>SOAP Transport Independence</title><content type='html'>More thoughts while reading...&lt;br /&gt;&lt;br /&gt;I keep thinking about SOAP's use of HTTP as a transport protocol and the fact that SOAP is supposed to be transport independent so you can make use of existing protocols like SMTP or FTP or whatever. I gues my question at this point is why?&lt;br /&gt;&lt;br /&gt;Why would I want to use SMTP instead of HTTP? What does that buy me? OK, so I dont need a web server to service requests - I can just float stuff through email. But now I need to write some new sort of server that can poll the service's 'inbox' and process the messages that it finds there. So not only do I still need some sort of server, but now I've got to write my own when I could have just used already existing and readily available web server software.&lt;br /&gt;&lt;br /&gt;As to the question of why HTTP is the preferred protocol, I suppose I can see why that's the case. There's already lots of well tested HTTP client and server software out there, so its real easy to use. And just about everybody lets HTTP through the firewall. But isn't that really just a port number? I could run any protocol on port 80 and it would still make it through just about as many firewalls.&lt;br /&gt;&lt;br /&gt;Well, back to reading. Maybe the answers will eventually become clear to me, but it just feels like the whole protocol independence thing and the use of HTTP has made things much more complicated than they need to be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-111180948976749262?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/111180948976749262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=111180948976749262' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111180948976749262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111180948976749262'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2005/03/soap-transport-independence.html' title='SOAP Transport Independence'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-111180634659767553</id><published>2005-03-25T19:55:00.000-05:00</published><updated>2005-03-25T23:12:55.846-05:00</updated><title type='text'>SOAP. SOAP.  What is SOAP?</title><content type='html'>Since I've got some free time on my hands (while I look for a new job), I decided it'd be a good idea to get caught up on current technology - and first up is SOAP/SOA/WS-*, etc.&lt;br /&gt;&lt;br /&gt;I've actually used SOAP and Axis on a couple of projects now, but only in a sort of peripheral manner. In fact, in both cases, the presence of a web service interface was more related to marketing than actual customer demand (you know - "let's put a web service interface on so we can say our product supports SOAP"). And since the web services part wasn't part of the core architecture, I've never spent much time really investigating and trying to understand the why's and wherefore's of SOAP and Web Services.&lt;br /&gt;&lt;br /&gt;So, last week, I went out and picked up the dead tree version of &lt;a href="http://www.amazon.com/exec/obidos/tg/detail/-/0672326418/104-3444935-4311956"&gt;&lt;span style="font-style: italic;"&gt;Building Web Services with Java&lt;/span&gt;&lt;/a&gt;.  (I had hoped to find something on &lt;a href="http://safari.oreilly.com/"&gt;O'Reilly's Safari Bookshelf&lt;/a&gt; since I do have a subscription, but it seemed like everything there was at least two years old.)&lt;br /&gt;&lt;br /&gt;Berfore I go on, I should point out that I've been a pretty strong believer in the REST architectural style and, over the past three or four years, I've made a pretty concerted effort to adhere to those principles in the solutions I've designed and built. I'm very much aware that there's a sort of SOAP/WS-* vs REST mentality out there right now, but I really dont know enough about SOAP and WS-* to know where I might fall in that debate. At this point, from what I've read so far I have what you might call a healthy skepticism for SOAP and WS-*.&lt;br /&gt;&lt;br /&gt;So far, and for the most part, I like the book. Despite the fact that the authors seem to think Web Services are the greatest thing since sliced bread, they do manage to take you through all the pieces that are involved - XML, SOAP, Web Services - and they bring up just enough of the issues that Web Services are trying to address to make you think a little bit. There are a few sidebars that compare to REST and WS-*, but they're pretty superficial and it seems like they're only there to make the presentation look balanced.&lt;br /&gt;&lt;br /&gt;So far, there haven't been any surprises. I've either heard of or have actually used most of the technologies they've covered - XML and XML Schema, SOAP, WSDL, UDDI, Axis, etc. However, I can't help but to keep asking myself "What happened to the web in Web Services?"&lt;br /&gt;&lt;br /&gt;Two things strike me. One is that, despite the use of URIs for just about everything that needs a name, almost none of them actually identify a resource that's on the web. The only thing that even comes close is the service endpoint, and that's barely on the web since all of the useful stuff is hidden behind the service.&lt;br /&gt;&lt;br /&gt;The other thing that bugs me is the use of HTTP is a transport protocol. Other than the fact that HTTP flows freely through firewalls, what's the point? Only one verb, POST, is ever used (although I do see that you can now do certain operations using GET as well). I keep asking myself why they didn't just come up with the SOAP Message Transfer Protocol. Well, OK, the acronym for that might cause just a little confusion, but still. Maybe I just need to read more and I'll understand.&lt;br /&gt;&lt;br /&gt;(&lt;span style="font-style: italic;"&gt;In case you're wondering, the title is a reference to a bit from a Sponge Bob Squarepants episode.)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-111180634659767553?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/111180634659767553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=111180634659767553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111180634659767553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111180634659767553'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2005/03/soap-soap-what-is-soap.html' title='SOAP. SOAP.  What is SOAP?'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-111153312765636502</id><published>2005-03-22T16:16:00.000-05:00</published><updated>2005-03-23T01:14:17.193-05:00</updated><title type='text'>Hello</title><content type='html'>So, I've finally set up my own blog. (Cue sound of crickets chirping.)&lt;br /&gt;&lt;br /&gt;I've been thinking about doing this for a while, but I've never really been motivated enough to actually do anything. I've come real close a number of times over the past few months, but each time I've been thwarted by my inability to come up with a name that I like (seems I struggle with naming even outside the software world). So today, in an effort to avoid doing something else that I really should be doing, I managed to come up with a name and finally get myself my very own blog.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;So why am I doing this? I'm not completely sure. I've thought of any number of reasons why I should do a blog, but in the end, I think there are only two that really matter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Writing Practice&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've never been very happy with my writing skills. For one thing, my mastery of grammar and punctuation leaves more than a little to be desired - I really wish I'd paid much more attention in my high school English classes. But that's minor stuff. What really bugs me is the fact that I always seem to have so much trouble getting the thoughts in my head into words on the screen. It's not that I sit and stare at the screen with writer's block - I can generate plenty of words. The problem is coming up with the right words and getting them in the right order so that when someone else reads what I've written, they have half of chance of understanding what I'm trying to say.&lt;br /&gt;&lt;br /&gt;I suppose I could take a writing class - and I might well do that eventually, but it seems like the simpler thing to do is to just start writing more. Practice makes perfect and all that.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Seeing What Happens&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Beyond the writing practice, the only other reason for doing this blog is to see what happens. I dont necessarily think I have a whole lot to say. I don't consider myself exceptionally smart, nor do I think I'm a deep thinker. And I'm certainly not an expert on anything in particular (I'm more a jack-of-all-trades kind of guy). But that doesnt seem to stop most people. And I'm not going to let it stop me either.&lt;br /&gt;&lt;br /&gt;Maybe, if I'm really lucky, I'll manage to start a conversation or two of my own and actually get some feedback. Maybe I'll find out that I'm pretty normal and that my approach to doing software fits in with the way most other people do it. Or, maybe I'll find out that I'm way out in left field making mountains out of molehills and my writing really does suck as bad as I think it does. Either way is fine by me - at least I've learned something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11628709-111153312765636502?l=chuckhinson.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/111153312765636502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11628709&amp;postID=111153312765636502' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111153312765636502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/111153312765636502'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2005/03/hello.html' title='Hello'/><author><name>Chuck</name><uri>http://www.blogger.com/profile/03276610016389894438</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
