<?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>Nails And Hammers</title>
	<atom:link href="http://nailsandhammers.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nailsandhammers.wordpress.com</link>
	<description>A blog about creating software solutions</description>
	<lastBuildDate>Mon, 16 Feb 2009 03:36:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nailsandhammers.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nails And Hammers</title>
		<link>http://nailsandhammers.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nailsandhammers.wordpress.com/osd.xml" title="Nails And Hammers" />
	<atom:link rel='hub' href='http://nailsandhammers.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Using NeoDatis OODB for unit testing</title>
		<link>http://nailsandhammers.wordpress.com/2009/02/15/using-neodatis-oodb-for-unit-testing/</link>
		<comments>http://nailsandhammers.wordpress.com/2009/02/15/using-neodatis-oodb-for-unit-testing/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 02:57:11 +0000</pubDate>
		<dc:creator>nailsandhammers</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://nailsandhammers.wordpress.com/?p=68</guid>
		<description><![CDATA[Related to the previous blog entry about using db4o for unit testing &#8211; I have tried an alternative framework NeoDatis, which is a small and simple OODB for Java, Groovy and .NET. The main reason why I started looking for alternatives was the fact that the DB4O GUI tool Object Manager was only available as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=68&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Related to the previous <a title="DB4O for unit testing" href="http://nailsandhammers.wordpress.com/2008/12/30/using-db4o-for-unit-test-results-verification/" target="_blank">blog entry</a> about using <a title="DB4O" href="http://www.db4o.com/" target="_blank">db4o</a> for unit testing &#8211; I have tried an alternative framework <a title="NeoDatis" href="http://www.neodatis.org/start" target="_blank">NeoDatis</a>, which is a small and simple <a title="OODMS" href="http://en.wikipedia.org/wiki/ODBMS" target="_blank">OODB</a> for Java, Groovy and .NET. The main reason why I started looking for alternatives was the fact that the DB4O GUI tool Object Manager was only available as part of the commercial license and NeoDatis did have simple GUI object browser. That&#8217;s not an issue anymore &#8211; <a title="DB4O Object Manager" href="http://developer.db4o.com/blogs/product_news/archive/2009/01/25/object-manager-enterprise-now-free-to-all-developers.aspx" target="_blank">DB4O OME is available now</a>. The <a title="GPL" href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html" target="_blank">GPL</a> license was another reason. From my perspective and because of the way I am using this framework for unit testing and temporary storage, the <a title="LGPL" href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" target="_blank">LGPL</a> license just makes more sense than the full GPL that DB4O uses.</p>
<p>The migration from DB4O to NeoDatis was very straightforward, the only difference I had to figure out was on querying objects by class:</p>
<p><pre class="brush: java;">
//db4o version:
ObjectContainer db = Db4o.openFile(&quot;CARS.DAT&quot;);
ObjectSet results = db.queryByExample(Car.class);
//returns also objects Cabrio, Sedan, Hatchback, ...

//NeoDatis version
ODB odb = ODBFactory.open(&quot;CARS.DAT&quot;);
CriteriaQuery query = new CriteriaQuery(Car.class);
query.setPolymorphic(true);	//in order to return the subclasses of Car
Objects results = odb.getObjects(query);
//because simple odb.getObjects(Car.class) doesn't return the subclasses of Car,
//it needs to be explicitly set as polymorphic query.
</pre></p>
<p>There are probably more differences than that, and even deeper ones when it comes to features, robustness, reliability, support, but I am just trying to find the right tool for my work, not one hammer for everything.<br />
Speaking of which, I am getting more and more convinced that we might be rushing to use the relational databases a bit too much, even when it is not necessary or not really appropriate. The OODBs for storing objects is one alternative option,<a title="SimpleDB" href="http://aws.amazon.com/simpledb/" target="_blank"> Amazon SimpleDB</a>, <a title="Hadoop" href="http://hadoop.apache.org/" target="_blank">Apache Hadoop</a>, <a title="CouchDB" href="http://couchdb.apache.org/" target="_blank">CouchDB</a> or <a title="BigTable" href="http://en.wikipedia.org/wiki/BigTable" target="_blank">Google&#8217;s BigTable</a> are other data storage options with different benefits and applicability.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nailsandhammers.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nailsandhammers.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nailsandhammers.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nailsandhammers.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nailsandhammers.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nailsandhammers.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nailsandhammers.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nailsandhammers.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nailsandhammers.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nailsandhammers.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nailsandhammers.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nailsandhammers.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nailsandhammers.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nailsandhammers.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=68&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nailsandhammers.wordpress.com/2009/02/15/using-neodatis-oodb-for-unit-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f0ef04cf64d03bef7f87d8105fc102d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nailsandhammers</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple configurable event processing application with Esper and Spring</title>
		<link>http://nailsandhammers.wordpress.com/2009/01/15/simple-configurable-event-processing-application-with-esper-and-spring/</link>
		<comments>http://nailsandhammers.wordpress.com/2009/01/15/simple-configurable-event-processing-application-with-esper-and-spring/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 06:01:56 +0000</pubDate>
		<dc:creator>nailsandhammers</dc:creator>
				<category><![CDATA[CEP]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://nailsandhammers.wordpress.com/?p=42</guid>
		<description><![CDATA[As I was working on the CEP application I wanted to be able to add/remove the Esper statements, or change the expression text without having to recompile, or restart the process.  I used the Spring xml configuration file and XmlBeanFactory to define the eventProcessor bean and the statements that it will be executing against the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=42&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I was working on the CEP application I wanted to be able to add/remove the<a title="Esper homepage" href="http://esper.codehaus.org/" target="_blank"> Esper</a> statements, or change the expression text without having to recompile, or restart the process.  I used the <a title="Spring home page" href="http://www.springsource.org/projects" target="_blank">Spring</a> xml configuration file and <strong>XmlBeanFactory</strong> to define the<strong> eventProcessor</strong> bean and the <strong>statements</strong> that it will be executing against the event stream.</p>
<p>Let&#8217;s imagine a hypothetical system that monitors a building, which generates an event (ZoneEnteredEvent, ZoneAbandonedEvent) whenever a person enters or leaves a zone (by swiping a card, RFID, face recognition, whatever). The <strong>eventProcessor</strong> definition looks like this:</p>
<p><pre class="brush: xml;">
&lt;bean id=&quot;eventProcessor&quot; class=&quot;com.nailsandhammers.espring.processor.EventProcessor&quot;&gt;
&lt;property name=&quot;statements&quot;&gt;
	&lt;list&gt;
			&lt;ref bean=&quot;tooMuchExposureStatement&quot; /&gt;
			&lt;ref bean=&quot;duplicateEntryStatement&quot; /&gt;
		&lt;/list&gt;
	&lt;/property&gt;
&lt;/bean&gt;
</pre></p>
<p>When the eventProcessor bean is instantiated by the application it also instantiates all objects defined in the statements list.</p>
<p>The statements are then defined like this:</p>
<p><pre class="brush: xml;">
&lt;bean id=&quot;tooMuchExposureStatement&quot; 
class=&quot;com.nailsandhammers.espring.statement.TooMuchExposureStatement&quot;&gt;
&lt;property name=&quot;expressionText&quot;
value=&quot;select * from pattern[every s=ZoneEnteredEvent -&gt; (timer:interval(30 minutes) and not f=ZoneAbandonedEvent(s.subjectId=f.subjectId and s.zoneId=f.zoneId and s.zoneId='A'))]&quot; /&gt;
&lt;/bean&gt;
&lt;bean id=&quot;duplicateEntryStatement&quot; 
class=&quot;com.nailsandhammers.espring.statement.DuplicateEntryStatement&quot;&gt;
&lt;property name=&quot;expressionText&quot;
value=&quot;select * from pattern[every s=ZoneEnteredEvent -&gt; (f=ZoneEnteredEvent(s.subjectId=f.subjectId and s.zoneId!=f.zoneId)) and not a=ZoneAbandonedEvent(s.subjectId=a.subjectId and s.zoneId=a.zoneId)]&quot; /&gt;
&lt;/bean&gt;
</pre></p>
<p>The first statement <strong>tooMuchExposureStatement</strong> ensures that nobody stays in the Zone A longer than 30 minutes (let&#8217;s say it&#8217;s dangerous there).<br />
The second statement <strong>duplicateEntryStatement</strong> controls that somebody entered a Zone, they cannot enter another Zone without abandoning the current one. Otherwise the person is clearly in two places at the same time, or it means somebody&#8217;s identity has been compromised, or the system is not working correctly. In any case, it is something to be looked at.</p>
<p>The statement could be any object that implements com.espertech.esper.client.UpdateListener and of course before the eventProcessor starts accepting any kind of events, it needs to make sure the statements get registered with the Esper CEP engine. In order to make the statements expressions configurable as well I created an abstract superclass <strong>EsperStatement</strong> that contains the <strong>expressionText</strong> and the <strong>register</strong> method that adds the statement to the Esper engine:</p>
<p><pre class="brush: java;">

public abstract class EsperStatement implements UpdateListener {
    private String expressionText;

    public EsperStatement() {
        super();
    }

    public void register(EPServiceProvider serviceProvider) {
        EPStatement epStmt = serviceProvider.getEPAdministrator().createEPL(
                expressionText);
        epStmt.addListener(this);
    }

...

}

</pre></p>
<p>When <strong>eventProcessor</strong> starts up, it needs to initialize the Esper engine (see the documentation and samples) and register the statements:</p>
<p><pre class="brush: java;">
public class EventProcessor {
...
	EPServiceProvider serviceProvider;
	private void registerEsperStatements() {
		if (statements == null || statements.size() == 0)
			return;
		serviceProvider = initServiceProvider();
		for (int i = 0; i &lt; statements.size(); i++) {
			EsperStatement stmt = (EsperStatement) statements.get(i);
			stmt.register(serviceProvider);
		}
	}
...
}
</pre></p>
<p>So in the end the statements and the expressions that are used to process events are configurable components, that can be added, removed and changed. With a little bit more coding it would be possible to force the eventProcessor to reload the config file and reinitialize the CEP engine with the changed statements without even restarting the application process.<br />
Happy experimenting with CEP and Esper!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nailsandhammers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nailsandhammers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nailsandhammers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nailsandhammers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nailsandhammers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nailsandhammers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nailsandhammers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nailsandhammers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nailsandhammers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nailsandhammers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nailsandhammers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nailsandhammers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nailsandhammers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nailsandhammers.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=42&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nailsandhammers.wordpress.com/2009/01/15/simple-configurable-event-processing-application-with-esper-and-spring/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f0ef04cf64d03bef7f87d8105fc102d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nailsandhammers</media:title>
		</media:content>
	</item>
		<item>
		<title>Using db4o for unit test results verification</title>
		<link>http://nailsandhammers.wordpress.com/2008/12/30/using-db4o-for-unit-test-results-verification/</link>
		<comments>http://nailsandhammers.wordpress.com/2008/12/30/using-db4o-for-unit-test-results-verification/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 21:29:55 +0000</pubDate>
		<dc:creator>nailsandhammers</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://nailsandhammers.wordpress.com/?p=16</guid>
		<description><![CDATA[There was a situation when I needed to verify status of an object that has been supposedly created by the component I was testing, but I couldn&#8217;t reach it from the TestCase. It was not being returned by the method, nor it was persisted in any way I could easily use. It existed only for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=16&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There was a situation when I needed to verify status of an object that has been supposedly created by the component I was testing, but I couldn&#8217;t reach it from the TestCase. It was not being returned by the method, nor it was persisted in any way I could easily use. It existed only for a fraction of a second and then it was sent to another component/class. This is pretty common when you have a system that is doing any kind of remote calls or asynchronous messaging. In my case I was working on an <a title="Complex Event Processing" href="http://complexevents.com" target="_blank">CEP</a> application.</p>
<p>Of course there are several <a title="Factory Method" href="http://www.refactoring.com/catalog/replaceConstructorWithFactoryMethod.html" target="_blank">refactoring</a> solutions that might help,  but Gerard Meszaros in his <a title="xUnit Test Patterns" href="http://xunitpatterns.com/index.html" target="_blank">xUnit Test Patterns</a> describes another way how to deal with this situation &#8211; a <a title="Test Spy" href="http://xunitpatterns.com/Test%20Spy.html" target="_blank">TestSpy</a> pattern. TestSpy is a class that I can &#8216;inject&#8217; to the tested class in order to instrument and capture its behaviour. I used the TestSpy to persist objects that were being created in the tested method so I can verify them later.</p>
<p>I had wide number of choices how to implement the persistence &#8211; using a file, a regular sql database, embedded database like <a title="HSQLDB" href="http://hsqldb.org/" target="_blank">HSQLDB</a> or <a title="H2 Database" href="http://www.h2database.com/html/main.html" target="_blank">H2</a>.  I really wanted something simple, no extra server administration, table creation or  O/R mapping definition. I wanted to store and retrieve objects, so I decided to give it a try with an embedded <a title="OODBMS" href="http://en.wikipedia.org/wiki/ODBMS" target="_blank">object-oriented database </a>. I chose <a title="DB4O" href="http://developer.db4o.com/" target="_blank">db4o</a> for no particular reason except that it seems to be pretty well established as a product and is coming with an open source license (<a title="GPL" href="http://en.wikipedia.org/wiki/GPL" target="_blank">GPL</a>, though).</p>
<p>Despite having not much of former exposure to db4o, it turned out pretty quick and simple. I followed the tutorial and I had the whole testing up and running in about 30 minutes.</p>
<p>Here is the &#8216;TestSpy&#8217; class:</p>
<p><pre class="brush: java;">
public class TestStore {
	private static String dbFileName = &quot;DB4O.DATA&quot;;
	private ObjectContainer	db;

	public TestStore() {
		db = Db4o.openFile(dbFileName);
	}

	public void close() {
		db.close();
	}

	// store object to the database
	public void store(Object dataObj) {
		db.store(dataObj);
	}

	// retrieve stored objects using an example object
	public List queryByExample(Object example) {
		ObjectSet resultSet = db.queryByExample(example);
		return resultSet;
	}

	// retrieve stored objects of the same class
	public List queryByClass(Class clazz) {
		ObjectSet resultSet = db.queryByExample(clazz);
		return resultSet;
	}
}
</pre></p>
<p>That&#8217;s it, that&#8217;s all the db4o-specific code I needed.</p>
<p>And here is the tested method:</p>
<p><pre class="brush: java;">
public class EmailSender {

	// send emails to all recipients using the NewYearGreeting email template
	public void sendNewYearGreetings(String[] recipients) {
		for(int i=0; i&lt;recipients.length; i++) {
			NewYearGreetingEmail email = new NewYearGreetingEmail(recipients[i]);
			smtpServer.send(email);

			//testability support
			if(AppConfig.ALLOW_TEST_SPY) {
				testSpy.store(email);
			}
		}
	}

	private TestStore testSpy;
	//set the TestSpy
	public void setTestSpy(TestStore testStore) {
		testSpy = testStore;
	}
}
</pre></p>
<p>Finally, here the testing and verification code from the TestCase:</p>
<p><pre class="brush: java;">
public void testSendNewYearGreetings() {
	try {
		String[] recipients = new String[]{&quot;joe's_addr&quot;, &quot;bob's_addr&quot;,
								&quot;ann's_addr&quot;};
		TestStore testStore = new TestStore();
		EmailSender emailSender = new EmailSender();
		emailSender.setTestSpy(testStore);
		emailSender.sendNewYearGreetings(recipients);

		List resultSet = testStore.queryByClass(NewYearGreetingEmail.class);
		if(resultSet.size()!=3)
			fail(&quot;Unexpected number NewYearGreetingEmail objects!&quot;);
		//TODO - add further verification
	}
	catch(Exception ex) {
		fail(&quot;testSendNewYearGreetings Failed&quot;);
	}
}
</pre></p>
<p>Of course, this testing method changes the tested code somewhat. As usual in this world, there is no free lunch and adding more testability to the code introduces some features that may need to be removed in production. If this is an issue, then you can use some of the &#8216;conditional compilation&#8217; techniques :</p>
<ul>
<li> use ant to remove the test code from the production code as described for example <a title="Correntions | Main | Certification or Indoctrination? Depends on You! » How to do Conditional Compilation with Java" href="http://weblogs.java.net/blog/schaefa/archive/2005/01/how_to_do_condi_1.html" target="_blank">here</a>.</li>
<li> you can even use the gcc preprocessor to have &#8216;real&#8217; conditional compilation as described <a title="conditional compilation in Java" href="http://www.jguru.com/faq/view.jsp?EID=58973" target="_blank">here</a>.</li>
<li> or you can use a <strong>static final</strong> variable that drives the execution of the test logic. This feature takes the advantage of the fact that the compilers do not generate unreachable code, so in fact your class would not even contain calls to the Test Spy methods. See the AppConfig.ALLOW_TEST_SPY variable being used in the code above.</li>
</ul>
<p>In this case the OODB did exactly what I needed &#8211; allows me to store and retrieve my objects without too much dancing around. Pretty clean and easy to set up. I will see if this is the right hammer for the testing nail.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nailsandhammers.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nailsandhammers.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nailsandhammers.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nailsandhammers.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nailsandhammers.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nailsandhammers.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nailsandhammers.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nailsandhammers.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nailsandhammers.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nailsandhammers.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nailsandhammers.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nailsandhammers.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nailsandhammers.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nailsandhammers.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=16&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nailsandhammers.wordpress.com/2008/12/30/using-db4o-for-unit-test-results-verification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f0ef04cf64d03bef7f87d8105fc102d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nailsandhammers</media:title>
		</media:content>
	</item>
		<item>
		<title>Release It!</title>
		<link>http://nailsandhammers.wordpress.com/2008/12/19/release-it/</link>
		<comments>http://nailsandhammers.wordpress.com/2008/12/19/release-it/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 05:19:07 +0000</pubDate>
		<dc:creator>nailsandhammers</dc:creator>
				<category><![CDATA[Availability and Reliability]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://nailsandhammers.wordpress.com/?p=8</guid>
		<description><![CDATA[As I mentioned in the previous blog entry, Michael Nygard&#8217;s Release It! gives some advices how to deploy and run systems. But the most important point is that is changes the way people think about system development. The gap between developing a piece of code that runs in a lab and having a complete system [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=8&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in the previous blog entry, <a href="http://www.michaelnygard.com/blog/" target="_blank">Michael Nygard&#8217;s</a> <a href="http://www.pragprog.com/titles/mnee/release-it" target="_blank">Release It!</a> gives some advices how to deploy and run systems. But the most important point is that is changes the way people think about system development. The gap between developing a piece of code that runs in a lab and having a complete system that can run for days (weeks, months, years) without glitches and can sustain all kinds of extreme and often unpredictable conditions is huge. The more important and critical the system is, the more difficult and costly it is to ensure those reliability and availability parameters.</p>
<p>The book shows some interesting what-could-go-wrong scenarios,  and outlines some solutions and patterns how to address them, but the main value is that it illustrates how apparently unrelated things could just come together and bring the whole system down.  Check the recent <a href="http://www.michaelnygard.com/blog/2008/12/attack_of_selfdenial_2008_styl.html" target="_blank">Attack of Self-Denial</a> post on Michael Nygard&#8217;s blog.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nailsandhammers.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nailsandhammers.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nailsandhammers.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nailsandhammers.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nailsandhammers.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nailsandhammers.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nailsandhammers.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nailsandhammers.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nailsandhammers.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nailsandhammers.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nailsandhammers.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nailsandhammers.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nailsandhammers.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nailsandhammers.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=8&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nailsandhammers.wordpress.com/2008/12/19/release-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f0ef04cf64d03bef7f87d8105fc102d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nailsandhammers</media:title>
		</media:content>
	</item>
		<item>
		<title>Toronto Stock Exchange down</title>
		<link>http://nailsandhammers.wordpress.com/2008/12/17/toronto-stock-exchange-down/</link>
		<comments>http://nailsandhammers.wordpress.com/2008/12/17/toronto-stock-exchange-down/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 04:42:40 +0000</pubDate>
		<dc:creator>nailsandhammers</dc:creator>
				<category><![CDATA[Availability and Reliability]]></category>

		<guid isPermaLink="false">http://nailsandhammers.wordpress.com/?p=6</guid>
		<description><![CDATA[Not a very good day today. The Toronto Stock Exchange (TSX) was down the whole day because of some data feed problem, supposedly. This is happening not long after the London Stock Exchange (LSE) was unavailable for most of the day due to a system failure.  And the list goes on and on &#8211; Blackberry [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=6&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Not a very good day today. The Toronto Stock Exchange (<a title="TSX" href="http://www.tsx.com/" target="_blank">TSX</a>) was <a href="http://www.tsx.com/en/news_events/news_releases/12-17-2008_TSXGroup-RemainClosed.html" target="_blank">down</a> the whole day because of some data feed problem, supposedly. This is happening not long after the London Stock Exchange (<a title="LSE" href="http://www.londonstockexchange.com/en-gb/">LSE</a>) was <a href="http://www.reuters.com/article/ousiv/idUSL01084620080908" target="_blank">unavailable</a> for most of the day due to a system failure.  And the list goes on and on &#8211; <a href="http://business.theglobeandmail.com/servlet/story/RTGAM.20080211.wblackberry0211/BNStory/Business/home" target="_blank">Blackberry outage</a>, Amazon, Twitter, Google, Apple&#8217;s MobileMe  &#8230;</p>
<p>Some of these system failures cause significant damage to company reputation, or a hard economical impact, but it makes me think how much of other software is running out there, controlling nuclear plants, medical care systems, military systems, air-traffic control, government. These systems are still developed by people and what I am asking is &#8211; do they have some kind of a secret recipe how to create reliable, available and secure systems? If yes, why not to share it with others? And if not, then maybe there is a reason to be scared!</p>
<p>Of course there isn&#8217;t a simple guideline how to &#8216;create a system that never fails&#8217;, but there certainly are practices that lead to better, more reliable software that at least fails less often. To get started, I would certainly recommend to read <a href="http://www.michaelnygard.com/blog/" target="_blank">Michael Nygard&#8217;s</a> <a href="http://www.pragprog.com/titles/mnee/release-it" target="_blank">Release It</a> book. Check out the next blog entry!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nailsandhammers.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nailsandhammers.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nailsandhammers.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nailsandhammers.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nailsandhammers.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nailsandhammers.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nailsandhammers.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nailsandhammers.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nailsandhammers.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nailsandhammers.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nailsandhammers.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nailsandhammers.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nailsandhammers.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nailsandhammers.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=6&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nailsandhammers.wordpress.com/2008/12/17/toronto-stock-exchange-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f0ef04cf64d03bef7f87d8105fc102d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nailsandhammers</media:title>
		</media:content>
	</item>
		<item>
		<title>Welcome to Nails and Hammers!</title>
		<link>http://nailsandhammers.wordpress.com/2008/12/17/hello-world/</link>
		<comments>http://nailsandhammers.wordpress.com/2008/12/17/hello-world/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 08:41:43 +0000</pubDate>
		<dc:creator>nailsandhammers</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[This blog is mostly about software engineering and related technologies. That&#8217;s what I do, even enjoy doing &#8211; creating solutions in Java, JEE, Grails, but also .NET, C#, Python, you name it. I am also interested in CEP, BAM, and the whole mystery of why the software systems still suck even though so many smart [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=1&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog is mostly about software engineering and related technologies. That&#8217;s what I do, even enjoy doing &#8211; creating solutions in Java, JEE, Grails, but also .NET, C#, Python, you name it. I am also interested in CEP, BAM, and the whole mystery of why the software systems still suck even though so many smart people work on technologies that are supposed to make the application development &#8216;easier, faster and less buggy&#8217;.</p>
<p>Maybe it&#8217;s because at the end of the day it&#8217;s the people that get to use those technologies like tools to build things, and as people say: <strong>If the only tool you have is a hammer, the next thing you are going to hit might be your fingernail!</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nailsandhammers.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nailsandhammers.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nailsandhammers.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nailsandhammers.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nailsandhammers.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nailsandhammers.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nailsandhammers.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nailsandhammers.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nailsandhammers.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nailsandhammers.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nailsandhammers.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nailsandhammers.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nailsandhammers.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nailsandhammers.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nailsandhammers.wordpress.com&amp;blog=5888124&amp;post=1&amp;subd=nailsandhammers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nailsandhammers.wordpress.com/2008/12/17/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f0ef04cf64d03bef7f87d8105fc102d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nailsandhammers</media:title>
		</media:content>
	</item>
	</channel>
</rss>
