<?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/"
	>

<channel>
	<title>Minimal Software</title>
	<atom:link href="http://www.minimalsoftware.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.minimalsoftware.com/blog</link>
	<description>software shouldn't be so painful</description>
	<lastBuildDate>Sat, 30 May 2009 09:06:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spring Roo &#8211; Bootstrap problems on Windows</title>
		<link>http://www.minimalsoftware.com/blog/?p=29</link>
		<comments>http://www.minimalsoftware.com/blog/?p=29#comments</comments>
		<pubDate>Fri, 29 May 2009 09:01:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Roo]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[Springsource]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=29</guid>
		<description><![CDATA[I&#8217;ve just started playing around with Spring Roo it seems like a really good &#8217;scaffold&#8217; approach to starting Java development, much like the productivity boost you get from Ruby on Rails or Grails.  There is a good tutorial here.  I did hit one issue while following it &#8211; on Windows.
If you have installed Roo on [...]]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignleft" style="width: 207px"><a href="http://www.springsource.com/"><img title="SpringRoo" src="http://www.springsource.com/sites/all/themes/zen/springsource2/logo.png" alt="SpringSource" width="197" height="60" /></a><p class="wp-caption-text">SpringSource</p></div>
<p>I&#8217;ve just started playing around with <a href="http://www.springsource.org/roo">Spring Roo</a> it seems like a really good &#8217;scaffold&#8217; approach to starting Java development, much like the productivity boost you get from Ruby on Rails or Grails.  There is a good tutorial <a href="http://blog.springsource.com/2009/05/27/roo-part-2/">here</a>.  I did hit one issue while following it &#8211; on Windows.</p>
<p>If you have installed Roo on a different drive than the projects you create, for example I installed Roo to E:\apps\roo and then tried to create a Roo project in C:\rootest and got this:</p>
<pre>Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/r
oo/bootstrap/Bootstrap
Caused by: java.lang.ClassNotFoundException: org.springframework.roo.bootstrap.B
ootstrap
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.springframework.roo.bootstrap.Bootstrap.  Pro
gram will exit.</pre>
<p>The easiest work around is just to make sure you create them on the same drive, and then it works fine.</p>
<p>I&#8217;ll update more as I get chance to play</p>
<p>BTW &#8211; M1 also includes Selenium support</p>
<p>Quick update:  this will now be fixed in the next release JIRA task <a title="Jira task" href="http://jira.springframework.org/browse/ROO-62">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=29</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Who broke the build? Bring on the Coat of Shame!!</title>
		<link>http://www.minimalsoftware.com/blog/?p=20</link>
		<comments>http://www.minimalsoftware.com/blog/?p=20#comments</comments>
		<pubDate>Fri, 05 Dec 2008 22:14:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Best Practice]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=20</guid>
		<description><![CDATA[Question: What should happen when the build breaks?
The easy andwer is everyone should jump and fix it as soon as possible, not later, not tomorrow, NOW!
OK, so you find what&#8217;s wrong, fix it, create any tests you need to make sure it soesn&#8217;t happen again, and then you Bring on the Coat of Shame!
Development should [...]]]></description>
			<content:encoded><![CDATA[<p>Question: What should happen when the build breaks?</p>
<p>The easy andwer is everyone should jump and fix it as soon as possible, not later, not tomorrow, NOW!</p>
<p>OK, so you find what&#8217;s wrong, fix it, create any tests you need to make sure it soesn&#8217;t happen again, and then you Bring on the <em>Coat of Shame!</em></p>
<p>Development should never be a blame game, but a bit of humiliation never hurt anyone&#8230;If you check in code that breaks the build you get to wear the coat.</p>
<p>Now if we were in a blame culture we&#8217;d make you go to the pub wearing it and buy everyone a round of drinks wouldn&#8217;t we? <img src='http://www.minimalsoftware.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="wp-caption aligncenter" style="width: 355px"><img title="The Coat of Shame!" src="http://www.minimalsoftware.com/blog/wp-content/uploads/2008/05/coatOfShame.JPG" alt="The Coat of Shame!" width="345" height="521" /><p class="wp-caption-text">The Coat of Shame!</p></div>
<p>And the coat? No, not mine but it really does belong to someone where I&#8217;m working now!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=20</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maturing a language &#8211; when do you stop adding things?</title>
		<link>http://www.minimalsoftware.com/blog/?p=4</link>
		<comments>http://www.minimalsoftware.com/blog/?p=4#comments</comments>
		<pubDate>Tue, 25 Nov 2008 21:06:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Educating]]></category>
		<category><![CDATA[Introduction]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=4</guid>
		<description><![CDATA[I ask the question, because there&#8217;s been a lot of debate recently. The whole debate over when you stop adding to a language and allow those around it to mature instead!
Doug Lea &#8211; http://gee.cs.oswego.edu/dl/
As poor software engineering goals, some criticisms are valid (but it needs to be looked at in comparison to it&#8217;s modern peers), [...]]]></description>
			<content:encoded><![CDATA[<p>I ask the question, because there&#8217;s been a lot of debate recently. The whole debate over when you stop adding to a language and allow those around it to mature instead!</p>
<p>Doug Lea &#8211; http://gee.cs.oswego.edu/dl/<br />
As poor software engineering goals, some criticisms are valid (but it needs to be looked at in comparison to it&#8217;s modern peers), though whatever tool your given, people inexperienced in it&#8217;s application will misuse it in ways in which the originator never intended.  After all, you can still bash a screw in with a hammer!</p>
<p>Is this also a question of how engineering has changed?  A colleague recently made the comparison of how we spent childhood playing with tape recorders, taking things apart to see how they worked, and doing basic hardware hacking, and what current 10-15 year olds do and how they approach problems. They seem to be more a  generation who seem to be at a loss if they turn something on and it just doesn&#8217;t work straight away &#8211; many don&#8217;t understand how to take a step back and systematically debug what is wrong.  Perhaps they&#8217;ve been spoilt by the Internet, and mobile phones &#8211; the way it just works. They have no idea of the underlying protocols and the what or why they do things so have trouble reasoning based on small building blocks of information.</p>
<p>To quote Blackadder -</p>
<pre>E:  Yes. He has patented a machine called "The Ravelling Nancy".

PR: Mmm, what does it do?

E:  It ravels cotton sir.

PR: What for?

E:  That I cannot say sir. I am one of these people who are quite happy
    to wear cotton, but have no idea how it works.</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If you bravely updated to Firefox 3.1 beta, and need to get your extensions working&#8230;</title>
		<link>http://www.minimalsoftware.com/blog/?p=17</link>
		<comments>http://www.minimalsoftware.com/blog/?p=17#comments</comments>
		<pubDate>Wed, 15 Oct 2008 16:24:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[greasemonkey]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=17</guid>
		<description><![CDATA[Just a quick post &#8211; I got greasemonkey working no problem&#8230;

Download the xpi file, this is easiest in a browser other than Firefox (yes sorry to say that!)
open xpi with tar or winzip
Edit install.rdf
Change version number line e.g. 3.0.0.* to 3.1.*
zip it back up
Open file in Firefox to reinstall
restart Firefox

]]></description>
			<content:encoded><![CDATA[<p>Just a quick post &#8211; I got greasemonkey working no problem&#8230;</p>
<ul>
<li>Download the xpi file, this is easiest in a browser other than Firefox (yes sorry to say that!)</li>
<li>open xpi with tar or winzip</li>
<li>Edit install.rdf</li>
<li>Change version number line e.g. 3.0.0.* to 3.1.*</li>
<li>zip it back up</li>
<li>Open file in Firefox to reinstall</li>
<li>restart Firefox</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Greasemonkey working with Firefox 3 RC1</title>
		<link>http://www.minimalsoftware.com/blog/?p=15</link>
		<comments>http://www.minimalsoftware.com/blog/?p=15#comments</comments>
		<pubDate>Wed, 28 May 2008 09:06:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[greasmonkey]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=15</guid>
		<description><![CDATA[
WARNING/Disclaimer: This is an approach for the brave or those who are desperate to get their Greasemonkey extensions working again.
It&#8217;s by no means scientific, but I use Greasemonkey a lot (and a couple of other extensions too), and really wanted it back!
What I have: Firefox 3.0 RC1, Greasemonkey 0.7.20080121.0

Go get yourself the Nightly Tester tools [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.minimalsoftware.com/blog/wp-content/uploads/2008/05/wooden_mallet.gif"><img class="alignleft size-thumbnail wp-image-16" title="wooden_mallet" src="http://www.minimalsoftware.com/blog/wp-content/uploads/2008/05/wooden_mallet.gif" alt="If it still doesn\'t work, get a bigger hammer!" width="80" height="121" /></a></p>
<p>WARNING/Disclaimer: This is an approach for the brave or those who are desperate to get their Greasemonkey extensions working again.</p>
<p>It&#8217;s by no means scientific, but I use Greasemonkey a lot (and a couple of other extensions too), and really wanted it back!</p>
<p>What I have: Firefox 3.0 RC1, Greasemonkey 0.7.20080121.0</p>
<ol>
<li>Go get yourself the Nightly Tester tools (2.02) <a title="Nightly Tester Tools extension" href="https://addons.mozilla.org/en-US/firefox/addon/6543">here</a></li>
<li>Make a note of all the extensions/add-ons currently enabled &#8211; consider this your safe list!</li>
<li>Install and enable it</li>
<li>It will ask if you want to override the extensions and enable them &#8211; say yes.  Note: at the next step Firefox will almost certainly fail to load!</li>
<li>Let Firefox restart &#8211; it may well fail!</li>
<li>open a command window and cd into the Firefox install location.</li>
<li>Run &#8216;firefox -safe-mode&#8217; to restart in safe mode</li>
<li>Click the disable all extensions and continue</li>
<li>Once restarted, go into Tools, Add-ons and enable all the things in your safe list.</li>
<li>Enable Grease Monkey</li>
<li>Restart firefox</li>
<li>Done!</li>
</ol>
<p>Well&#8230;hopefully.  If not restart in safe-mode again and disable greasmonkey and check all else is still ok.</p>
<p>If you have other extensions you want to get working, you can repeat this process.  I did manage to get a couple of others working, but not Google Gears <img src='http://www.minimalsoftware.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaOne. Service Oriented Architecture and Java Technology: Level-Setting Standards, Achitecture and Code.</title>
		<link>http://www.minimalsoftware.com/blog/?p=14</link>
		<comments>http://www.minimalsoftware.com/blog/?p=14#comments</comments>
		<pubDate>Thu, 22 May 2008 14:29:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Best Practice]]></category>
		<category><![CDATA[Educating]]></category>
		<category><![CDATA[Introduction]]></category>
		<category><![CDATA[javaone]]></category>
		<category><![CDATA[soa]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=14</guid>
		<description><![CDATA[A session by Steve Jones and Duane Nickul
Exploring the OASIS reference model, so that we can have a reference point for understanding and articulating SOA.
It&#8217;s very tough when you ask questions like:
- how does SOA differ from other types of architecture?
- If SOA is x, what is the antipattern?
- How does Java relate to SOA?
We [...]]]></description>
			<content:encoded><![CDATA[<p>A session by Steve Jones and Duane Nickul</p>
<p>Exploring the OASIS reference model, so that we can have a reference point for understanding and articulating SOA.<br />
It&#8217;s very tough when you ask questions like:</p>
<p>- how does SOA differ from other types of architecture?<br />
- If SOA is x, what is the antipattern?<br />
- How does Java relate to SOA?</p>
<p>We need a common point of origin to let us have a sensible discussion about SOA because we all say it is different things, and this is not aided by the product vendors.</p>
<p>So, what is the RM?<br />
- An ABSTRACT model for comparison and analysis of a range of Service Oriented architectures<br />
- A framework for understanding relationships among the entities in a SOA environment.<br />
- Industry standard (OASIS standard-2006)</p>
<p>RM is obviously a reference model, but also by not tying itself to existing technologies it is durable.</p>
<p>The elements are a Service, Visibility, Service Description, Interaction, Contract and Policy, Real world effect and an Execution Context.<br />
The RM is guided by patterns, reference architecture, related models and concrete architectures. It considers protocols, profiles, specifications and standards.</p>
<p>Service: A mechanism that brings together needs and capabilities.<br />
Service Description: declaration of aspects required to interact with the service.<br />
Capability: a specific set of functions resulting in a real world effect.<br />
Visibility: How those with needs and capability see each other and interact.<br />
Execution Context: technical/business elements that allow information to be exchanged, actions to be performed and enforce policies and contracts<br />
Policy: constraints imposed upon invocation.<br />
Real World Effect: The result of an interaction with a service.<br />
Interaction: the models for using the service.</p>
<p>So, the RM covers all the things you need to successfully produce and consume a service.  It also helps describe the critical success factors e.g. manageability, trust, predictability, real world effect, governance, that allow us to communicate successfully.</p>
<p><strong>It&#8217;s 2008 it must be the year of Complex Event Processing because BPEL is SO last year <img src='http://www.minimalsoftware.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
</strong><br />
SOA and Java &#8211; Differences<br />
J2EE has a single domain of ownership &#8211; SOA has many<br />
Java has reliable semantics (some)<br />
SOA is more about the interfaces and the effects than the implementation<br />
SOA needs more thought and design to establish those formalisms</p>
<p>SOA and Java &#8211; Similarities<br />
A Service and a Java API are notionally similar.<br />
Encapsulation, Service Transparency/Autonomy are similar<br />
SCA and SDO are good SOA implementation approaches</p>
<p>Some good tips on getting SOA done in Java:</p>
<ul>
<li>Think in terms of services, and organise your teams around them</li>
<li>Think of process and the UI second</li>
<li>Think about measurements for the service &#8211; business SLA</li>
<li>Think about standardisation. How are interfaces defined, versioned, verified and how are dependencies managed?</li>
<li>Pick the appropriate technologies and standards &#8211; e.g. JAX-WS, SCA/SDO, Apache, IBM etc.</li>
<li>Maintain consistency in the model &#8211; remember that that is what the RM brings to Java</li>
<li>Remember chang is likely insulate yourself with proxies</li>
<li>REST can also be compatible with the OASIS RM.  If you know Steve, you know he LOVES REST <img src='http://www.minimalsoftware.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<p>Then there was a good live demo, pulling latest builds of vendors RM&#8217;s and making it work, taking WSDL into Flex, which uses Apache Axis 2 to generate stuff.<br />
This all works because of a reference model and because standards are a point of reference for vendor implementation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox RC1 is out!</title>
		<link>http://www.minimalsoftware.com/blog/?p=13</link>
		<comments>http://www.minimalsoftware.com/blog/?p=13#comments</comments>
		<pubDate>Sat, 17 May 2008 14:29:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=13</guid>
		<description><![CDATA[
The first release candidate for Firefox has just surfaced.  You can get it over at Mozilla.
It has a nice new look, a really useful address bar, and it is so much faster than 2.
]]></description>
			<content:encoded><![CDATA[<p><img style="vertical-align: top; margin: 3px;" src="http://www.mozilla.com/img/products/firefox-title.jpg" alt="Firefox" width="320" height="120" /></p>
<p>The first release candidate for Firefox has just surfaced.  You can get it over at <a title="Download Firefox" href="http://www.mozilla.com/en-US/firefox/all-rc.html">Mozilla</a>.</p>
<p>It has a nice new look, a really useful address bar, and it is so much faster than 2.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaOne.  How to Implement Your Own OpenSocial Container on the Java™ Platform</title>
		<link>http://www.minimalsoftware.com/blog/?p=11</link>
		<comments>http://www.minimalsoftware.com/blog/?p=11#comments</comments>
		<pubDate>Sun, 11 May 2008 22:29:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Introduction]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=11</guid>
		<description><![CDATA[This was session TS-6574 at JavaOne.
A talk around implementing the OpenSocial APIs for your site.  OpencSocial defines a dingle API for social applications that covers the majority of interactions with social web tools.
There are two basic parts.  The Server side contains a Gadget Server (think Google gadgets), and an OpenSocial JavaScript library. The client side [...]]]></description>
			<content:encoded><![CDATA[<p>This was session <span style="font-family: Times New Roman; font-size: small;"><span style="font-size: 12pt;">TS-6574 at JavaOne.</span></span></p>
<p>A talk around implementing the OpenSocial APIs for your site.  OpencSocial defines a dingle API for social applications that covers the majority of interactions with social web tools.</p>
<p>There are two basic parts.  The Server side contains a Gadget Server (think Google gadgets), and an OpenSocial JavaScript library. The client side uses XML and JavaScript, similar to that by Google gadgets to make requests to the server using JSON requests.</p>
<p>The JavaScript API has 3 constituent parts:</p>
<ul>
<li>People and Friends API</li>
<li>Activities Data API</li>
<li>Persistence Data API</li>
</ul>
<p>So what are your options? Well, you can either roll your own API to the spec. or utilise the existing open source implementation &#8211; e.g. <a title="Shindig RI" href="http://incubator.apache.org/shindig/">Shindig</a>.</p>
<p>An opensource implementation, as part of the Apache Incubator.  Currently only for PHP and Java, and very easy to use.</p>
<p>The Gadget server renders XML, and the server-side components are covered by an OpenSocial Servlet, and now there is a REST based API on it&#8217;s way.  Note: It needs JDK 1.5.</p>
<p>It comes bundled with Jetty so you don&#8217;t have to have another Application server to run it in. When you download it, there is an infrastructure dir with some useful plugins.  A maven plugin for Eclipse that allows you to great a project for a gadget etc.</p>
<p>When it comes to integrating it with your data e.g. a Database, you just need to implement your own brand of the sample implementations included of People Services, Activity and Data.  These are bound using a provided module, using <a title="Guice - Google" href="http://code.google.com/p/google-guice/ ">Guice</a>.</p>
<p>Security is obviously important, so you can either use the built in OAuth mechanism, or again roll your own.</p>
<p>Social site <a title="Hi5" href="http://hi5.com">Hi5 </a>have built their own, based on the RI, more detail on their <a title="Hi5 developer" href="http://developer.hi5.com">developer </a>site.</p>
<p>They shared a few lessons learned:</p>
<ol>
<li>Prepare for viral growth.  They experienced a sudden 50% increase in days.</li>
<li>Think carefully about the policies &#8211; what you will allow</li>
<li>Build tools to for publishing and managing this data.</li>
<li>Think about the request model &#8211; they had a friends list on every page, which each time the page gets refreshed, makes a very expensive call to getListFriends.  They added a TTL style cache.</li>
<li>Tuning &#8211; on their dev site, there&#8217;s a tuning guide for 6.10</li>
<li>There is a need for lots of synchronization and encryption (cases that worked in the guide)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaOne. Open Source tools for optimizing your development process</title>
		<link>http://www.minimalsoftware.com/blog/?p=9</link>
		<comments>http://www.minimalsoftware.com/blog/?p=9#comments</comments>
		<pubDate>Fri, 09 May 2008 16:57:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Best Practice]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=9</guid>
		<description><![CDATA[Well, I made it to JavaOne this year, and here is the first session from the Community Day, delivered by John Smart.
This session was really about how you can be more focussed in software development by utilising tools and process to take out some of the pain.
Main focus of which was:

Reducing bugs
Using build scripts
Managing dependencies
Automating [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I made it to JavaOne this year, and here is the first session from the Community Day, delivered by John Smart.</p>
<p>This session was really about how you can be more focussed in software development by utilising tools and process to take out some of the pain.</p>
<p>Main focus of which was:</p>
<ul>
<li>Reducing bugs</li>
<li>Using build scripts</li>
<li>Managing dependencies</li>
<li>Automating builds</li>
<li>Checking code quality</li>
<li>Introducing tighter integration with issue tracking</li>
<li>Automating the generation of some technical documents</li>
</ul>
<p>Build Scripts: The aim is to have something <strong>reproducible</strong>, that <strong>works anywhere</strong> (not just on my pc!) and is <strong>portable</strong>. Once you have this basis, then you can look at automation through Ant or Maven 2.</p>
<p>The two main choices (though there a few hybrid ones now based on some of the dynamic scripting languages) are <a title="Ant" href="http://ant.apache.org">Ant </a>and <a title="Maven" href="http://maven.apache.org">Maven 2</a>.  Both have advantages and disadvantage, which is why Apache maintain two!</p>
<p>Ant is widely used and extensible, but does need a lot of low level scripting, and doesn&#8217;t have a standard lifecycle (there are conventions, but they are not consistent).</p>
<p>Maven is a declarative build scripting framework that prefers convention over configuration.  By following the conventions yourself, much of the &#8216;lifting&#8217; becomes simpler.</p>
<p>Both support lots of plugins/tasks for deployment, reporting and quality measurement, but because Maven has a standard lifecycle, unlike the adhoc nature of tasks in Ant, it is much easier to understand what is going on in the build process without having to wade through the build source scripts.</p>
<ul>
<li>Standard directory structure</li>
<li>Convention over configuration</li>
<li>Better dependency management</li>
<li>Good support for multiple concurrent projects and the dependencies between them</li>
</ul>
<p>Although Maven imposes a standard directory structure, which yes, isn&#8217;t as flexible, but it does mean as you go from project to project you don&#8217;t have to work out each time what to put where.</p>
<p>Managing Dependencies: Both internal and external dependencies, e.g. libraries like Commons logging.  Traditionally, each project would have it&#8217;s own JAR files, but it is hard to keep a track of versions of common JARs you are using (and the ones that are in turn used by things you depend on! Which may well differ). So to get around this we can use <a title="Ivy - dependency management" href="http://ant.apache.org/ivy">Ivy</a> for ANT, or and ANT task for Maven.  It&#8217;s also worth maintaining a local repository of libraries you depend on, versioned in some sensible (even if it&#8217;s renaming them with the providers versioning) way so you know what versions they are.</p>
<p>Good testing practices: Remember that Unit tests document your intentions! they also give comfort &#8211; not just to you.  More readable cases are easier to maintain and regression test.</p>
<p>The two main alternatives are <a title="TestNG" href="http://testng.org">TestNG</a> and <a title="JUnit" href="http://www.junit.org">JUnit</a></p>
<p>TestNG is certainly increasing in popularity, and it looks like JUnit 4.4 is making testing much easier over JUnit 3, with:</p>
<ul>
<li>Annotation based testing</li>
<li>Ability to test for timeouts</li>
<li>Easier Exception Handling</li>
<li>Parametrized tests</li>
</ul>
<p>It was certainly a pain before that everything had to be derived from TestCase.  Now any class can be used via annotation @Test.  Before there was setup and tear-down, now there are @before, @after, @beforeclass and @afterclass.  BTW &#8211; JUnit 4 still runs JUnit 3 tests.</p>
<p>Now that it is any plain Java class, and the fact that methods can have any name, developers are encouraged to use behaviour driven testing, for example naming the test method &#8217;shouldUpdateEmployee&#8217;.</p>
<p>The parametrized testing is a significant addition. Basically, it takes a set of arbitrary data and test cases in a single bundle.  You just need a test class with fields that match the grid of your test data, and some data as rows &#8211; it then executes once per row, which is a great improvement &#8211; you can now test more data with less!</p>
<p>They&#8217;ve also added Hamcrest asserts (see the tutorial <a title="Google code Tutorial on Hamcrest" href="http://code.google.com/p/hamcrest/wiki/Tutorial">here</a>) a much more readable way of using assertions.  So instead of the rather weird looking assertEquals(10,x) you can have something like this:</p>
<p>assertThat(theBiscuit, is(equalTo(myBiscuit)));<br />
or<br />
assertThat(&#8220;chocolate chips&#8221;, theBiscuit.getChocolateChipCount(), greaterThan(10));</p>
<p>It also generates much more friendly error messages e.g. &#8216;expected red, got blue&#8217;.</p>
<p>Test Coverage: The aim of which is really to help you write better unit tests!  Obviously, there&#8217;s no guarantees that what you have is well written, but points you at areas of your app that are poorly covered.</p>
<p>Add it into you build process to give early feedback and visibility to the team (see <a title="Cobertura" href="http://cobertura.sourceforge.net/">Cobertura</a> which is great for project level coverage reporting), or build it into your IDE (tools like <a title="EcLEmma" href="http://www.eclemma.org/">EclEmma</a>).</p>
<p>Another useful tool I&#8217;d not seen before was <a title="Crap4J" href="http://www.crap4j.org/">Crap4J</a> &#8211; boy do they need to work on the name!  It gives some good additional statistical data like the number of times it was actually executed too.  Sounds like a good addition to the toolkit of any build-meister.</p>
<p>One good point that comes across again and again with many of these tools &#8211; not just for test coverage is Why use one?  Use both! Chances are they&#8217;ll pick up different things.<br />
Continuous Integration: Basically, automatic integration testing and compilation on a central server.  Obviously better with some sound testing, and good coverage <img src='http://www.minimalsoftware.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  so I&#8217;d sort that first!</p>
<p>You need an automated build process (which you should have already with ANT, maven or similar), automated test processes and a source repository.</p>
<p>Common tools &#8211; <a title="Continuum" href="http://continuum.apache.org/">Continuum</a>, <a title="Hudson" href="http://hudson.dev.java.net">Hudson </a>or <a title="Bamboo" href="http://www.atlassian.com/software/bamboo">Bamboo</a>.  I&#8217;m going to a session on Friday by Kohsuke Kawaguchi, Hudson&#8217;s creator, which should be cool &#8211; more later.</p>
<p>So what problems do they solve?</p>
<ul>
<li>Infrequent Integration and testing</li>
<li>Infrequent commits &#8211; because people are scared of breaking things, which is ironic really</li>
<li>Fewer release, which results in less user testing</li>
<li>Reduces the number of bugs over the lifetime</li>
</ul>
<p>So, no excuses.</p>
<p>Other good stuff you can leverage from your builds &#8211; take a look at the build history.  What you want to see is an increasing number of tests, and some indication of build stability e.g. 5 out of the last 6 builds were all successful.  Go one step further &#8211; auto update your wiki to show it, it gets people more involved in the build process, and fixing it if there are problems, but it also shows when your heading in the right direction.  See testing doesn&#8217;t always have to be negative <img src='http://www.minimalsoftware.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>User perception: What else could you do in your build process? How about automatically deploying a successful build occasionally, so that users have got something to see, and can see some progress.  Try and show them some way what&#8217;s new, so they can see the fruits of all your hard work.  Continuous Integration and Continuous feedback (hopefully), not bad.</p>
<p>Code Quality: Increasing code quality give you:</p>
<ul>
<li>a better product</li>
<li>a more maintainable product</li>
<li>a descriptive statement of intents</li>
<li>enforcement of coding standards</li>
<li>an opportunity for training and development of new team members.  Plus possibly those who by now need a refresher course!</li>
</ul>
<p>Usual suspects <a title="CheckStyle" href="http://checkstyle.sourceforge.net">CheckStyle</a>, <a title="PMD" href="http://pmd.sourceforge.net">PMD</a>, <a title="FindBugs" href="http://findbugs.sourceforge.net/">FIndBugs</a> and Crap4J.</p>
<p>CheckStyle gives good pointers on coding style and formatting.  FindBugs is good at tracking down potential bugs i.e. those that may bite you in the future. PMD, a bit like CheckStyle, but more technical. Crap4J also gives good indicators of poorly tested classes and overly complex ones.</p>
<p>Automated Documentation: What??? I hear you cry.  No, not fully automated, but how about some basics that you should be doing that you can at least part generate automatically, and will always be up to date?  Typically wjhat happens is some of the basics are written once and then forgotten as everyone moves on to the next important thing.  They are still basics though.</p>
<p>Obviously they will be a little dry, but two good ones to try : <a title="UMLGraph" href="http://www.umlgraph.org/">UMLGraph </a>and <a title="Schema Spy" href="http://schemaspy.sourceforge.net/">SchemaSpy</a></p>
<p>UMLGraph will be clickable and navigable class diagrams right into your Javadoc, which is a great start.</p>
<p>SchemaSpy is similar, but for Databases.  Given an arbitrary schema will generate a nice ER model for you.  This can often be really useful, especially if someone has given you a large legacy DB, and no documentation, just reverse engineer it.</p>
<p>As ever with useful documentation like Javadoc &#8211; generated or not, note that you may need to use thumbscrews to get people to actually read them!</p>
<p>Final tips:</p>
<p>Fail early and often in the build process, and give feedback ASAP.  Failure at any stage (unit, integration or quality) halts the build.  Tests getting too big? work out which ones give the best indicators and run them always.  Then move longer running indicators to a less frequent schedule e.g. at night.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 Patterns for Scaling Out Java Applications</title>
		<link>http://www.minimalsoftware.com/blog/?p=10</link>
		<comments>http://www.minimalsoftware.com/blog/?p=10#comments</comments>
		<pubDate>Fri, 09 May 2008 01:45:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Best Practice]]></category>
		<category><![CDATA[Educating]]></category>
		<category><![CDATA[Introduction]]></category>

		<guid isPermaLink="false">http://www.minimalsoftware.com/blog/?p=10</guid>
		<description><![CDATA[My DRAFT notes for the session (TS-6339) given by Cameron Purdy from the Oracle Coherence team at JavaOne.
Current trends to reflect the move to lighter technologies. However, the patterns for scaling don&#8217;t change, and this was a session aimed at giving guidance to achieve that&#8230;without shooting yourself in the foot.
10. Understanding the Problem

Initial expectations are [...]]]></description>
			<content:encoded><![CDATA[<p>My DRAFT notes for the session (TS-6339) given by Cameron Purdy from the Oracle Coherence team at <a title="JavaOne 2008" href="http://java.sun.com/javaone/sf/index.jsp">JavaOne</a>.</p>
<p>Current trends to reflect the move to lighter technologies. However, the patterns for scaling don&#8217;t change, and this was a session aimed at giving guidance to achieve that&#8230;without shooting yourself in the foot.</p>
<p><em>10. Understanding the Problem</em></p>
<ul>
<li>Initial expectations are crucial.</li>
<li>A scalable system will always be slower in single user mode</li>
<li>Complexity always increases path length</li>
</ul>
<p>Indeed, if a system is fast in single user mode but slow under heavy load, then the problem is not one of performance, but scalability.</p>
<p>Horizontal scalability is the only answer</p>
<p><em>9. Define the requirements</em></p>
<p>The ARSPMS Requirements model<br />
<strong> A</strong>vailability<br />
<strong> R</strong>eliability<br />
<strong> S</strong>calability<br />
<strong> P</strong>erformance<br />
<strong>M</strong>anageability<br />
<strong> S</strong>erviceability</p>
<ol>
<li>Understand the theoretical achievable performance &#8211; define single user load scenario</li>
<li>Understand the cost of achieving these capabilities.</li>
<li>Work towards ensuring linear system scalability, i.e. making sure the cost per user doesn&#8217;t rise (what you see when adding more servers, each successive addition supports less users than before)</li>
</ol>
<p>Gotcha &#8211; Predictable latency<br />
more moving pieces<br />
- Garbage Collection<br />
- Thread switches<br />
- Network I/O<br />
- Switches and Routers</p>
<p>Gotcha &#8211; Read Consistency<br />
2nd law of distributed systems &#8211; The only things you can distribute are state (info) and behaviour.  This presents two challenges<br />
- distribution creates multiple copies &#8211; how do you keep them in sync?<br />
- how do you guarantee transactional consistency</p>
<p>Gotcha &#8211; Durability<br />
Achieving availability of stateful system requires a form of durability e.g.<br />
- sync replication<br />
- disks/SANs<br />
- transaction logging<br />
- durable message queues</p>
<p>The challenges then are:</p>
<ul>
<li>latency</li>
<li>shared access between writer and any potential failover</li>
</ul>
<p><em>8. Architecture trumps technology!</em></p>
<p>I like this one, and it&#8217;s at the heart of many of the others here i.e. you can&#8217;t just throw more technology at the problem.  There may be natural domain specific limitations, sequential high latency operations, globally ordered operations or data hot spots.</p>
<p>On the flip side, data consistency and reliability, immediate reliable state access, durability of state change.</p>
<p>Red herrings &#8211; in truth, these are all scalable&#8230;<br />
EJBs, tiered architectures, RPC, XML, Web Services, SOAP, HTTP, Programming languages and Operating systems. They may well be inefficient but not un-scalable!</p>
<p>There are some legitimate language and platform concerns that should worry us:</p>
<ul>
<li> predictability of latency &#8211; unpredictable scheduling and duration of full gc pauses</li>
<li>Lack of control over thread scheduling</li>
<li>Lack of asynch I/O</li>
<li>Ease of development &#8211;  languages differ in effectiveness for special tasks</li>
<li>Availability of libraries and components, after all we don&#8217;t want to keep re-inventing the wheel..especially if someone smart like Doug Lea wrote it <img src='http://www.minimalsoftware.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<p><em>7. Understand the basics</em></p>
<p>a) Delivery &#8211; packet oriented, stream oriented, req/resp<br />
UDP /IP Packet oriented &#8211; not reliabile, limited payload size but  predictable latency</p>
<p>TCP/IP &#8211; stream oriented, unpredictable latency but  easy programming</p>
<p>HTTP &#8211; req/response based, built on top  of TCP/IP</p>
<p>b) Messaging concepts<br />
delivery guarantees,  latency,  processing model (at best once, at most once etc.) and ordering guarantees</p>
<p>Efficient models are single threaded, reliable, in order, zero latency once and only once &#8211; like being sat at your workstation.</p>
<p>- messaging makes you pay</p>
<ul>
<li> ordering limits scalability</li>
<li> reliability adds costs</li>
<li> introduces latency</li>
<li> once and only once is hard</li>
</ul>
<p><em>6. visualize the network</em><br />
The wire &#8211; a few basics e.g. Ethernet and Infiniband, all very fragile</p>
<p>Switched fabric offers fault tolerance, scalability and direct p2p connections.</p>
<p><em>5. visualise the design</em><br />
Patterns of stateful scaleout</p>
<p>Sprayer &#8211; no knowledge of app<br />
Routing &#8211; to the right server<br />
Patitioning &#8211; assign responsibility<br />
Availabilty<br />
Messaging<br />
Coordination</p>
<p>Routing &#8211; information and processing in right place where there is locality of state. Reliable routing is fundamental and supports partitioning and replication.</p>
<p>Partitioning &#8211; ownership of state distributed</p>
<p>Replication (availability) &#8211; limit loss, relies on coordination</p>
<p>Coordination &#8211; difficult to scale and can work against availability, orchestrated state change process.<br />
benefits &#8211; simplifies programming, supports synchronous behaviour</p>
<p>Messaging<br />
Queue supports reliability(hand off), durability, ordering, collection (batching &#8211; a bus load).  He made a good point about messaging, in that if you have enough localised queues, when you go to get a message from the queue, it&#8217;s not always best just to get one &#8211; think about batching work, why not take a bus load?</p>
<p><em>4a plan for overload</em><br />
load balancing &#8211; spraying<br />
partition<br />
queue &#8211; collect then process in bulk<br />
parellelize &#8211; spread concurrent processing.</p>
<p>Oveloaded? What are your options?<br />
a) turn away request<br />
b) Queue<br />
c) add capacity dynamically<br />
d) increase batch size or q delay &#8211; let them stand in larger groups<br />
e) relax read and / or write consistency  &#8211;&gt; sometimes you have to e.g. caching</p>
<p><em>4b partition for scalability</em><br />
It&#8217;s the only way to provide significant scale. And dynamic partitioning supports dynamic capacity. This introduces a challenge for distributed read consistency. Even with custom affinity of data, complete data locality is simply impossible for some apps.</p>
<p><em>3a plan for failure</em><br />
we cause accidents&#8230;<br />
The 3 R&#8217;s</p>
<ul>
<li>redundancy</li>
<li>reserve</li>
<li>recoverability</li>
</ul>
<p>Plan for failure at two levels &#8211; component, and system.<br />
When possible failover to transparently handle component failure &#8211; e.g. server. Use recoverability to handle everything else (requires durability &#8211; tx logs, db logs etc. to reconstruct after failure).</p>
<p><em>3b replicate for availability</em></p>
<p><strong>Do</strong><br />
synchronous replication for durability<br />
replicate at levels that are responsible for failover &#8211; not everywhere<br />
asynch replication for increased locality e.g. caching or for recovery</p>
<p><strong>Don&#8217;t</strong><br />
replicate synchronous inside a critical session unless you have to<br />
Only replicate only what you need!</p>
<p>In most successful models events are partitioned and THEN replicated.</p>
<p><em>2. tier where it makes sense</em><br />
- this is not horizontal scalability, just segmenting responsibility.</p>
<p><strong>Pro&#8217;s</strong><br />
it can increase scale<br />
localisation can eliminate need for coordination, and thus help to scale<br />
tier traversal creates opportunities for batching queues</p>
<p><strong>Cons</strong><br />
added complexity<br />
potential for reduced efficiency<br />
- tier traversal should be on a constant order</p>
<p>There is no reason to tier stateless systems for scalability! Though maybe for other reasons:<br />
- latency<br />
- scaling<br />
- availability<br />
- efficiency</p>
<p><em>1. Simplify</em><br />
Complexity is the enemy. Reliable distributed systems must be modelled as finite state architectures &#8211; prove them<br />
Partitioning comes with hidden treasures &#8211; localized ordering managed locally<br />
Consider change to the programming model e.g. use an event driven architecture to turn the problem on it&#8217;s head.</p>
<p><strong>Conclusion</strong><br />
if you can&#8217;t show it working on a white board&#8230;it&#8217;ll never work in production.  Don&#8217;t we know it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.minimalsoftware.com/blog/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
