<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>marten.gustafson</title>
	<atom:link href="http://mgustafson.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mgustafson.wordpress.com</link>
	<description>Mårten on the more professional parts of his life, work and computer related</description>
	<lastBuildDate>Thu, 27 Oct 2011 15:58:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mgustafson.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>marten.gustafson</title>
		<link>http://mgustafson.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mgustafson.wordpress.com/osd.xml" title="marten.gustafson" />
	<atom:link rel='hub' href='http://mgustafson.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Reasoning on REST versioning, with example code</title>
		<link>http://mgustafson.wordpress.com/2011/10/27/reasoning-on-rest-versioning-with-example-code/</link>
		<comments>http://mgustafson.wordpress.com/2011/10/27/reasoning-on-rest-versioning-with-example-code/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 15:58:11 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[guice]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jersey]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[versioning]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=721</guid>
		<description><![CDATA[Versioning and ease of use The way to &#8220;properly&#8221; version REST services, according to most texts I&#8217;ve read and people I&#8217;ve talked to, is to use custom media types. I think this is a good solution implementation wise. Usability wise I think it sucks because it makes it very hard to test the service using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=721&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Versioning and ease of use</h1>
<p>The way to &#8220;properly&#8221; version REST services, according to most texts I&#8217;ve read and people I&#8217;ve talked to, is to use custom media types. I think this is a good solution implementation wise. Usability wise I think it sucks because it makes it very hard to test the service using your browser since you need to specify a custom accept header.</p>
<h1>Example</h1>
<p>Instead of rambling about pros and cons here, like many have already done. I made an example using Java (Jersey, Guice, Tomcat) and nginx to illustrate how to both implement a media type versioned service as well as publishing it in a way that also makes it easy to explore using a browser.</p>
<h1>tl;dr</h1>
<p>It&#8217;s all here <a href="https://github.com/chids/java-rest-versioning/">https://github.com/chids/java-rest-versioning/</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/721/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/721/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/721/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=721&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/10/27/reasoning-on-rest-versioning-with-example-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
		<item>
		<title>Visualizing cost and improvement areas for software maintenance</title>
		<link>http://mgustafson.wordpress.com/2011/09/02/visualizing-cost-and-improvement-areas-for-software-maintenance/</link>
		<comments>http://mgustafson.wordpress.com/2011/09/02/visualizing-cost-and-improvement-areas-for-software-maintenance/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 22:26:07 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[cost]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[philosophies]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[techniques]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[visualize]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=662</guid>
		<description><![CDATA[In chapter 4 &#8220;Motivation&#8221; of his book Implementation Patterns (Addison-Wesley Professional, 2008) Kent Beck cites Structured Design: Fundamentals of a Discipline of Computer Program and Systems Design (Prentice Hall, 1979) with the formula for calculating the cost of software as the sum of the cost of development plus the cost of maintaining it: COSTtotal = COSTdevelop [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=662&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">In chapter 4 &#8220;Motivation&#8221; of his book <a href="http://www.amazon.com/Implementation-Patterns-Kent-Beck/dp/0321413091">Implementation Patterns</a> (Addison-Wesley Professional, 2008) <a href="http://www.threeriversinstitute.org/">Kent Beck</a> cites <a href="http://www.amazon.com/Structured-Design-Fundamentals-Discipline-Computer/dp/0138544719">Structured Design: Fundamentals of a Discipline of Computer Program and Systems Design</a> (Prentice Hall, 1979) with the formula for calculating the cost of software as the sum of the cost of development plus the cost of maintaining it:</p>
<p>COST<sub>total</sub> = COST<sub>develop</sub> + COST<sub>maintain</sub></p>
<p>The cost of maintenance is then broken down to:</p>
<p>COST<sub>maintain</sub> = COST<sub>understand</sub> + COST<sub>change</sub> + COST<sub>test</sub> + COST<sub>deploy</sub></p>
<p>I like this formula and when I recently revisited Implementation Patterns I started thinking about the cost components of software maintenance and how we work with them.</p>
<p>I&#8217;ve put together a short illustrated text on my reasoning and <a href="http://marten.gustafson.pp.se/content/visualizing-cost-and-improvement-areas-for-software-maintenance">published it here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/662/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/662/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/662/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/662/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/662/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/662/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/662/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/662/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/662/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/662/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/662/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/662/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/662/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/662/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=662&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/09/02/visualizing-cost-and-improvement-areas-for-software-maintenance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
		<item>
		<title>Confluence: Render XML response from HTTP service</title>
		<link>http://mgustafson.wordpress.com/2011/05/30/confluence-render-xml-response-from-http-service/</link>
		<comments>http://mgustafson.wordpress.com/2011/05/30/confluence-render-xml-response-from-http-service/#comments</comments>
		<pubDate>Mon, 30 May 2011 20:58:47 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=627</guid>
		<description><![CDATA[tl;dr; Here&#8217;s the macro, example of it&#8217;s usage and the XSLT used to pretty print. Background We document our HTTP based services in Confluence and I wanted to&#8230; embed service invocations in wiki pages to show the result of calling a certain URL pretty print the output not have to write a Java plugin in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=627&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>tl;dr;</h1>
<p>Here&#8217;s the <a href="https://gist.github.com/999412">macro, example of it&#8217;s usage and the XSLT used to pretty print</a>.</p>
<h1>Background</h1>
<p>We document our HTTP based services in <a href="http://www.atlassian.com/software/confluence/">Confluence</a> and I wanted to&#8230;</p>
<ul>
<li>embed service invocations in wiki pages to show the result of calling a certain URL</li>
<li>pretty print the output</li>
<li>not have to write a Java plugin in Confluence</li>
</ul>
<h1>Steps</h1>
<h3>Making a HTTP request from a macro</h3>
<p>I started of with the <a href="https://studio.plugins.atlassian.com/wiki/display/HTML/Confluence+HTML+Plugin">HTML macro</a> and verified that it worked.</p>
<h3>Formatting the response</h3>
<p>Our services produces as compact XML as possible to save space, they don&#8217;t pretty print. Hence I needed to format the service response and after finding these <a href="http://www.dpawson.co.uk/xsl/sect2/pretty.html">XSLT&#8217;s</a> I saved one of them as an attachment to a page within Confluence and paired it with the <a href="https://studio.plugins.atlassian.com/wiki/display/HTML/XSLT+Macro">XSLT macro</a>.</p>
<h3>Alternating the URL displayed (and/or used to make the request)</h3>
<p>As I&#8217;ve <a href="/2011/03/15/atlassian-confluence-context-aware-includes/">written about earlier</a> we document all of our services in one space and selectively &#8220;publish&#8221; a subset of those to another space from which we allow export of PDF&#8217;s as the deliverable documentation. In order for this to work we need the service examples to show, and use, different domain names for accessing services based on wether the documentation is viewed in our internal space or in the space used to export PDF documentation to our clients. The logic for this is the first block in the macro in which it looks at which space the macro is rendered and selects the base URL based on that.</p>
<h2>Caveats</h2>
<h3>Query parameters</h3>
<p>Due to what appears to be a limitation or bug in the handling of user macros Confluence won&#8217;t properly render the macro if the URL to the service contains an equal (=) sign. So in order to support query parameters the macro replaces any occurrences of two colons (::) with an equal sign. It&#8217;s all illustrated in the Gist <a href="https://gist.github.com/999412">showing the macro</a>.</p>
<h3>What about JSON?</h3>
<p>We use this solution for JSON as well but without the XSLT formatting stage which renders our JSON responses butt ugly, if you have a solution on how to format JSON as well &#8211; feel free to post a comment.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/627/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=627&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/05/30/confluence-render-xml-response-from-http-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
		<item>
		<title>Nginx: set the accept header based on file extension</title>
		<link>http://mgustafson.wordpress.com/2011/03/17/nginx-set-the-accept-header-based-on-file-extension/</link>
		<comments>http://mgustafson.wordpress.com/2011/03/17/nginx-set-the-accept-header-based-on-file-extension/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 12:23:28 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=612</guid>
		<description><![CDATA[tl;dr https://gist.github.com/874201 Background Most of our services responds to HTTP GET requests and produce an XML or JSON response. The format of the response is determined by the HTTP Accept header. This is fine when our users program their clients but since our APIs are exposed over HTTP most of the initial sampling and testing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=612&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>tl;dr</h2>
<p><a href="https://gist.github.com/874201">https://gist.github.com/874201</a></p>
<h2>Background</h2>
<p>Most of our services responds to HTTP GET requests and produce an XML or JSON response. The format of the response is determined by the <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">HTTP Accept header</a>. This is fine when our users program their clients but since our APIs are exposed over HTTP most of the initial sampling and testing can be done simply by pointing a browser to the endpoint and experimenting with query params etc. So how to do play with your browser and still be able to choose wether to get the result as JSON or XML? Well set the accept header by using <a href="https://addons.mozilla.org/sv-se/firefox/addon/poster/">Poster</a> for Firefox or <a href="https://chrome.google.com/extensions/detail/fhjcajmcbmldlhcimfajhfbgofnpcjmb">Simple REST client</a>, <a href="https://chrome.google.com/extensions/detail/faceofpmfclkengnkgkgjkcibdbhemoc">REST Console</a>, or <a href="https://chrome.google.com/extensions/detail/ahdjpgllmllekelefacdedbjnjaplfjn">Advanced REST Client</a> for Chrome. There&#8217;s certainly more alternatives available for any and all browser that you may use. Or you can fire up a console and run <a href="http://curl.haxx.se/">cURL</a>.</p>
<p>All clients and command lines are fine, and usually invaluable to have when your getting deep with the API. But for those initial play around tests it&#8217;d be nice just to be able to surf to the resource and say: <em>I want this resource to respond with XML or JSON</em>.</p>
<h2>Keep it simple&#8230;</h2>
<p>&#8230;therefore we support the use of file extensions <strong>.xml</strong> and <strong>.json</strong> respectively. So a service that we expose as:<br />
<code>http://some.api.domain/some-service/v1/fetch?foo=bar</code><br />
might also be invoked as:<br />
<code>http://some.api.domain/some-service/v1/fetch.json?foo=bar</code><br />
or<br />
<code>http://some.api.domain/some-service/v1/fetch.xml?foo=bar</code></p>
<h2>Accept header manipulation in Nginx</h2>
<p>Now, where not really interested in introducing this handling in all our services. They all have automagic response format serialization through the Accept header. Hence we&#8217;d simply like to alter the accept header for requests that provide a file extension and we already use <a href="http://nginx.org/">Nginx</a> as a reverse proxy in front of our application servers &#8211; see this gist for an <a href="https://gist.github.com/874201">example nginx configuration</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/612/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=612&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/03/17/nginx-set-the-accept-header-based-on-file-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
		<item>
		<title>Atlassian Confluence: Context aware includes</title>
		<link>http://mgustafson.wordpress.com/2011/03/15/atlassian-confluence-context-aware-includes/</link>
		<comments>http://mgustafson.wordpress.com/2011/03/15/atlassian-confluence-context-aware-includes/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 10:16:53 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[macro]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=606</guid>
		<description><![CDATA[tl;dr https://gist.github.com/870528 Background I&#8217;ve written earlier about how we utilize Atlassian Confluence to document our APIs in general and my user macro hack to actually perform service calls and display results on page rendering (read the section &#8220;User macro to render service response&#8221; for more details). Our space structure We mainly classify services into three [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=606&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>tl;dr</h1>
<p><a href="https://gist.github.com/870528">https://gist.github.com/870528</a></p>
<h1>Background</h1>
<p>I&#8217;ve <a href="/2010/09/25/using-a-wiki-for-api-documentation/">written earlier</a> about how <a href="http://www.hitta.se/">we</a> utilize <a href="http://www.atlassian.com/">Atlassian Confluence</a> to document our APIs in general and my user macro hack to actually perform service calls and display results on page rendering (read the section <a href="/2010/09/25/using-a-wiki-for-api-documentation/">&#8220;User macro to render service response&#8221;</a> for more details).</p>
<h3>Our space structure</h3>
<p>We mainly classify services into three groups; public, partner and internal. Public being services where we don&#8217;t really care about their usage &#8211; we might not encourage broad public use but we&#8217;re not trying to limit it. Partner services are offered within some form of commercial agreement and requires a API key. Internal services are not accessible from outside our internal networks.</p>
<p>This has led me to do the following <a href="http://confluence.atlassian.com/display/DOC/Working+with+Spaces">space structure</a> in our Confluence wiki:</p>
<ul>
<li>API, this is the space that contains all of our services</li>
<li>PARTNER, this space contains the subset of the API contents that are available to partners</li>
</ul>
<p>The partner space uses the include macro to include those pages from the API space that are available to partners. The bread and butter of all our service docs are the various macros that call our services and display the result to provide concrete examples. These will always use the internal address of a service to circumvent the need for any API key handling. However the internal domain should not be used in the examples displayed to our partners.</p>
<h3>Context aware includes</h3>
<p>The partner space uses includes from the api space and the page in the api space is the one using the macro to perform and display the service call. Hence I needed to have the macro display a different base URL depending on the space key. This wasn&#8217;t bloody obvious but proved very simple once I grasped the Veolcity context and the objects it provide. The magic happens with:<br />
<code>$renderContext.getOriginalContext().getSpaceKey()</code></p>
<p><a href="https://gist.github.com/870528">See the gist for a complete example</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/606/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=606&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/03/15/atlassian-confluence-context-aware-includes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
		<item>
		<title>Giving tech talks in upper secondary school</title>
		<link>http://mgustafson.wordpress.com/2011/03/14/giving-tech-talks-in-upper-secondary-school/</link>
		<comments>http://mgustafson.wordpress.com/2011/03/14/giving-tech-talks-in-upper-secondary-school/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 12:59:56 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[databases]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[hierarchical]]></category>
		<category><![CDATA[mentoring]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[relational]]></category>
		<category><![CDATA[transfer.nu]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=598</guid>
		<description><![CDATA[I&#8217;ve been a member of Transfer for some time now and thought it might be worth a mention. Specifically I&#8217;d like to hear about similar initiatives elsewhere, if you know any &#8211; please drop me a line. Transfer is a non-profit knowledge transfer network whose aim is to bring professionals in all sorts of diverse areas to Sweden&#8217;s upper secondary [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=598&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a member of <a href="http://www.transfer.nu/Transfer/omoss/transferinenglish.jspx">Transfer</a> for some time now and thought it might be worth a mention. Specifically I&#8217;d like to hear about similar initiatives elsewhere, if you know any &#8211; <em>please drop me a line</em>. Transfer is a non-profit knowledge transfer network whose aim is to bring professionals in all sorts of diverse areas to Sweden&#8217;s upper secondary schools. Teachers can use the Transfer website to request a lecture in an area and Transfer then matches those requests with the profiles of the affiliated professionals, which can then either accept or decline the request. Sort of like a dating service.</p>
<p>To be fair, I&#8217;ve only done two lectures and the amount of requests within my area of expertise are somewhat sparse. Nonetheless, giving a lecture to a young audience that&#8217;s still in school and usually very curious is challenging and thus very rewarding. I sincerely recommend participating, regardless of what area you do work in.</p>
<p>The slides from my latest lecture (given in November 2010) on databases in general are now up on Slideshare.</p>
<iframe src='http://www.slideshare.net/slideshow/embed_code/7258133' width='570' height='467'></iframe>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/598/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/598/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/598/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=598&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/03/14/giving-tech-talks-in-upper-secondary-school/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
		<item>
		<title>Stockholm #killdashnine 1</title>
		<link>http://mgustafson.wordpress.com/2011/02/10/stockholm-killdashnine-1/</link>
		<comments>http://mgustafson.wordpress.com/2011/02/10/stockholm-killdashnine-1/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 10:58:45 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[activemq]]></category>
		<category><![CDATA[basho]]></category>
		<category><![CDATA[cocktails]]></category>
		<category><![CDATA[dry-martini]]></category>
		<category><![CDATA[durability]]></category>
		<category><![CDATA[killdashnine]]></category>
		<category><![CDATA[riak]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=585</guid>
		<description><![CDATA[Bckgrnd Basho posted &#8220;Data Durability Is Not An After-market Add-on; Announcing KillDashNine&#8221; and since I&#8217;m a fan of durable data in general, Riak and Dry Martini in particular I decided to do the Stockholm version of #killdashnine. The venue was Little Quarter (the inner bar at restaurant Marie Laveau), home to my favorite bar staff. Killing-dash-nine-shit Me, Jesper, Sven and Fredrik made only [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=585&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Bckgrnd</h3>
<p><img class="alignright size-medium wp-image-587" title="kill-dash-nine-martini" src="http://mgustafson.files.wordpress.com/2011/02/kill-dash-nine-martini1.jpg?w=224&#038;h=300" alt="kill-dash-nine-martini" width="224" height="300" /></p>
<p>Basho posted <a href="http://blog.basho.com/2011/02/07/data-durability-is-not-an-after-market-add-on;-announcing-killdashnine/">&#8220;Data Durability Is Not An After-market Add-on; Announcing KillDashNine&#8221;</a> and since I&#8217;m a fan of durable data in general, <a href="http://riak.basho.com/">Riak</a> and Dry Martini in particular I decided to do the Stockholm version of <a href="http://search.twitter.com/search?q=%23killdashnine">#killdashnine</a>. The venue was <a href="http://twitter.com/littlequarter">Little Quarter</a> (the inner bar at restaurant <a href="http://www.marielaveau.se/">Marie Laveau</a>), home to my favorite bar staff.</p>
<h3>Killing-dash-nine-shit</h3>
<p>Me, <a href="http://twitter.com/jebl01">Jesper</a>, <a href="http://twitter.com/svjson">Sven</a> and <a href="http://twitter.com/kenobe">Fredrik</a> made only four people in attendance so we certainly have some room for improvement. Also <span style="text-decoration:underline;">we didn&#8217;t actually kill any databases on location</span>. Although me and Jesper did spend some time last week beating the crap out of <a href="http://activemq.apache.org/">ActiveMQ</a> using kill -9 on the broker while producing and consuming persistent messages. Using our very non-scientific, nor exhaustive, approach it all looked well <a href="https://issues.apache.org/jira/browse/AMQ-3120">although some people experience problems with KahaDB</a>.</p>
<p>I&#8217;m aiming to keep this going on the 9th of the month and hopefully I&#8217;ll muster the energy to prep some proper kill-demos for the next gathering.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/585/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/585/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/585/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=585&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/02/10/stockholm-killdashnine-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>

		<media:content url="http://mgustafson.files.wordpress.com/2011/02/kill-dash-nine-martini1.jpg?w=224" medium="image">
			<media:title type="html">kill-dash-nine-martini</media:title>
		</media:content>
	</item>
		<item>
		<title>Goals for 2011</title>
		<link>http://mgustafson.wordpress.com/2011/01/09/goals-for-2011/</link>
		<comments>http://mgustafson.wordpress.com/2011/01/09/goals-for-2011/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 17:39:01 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[apprenticeship]]></category>
		<category><![CDATA[evolution]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[goal]]></category>
		<category><![CDATA[resolutions]]></category>
		<category><![CDATA[self-improvement]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=552</guid>
		<description><![CDATA[In no particular order: Travel &#8211; I love the new and unknown, therefore: take a solid vacation. Solid meaning minimum six weeks spent in another country. Hot candidates are India, South America, Africa, and Indonesia. Work &#8211; I see myself as very diverse individual with a multidisciplinary palette which I often find hard to convey, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=552&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In no particular order:</p>
<ul>
<li>Travel &#8211; I love the new and unknown, therefore: <strong>take a solid vacation</strong>. Solid meaning minimum six weeks spent in another country. Hot candidates are India, South America, Africa, and Indonesia.</li>
<li>Work &#8211; I see myself as very diverse individual with a multidisciplinary palette which I often find hard to convey, therefore: <strong>Revamp my resumé/CV</strong> by taking the time to explore the various ideas I&#8217;ve had over the years on how to break free from the traditional CV/resumé format in order to communicate my diverse skill set, experience and strengths.</li>
<li>Work &#8211; I have had very positive experiences of mentor/mentee relations in the past but I haven&#8217;t had a mentor in almost 10 years, therefore: <strong>Try to find a mentor</strong> which is in someway senior to me but not within IT but rather in finance, human resources or type of management.</li>
<li>Travel &#8211; I&#8217;ve enjoyed all my tips to the US (New York, North Carolina &amp; Las Vegas) and therefore: <strong>visit the US west coast</strong> and see at least three of: San Francisco, Los Angeles, Seattle, Portland, Sacramento, Fresno, Santa Cruz, Tijuana, Oakland. Also, this is separate from the <em>solid vacation</em> goal.</li>
<li>Work &#8211; I originate from programming and after a few years in exile I&#8217;m back into doing it almost full time, therefore: <strong>become self-sufficient in one new programming language</strong>. Obvious candidates are Scala, Erlang, and Clojure.</li>
<li>Home &#8211; I love watching movies, therefore: <strong>realize a slim, no fuzz, home media setup</strong>: A thin display (TFT/LED) that supports as much DLNA/UPnP stuff as possible in combination with either a media player such as Sony PS3, Mac Mini or, preferably, just a capable enough NAS.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/552/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/552/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/552/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=552&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/01/09/goals-for-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
		<item>
		<title>Two years late: Comments on old WMB best practices</title>
		<link>http://mgustafson.wordpress.com/2011/01/06/two-years-late-comments-on-old-wmb-best-practices/</link>
		<comments>http://mgustafson.wordpress.com/2011/01/06/two-years-late-comments-on-old-wmb-best-practices/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 16:18:57 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[ibm]]></category>
		<category><![CDATA[WMB]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[developerworks]]></category>
		<category><![CDATA[esql]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[wbimb]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=323</guid>
		<description><![CDATA[In September 2008 Shravan K Kudikala posted an article on IBM DeveloperWorks entitled &#8220;WebSphere Message Broker development and deployment best practices&#8221; consisted of various best practice bullet points. This product being my key competence at the time I had a few comments on his article but for some reason I never got around to finish and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=323&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In September 2008 Shravan K Kudikala posted an article on IBM DeveloperWorks entitled &#8220;<a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0809_kudikala/0809_kudikala.html">WebSphere Message Broker development and deployment best practices</a>&#8221; consisted of various best practice bullet points. This product being my key competence at the time I had a few comments on his article but for some reason I never got around to finish and publish it. While cleaning out various drafted blog posts I found this and even though this is somewhat embarrassingly old I thought I might as well post since I obviously took the time to write it.</p>
<p><strong>DISCLAIMER: </strong>Read the above &#8211; this is old material. Always refer to and double check agains the <a href="http://www.ibm.com/software/integration/wbimessagebroker/">latest product documentation</a>.</p>
<ul>
<li>Often, to separate configuration information from business logic, customers externalize configuration information to a file or database. This technique can reduce performance, because reading a configuration or parameters file is a one-time activity at the time of the first instance of a node is created or at the time the first message is processed, instead of a loop checkup for each message. Since Message Broker is more CPU-oriented than I/O-oriented, it is usually best to avoiding I/O operations involving files or databases when possible.
<ul>
<li><em>While far from a simple decision or guideline to provide I&#8217;d opt for building flows highly configurable at first. Should stress testing reveal that the externalization of configuration data poses too much of a performance increase, inline it. But generally I&#8217;d say that the flexibility that an external configuration solution provides (be it database, file, or a registry) enables rapid change and drives a more module solution.</em></li>
</ul>
</li>
<li>Do not use trace nodes on production environments. Using ${Root} expression is expensive operation as this causes the complete message tree parsing. This happens even if the destination is not an active one.
<ul>
<li><em>Clarification; do use trace nodes at key points in your flows but be sure that your production environment is configured with trace nodes disabled. As of version 6.1.0.3 of WebSphere Message Broker; consider using the new flow monitoring solution instead of trace nodes for a more flexible monitoring solution.</em></li>
</ul>
</li>
<li>Wherever possible use user-exits and redirect the audit / logging information appropriately. User exit feature gives the flexibility to activate &amp; deactivate them dynamically during message processing.
<ul>
<li><em>This also holds true for trace nodes and the event monitoring introduced in version 6.1.0.3.</em></li>
</ul>
</li>
<li>Save intermediate results in the message tree in order to avoid recalculating them in subsequent nodes. If the message contains user maintainable data folders in the headers like MQRFH2 usr folder then store the intermediate results in it for subsequent nodes.
<ul>
<li><em>For temporary results that are only needed during the execution of a flow, consider using the global or local environment.</em></li>
</ul>
</li>
<li>Using destination list is more recommended rather than using more nodes when message has to be written to multiple destinations.
<ul>
<li><em>Destinaion lists are a good way to provide dynamic destinations. Multiple nodes are more explicit and easily understood when the destinations are fixed. Route nodes in combination with MQOutput-nodes provide a way to specify conditions to determine which destinations should receive a message. Be sure to weigh ease-of-understanding versus dynamicity (and whether that dynamicity is really needed!).</em></li>
</ul>
</li>
<li>Always have exceptional handling mechanism for the message flows rather than relying on the default broker exception handler. The default exceptional handler can block the message consumption when a single poisoned message processing is failed.
<ul>
<li><em>For MQ-driven flows the default exception handling should be fine as long as you&#8217;ve defined a backout queue on the flow input queue.</em></li>
</ul>
</li>
<li>Use subflows for code reuse across multiple message flows, especially if you are using or considering multiple protocols.
<ul>
<li><em>Do note that a subflow is the equivalent of an include statement. A subflow is merely a IDE construct and what the runtime receives is a message flow that is the result of an &#8220;merge&#8221; done by the tooling in which it simply inlines all subflows in the main flow. Therefore changing a subflow will never change any deployed flow using that subflow. Nor is it possible to deploy a subflow on it&#8217;s own. Sometimes this is a good thing, <em>however </em>for a &#8220;pure&#8221; service re-use it is not, for those scenarios; consider using a separate flow.</em></li>
</ul>
</li>
<li>Revisit all the java nodes and ensure that there is a clearMessage() called on every MbMessage object especially in the finally block. MbMessage object is used to create output message tree, environment tree, local environment tree, exception list tree, etc. So where ever the message trees are created, clear them out in the try &#8211; finally block.
<ul>
<li><em>The clearMessage() call is not necessary. You can safely exclude try/finally blocks that only exist to call clearMessage().</em></li>
</ul>
</li>
<li>It is strongly recommended to have fewer, more complex nodes rather than having large number of nodes with the processing logic spread across.
<ul>
<li><em>Again, performance versus maintainability. I approach this as any kind of software optimization and prefer to build flows that are easily understood &#8211; this often means a larger number of nodes that only have a specific responsibility, and are named to explain that responsibility. In my view optimization should be done when actual bottle necks are identified.</em></li>
</ul>
</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/323/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=323&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/01/06/two-years-late-comments-on-old-wmb-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
		<item>
		<title>Adventures in GIS</title>
		<link>http://mgustafson.wordpress.com/2011/01/06/adventures-in-gis/</link>
		<comments>http://mgustafson.wordpress.com/2011/01/06/adventures-in-gis/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 15:48:18 +0000</pubDate>
		<dc:creator>Mårten Gustafson</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[geographic]]></category>
		<category><![CDATA[geotools]]></category>
		<category><![CDATA[gis]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[rt90]]></category>
		<category><![CDATA[sweref99]]></category>
		<category><![CDATA[transformation]]></category>
		<category><![CDATA[wgs84]]></category>

		<guid isPermaLink="false">http://mgustafson.wordpress.com/?p=465</guid>
		<description><![CDATA[I spent a fair amount of time during September and October 2010 with cleaning up and refactoring our generic coordinate library. GIS not being a domain I&#8217;ve had much, if any, to do with since before joining Hitta.se it&#8217;s been a deep dive into this pretty tricky domain. Some of the key insights gained during the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=465&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I spent a fair amount of time during September and October 2010 with cleaning up and refactoring our generic coordinate library. GIS not being a domain I&#8217;ve had much, if any, to do with since before joining <a href="http://www.hitta.se/">Hitta.se</a> it&#8217;s been a deep dive into this pretty tricky domain. Some of the key insights gained during the work was that there are different types of coordinate systems. <a href="http://en.wikipedia.org/wiki/World_Geodetic_System">WGS84</a> not being a projected coordinate system but rather a <a href="http://en.wikipedia.org/wiki/Geodetic">geodetic</a> while Swedish systems <a href="http://en.wikipedia.org/wiki/Swedish_grid">RT90</a> and SWEREF99 are projected. Understanding transformations becomes much easier when you know that ;-)</p>
<p>The actual transformation math is not something I&#8217;ll even try to understand, nor actually care for, but I now understand how transformations are done and why. We&#8217;re lucky that we have <a href="http://www.twitter.com/tablackmore">Tom</a> to help us out in GIS-crunch times.</p>
<p>In the process of structuring and simplifying the code base I&#8217;ve played around with some of the less and more known GIS-libraries written in Java. Most notably there was a short period of time when it looked like <a href="http://www.geotools.org/">GeoTools</a> would simply plug in and free us from all transformation headaches. It was a nice illusion to live in for a week or so. Turned out it was, at the time, more or less impossible to get a clear idea of which libraries (out of way too many) that we actually needed. I ended up simply removing them one at the time from the classpath and running tests. When I&#8217;d slimmed down the amount of required libraries to a bare minimum (still too many) it turned out that the code was <a href="http://osgeo-org.1803224.n2.nabble.com/Allowing-web-applications-to-undeploy-without-perm-gen-leaks-a-first-cut-td5075011.html">leaking memory</a> all over. It soon become to cumbersome to justify. Hence we&#8217;re now rolling our own bare minimum transformation code which is slim, fast and does not leak.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mgustafson.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mgustafson.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mgustafson.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mgustafson.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mgustafson.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mgustafson.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mgustafson.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mgustafson.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mgustafson.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mgustafson.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mgustafson.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mgustafson.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mgustafson.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mgustafson.wordpress.com/465/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mgustafson.wordpress.com&amp;blog=3531766&amp;post=465&amp;subd=mgustafson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mgustafson.wordpress.com/2011/01/06/adventures-in-gis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a204e1fe2002bc6d087391759c3dfab0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">chids</media:title>
		</media:content>
	</item>
	</channel>
</rss>
