<?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>Matthias Friedrich&#039;s Blog</title>
	<atom:link href="http://blog.mafr.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mafr.de</link>
	<description>Scripting, Software Engineering and Stuff in Between</description>
	<lastBuildDate>Fri, 27 Jan 2012 11:12:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.mafr.de' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Matthias Friedrich&#039;s Blog</title>
		<link>http://blog.mafr.de</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.mafr.de/osd.xml" title="Matthias Friedrich&#039;s Blog" />
	<atom:link rel='hub' href='http://blog.mafr.de/?pushpress=hub'/>
		<item>
		<title>Five Years of Blogging</title>
		<link>http://blog.mafr.de/2012/01/01/five-years-of-blogging/</link>
		<comments>http://blog.mafr.de/2012/01/01/five-years-of-blogging/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 11:35:35 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[meta]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.mafr.de/?p=729</guid>
		<description><![CDATA[When I started this blog in December 2006, I didn&#8217;t think I&#8217;d keep going for five years. Now, more than a hundred articles later, there&#8217;s still no shortage of topics to write about. Five years is like eternity in my &#8230; <a href="http://blog.mafr.de/2012/01/01/five-years-of-blogging/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=729&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I started this blog in December 2006, I didn&#8217;t think I&#8217;d keep going for five years. Now, more than a hundred articles later, there&#8217;s still no shortage of topics to write about. Five years is like eternity in my line of business, so let&#8217;s not dwell in the past. Anyway, I&#8217;m still going to have a brief look at what happened last year.</p>
<p><span id="more-729"></span></p>
<p>These were last year&#8217;s most successful articles:</p>
<ol>
<li><a href="/2008/04/12/hibernate3-schema-creation/">Generating DDL Scripts from JPA Annotations with Maven</a></li>
<li><a href="/2008/05/13/revert-a-commit-in-svn/">Reverting a Commit in Subversion</a></li>
<li><a href="/2007/08/05/cmdline-options-in-shell-scripts/">Parsing Command Line Options in Shell Scripts</a></li>
<li><a href="/2007/06/30/generating-ddl-scripts-with-maven/">Generating DDL Scripts with Maven</a></li>
<li><a href="/2011/05/14/ubuntu-natty-vs-nvidia/">Ubuntu Natty vs. nVidia</a></li>
</ol>
<p>That&#8217;s pretty similar to 2010, the top four are well linked and seem to contain just the right keywords so search engines send a lot of traffic. The Ubuntu posting is a typical problem solving piece from this year that earned me some serious karma points, judging from the comments.</p>
<p>Traffic-wise, rants linked from link aggregators like <a href="http://dzone.com">DZone</a> generate lots of page impressions in a short amount of time. So do problem solving articles until the underlying issue is fixed. But it&#8217;s the HOWTO-style articles that generate steady traffic for years.</p>
<p>There was another thing that&#8217;s interesting from a SEO point of view. <a href="/2011/07/23/moving-to-blog-mafr-de/">Back in July</a> I switched from a wordpress subdomain to my own domain, wondering what this would do to website traffic. Now I know: Page impressions dropped by 50% and it took almost two months to recover. This would have been really serious if this was an ad-supported website (which it isn&#8217;t, the ads you see are from <a href="http://wordpress.com">WordPress.com</a>, and I don&#8217;t get a share).</p>
<p>Despite this sharp drop, compared to last year, page impressions have increased by more than 40%. While I&#8217;m still a very long shot from running a high-traffic blog, I could have made a bit of money that would more than cover typical hosting costs. But I&#8217;m still happy with WordPress.com, so I won&#8217;t bother.</p>
<p>So, that&#8217;s it, enough meta blogging for this year. Thanks for reading and commenting and have a great new year!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/729/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/729/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/729/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=729&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2012/01/01/five-years-of-blogging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>Hudson vs. Jenkins Revisited</title>
		<link>http://blog.mafr.de/2011/12/27/hudson-vs-jenkins-revisited/</link>
		<comments>http://blog.mafr.de/2011/12/27/hudson-vs-jenkins-revisited/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 15:23:51 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[tools]]></category>
		<category><![CDATA[build systems]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://blog.mafr.de/?p=723</guid>
		<description><![CDATA[When the Hudson/Jenkins fork was announced earlier this year, the case seemed pretty clear. There were heroes from the Open Source community, among them Hudson&#8217;s original author, and there was everybody&#8217;s favorite villain, Oracle. Back in February, I would have &#8230; <a href="http://blog.mafr.de/2011/12/27/hudson-vs-jenkins-revisited/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=723&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When the Hudson/Jenkins fork was announced earlier this year, the case seemed pretty clear. There were heroes from the Open Source community, among them Hudson&#8217;s original author, and there was everybody&#8217;s favorite villain, Oracle. Back in February, I would have chosen Jenkins without a second thought. Now, almost a year later, things are less clear and I&#8217;m not sure which one to pick.</p>
<p><span id="more-723"></span></p>
<p>Before comparing the alternatives let&#8217;s first have a look at my use case. My department runs a medium sized Hudson installation with three build slaves. We have 700 build jobs, most of them using Maven 2 to build software and run rather large test suites. These jobs fall into a small number of categories (on-commit builds, nightly site builds, Sonar builds, release builds, etc.) where jobs in the same category are pretty much identical except for their Subversion URL.</p>
<p>It&#8217;s probably hard to understand for CI developers, but to us, our CI server is about as exciting as our Maven repository or our wiki. We don&#8217;t care about it most of the time and expect it to run with little to no maintenance. Here&#8217;s what we need:</p>
<ul>
<li>Subversion support</li>
<li>On-commit and time-based build triggers</li>
<li>Running Maven builds</li>
<li>E-Mail notifications</li>
<li>Developer self service</li>
<li>Authentication and authorization</li>
</ul>
<p>We don&#8217;t care much for fancy features. Our main Hudson system is critical to our internal development processes and hasn&#8217;t been updated in more than three years. Back then, when you finally managed to find a stable Hudson release for your scenario, there was no way you would ever upgrade. Neither would you install any plugins without a very thorough QA process.</p>
<p>Anyway, three years is a long time in IT and since our build servers are about to be modernized, we&#8217;re finally going to upgrade our CI environment with the latest version of either Hudson or Jenkins.</p>
<p>I don&#8217;t have any inside knowledge into either project, but to make a decision I&#8217;ll sum up my impressions drawn from reading blog posts, looking around websites, mailing list archives and bug trackers. Feel free to comment if I got something wrong.</p>
<h4>A Common History</h4>
<p>With Jenkins being a fork of Hudson (or maybe the other way round), both projects share a common past. Both projects inherited an old, mostly undocumented code base with lots of open issues in Jira, a huge unmanaged set of dependencies and no test coverage to speak of. From my short glances at the code it looked like a hackish open source project with a few cool ideas but overall little emphasis on quality. In projects like this you need good developers to keep the code base from collapsing under its own weight.</p>
<p>While there were a lot of third-party plugins, many of the more obscure plugins seemed to be buggy or unmaintained, which is a well-known problem in extensible software packages (see Firefox, for example). Still, Hudson core along with its most important plugins was a usable, battle tested CI server.</p>
<h4>The Case for Jenkins</h4>
<p><em>Project team</em>: The <a href="http://jenkins-ci.org/">Jenkins project</a> picked up where Hudson left off, taking many (plugin) developers with it. This seems to be the original development team from before the fork but obviously without Oracle employees.</p>
<p><em>Activity</em>: There have been regular releases since the fork, the community seems very active and there was even a conference on Jenkins. All in all a healthy open source project.</p>
<p><em>Releases</em>: One of my biggest complaints about the original Hudson has always been its weird release policy. There was no stable release branch; to get bug fixes, you had to install the latest release which also contained new features. Since this is unacceptable to many companies, the Jenkins project introduced long term support releases (LTS), with &quot;long term&quot; meaning three months. Apparently, you can get 12 months of <a href="http://www.cloudbees.com/jenkins-enterprise-by-cloudbees-overview.cb">support from Cloudbees</a> which is better than nothing.</p>
<p><em>Documentation</em>: User documentation is traditionally sparse on the web, but a <a href="http://shop.oreilly.com/product/0636920010326.do">book from O&#8217;Reilly</a> fills the gap for those who need it. There&#8217;s very little on Jenkins&#8217; architecture which is a problem for plugin developers and contributors.</p>
<p><em>Quality</em>: Looking at Jira, there are currently 515 open bugs in Jenkins core, 244 of them older than a year. Everything else included, there are 4273 open issues, which is (in my opinion) not a healthy amount for a project of this size. This makes me less than confident that obscure bugs plaguing only a minority of users get fixed in a timely manner.</p>
<p><em>Features</em>: Some features useful for larger installations are only available through <a href="http://www.cloudbees.com/jenkins-enterprise-by-cloudbees-available-plugins.cb">Jenkins Enterprise</a> by CloudBees which is annoying. There&#8217;s also a large number of third party plugins, but since our requirements are pretty basic, we don&#8217;t need any of them.</p>
<h4>The Case for Hudson</h4>
<p><em>Project team</em>: Despite many people&#8217;s predictions, <a href="http://hudson-ci.org/">Hudson</a> is still alive. There seems to be a team at Oracle working on Hudson and there have also been contributions from <a href="http://sonatype.com/">Sonatype</a>, a well-known player from the Maven universe. I&#8217;m not sure how dependent the project is on employees from either companies.</p>
<p><em>Activity</em>: There have been several releases since the fork, with some rather large changes. Right now, there&#8217;s at lot of clean up and refactoring activity going on which is necessary for migrating the project to the Eclipse Foundation. They also spent some time on professionalizing the project, for example defining and documenting processes.</p>
<p><em>Releases</em>: Release cycles seem to be longer than with Jenkins, with release numbers using a more mainstream numbering scheme. I didn&#8217;t find any information on how long releases are supported.</p>
<p><em>Documentation</em>: There&#8217;s a free book on Hudson available from the website which is a work in progress and there&#8217;s also serious architectural documentation. Right now, both projects are similar enough to benefit from this documentation, but projects are likely to drift apart over time.</p>
<p><em>Quality</em>: Currently, Jira shows 2663 open issues with 34 being open bugs in Hudson core (6 of them older than a year). It seems the Hudson team spent some time cleaning up their bug tracker. According to <a href="http://wiki.hudson-ci.org/display/HUDSON/Development+Lifecycle">their wiki</a>, an Oracle-based QA team does functional testing of Hudson core along with the most important plugins. From my own experience with good software testers, I know about the huge positive effect this can have on a product.</p>
<p><em>Features</em>: Release 2.2.0 comes with a job templating mechanism (&quot;cascading&quot;) that&#8217;s going to be extremely valuable for handling large numbers of similar jobs. I guess if they spiced up the Nested Views plugin, too, this would make the Cloudbees offering pretty much pointless to a lot of users.</p>
<h4>Conclusion</h4>
<p>The Jenkins project takes pride in frequent releases and its large number of plugins, but honestly, I couldn&#8217;t care less. CI is a critical part of our infrastructure. If it doesn&#8217;t work, we&#8217;re in serious trouble, so I choose quality and stability over features any day. In fact, I would jump at the opportunity to disable features on the job configuration page.</p>
<p>Given its bad track record with Open Source, I don&#8217;t trust Oracle, but I haven&#8217;t seen enough from Cloudbees to trust them, either. Sonatype has a better reputation though, and so does Hudson&#8217;s new home, the Eclipse Foundation. Since Sonatype offers a Hudson-based product, I&#8217;m confident that there will be continued development.</p>
<p>To sum things up, I&#8217;m leaning towards Hudson. The Hudson project makes a more professional impression, looking like a well-run enterprise IT project rather than your typical open source project. In my opinion, their focus on quality makes it a better match for our use case.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/723/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/723/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/723/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=723&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/12/27/hudson-vs-jenkins-revisited/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>Sharing Files Revisited</title>
		<link>http://blog.mafr.de/2011/11/19/sharing-files-revisited/</link>
		<comments>http://blog.mafr.de/2011/11/19/sharing-files-revisited/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 15:35:15 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[distributed systems]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.mafr.de/?p=718</guid>
		<description><![CDATA[It&#8217;s amazing how sometimes problems solve themselves. Since my last article, I got a new home router (a FRITZ!Box Fon WLAN 7320) that nicely solves the problem of accessing network devices with dynamic addresses even without Zeroconf. My router also &#8230; <a href="http://blog.mafr.de/2011/11/19/sharing-files-revisited/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=718&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s amazing how sometimes problems solve themselves. Since my <a href="/2011/10/09/sharing-files-android/">last article</a>, I got a new home router (a FRITZ!Box Fon WLAN 7320) that nicely solves the problem of accessing network devices with dynamic addresses even without Zeroconf.</p>
<p><span id="more-718"></span></p>
<p>My router also acts as a DNS proxy and provides a few handy DNS records, too. The router itself has the host name <code>fritz.box</code> and every other device on the network is available via <code>HOSTNAME.fritz.box</code> (the router learns the client&#8217;s host name via DHCP). This means I can access my desktop machine via <code>amy.fritz.box</code>.</p>
<p>Using <a href="/2007/02/03/writing-a-web-server-in-python/">my servehttp</a> script or Simon Budig&#8217;s similar but more fancy <a href="http://www.home.unix-ag.org/simon/woof.html">woof script</a>, I can serve files from my desktop machine and download them from my Android device via the browser. Using the browser is nice because I don&#8217;t need any additional apps or configuration (a bookmark is useful though).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/718/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/718/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/718/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=718&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/11/19/sharing-files-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>Sharing Files With Android Devices</title>
		<link>http://blog.mafr.de/2011/10/09/sharing-files-android/</link>
		<comments>http://blog.mafr.de/2011/10/09/sharing-files-android/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 09:39:39 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[distributed systems]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.mafr.de/?p=693</guid>
		<description><![CDATA[Occasionally I want to transfer a file from my Linux desktop machine to one of my Android-based devices via my home network. Shouldn&#8217;t be a problem, there are lots of networking protocols for this, right? In practice, many solutions you &#8230; <a href="http://blog.mafr.de/2011/10/09/sharing-files-android/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=693&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Occasionally I want to transfer a file from my Linux desktop machine to one of my Android-based devices via my home network. Shouldn&#8217;t be a problem, there are lots of networking protocols for this, right? In practice, many solutions you think of aren&#8217;t convenient enough for daily use.</p>
<p><span id="more-693"></span></p>
<p>Services like <a href="https://one.ubuntu.com/">Ubuntu One</a> or <a href="https://www.dropbox.com/">Dropbox</a> work well, but you don&#8217;t want to send larger files across the internet. Sharing via Bluetooth might work for small files, but my desktop machine doesn&#8217;t support Bluetooth. Using my <a href="/2007/02/03/writing-a-web-server-in-python/">servehttp</a> script to publish a directory via HTTP works technically, but you have to know the (dynamic) IP address of the desktop machine. While I could assign a static address, it&#8217;s pretty inconvenient having to deal with IP addresses (even more so with IPv6).</p>
<p>A perfectly fine set of standards for solving the addressing problem is <a href="http://zeroconf.org/">Zeroconf</a>, modeled after Apple&#8217;s Bonjour. Using its Multicast DNS (MDNS) protocol, a device can look up a host&#8217;s name by sending a MDNS query to the local network. The device owning the host name responds with its IP address. Since this is just DNS over multicast, it integrates well with your system&#8217;s resolver. Also, hosts can announce services to the network. On recent linux distributions you need packages <code>avahi-daemon</code> and the resolver plugin package <code>libnss-mdns</code>. Then you should be able to look up your host on your local network (try <code>ping HOST.local</code>). Unfortunately, Android doesn&#8217;t support Zeroconf out of the box.</p>
<p>A widely deployed alternative to Zeroconf is <a href="http://upnp.org">Universal Plug and Play</a> (UPnP). It provides service discovery through announcements like Zeroconf, but has never been properly standardized. Hosts announce services via <a href="http://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol">Simple Service Discovery Protocol</a> (SSDP), a multicast-based UDP protocol. SSDP announcements are basically HTTP extended with a <code>NOTIFY</code> method:</p>
<pre>
NOTIFY * HTTP/1.1
HOST: 239.255.255.250:1900
CACHE-CONTROL: max-age=1800
LOCATION: http://192.168.2.103:49152/description.xml
NT: urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1
NTS: ssdp:alive
SERVER: Linux/2.6.38-11-generic, UPnP/1.0, Portable SDK for UPnP devices/1.6.6
X-User-Agent: redsonic
USN: uuid:898f9738-d930-4db4-a3cf-0015c5c15a3f::urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1
</pre>
<p>It looks a bit like a redirect; in fact you can download a service description from <code>http://192.168.2.103:49152/description.xml</code>.</p>
<p>There are several media servers that support UPnP. Here&#8217;s how you share a file system directory on my desktop machine using <a href="http://ushare.geexbox.org/">ushare</a>:</p>
<pre>
matthias@amy ~ $ ushare -c /tmp/share/
Warning: can't parse file "/etc/ushare.conf".
Recheck uShare's configuration and try again !
uShare (version 1.1a), a lightweight UPnP A/V and DLNA Media Server.
Benjamin Zores (C) 2005-2007, for GeeXboX Team.
See http://ushare.geexbox.org/ for updates.
Listening on telnet port 1337
Initializing UPnP subsystem ...
UPnP MediaServer listening on 192.168.2.103:49152
Sending UPnP advertisement for device ...
Listening for control point connections ...
Building Metadata List ...
Looking for files in content directory : /tmp/share/
Found 2 files and subdirectories.
</pre>
<p>This works well for one-off sharing of media files. You can also run ushare as a system service on a fixed set of directories. Obviously, this is only viable for local, trusted networks (have a look at ushare&#8217;s web console for even more reasons).</p>
<p>On my Android devices, I use <a href="https://market.android.com/details?id=com.bubblesoft.android.bubbleupnp&amp;feature=search_result">BubbleUPnp</a> to stream music or videos (in supported formats) and optionally download them. Unfortunately, most UPnP apps seem to be media players and ushare doesn&#8217;t seem to serve document files (I want my ebooks, dammit).</p>
<p>This means, right now I&#8217;m stuck with assigning a static IP address to my desktop machine and serve files via HTTP. Or are there better solutions?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/693/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/693/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/693/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=693&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/10/09/sharing-files-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Cannot fork&#8221;</title>
		<link>http://blog.mafr.de/2011/09/04/cannot-fork/</link>
		<comments>http://blog.mafr.de/2011/09/04/cannot-fork/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 07:50:55 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.mafr.de/?p=683</guid>
		<description><![CDATA[From time to time, the virtual server I rented acted up. When logging into the system, I would get error messages indicating the server wasn&#8217;t able to create any more processes: &#8220;cannot fork&#8221;. This was weird because ps(1) showed only &#8230; <a href="http://blog.mafr.de/2011/09/04/cannot-fork/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=683&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>From time to time, the virtual server I rented acted up. When logging into the system, I would get error messages indicating the server wasn&#8217;t able to create any more processes: &#8220;cannot fork&#8221;. This was weird because <code>ps(1)</code> showed only 20 processes, while the hard limit of the virtual machine host was apparently set to 94.</p>
<p><span id="more-683"></span></p>
<p>My server doesn&#8217;t do a lot: There&#8217;s just a couple of deamons, including an Apache instance that servers less than 1000 page impressions per day. Load is pretty much zero most of the time, there&#8217;s very little network I/O, and memory use is below limits, too.</p>
<p>After some head scratching, I realized what the problem was: The virtual machine host counts kernel level threads towards the process limit! It&#8217;s quite obvious when you think about it; a quick <code>"ps -efL"</code> confirmed the suspicion.</p>
<p>The culprit was Apache with its threaded worker model (<code>apache2-mpm-worker</code>). The default settings were unsuitable for my rather limited virtual machine, they caused Apache to spawn too many threads. Fortunately, after reading <a href="http://httpd.apache.org/docs/2.2/mod/worker.html">the documentation</a> this was rather easy to fix. I edited the configuration (<code>/etc/apache2/apache2.conf</code> on my system), adjusting the default settings:</p>
<pre>
&lt;IfModule mpm_worker_module&gt;
    StartServers          2
    ServerLimit           4
    MaxClients           64
    ThreadsPerChild      16
    MinSpareThreads       4
    MaxSpareThreads       8
    MaxRequestsPerChild   0
&lt;/IfModule&gt;
</pre>
<p>After an Apache restart, my problems were gone.</p>
<p>This configuration limits the number of active worker threads to 64 (<code>MaxClients</code>), which is well below the virtual machine&#8217;s threshold. Those 64 threads run in up to 4 child processes (<code>ServerLimit</code>), with 2 processes created on startup (<code>StartServers</code>). Each server process contains at most 16 threads (<code>ThreadsPerChild</code>), with 4 threads created at minimum and at most 8 idle threads kept in the worker pool (<code>MinSpareThreads</code> and <code>MaxSpareThreads</code> respectively). There&#8217;s no limit on the number of requests a process may serve (<code>MaxRequestsPerChild</code>).</p>
<p>An alternative solution would be to switch to the <a href="http://httpd.apache.org/docs/2.2/mod/prefork.html">prefork module</a>. It works with processes rather than threads and is a lot easier to configure. Just install the <code>apache2-mpm-prefork</code> and set its <code>MaxClients</code> appropriately.</p>
<p>Keep in mind that browsers typically open several connections to your host, so one client can easily hog half a dozen workers. For my site, that&#8217;s no problem, for others it may very well be.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/683/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=683&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/09/04/cannot-fork/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>Writing Hamcrest Matchers</title>
		<link>http://blog.mafr.de/2011/08/02/writing-hamcrest-matchers/</link>
		<comments>http://blog.mafr.de/2011/08/02/writing-hamcrest-matchers/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 15:52:28 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://blog.mafr.de/?p=668</guid>
		<description><![CDATA[JUnit 4 introduced a fancy DSL based on the Hamcrest framework for expressing assertions. JUnit ships with the most important matchers and you can always add Hamcrest to your classpath if you need more. Sometimes no existing matcher fits your &#8230; <a href="http://blog.mafr.de/2011/08/02/writing-hamcrest-matchers/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=668&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>JUnit 4 introduced a fancy DSL based on the <a href="http://code.google.com/p/hamcrest/">Hamcrest</a> framework for expressing assertions. JUnit ships with the most important matchers and you can always add Hamcrest to your classpath if you need more. Sometimes no existing matcher fits your needs and you have to roll your own. Since it&#8217;s not entirely obvious from the documentation, I&#8217;ll show a template for creating a simple Hamcrest matcher.</p>
<p><span id="more-668"></span></p>
<p>A check in JUnit 4 always looks something like this:</p>
<pre>
assertThat(actual, predicateName(expected));
</pre>
<p>The <code>predicateName()</code> factory method is just syntactic sugar, so let&#8217;s instantiate the matcher directly to make it more obvious what happens here:</p>
<pre>
assertThat(actual, new SomeMatcher(expected));
</pre>
<p>The first argument is of type <code>TypeActual</code>, the expectation&#8217;s type (the constructor&#8217;s argument) is <code>ExpectedType</code>. This is our implementation of SomeMatcher:</p>
<pre>
import org.hamcrest.Description;
import org.hamcrest.Factory;
import org.hamcrest.TypeSafeMatcher;

public class SomeMatcher extends TypeSafeMatcher&lt;ActualType&gt; {
    private final ExpectedType expected;

    public SomeMatcher(ExpectedType expected) {
        this.expected = expected;
    }

    &#064;Override
    public boolean matchesSafely(ActualType actual) {
        // return true iff &quot;actual&quot; matches &quot;expected&quot;
    }

    &#064;Override
    public void describeTo(Description descr) {
        // describe expectation
    }

    &#064;Factory
    public static SomeMatcher predicateName(ExpectedType expected) {
        return new SomeMatcher(expected);
    }
}
</pre>
<p>The <code>&#064;Factory</code> annotation isn&#8217;t necessary, but Hamcrest ships with <a href="http://code.google.com/p/hamcrest/wiki/Tutorial#Sugar_generation">a tool</a> that picks up predicates annotated this way and collects them in a Matchers class for easy importing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/668/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/668/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/668/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=668&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/08/02/writing-hamcrest-matchers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving to blog.mafr.de</title>
		<link>http://blog.mafr.de/2011/07/23/moving-to-blog-mafr-de/</link>
		<comments>http://blog.mafr.de/2011/07/23/moving-to-blog-mafr-de/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 10:52:43 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[meta]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.mafr.de/?p=653</guid>
		<description><![CDATA[This blog has been running for four and a half years now. That&#8217;s quite a while in internet time, so I&#8217;ve decided to move it to my own domain at http://blog.mafr.de/ (the old URL will be valid indefinitely, though). Since &#8230; <a href="http://blog.mafr.de/2011/07/23/moving-to-blog-mafr-de/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=653&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog has been running for four and a half years now. That&#8217;s quite a while in internet time, so I&#8217;ve decided to move it to my own domain at <a href="http://blog.mafr.de/">http://blog.mafr.de/</a> (the old URL will be valid indefinitely, though). Since I don&#8217;t want to host a WordPress blog myself for both stability and security reasons, I bought the domain mapping upgrade <a href="http://wordpress.com">wordpress.com</a> offers.</p>
<p><span id="more-653"></span></p>
<p>They have <a href="http://en.support.wordpress.com/domain-mapping/map-subdomain/">pretty decent documentation</a> so setup was simple. You can see that I added a CNAME DNS entry from <code>blog.mafr.de</code> to the blog&#8217;s &#8220;technical&#8221; address at wordpress.com:</p>
<pre>
matthias@amy ~ $ host -t CNAME blog.mafr.de
blog.mafr.de is an alias for unmaintainable.wordpress.com.
matthias@amy ~ $
</pre>
<p>The <code>unmaintainable.wordpress.com</code> entry itself is just an alias for <code>lb.wordpress.com</code> which in turn maps to several actual hosts using round-robin DNS. Users who still request URLs from the old site are redirected (I hope this doesn&#8217;t affect search engine traffic):</p>
<pre>
matthias@amy ~ $ curl -D - http://unmaintainable.wordpress.com
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sat, 23 Jul 2011 10:12:57 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: close
Vary: Cookie
Location: http://blog.mafr.de/

matthias@amy ~ $
</pre>
<p>Checking my new setup I noticed this:</p>
<pre>
matthias@amy ~ $ curl -s -D - http://blog.mafr.de | head
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 23 Jul 2011 10:48:54 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: close
Vary: Accept-Encoding
Vary: Cookie
Set-Cookie: hiab=on; path=/; domain=blog.mafr.de
X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
</pre>
<p>Coolest job offer ever :)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/653/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/653/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/653/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=653&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/07/23/moving-to-blog-mafr-de/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>JBoss: Running Multiple Instances on One Host</title>
		<link>http://blog.mafr.de/2011/07/10/jboss-multiple-instances/</link>
		<comments>http://blog.mafr.de/2011/07/10/jboss-multiple-instances/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 06:48:41 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://unmaintainable.wordpress.com/?p=642</guid>
		<description><![CDATA[Occasionally, it&#8217;s useful to run multiple JBoss instances on one machine. Like with any network server, this is difficult because only one application can bind to a port at any given time. You have to assign different sets of ports &#8230; <a href="http://blog.mafr.de/2011/07/10/jboss-multiple-instances/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=642&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Occasionally, it&#8217;s useful to run multiple JBoss instances on one machine. Like with any network server, this is difficult because only one application can bind to a port at any given time. You have to assign different sets of ports to each instance. JBoss consists of quite a few network services so it&#8217;s a lot of tedious work to reconfigure each and every port (I counted 16 different ports on JBoss 6&#8242;s default profile).</p>
<p><span id="more-642"></span></p>
<p>Fortunately, there&#8217;s a little known but <a href="http://community.jboss.org/wiki/ConfiguringMultipleJBossInstancesOnOneMachine">documented mechanism</a> to globally remap all JBoss ports. The file <code>server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml</code> (for the default profile) contains port bindings that you can activate using the <code>jboss.service.binding.set</code> property from the command line.</p>
<p>Suppose there&#8217;s already a JBoss instance running (which uses the default <code>ports-default</code> binding). Using the command line property, we can run a second instance like this:</p>
<pre>
  bin/run.sh -Djboss.service.binding.set=ports-01
</pre>
<p>The <code>ports-01</code> binding adds 100 to each port of the <code>ports-default</code> binding, <code>ports-02</code> adds 200, and <code>ports-03</code> adds 300. You can easily add more ports bindings yourself if you need them. </p>
<p>I tested this on JBoss 6.0.0.Final and it worked well. An alternative to port mapping approach is to make your machine listen on multiple IP addresses and have each JBoss instance bind to a different IP address using the <code>jboss.bind.address</code> property. Obviously, this requires no port remapping but changes to your network setup, usually including DNS.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/642/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/642/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/642/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=642&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/07/10/jboss-multiple-instances/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>Gnome Terminal: Stop Cursor From Blinking</title>
		<link>http://blog.mafr.de/2011/06/26/gnome-terminal-cursor-blinking/</link>
		<comments>http://blog.mafr.de/2011/06/26/gnome-terminal-cursor-blinking/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 07:44:23 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://unmaintainable.wordpress.com/?p=626</guid>
		<description><![CDATA[I&#8217;m currently setting up my new Laptop with Ubuntu Natty. Apart from all the things I hate in Unity (the list is long), there&#8217;s one recurring annoyance: the blinking cursor in Gnome Terminal. There&#8217;s no menu setting to disable it, &#8230; <a href="http://blog.mafr.de/2011/06/26/gnome-terminal-cursor-blinking/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=626&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently setting up my new Laptop with Ubuntu Natty. Apart from all the things I hate in Unity (the list is long), there&#8217;s one recurring annoyance: the blinking cursor in Gnome Terminal. There&#8217;s no menu setting to disable it, but fortunately, there&#8217;s still a way to fix it.</p>
<p><span id="more-626"></span></p>
<p>You can configure a lot in Gnome using the gconf configuration system. For all settings that aren&#8217;t available through the menus, you can use the graphical <code>gconf-editor</code> tool or the command line utility <code>gconftool-2</code>.</p>
<p>There are two gconf settings: A desktop-wide one that disables cursor blinking for all Gnome applications (<code>/desktop/gnome/interface/cursor_blink</code>).  And the other is a setting specific to a Gnome Terminal profile (<code>/apps/gnome-terminal/profiles/Default/cursor_blink_mode</code> for the &#8220;Default&#8221; profile). While the desktop-wide one is a boolean setting, Gnome Terminal allows to either inherit the desktop-wide setting (&#8220;system&#8221;) or to set your preference explicitly (&#8220;on&#8221;, &#8220;off&#8221;).</p>
<p>This command disables cursor blinking desktop-wide:</p>
<pre>
  gconftool-2 --set /desktop/gnome/interface/cursor_blink --type bool false
</pre>
<p>And this command disables blinking just for Gnome Terminal&#8217;s Default profile:</p>
<pre>
  gconftool-2 --set /apps/gnome-terminal/profiles/Default/cursor_blink_mode --type string off
</pre>
<p>All changes to the gconf database are persistent, so you don&#8217;t have to run these commands in every session.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/626/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=626&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/06/26/gnome-terminal-cursor-blinking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
		<item>
		<title>OpenID Delegation</title>
		<link>http://blog.mafr.de/2011/06/18/openid-delegation/</link>
		<comments>http://blog.mafr.de/2011/06/18/openid-delegation/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 07:23:11 +0000</pubDate>
		<dc:creator>mafr</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://unmaintainable.wordpress.com/?p=619</guid>
		<description><![CDATA[OpenID is a great concept but what I don&#8217;t like is that I tie myself to a specific identity provider. Suppose the provider goes out of business or doesn&#8217;t support OpenID anymore. Of course, I could set up my own &#8230; <a href="http://blog.mafr.de/2011/06/18/openid-delegation/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=619&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://openid.net/">OpenID</a> is a great concept but what I don&#8217;t like is that I tie myself to a specific identity provider. Suppose the provider goes out of business or doesn&#8217;t support OpenID anymore. Of course, I could set up my own private identity provider but I&#8217;m lazy and I don&#8217;t want to run a security-critical service on my own server. Fortunately, there&#8217;s an alternative: OpenID&#8217;s authentication delegation.</p>
<p><span id="more-619"></span></p>
<p>Using my own domain, I can define a personal identifier (let&#8217;s say <a href="http://example.com/matthias/">http://example.com/matthias/</a>) that delegates to a real identity provider. All I need is an HTML page on the public internet with some OpenID metadata that refers to an identity provider. The relying party (OpenID speak for the service I want to authenticate to) associates me with <a href="http://example.com/matthias/">http://example.com/matthias/</a> and I can switch identity providers as I see fit.</p>
<p>Let&#8217;s have a look at an example. I want to use my WordPress blog as my identity provider so I can use my existing Google account to log into OpenID-enabled services like <a href="http://stackoverflow.com">Stackoverflow</a>. All I need is a bit of metadata at <a href="http://example.com/matthias/">http://example.com/matthias/</a>:</p>
<pre>
&lt;html&gt;
&lt;head&gt;
  &lt;link rel=&quot;openid.delegate&quot; href=&quot;http://unmaintainable.wordpress.com/&quot; /&gt;
  &lt;link rel=&quot;openid.server&quot; href=&quot;http://unmaintainable.wordpress.com/?openidserver=1&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;!-- ... --&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Wikipedia has a <a href="http://en.wikipedia.org/wiki/OpenID#OpenID_Providers">list of OpenID identity providers</a>. For more information about the required metadata see the <a href="http://openid.net/specs/openid-authentication-1_1.html#delegating_authentication">OpenID spec</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/unmaintainable.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/unmaintainable.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/unmaintainable.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/unmaintainable.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/unmaintainable.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/unmaintainable.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/unmaintainable.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/unmaintainable.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/unmaintainable.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/unmaintainable.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/unmaintainable.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/unmaintainable.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/unmaintainable.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/unmaintainable.wordpress.com/619/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.mafr.de&amp;blog=586265&amp;post=619&amp;subd=unmaintainable&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.mafr.de/2011/06/18/openid-delegation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59c9677a3b9569af44561adab6c2a980?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mafr</media:title>
		</media:content>
	</item>
	</channel>
</rss>
