<?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:blogger='http://schemas.google.com/blogger/2008' 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>2024-09-27T18:06:40.043-04: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?alt=atom'/><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='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11628709.post-1891606507187348794</id><published>2022-11-22T13:57:00.004-05:00</published><updated>2022-11-22T13:57:48.035-05:00</updated><title type='text'>Book Recommendations</title><content type='html'>&lt;p&gt;Knowing that I read a lot, a friend asked for some recommendations.&amp;nbsp; Looking through my list on Goodreads of all of the books I&#39;ve read, I found it hard to give specific recommendations.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&#39;ve found that I&#39;ve enjoyed 99% of the books I&#39;ve read; it&#39;s rare that I finish a book and regret reading it.&amp;nbsp; Take that as you may - I dont consider myself any sort of literary critic.&amp;nbsp; Goodreads does have lots of good lists that can get you started.&amp;nbsp; For me, starting with authors who have won (or been runners-up) for various awards like the Hugos and Nebulas has worked out pretty well.&lt;/p&gt;&lt;p&gt;Here&#39;s a list of books and authors that I remember well enough to recommend&lt;/p&gt;&lt;p&gt;&lt;b&gt;Authors &lt;/b&gt;(my favorites that I&#39;ll read without even looking at reviews)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Neil Gaiman&lt;/li&gt;&lt;li&gt;Neal Stephenson&lt;/li&gt;&lt;li&gt;William Gibson&lt;/li&gt;&lt;li&gt;Iain M Banks&lt;/li&gt;&lt;li&gt;Isaac Asimov&lt;/li&gt;&lt;li&gt;Arthur C Clarke&lt;/li&gt;&lt;li&gt;Greg Egan&lt;/li&gt;&lt;li&gt;Alistair Reynolds&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Space Opera/Series&lt;/b&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;The Expanse series by James S.A. Corey&lt;/li&gt;&lt;li&gt;Culture series by Ian M Banks&lt;/li&gt;&lt;li&gt;Imperial Radch series by Anne Leckie&lt;/li&gt;&lt;li&gt;Vorkosigan Saga by Lois McMaster Bujold&lt;/li&gt;&lt;li&gt;The Long Earth series by Terry Pratchett&lt;/li&gt;&lt;li&gt;Zones of Thoughs series by Vernor Vinge&lt;/li&gt;&lt;li&gt;Silo series by Hugh Howey&lt;/li&gt;&lt;li&gt;Subjective Cosmology Series by Greg Egan&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Science Fiction&lt;/b&gt; (I&#39;m bad at distinguishing between Science Fiction and just Fiction, so dont read much into this category)&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Darwin&#39;s Radio by Greg Bear&lt;/li&gt;&lt;li&gt;The Space between Worlds by Micaiah Johnson&lt;/li&gt;&lt;li&gt;Lock In by John Scalzi&lt;/li&gt;&lt;li&gt;Barsk: The Elephants&#39; Graveyard by Lawrence M. Schoen&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Fiction/Fantasy&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Neverwhere by Neil Gaiman&lt;/li&gt;&lt;li&gt;The Graveyard Book by Neil Gaiman&lt;/li&gt;&lt;li&gt;The Night Circus by Erin Morgenstern&lt;/li&gt;&lt;li&gt;The Starless Sea by Erin Morgenstern&lt;/li&gt;&lt;li&gt;The City &amp;amp; the City by China Miéville&lt;/li&gt;&lt;li&gt;The Masquerade series by Seth Dickinson&lt;/li&gt;&lt;li&gt;Snow Queen Cycle series by Joan D Vinge&lt;/li&gt;&lt;li&gt;The Time Quintet series by Madeleine L&#39;Engle&lt;/li&gt;&lt;li&gt;The Missionaries by Owen Stanley&lt;/li&gt;&lt;li&gt;Otherland series by Tad Williams&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Djinn/Genies&lt;/b&gt; (not sure why I&#39;ve set aside this specific category)&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;A Master of Djinn by P Djeli Clark&lt;/li&gt;&lt;li&gt;The Golem and the Jinni by Helene Wecker&lt;/li&gt;&lt;li&gt;The Hidden Palace by Helene Wecker&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Mythology Remakes/Takeoffs/Alternative Tellings&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;Ariadne - Minotar story told from point of view of King Minos&#39; daughter&lt;/li&gt;&lt;li&gt;&amp;nbsp;The Just City by Jo Walton - Socrates and Plato and the Greek gods&amp;nbsp;&lt;/li&gt;&lt;li&gt;&amp;nbsp;Odd and the Frost Giants by Neil Gaiman - Norse myth&lt;/li&gt;&lt;li&gt;&amp;nbsp;Norse Mythology by Neil Gaiman&lt;/li&gt;&lt;li&gt;&amp;nbsp;The Mere Wife by Maria Dahvana Headley - A Beowulf adaptation&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Russia&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;I&#39;m fascinated by Russian stories because Russia is neither Western/European or Asian and I know so little of its history or culture.&amp;nbsp; I&#39;m not really into reading straight-up history books, but I do like novels set in Russia. The ones with Russian authors are available in multiple translations; I&#39;ve found translations by Richard Pevear and&amp;nbsp;Larissa Volokhonsky to be well regarded.&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Classics&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Anna Karenina by Leo Tolstoy&lt;/li&gt;&lt;li&gt;The Master and Margarita by Mikhail Bulgakov&lt;/li&gt;&lt;li&gt;The Brothers Karamazov by Fyodor Dostoevsky&lt;/li&gt;&lt;li&gt;Cancer Ward by Aleksandr Solzhenitsyn&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Historical Fiction/Fiction&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Chimes of a Lost Cathedral by Janet Fitch&lt;/li&gt;&lt;li&gt;The Revolution of Marina M by Janet Fitch&lt;/li&gt;&lt;li&gt;Russka: The Novel of Russia by Edward Rutherfurd&lt;/li&gt;&lt;li&gt;Night Watch by Sergei Lukyanenko&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As with the Russian novels, I also find reading novels by non-western authors interesting - both in the way they tell stories, but also because it reveals a little bit about their culture (of which I&#39;m mostly ignorant)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;African Authors&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Octavia Butler: Xenogenesis series, currently reading PatternMaster series&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;Nnedi Okorafor: Binti, Nsibidi Scripts, Who Fears Death (these are all series)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Asian Authors&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;Klara and the Sun by&amp;nbsp;Kazuo Ishiguro&lt;/li&gt;&lt;li&gt;1Q84 by Haruki Murakami&lt;/li&gt;&lt;li&gt;Remembrance of Earth&#39;s Past - series by Liu Cixin, Three Body problem to be a Netflix series&lt;/li&gt;&lt;li&gt;The Memory Police by Yoko Ogawa&lt;/li&gt;&lt;li&gt;The Windup Bird Chronicle by Haruki Murakami&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/1891606507187348794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11628709/1891606507187348794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/1891606507187348794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/1891606507187348794'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2022/11/book-recommendations.html' title='Book Recommendations'/><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='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-2356642062638577311</id><published>2018-02-04T19:44:00.001-05:00</published><updated>2018-02-04T19:44:03.718-05:00</updated><title type='text'>Backing up with rsync to a bitlocker disk mounted under Ubuntu on Raspberry Pi</title><content type='html'>Needed to set up backup to a bitlocker drive (corp policy - not allowed to put anything on a driver that&#39;s not bitlocker&#39;d).&amp;nbsp; Corp laptops are set up&amp;nbsp;such that they want to inspect all data written to external devices, so backups ended up being painfully slow (especially when jar files were involved since it wanted to unzip them and scan everything in them).&amp;nbsp; Decided to go with rsync over ssh from cygwin bash shell.&lt;br /&gt;
&lt;br /&gt;
For fun (and since I didnt want this stuff on my personal machines), I decided to buy a Raspberry Pi and use that as my rsync target with the bitlocker disk mounted using dislocker.&lt;br /&gt;
&lt;br /&gt;
I think I start out trying to install a packaged version with apt-get, but had dependency problems (might have had something to do with trying to run under Ubuntu on Raspberry Pi) , so reverted to these instructions: &lt;a href=&quot;http://blog.airbuscybersecurity.com/post/2016/01/Mounting-Bitlocker-Volumes-Under-Linux&quot;&gt;http://blog.airbuscybersecurity.com/post/2016/01/Mounting-Bitlocker-Volumes-Under-Linux&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
On the server side, I ended up with two scripts:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;vmdiskmount&lt;/span&gt;:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;dislocker-fuse -V /dev/sda1 -u -- /mnt/dislocker&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mount -t ntfs-3g -o loop /mnt/dislocker/dislocker-file /mnt/vmdisk&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mount | grep vmdisk&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;vmdiskumount&lt;/span&gt;:&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;umount /mnt/vmdisk &amp;amp;&amp;amp; umount /mnt/dislocker&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mount | grep dislocker&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
The mount script will prompt you for your bitlocker passphrase.&amp;nbsp; Note that shutting down the server without unmounting dislocker first can supposedly cause scary things to happen with the bitlocker encryption.&lt;br /&gt;
&lt;br /&gt;
I also setup usermapping to map between windows SIDs and my linux user/group.&amp;nbsp; This goes in&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/mnt/vmdisk/.NTFS-3G/UserMapping&lt;/span&gt;:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# User mapping proposal :&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# -------------------- cut here -------------------&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;1001::S-1-5-21-4271255075-229453548-3213529333-6405&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;:1001:S-1-5-21-4271255075-229453548-3213529333-513&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;::S-1-5-21-4271255075-229453548-3213529333-10000&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# -------------------- cut here -------------------&lt;/span&gt;&lt;/blockquote&gt;
On the client side, its just standard rsync commands to send the data. Again, corp security required more dancing - cygwin needed to run as admin, but you cant do that directly anymore, so you have to run a DOS window as admin and launch cygwin from there. Also, trying to rsync the c drive doesnt work well because only the trusted installer user has write privs, so rysnc gets locked out as soon as it syncs the root directory on c: (which is the first thing it does).&amp;nbsp; Trick is to specify directories under c: as the rsync sources rather than the c drive itself.</content><link rel='replies' type='application/atom+xml' href='http://chuckhinson.blogspot.com/feeds/2356642062638577311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/11628709/2356642062638577311' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/2356642062638577311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11628709/posts/default/2356642062638577311'/><link rel='alternate' type='text/html' href='http://chuckhinson.blogspot.com/2018/02/backing-up-with-rsync-to-bitlocker-disk.html' title='Backing up with rsync to a bitlocker disk mounted under Ubuntu on Raspberry Pi'/><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='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11628709.post-4425294435076423260</id><published>2011-07-01T13:48:00.001-04:00</published><updated>2014-04-04T14:00:20.788-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&#39;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=&quot;brush: java&quot;&gt;class Afsc 
{
&amp;nbsp; String id 
&amp;nbsp; String code 
&amp;nbsp; Afsc parent  

&amp;nbsp; def afscService 
&amp;nbsp; def sessionFactory
&amp;nbsp; ...
&amp;nbsp; static constraints = {
&amp;nbsp; &amp;nbsp; ...
&amp;nbsp; &amp;nbsp; parent (nullable: true, validator: { val, obj -&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (obj.id &amp;amp;&amp;amp; (val?.id == obj.id)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; || obj.afscService.getChild(obj, val.code)) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &#39;AFSC.cannot.be.cyclic&#39;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; })
&amp;nbsp; }
...
}&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=&quot;brush: java&quot;&gt;&amp;nbsp; def getChild(parent, targetCode) {
&amp;nbsp; &amp;nbsp; def children = Afsc.findAllByParent(parent)
&amp;nbsp; &amp;nbsp; def child = children.find {
&amp;nbsp; &amp;nbsp; &amp;nbsp; it.code == targetCode
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; if (!child) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; children.each {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; child = child ?: getChild(it,targetCode)
&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; return child
&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&#39;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=&quot;brush: csharp&quot;&gt;&amp;nbsp; &amp;nbsp; parent (nullable: true, validator: { val, obj -&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (obj.id &amp;amp;&amp;amp; val) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (val.id == obj.id) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &#39;AFSC.cannot.be.cyclic&#39;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; def originalFlushMode = obj.sessionFactory.currentSession.flushMode
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; obj.sessionFactory.currentSession.flushMode = org.hibernate.FlushMode.MANUAL
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (obj.afscService.getChild(obj, val.code)) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &#39;AFSC.cannot.be.cyclic&#39;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch(Exception e) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return e.getMessage()
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; obj.sessionFactory.currentSession.flushMode = originalFlushMode
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; })
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Update 04-Apr-2014:&lt;br /&gt;
&lt;br /&gt;
Today I was writing a custom validator and something was telling me that querying the database from a validator might cause problems, so I decided to google a bit to see if I was right. &amp;nbsp;I guess it was my subconscious reminding me that I&#39;d already solved this problem once before.&lt;br /&gt;
&lt;br /&gt;
Having seen a couple of other solutions for this problem, it seems like a better solution might be&lt;br /&gt;
to use the withNewSession() domain class dynamic function so that the query can be performed in a new session. &amp;nbsp;See&amp;nbsp;http://adhockery.blogspot.com/2010/01/upgrading-grails-11-12.html for an example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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/fullpage/post/11628709/4425294435076423260' title='1 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='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</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&#39;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&#39;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.</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/fullpage/post/11628709/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='https://img1.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'>&quot;Engineer for serendipity.&quot;&lt;br /&gt;
&lt;br /&gt;
--Roy Fielding&lt;br /&gt;
&lt;br /&gt;
[http://tech.groups.yahoo.com/group/rest-discuss/message/8343]</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/fullpage/post/11628709/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='https://img1.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&#39;t really interested in going to the W3C Web of Services Workshop.  It ended up that someone else couldn&#39;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&#39;m glad I went.  There was a lot of good and interesting discussion.  I don&#39;t think any of the world&#39;s problems were solved and I don&#39;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&#39;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&#39;re strongly typed and I know exactly what kind of data I&#39;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&#39;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&#39;ll just call DeviceInfo.  If I&#39;m writing a client to retrieve the printer&#39;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&#39;s code - I have to pull in the copier&#39;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&#39;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.</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/fullpage/post/11628709/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='https://img1.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&#39;d rather be too hot than too cold.  And every summer, there are people who say they&#39;d rather be too cold than too hot.  And I&#39;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&#39;d rather be too hot than too cold.  Problem is, I&#39;m concerned that I might have a seasonal opinion - but I really can&#39;t remember what I thought when it was actually hot out.  I&#39;m pretty certain I face this same dilemma every year, and probably twice a year (but I can&#39;t remember for sure).&lt;br /&gt;
&lt;br /&gt;
So this year, I&#39;m going to do something about it - I&#39;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&#39;s really hot out.</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/fullpage/post/11628709/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='https://img1.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=&quot;http://www.w3.org/2007/01/wos-papers/gestalt&quot;&gt;this position paper&lt;/a&gt; for the &lt;a href=&quot;http://www.w3.org/2007/01/wos-ec-program.html&quot;&gt;W3C Workshop on Web of Services for Enterprise Computing&lt;/a&gt;.   If I&#39;m lucky, maybe I&#39;ll finally get to meet fellow RESTafarian &lt;a href=&quot;http://www.markbaker.ca/blog/&quot;&gt;Mark Baker&lt;/a&gt; who&#39;s also presenting &lt;a href=&quot;http://www.w3.org/2007/01/wos-papers/coactus&quot;&gt;something&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Although I contributed to the position paper (somewhat unwittingly), at this point I&#39;m not sure I&#39;m  looking forward to going to the workshop.  In fact, if you&#39;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 &quot;why would I want to work to improve something (WS-*) that I&#39;d prefer to see fade away?&quot;&lt;br /&gt;
&lt;br /&gt;
The project I&#39;m on now is a research-oriented project for a military customer where we&#39;re looking at SOA, ESBs and Web Services (among other things).  In a nutshell, we&#39;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&#39;m working with stuff that I don&#39;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&#39;s me), so we occasionally have some spirited debates.&lt;br /&gt;
&lt;br /&gt;
For the last few months, we&#39;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&#39;re cranking out the architectural guidelines and building themselves some infrastructure to support all these new services that&#39;ll be part of their SOA.  One piece of that infrastructure is discovery.&lt;br /&gt;
&lt;br /&gt;
Apparently, there&#39;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&#39;s another group that believes there&#39;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&#39;ve been looking at service discovery and asking lots of questions -  like what&#39;s the difference between design-time and run-time discovery, and is there really a need for such a thing?  It&#39;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&#39;s currently able to muster.&lt;br /&gt;
&lt;br /&gt;
We&#39;ve managed to make some progress - to the point where I&#39;ve managed to formulate a somewhat coherent picture of service discovery in my head; and over the last month, I&#39;ve tried to put some of it on paper.  Mind you, none of it&#39;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&#39;ve drawn is that (assuming run-time discovery is actually a useful thing), what&#39;s currently out there in terms of tools, technologies, and specifications probably isn&#39;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&#39;m not so sure.  I&#39;m not even convinced there&#39;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&#39;m not even sure is a problem, and I have to do it at a workshop that I&#39;d otherwise have no interest in.  Oh well, if I do go, at least I&#39;ll finally get to meet a bunch of cool people - like Mark, Noah and Dave - whose writings I&#39;ve followed in such august places as the &lt;a href=&quot;http://www.w3.org/2001/tag/&quot;&gt;W3C TAG&lt;/a&gt; mailing list or the &lt;a href=&quot;http://groups.yahoo.com/group/rest-discuss/&quot;&gt;REST-discuss&lt;/a&gt; group.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Let&#39;s see if I can do another one of these without waiting another two years.)</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/fullpage/post/11628709/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='https://img1.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=&quot;http://rest.blueoxen.net/cgi-bin/wiki.pl?HowSoapComparesToRest&quot;&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=&quot;font-weight: bold;&quot;&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&#39;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&#39;s not that&#39;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&#39;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&#39;ve thought about it this way.</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/fullpage/post/11628709/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='https://img1.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&#39;ve been spending a lot of time looking for information that compares and/or contrasts WS-* with REST. As I go, I&#39;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=&quot;http://del.icio.us/&quot;&gt;del.icio.us&lt;/a&gt;. Once I&#39;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=&quot;http://lists.w3.org/Archives/Public/www-ws-arch/&quot;&gt;ws-arch mail archives&lt;/a&gt; and a few more over in the &lt;a href=&quot;http://lists.xml.org/archives/xml-dev/&quot;&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&#39;ll add them to the &lt;a href=&quot;http://del.icio.us/tag/restvsoap&quot;&gt;restvsoap &lt;/a&gt;tag that I set up on del.icio.us. I&#39;m hoping that at least a few other people notice the tag and are able to add some useful pointers as well. I&#39;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.</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/fullpage/post/11628709/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='https://img1.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&#39;ve reached the chapter that talks about WS-Addressing and the WS-Resource Framework (chapter 8 in &lt;a href=&quot;http://www.amazon.com/exec/obidos/tg/detail/-/0672326418/104-3444935-4311956&quot;&gt;Building Web Services with Java&lt;/a&gt;). Apart from having a hard time getting my ahead around the authors&#39; concepts of stateful and stateless resources, I couldn&#39;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&#39;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&#39;ve also noticed that as I&#39;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&#39;s say that I have a real estate &#39;application&#39; 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 &#39;application&#39;, 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&#39;s state or data model; i.e., what elements make up a listing resource&#39;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&#39;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&#39;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&#39;m not sure what the answer might be. For that matter, I&#39;m not even sure I&#39;m asking the right question.&lt;br /&gt;
&lt;br /&gt;
I&#39;m pretty sure that the first and last items are reasonable things to want. Its the middle one that I&#39;m not so sure of. I can&#39;t help but think that I&#39;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=&quot;http://www.markbaker.ca/2003/05/RDF-Forms/&quot;&gt;RDF Forms&lt;/a&gt;, but I&#39;m not sure whether that&#39;s what I want or not. It seems like something is missing, but maybe I&#39;m just making it more complicated than it needs to be</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/fullpage/post/11628709/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='https://img1.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&#39;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&#39;s &#39;inbox&#39; and process the messages that it finds there. So not only do I still need some sort of server, but now I&#39;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&#39;s the case. There&#39;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&#39;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.</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/fullpage/post/11628709/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='https://img1.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&#39;ve got some free time on my hands (while I look for a new job), I decided it&#39;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&#39;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 - &quot;let&#39;s put a web service interface on so we can say our product supports SOAP&quot;). And since the web services part wasn&#39;t part of the core architecture, I&#39;ve never spent much time really investigating and trying to understand the why&#39;s and wherefore&#39;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=&quot;http://www.amazon.com/exec/obidos/tg/detail/-/0672326418/104-3444935-4311956&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Building Web Services with Java&lt;/span&gt;&lt;/a&gt;.  (I had hoped to find something on &lt;a href=&quot;http://safari.oreilly.com/&quot;&gt;O&#39;Reilly&#39;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&#39;ve been a pretty strong believer in the REST architectural style and, over the past three or four years, I&#39;ve made a pretty concerted effort to adhere to those principles in the solutions I&#39;ve designed and built. I&#39;m very much aware that there&#39;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&#39;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&#39;re pretty superficial and it seems like they&#39;re only there to make the presentation look balanced.&lt;br /&gt;&lt;br /&gt;So far, there haven&#39;t been any surprises. I&#39;ve either heard of or have actually used most of the technologies they&#39;ve covered - XML and XML Schema, SOAP, WSDL, UDDI, Axis, etc. However, I can&#39;t help but to keep asking myself &quot;What happened to the web in Web Services?&quot;&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&#39;s on the web. The only thing that even comes close is the service endpoint, and that&#39;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&#39;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&#39;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&#39;ll understand.&lt;br /&gt;&lt;br /&gt;(&lt;span style=&quot;font-style: italic;&quot;&gt;In case you&#39;re wondering, the title is a reference to a bit from a Sponge Bob Squarepants episode.)&lt;/span&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/fullpage/post/11628709/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='https://img1.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&#39;ve finally set up my own blog. (Cue sound of crickets chirping.)&lt;br /&gt;&lt;br /&gt;I&#39;ve been thinking about doing this for a while, but I&#39;ve never really been motivated enough to actually do anything. I&#39;ve come real close a number of times over the past few months, but each time I&#39;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=&quot;font-weight: bold;&quot;&gt;Why&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;So why am I doing this? I&#39;m not completely sure. I&#39;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=&quot;font-weight: bold;&quot;&gt;Writing Practice&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I&#39;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&#39;d paid much more attention in my high school English classes. But that&#39;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&#39;s not that I sit and stare at the screen with writer&#39;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&#39;ve written, they have half of chance of understanding what I&#39;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=&quot;font-weight: bold;&quot;&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&#39;t consider myself exceptionally smart, nor do I think I&#39;m a deep thinker. And I&#39;m certainly not an expert on anything in particular (I&#39;m more a jack-of-all-trades kind of guy). But that doesnt seem to stop most people. And I&#39;m not going to let it stop me either.&lt;br /&gt;&lt;br /&gt;Maybe, if I&#39;m really lucky, I&#39;ll manage to start a conversation or two of my own and actually get some feedback. Maybe I&#39;ll find out that I&#39;m pretty normal and that my approach to doing software fits in with the way most other people do it. Or, maybe I&#39;ll find out that I&#39;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&#39;ve learned something.</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/fullpage/post/11628709/111153312765636502' title='1 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='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>