<?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>Nils&#039;s TechTalk</title>
	<atom:link href="http://nilshb.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nilshb.wordpress.com</link>
	<description>Tips, tricks, issues &#039;n stuff</description>
	<lastBuildDate>Fri, 20 May 2011 11:38:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nilshb.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nils&#039;s TechTalk</title>
		<link>http://nilshb.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nilshb.wordpress.com/osd.xml" title="Nils&#039;s TechTalk" />
	<atom:link rel='hub' href='http://nilshb.wordpress.com/?pushpress=hub'/>
		<item>
		<title>RIP log4j, hello logback!</title>
		<link>http://nilshb.wordpress.com/2009/10/08/rip-log4j-hello-logback/</link>
		<comments>http://nilshb.wordpress.com/2009/10/08/rip-log4j-hello-logback/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 12:25:14 +0000</pubDate>
		<dc:creator>nilshb</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://nilshb.wordpress.com/?p=56</guid>
		<description><![CDATA[As mentioned in a previous post, log4j has long been the de facto standard logging framework for java applications. That is until now. For a couple of months ago i became aware of a new framework: Logback. Logback and log4j are heavily related. The project is founded by Ceki Gülcü, who accidently also is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=56&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As mentioned in a <a href="http://nilshb.wordpress.com/2009/06/22/apache-log4j-as-log-server/">previous post</a>, <a href="http://logging.apache.org/log4j/">log4j</a> has long been the de facto standard logging framework for java applications. That is until now. For a couple of months ago i became aware of a new framework: <a href="http://logback.qos.ch/">Logback</a>. Logback and log4j are heavily related. The project is founded by Ceki Gülcü, who accidently also is the founder of log4j. This should lead to the conclusion that log4j development will come to a halt, and focus will shift to logback. So, for no other reason, you will probably be better off switching to logback yourself. But there&#8217;s more. Actually there are plenty of reasons to start using logback right this moment.</p>
<p>Some key features include:</p>
<ul>
<li>designed for an implementation independent abstraction layer: <a href="http://www.slf4j.org/">SLF4J</a></li>
<li>smaller footprint</li>
<li>better performance</li>
<li>markers</li>
<li>parametrized logging statements</li>
<li>conditional stack tracing</li>
<li>powerful eventfiltering</li>
</ul>
<p>Converting from log4j to logback has been a walk in the park. SLF4J has an (almost) identical API. Not a big surprise since Ceki Gülcü is the founder of SLF4J as well. The main difference is the support for parametrized logging: you no longer need to enclose your debug statements in <em>if (logger.isDebugEnabled()) {&#8230;.}</em>. Instead you pass objects as parameters and their String value is evaluated only at the right log level.</p>
<p>Should you regret converting to logback, then no harm is done. SLF4J supports both log4j and java.util.logging without further ado.</p>
<p>More about the <a href="http://logback.qos.ch/">Logback Project</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nilshb.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nilshb.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nilshb.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nilshb.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nilshb.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nilshb.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nilshb.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nilshb.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nilshb.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nilshb.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nilshb.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nilshb.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nilshb.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nilshb.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=56&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nilshb.wordpress.com/2009/10/08/rip-log4j-hello-logback/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/de7d6ef40efc1112edb86aa329917076?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nilshb</media:title>
		</media:content>
	</item>
		<item>
		<title>Building a low cost, low power, yet powerful home server</title>
		<link>http://nilshb.wordpress.com/2009/08/22/a-low-cost-low-power-yet-powerful-home-server/</link>
		<comments>http://nilshb.wordpress.com/2009/08/22/a-low-cost-low-power-yet-powerful-home-server/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 15:44:58 +0000</pubDate>
		<dc:creator>nilshb</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://nilshb.wordpress.com/?p=38</guid>
		<description><![CDATA[Building the perfect home server seems to be an endless struggle. My requirements are that it must be: small, silent, power efficient, linux friendly and powerful enough to run server side stuff. In this short review i will take a look at the Gigabyte GA-GC330UD motherboard as the basis for a system with a budget [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=38&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Building the perfect home server seems to be an endless struggle. My requirements are that it must be: small, silent, power efficient, linux friendly and powerful enough to run server side stuff. In this short review i will take a look at the <a href="http://www.gigabyte.com.tw/Products/Motherboard/Products_Overview.aspx?ProductID=3082">Gigabyte GA-GC330UD</a> motherboard as the basis for a system with a budget for about 2500 NOK. The board comes bundled with the <a href="http://ark.intel.com/Product.aspx?id=35641">intel atom 330</a> cpu. The cpu is mainly targeted at the <a href="http://en.wikipedia.org/wiki/Nettop_%28computer%29">Nettop plattform</a>, but this beauty can do more.</p>
<p><img class="alignnone size-medium wp-image-40" title="GA-GC330UD" src="http://nilshb.files.wordpress.com/2009/08/ga-gc330ud.jpg?w=290&#038;h=300" alt="GA-GC330UD" width="290" height="300" /></p>
<p><span id="more-38"></span></p>
<p><strong>The Atom 330</strong></p>
<p>According to the specs the 330 draws a maximum of 8W. It runs at 1,6 GHz, has 2 cores, a 533 MHz FSB and 1 MB L2 cache. The l2 cache size is a truth with modification: each core has its own 512 KB cache, they don&#8217;t share. Each core is able to run two hyperthreads, giving it a total of four processing threads to run apps on. A small annoyance is the FSB speed of 533. All the motherboards with this cpu supports DDR2 memory at 667 MHz, but due to the FSB you will only be able to run it at 533.</p>
<p><strong>The motherboard</strong></p>
<p>There are a few motherboards that supports the atom 330. I had a quick peek at one from <a href="http://www.intel.com/products/desktop/motherboards/D945GCLF2-D945GCLF2D/D945GCLF2-D945GCLF2D-overview.htm">intel </a>and one from <a href="http://www.asus.com/product.aspx?P_ID=xrR7wto9Z5BL42aU&amp;templete=2">asus </a>as the alternatives. Basically the boards are the same. The asus board has the nvidia ion grapichs chipset, but it costs almost twice as much. Graphics is not a concern for me. The intel board supports gigabit ethernet, but some people reports linux driver issues.</p>
<p>The board conforms to the <a href="http://www.mini-itx.com">mini-itx</a> form factor. It is surprisingly small and compact. Gigabyte claims they have used 2 ounces of copper for both the power and ground layers, making it more durable and cooler. Who knows, but the board feels heavy and of good quality. It <span id="intelliTXT">supports 2 GB of DDR2 RAM, and has one PCI expansion slot.</span></p>
<p>With a cpu drawing a max of 8 watts, my first thought was to make a fanless system. But hers a funny story: the cpu only requires passive cooling but the chipset, <span id="intelliTXT">945GC Northbridge and the ICH7 Southbridge, runs pretty hot and requires active cooling.</span></p>
<p><strong>The chassis</strong></p>
<p>A great motherboard needs a great home. For chassis i picked the <a href="http://www.silverstonetek.com/products/p_contents.php?pno=SG05&amp;area=">Silverstone Sugo SG05B</a>.</p>
<p><img class="alignnone size-medium wp-image-43" title="Silverstone sugo SG05" src="http://nilshb.files.wordpress.com/2009/08/sg05-3-41.jpg?w=300&#038;h=225" alt="Silverstone sugo SG05" width="300" height="225" /></p>
<p>It comes with an <a href="http://www.80plus.org/">80 plus certified</a> 300 watts power supply. Its small, yet there is room for a full size 9&#8243; expansion card. More about the casing in a review by <a href="http://www.hardwaresecrets.com/article/758">hardwaresecrets</a>. One drawback with this chassis is that it only support a slim optical drive. These drives are pretty expensive compared to 5,25&#8243; drives. But who needs an optical drive? This is 2009 and we use USB sticks to install the OS and transfer files when we can&#8217;t use the network.</p>
<p><strong>The order</strong></p>
<p>I ordered the board, chassis, disk and ram from <a href="http://www.komplett.no/">komplett.no</a>. The disk, a samsung spinpoint F1 1TB, was amazingly low priced. These days storage come cheap! Komplett may not be the cheapest store around, put they are pretty close. The packaging, shipping and support from them has always been excellent. This time was no exception.  The stuff was shipped one hour after i placed the order, and i could pick it all up at my post office the next day.</p>
<p><strong>The build</strong></p>
<p>After reading about the ultra compact chassis i was happily surprised to discover that there was lots of space inside it. There is actually ample space for a full size cpu cooler, making this chassis attractive for compact gaming rigs as well. Mounting the board was a walk in the park &#8211; even for people with large fingers.</p>
<p><img class="alignnone size-medium wp-image-45" title="lots if space inside the rig" src="http://nilshb.files.wordpress.com/2009/08/insidejpg.jpg?w=300&#038;h=225" alt="lots if space inside the rig" width="300" height="225" /></p>
<p>Actually there was not much to say about the build. It was all done in an hour or so, leaving me with a big smile and the feeling of a job well done. This is what happens when component all fit, with well thought details. Time to take it for a spin. The atom 330 has a 64 bit architecture, hence there is no reason not to go for a 64 bit OS. I installed <a href="http://www.ubuntu.com/products/WhatIsUbuntu/serveredition">ubuntu 64 bit server edition</a> with no problems, except from an annoying bug in the installer. I was not able to install this from usb. The installer expects a cdrom, and i was not able to fool it by mounting my usb stick as a cdrom drive. I guess this will be fixed pretty soon, but for me the fix was to use a cdrom from another machine for the install process.</p>
<p>My first impression of the final system was totally overwhelmed be the noise from the cpu fan. This little bugger is really noisy, this was not what i expected.</p>
<p><strong>The followup order</strong></p>
<p>The <a href="http://www.scythe-usa.com/product/acc/016/sy124010l_detail.html">Scythe Mini Kaze</a> is a classic when it comes to silent cpu fans. To be on the safe side i also ordered the <a href="http://www.scythe-usa.com/product/acc/002/sflex_detail.html">Scythe S-FLEX FDB</a> 120mm 800rpm, as a replacement for the casing fan. It runs at an amazing 8.7dB, the mini kaze at 14dB. I got them both from <a href="http://www.multicom.no/">multicom</a> for a couple of 100 NOK.</p>
<p><strong>The conclusion</strong></p>
<p>After fitting the new fans and running this rig for a couple of days i am pretty satisfied with the result. lm-sensors reports a steady core temp of 41 degrees. Under heavy load i guess this would raise to 60-70 degrees. No problem. /proc/cpuinfo reports 4 cpus, each at 3199,99 bogomips. BOIC benchmarking reports: 4 cpus with 481 floating point MIPS (Whetstone) per CPU and 1192 integer MIPS (Dhrystone) per CPU. This is not bad considering what we are dealing with here. You can not use this for gaming &#8211; but with a decent graphics card it could be done. At heavy load my guess would be that the rig draws around 40-50 W. There are some drawbacks. I would like more ram, a faster FSB and a cooler chipset. But the motherboards available today don&#8217;t support this. I ended up at around 3000 NOK for everything. Considering the price i would say that this is a bargain.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nilshb.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nilshb.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nilshb.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nilshb.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nilshb.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nilshb.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nilshb.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nilshb.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nilshb.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nilshb.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nilshb.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nilshb.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nilshb.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nilshb.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=38&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nilshb.wordpress.com/2009/08/22/a-low-cost-low-power-yet-powerful-home-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/de7d6ef40efc1112edb86aa329917076?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nilshb</media:title>
		</media:content>

		<media:content url="http://nilshb.files.wordpress.com/2009/08/ga-gc330ud.jpg?w=290" medium="image">
			<media:title type="html">GA-GC330UD</media:title>
		</media:content>

		<media:content url="http://nilshb.files.wordpress.com/2009/08/sg05-3-41.jpg?w=300" medium="image">
			<media:title type="html">Silverstone sugo SG05</media:title>
		</media:content>

		<media:content url="http://nilshb.files.wordpress.com/2009/08/insidejpg.jpg?w=300" medium="image">
			<media:title type="html">lots if space inside the rig</media:title>
		</media:content>
	</item>
		<item>
		<title>What will the next revolution in software development be?</title>
		<link>http://nilshb.wordpress.com/2009/06/26/what-will-the-nest-revolution-in-software-development-be/</link>
		<comments>http://nilshb.wordpress.com/2009/06/26/what-will-the-nest-revolution-in-software-development-be/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 12:29:42 +0000</pubDate>
		<dc:creator>nilshb</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="false">http://nilshb.wordpress.com/?p=33</guid>
		<description><![CDATA[The noble craft of software development has witnessed major changes only the last couple of years. We have had the era of object orientation, patterns, frameworks, tooling and methodology. Major achievements has been made in all these areas. It could seem like most of these areas has been pushed to the limit. Object orientation has [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=33&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The noble craft of software development has witnessed major changes only the last couple of years. We have had the era of object orientation, patterns, frameworks, tooling and methodology. Major achievements has been made in all these areas. It could seem like most of these areas has been pushed to the limit.</p>
<p><span id="more-33"></span></p>
<p>Object orientation has certainly reached it&#8217;s heights. In an almost desperate attempt to revitalize OO the concept of aspect orientation was introduced. For a while this seemed like an utterly new cool programming paradigm. And the vocabulary, so many awesome words. But the concept matured, and we didn&#8217;t do aspect oriented programming any more. We used aspects, and was still i the world of OO.</p>
<p>There will always bee new patterns. That&#8217;s the nature of patters. And there will always be better tooling. But still, I&#8217;m not that surprised anymore when the latest version of the programming tool i use comes with 20 new refactorings. I was one of the last developers in my organization to leave my beloved editor in favor of a modern IDE. This was some years ago, but still a milestone in my carrier.</p>
<p>Agile methodology had its breakthrough with XP. Everyone was running around with Kent Beck&#8217;s &#8220;Extreme Programming Explained&#8221;. But XP&#8217;s most powerful asset, it&#8217;s name (who wouldn&#8217;t want to do &#8220;extreme&#8221; programming) was also its downfall. No serious business would like to do anything &#8220;extreme&#8221;. Dark clouds where gathering, waterfall lurking in the shadows, but suddenly agile exploded. I don&#8217;t know how it happened, but overnight everyone was doing stand up meetings and burn down charts.</p>
<p>What will the next revolution be? For the time being it seems like there is a strong force  within programming languages. New dynamic languages are popping up faster than you can say cheese. Many come with agile, light and powerful enterprise frameworks. The biggest challenge this potential revolution faces is the &#8220;enterprise acceptance stage&#8221;. Introducing a new language to a large organization is not done over night. It is considered expensive and a major architectural choice. The community has responded with languages that run on an already solid enterprise platform. The JVM. I read somewhere that there are over 200 languages targeted at the Java Virtual Machine.</p>
<p>Another challenge to overcome is a more psychological one. Dynamic languages used to be called &#8220;scripting languages&#8221;. This is the same problem XP had to face, no serious organization would ever deliver business critical software in a &#8220;scripting language&#8221;. Hopefully, if we omit this term, and promote dynamic languages on a rock solid platform with no initial investment, backed by a lean methodology &#8211; we will see the next revolution come.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nilshb.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nilshb.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nilshb.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nilshb.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nilshb.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nilshb.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nilshb.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nilshb.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nilshb.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nilshb.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nilshb.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nilshb.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nilshb.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nilshb.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=33&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nilshb.wordpress.com/2009/06/26/what-will-the-nest-revolution-in-software-development-be/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/de7d6ef40efc1112edb86aa329917076?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nilshb</media:title>
		</media:content>
	</item>
		<item>
		<title>Apache log4j as log server</title>
		<link>http://nilshb.wordpress.com/2009/06/22/apache-log4j-as-log-server/</link>
		<comments>http://nilshb.wordpress.com/2009/06/22/apache-log4j-as-log-server/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 12:13:02 +0000</pubDate>
		<dc:creator>nilshb</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://nilshb.wordpress.com/?p=26</guid>
		<description><![CDATA[Log4j has been the de facto logging standard for Java applications a long time. And with good reason. It&#8217;s flexible, easy to use, jet extremely powerful. But, as many other open source projects, it lacks good (free) documentation. This is understandable since the main author, Ceki Gülcü, has made business of selling the documentation. One [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=26&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://logging.apache.org/log4j/">Log4j</a> has been the de facto logging standard for Java applications a long time. And with good reason. It&#8217;s flexible, easy to use, jet extremely powerful. But, as many other open source projects, it lacks good (free) documentation. This is understandable since the main author, Ceki Gülcü, has made business of selling the <a href="https://www.qos.ch/shop//products/log4j/log4j-Manual.jsp">documentation</a>.</p>
<p>One of the secrets buried in the log4j.jar is its socket server. This is a simple class with a main method. It takes two parameters, port and configuration file. Both work just as you would expect. The config file can be specified both in XML or as properties.</p>
<p>Example server startup:<br />
<code><br />
org.apache.log4j.net.SimpleSocketServer 4712 log4j-server.properties<br />
</code></p>
<p>Now all you have to do is spesify your appender on the client.</p>
<p>Example appender:<br />
<code><br />
log4j.appender.SERVER=org.apache.log4j.net.SocketAppender<br />
log4j.appender.SERVER.Port=4712<br />
log4j.appender.SERVER.RemoteHost=loghost<br />
log4j.appender.SERVER.ReconnectionDelay=10000<br />
</code></p>
<p>I use this in applications where i have load balancing between multiple hosts. Logs scattered all over the place is a mess. This way you can keep them all in one place. There is one problem with this, if the server is dead all your logging disappears in a black hole. For this reason i also log important stuff to the local filesystem, to serve as backup.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nilshb.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nilshb.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nilshb.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nilshb.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nilshb.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nilshb.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nilshb.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nilshb.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nilshb.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nilshb.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nilshb.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nilshb.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nilshb.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nilshb.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=26&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nilshb.wordpress.com/2009/06/22/apache-log4j-as-log-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/de7d6ef40efc1112edb86aa329917076?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nilshb</media:title>
		</media:content>
	</item>
		<item>
		<title>Threading issues exposed with ConTest</title>
		<link>http://nilshb.wordpress.com/2009/06/16/threading-issues-exposed-with-contest/</link>
		<comments>http://nilshb.wordpress.com/2009/06/16/threading-issues-exposed-with-contest/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 11:17:21 +0000</pubDate>
		<dc:creator>nilshb</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://nilshb.wordpress.com/?p=4</guid>
		<description><![CDATA[Java has made concurrent programming available for the masses. But concurrency is still tricky despite neat APIs and tons of patterns. What may seem to work like a charm in test and under heavy stress testing, may explode right in your face in real life when exposed to heavy stress for a long period. For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=4&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Java has made concurrent programming available for the masses. But concurrency is still tricky despite neat APIs and tons of patterns. What may seem to work like a charm in test and under heavy stress testing, may explode right in your face in real life when exposed to heavy stress for a long period. For a couple of days ago this happened to me.</p>
<p><span id="more-4"></span>Suddenly, from nowhere, we had a critical bug in a large online financial system. The system was shutdown immediately and we started trying to find out what was happening. But no matter how hard we tried, we could not reproduce the problem. We suspected a synchronization issue, and we suspected <a href="http://ws.apache.org/axis/">axis 1.4</a> to be responsible. After some serious research on how to pinpoint synchronization problems, a college of mine found <a href="http://www.alphaworks.ibm.com/tech/contest">ConTest</a>. ConTest is a tool from <a href="http://www.alphaworks.ibm.com/">IBM alphaWorks</a>. It instruments your bytecode to schedule execution of program threads such that program scenarios that are likely to contain race conditions, deadlocks, and other intermittent bugs appears with higher frequency.</p>
<p>This sounds almost to cool to be able to work &#8211; but it does! And in a very little intrusive way. All you have to do is add a javaagent argument to your run command, specify in a properties file witch classes to be instrumented &#8211; and off you go. It took me 10 minutes from being aware of  ConTest, until i had reproduced the bug.</p>
<p>It was as we suspected. Axis 1.4 has some serious flaws. Turns out they have been fixed in main trunk of the project, so the quick fix was to build  axis 1 from trunk. With ConTest we could now prove that the bug was gone.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nilshb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nilshb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nilshb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nilshb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nilshb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nilshb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nilshb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nilshb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nilshb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nilshb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nilshb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nilshb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nilshb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nilshb.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nilshb.wordpress.com&amp;blog=8065742&amp;post=4&amp;subd=nilshb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nilshb.wordpress.com/2009/06/16/threading-issues-exposed-with-contest/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/de7d6ef40efc1112edb86aa329917076?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nilshb</media:title>
		</media:content>
	</item>
	</channel>
</rss>
