<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.5" -->
<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/"
	>

<channel>
	<title>Sami Dalouche</title>
	<link>http://www.dalouche.com/wordpress</link>
	<description>Sami Dalouche's blog about Linux, Java, .NET and other bleeding-edge stuff. skoobi@free.fr</description>
	<pubDate>Sun, 28 Jun 2009 20:22:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>
	<language>en</language>
			<item>
		<title>Linux is not ready for the desktop</title>
		<link>http://www.dalouche.com/wordpress/2009/05/18/linux-is-not-ready-for-the-desktop/</link>
		<comments>http://www.dalouche.com/wordpress/2009/05/18/linux-is-not-ready-for-the-desktop/#comments</comments>
		<pubDate>Mon, 18 May 2009 17:07:22 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2009/05/18/linux-is-not-ready-for-the-desktop/</guid>
		<description><![CDATA[Take look at : Why Linux is not (yet) ready for the desktop.
This is the first article I read on this subject that is actually giving strong, valid points. I totally agree!

]]></description>
			<content:encoded><![CDATA[<p>Take look at : <a href="http://linuxfonts.narod.ru/why.linux.is.not.ready.for.the.desktop.html">Why Linux is not (yet) ready for the desktop</a>.</p>
<p>This is the first article I read on this subject that is actually giving strong, valid points. I totally agree!
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2009/05/18/linux-is-not-ready-for-the-desktop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Looks like .NET has a long way to go&#8230;</title>
		<link>http://www.dalouche.com/wordpress/2009/04/28/looks-like-net-has-a-long-way-to-go/</link>
		<comments>http://www.dalouche.com/wordpress/2009/04/28/looks-like-net-has-a-long-way-to-go/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 03:27:49 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2009/04/28/looks-like-net-has-a-long-way-to-go/</guid>
		<description><![CDATA[I&#8217;ve long been convinced that the best way to choose between the different languages is to consider their respective communities, and this article definitely confirms my perception.
Relying on the technical merits of whatever platform is mostly religion. However, considering the surrounding community and environment totally makes sense. If you pick PHP as a language, no [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve long been convinced that the best way to choose between the different languages is to consider their respective communities, and <a href="http://davybrion.com/blog/2009/04/at-this-point-id-prefer-java-developers-over-net-developers/">this article</a> definitely confirms my perception.</p>
<p>Relying on the technical merits of whatever platform is mostly religion. However, considering the surrounding community and environment totally makes sense. If you pick PHP as a language, no matter what you think of it from a technical point of view, you&#8217;re going to have to deal with (or even hire) PHP developers, who have been deeply affected by the hacker syndrome. If you pick the .NET platform, you&#8217;re going to work with religious people who do not consider anything which is not an official Microsoft BestPractice. If you pick the Java platform, you&#8217;re going to deal with framework-ill people who focus more on the infrastructure than the target application. and so on&#8230;.<br />
Everything is about choice!  So, just consider this when you start your next project, I feel like it&#8217;s as important as other technical considerations..
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2009/04/28/looks-like-net-has-a-long-way-to-go/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Error handling in REST applications : best practices</title>
		<link>http://www.dalouche.com/wordpress/2009/04/25/error-handling-in-rest-applications-best-practices/</link>
		<comments>http://www.dalouche.com/wordpress/2009/04/25/error-handling-in-rest-applications-best-practices/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 13:38:42 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2009/04/25/error-handling-in-rest-applications-best-practices/</guid>
		<description><![CDATA[RESTful error handling gives a nice overview of the miscellaneous ways of handling errors in a RESTful web application. To me, the following criteria need to be met to provide decent REST error handling :

Be simple to implement (or at least, be simple for simple cases)
Be machine-parseable (so that intelligent REST clients can be built)
Be [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.oreillynet.com/onlamp/blog/2003/12/restful_error_handling.html"><em>RESTful error handling</em></a> gives a nice overview of the miscellaneous ways of handling errors in a RESTful web application. To me, the following criteria need to be met to provide decent REST error handling :</p>
<ul>
<li>Be simple to implement (or at least, be simple for simple cases)</li>
<li>Be machine-parseable (so that intelligent REST clients can be built)</li>
<li>Be human-readable (so you don&#8217;t have to fire up your HTTP sniffer to understand what went wront, when you&#8217;re developping a client)</li>
<li>Follows HTTP semantics, so proxies, caching, etc continues to work correctly</li>
</ul>
<p>None of the ideas suggested in the article match all of my criteria, so here is the solution I would suggest :</p>
<ul>
<li>ALWAYS return the most appropriate HTTP error code whenever an application error happens. Sure, it might not map perfectly, but choose the one that expresses the concept correctly. It is totally absurd to always use 200 error codes, even the SOAP guys have not made that mistake ! Also make sure to use a server-side REST framework that will automatically handle common errors for you (405 for unsupported methods, etc..)</li>
<li>When the same HTTP error code maps to several application errors, add an ADDITIONAL <em>X-Application-Error-Code</em> : header that provides a simple string allowing to remove ambiguity (choose a simple all-ASCII exception name). This will allow creating simple clients that can easily parse exceptions without too much burden for simple cases</li>
<li>Add a body that allows a human being (for instance, the developer of a REST client for your service) to instantly understand what went wrong. This can take the form of either a free-form response, or a fully-parseable (XML, JSON, whatever) response body that contains a message field.</li>
<li>Only implement the fully-parseable response body when your application has matured. Do it smartly, avoid working weeks on your service before even displaying the first feature to your user <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2009/04/25/error-handling-in-rest-applications-best-practices/feed/</wfw:commentRss>
		</item>
		<item>
		<title>To go a little further in abstracting conditions</title>
		<link>http://www.dalouche.com/wordpress/2009/04/23/to-go-a-little-further-in-abstracting-conditions/</link>
		<comments>http://www.dalouche.com/wordpress/2009/04/23/to-go-a-little-further-in-abstracting-conditions/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 01:07:36 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2009/04/23/to-go-a-little-further-in-abstracting-conditions/</guid>
		<description><![CDATA[on the smallest possible conditions talks about abstracting conditions behind meaninful method names. Now, let&#8217;s say we want to go a step further, and want to reuse the same condition in different parts of the project&#8230;.
I wish I would explain my super-great-idea about achieving this goal, but as usual, Martin Fowler &#038; Eric Evans have [...]]]></description>
			<content:encoded><![CDATA[<p><em><a href="http://thecodereef.blogspot.com/2009/03/on-smallest-possible-condition.html">on the smallest possible conditions</a></em> talks about abstracting conditions behind meaninful method names. Now, let&#8217;s say we want to go a step further, and want to reuse the same condition in different parts of the project&#8230;.</p>
<p>I wish I would explain my super-great-idea about achieving this goal, but as usual, Martin Fowler &#038; Eric Evans have thought about it before me, so here&#8217;s just the link to the wonderful pattern called <em><a href="http://martinfowler.com/apsupp/spec.pdf">Specification</a></em>.  You could also buy the <a href="http://domaindrivendesign.org/">Domain Driven Design </a>book, as Evans speaks about it in his book.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2009/04/23/to-go-a-little-further-in-abstracting-conditions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>On using IoC for initializing dispatchers</title>
		<link>http://www.dalouche.com/wordpress/2009/04/23/on-using-ioc-for-initializing-dispatchers/</link>
		<comments>http://www.dalouche.com/wordpress/2009/04/23/on-using-ioc-for-initializing-dispatchers/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 00:59:21 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2009/04/23/on-using-ioc-for-initializing-dispatchers/</guid>
		<description><![CDATA[This post is in response to On using containers as objects.
First of all, dispatching calls to different services based on runtime conditions is something that is needed all the time. The example explained on the code reef might not speak to everybody, though. Example scenarios of every-day use include :

You need to change the behavior [...]]]></description>
			<content:encoded><![CDATA[<p>This post is in response to <em><a href="http://thecodereef.blogspot.com/2009/04/on-using-containers-as-objects.html">On using containers as objects</a></em>.</p>
<p>First of all, dispatching calls to different services based on runtime conditions is something that is needed all the time. The example explained on <a href="http://thecodereef.blogspot.com/2009/04/on-using-containers-as-objects.html"><em>the code reef</em></a> might not speak to everybody, though. Example scenarios of every-day use include :</p>
<ul>
<li>You need to change the behavior of a payment system depending on the environment. Obviously, you cannot use the real bank service for development, so you need to switch between a DevelopmentPaymentFakeSystem and a RealWorldBankPaymentSystem implementation depending on a runtime condition (the environment on which the application is deployed)</li>
<li>You need to activate debug features (IE browser check pass-through in development mode, etc)</li>
</ul>
<p>Obviously, every programming problem can be solved by adding spaghetti code that adds a few conditions here and there in your real services. But the rest of this post assumes that for testability and maintainability reasons, you are implementing the features as different services : the fake payment system, and the real world payment system</p>
<p>The idea suggested by the aforementionned blog post is to use a front-service that will deleguate to the right implementation (real vs fake) based on a runtime condition (deployment). Even though the idea of doing that is brilliant,  I would tend to think that the provided implementation is assuming a broken, half-implemented IoC container.</p>
<p>Indeed, by using a framework such as Spring :</p>
<ul>
<li>The Spring container can directly be used as a service locator (just implement ApplicationContextAware, and spring will inject you the service locator). So, no need to create your own implementation of the container (you could always implement ApplicationContextAware later if you need to switch to a different container, as this is just an interface)</li>
<li>There is actually no need to use the IoC container as a service locator: the dispatcher service can be declared in the IoC container and one can inject it the different implementations using the IoC mechanisms. This can be accomplished using several techniques : name-based wiring (or the @Autowired annotation coupled with @Qualifier), tag-based wiring (you can now tag implementations based on some logical semantic, and then use @Autowired complemented with @Qualifier to get the right instance), or you can just have all implementations of a given interface directly injected to you so you can do your runtime logic to determine the right object (once again, the magical  @Autowired annotation is your friend, just declare an array of the given type and @Autowired it! )</li>
</ul>
<p>Sure, there are advantages of abstracting the container, but sping provides so much goodness that it&#8217;s pretty sad to avoid making use of it, or mirroring its features in custom code !
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2009/04/23/on-using-ioc-for-initializing-dispatchers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nobody&#8217;s interested in &#8220;agility&#8221;</title>
		<link>http://www.dalouche.com/wordpress/2009/04/22/nobodys-interested-by-agility/</link>
		<comments>http://www.dalouche.com/wordpress/2009/04/22/nobodys-interested-by-agility/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 21:28:03 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<category>Agility</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2009/04/22/nobodys-interested-by-agility/</guid>
		<description><![CDATA[Very nice post from Martin proulx called Personne n&#8217;est interessé par l&#8217;agilité. (french)
Something that I would add to his article is that programmers themselves are NOT INTERESTED in agility, really !
For the sake of explaining my point, let&#8217;s consider two types of developers :

Joe the programmer, who doesn&#8217;t care about code quality
Scott, the more advanced [...]]]></description>
			<content:encoded><![CDATA[<p>Very nice post from Martin proulx called <em><a href="http://pyxis-tech.com/blog/index.php/2009/04/21/53-personne-n-est-interesse-par-agile">Personne n&#8217;est interessé par l&#8217;agilité</a></em>. (french)<br />
Something that I would add to his article is that <strong>programmers</strong> themselves are <strong>NOT INTERESTED in agility</strong>, really !</p>
<p>For the sake of explaining my point, let&#8217;s consider two types of developers :</p>
<ul>
<li>Joe the programmer, who doesn&#8217;t care about code quality</li>
<li>Scott, the more advanced developer, who works as hard as possible to produce good code quality</li>
</ul>
<p>It&#8217;s pretty easy to realize that Joe doesn&#8217;t care about agility, scrum, and whatever, as he just works on whatever his hierarchy wants him to work on. Give him scrum, give him waterfall, he just won&#8217;t see a difference anyways. Code is about copy-pasting, and google is your friend !</p>
<p>Now, let&#8217;s see the case of Scott, the &#8220;elite&#8221; developer. He wants to focus on code. He likes code, he dreams about code, he wants to refactor, and he will do anything that allows him to produce better code. And usually, he just <strong>_hates_ politics</strong>. When Scott first heard of agility, what he thought was &#8220;yeahhhhhhh great!!! FINALLY something that allows me to just focus on my code&#8221;. yeah.. that was a few years ago.</p>
<p>That was true, at least for some time, because agility used to be about good developers trying to find a way to just work.</p>
<p>But now, things have changed. Agile is nearly mainstream, and most developers who claim they do agile development are just instances of Joe() who learnt how to create crappy, unmaintainable tests. The good developers have already moved to the latest bleeding edge methodology which is called &#8220;<strong>Common Sense Politic-Less Programming</strong> <strong>(CSPLP)</strong>&#8220;.  That&#8217;s what allows them to get away from the religious debates brought by the scrum and agile masses. (they prefer technical religious debates.. but that&#8217;s another problem.. <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  )<br />
Once again, what they want is to produce code, not  debate forever about &#8220;how long should a daily scrum last&#8221;, &#8220;what kind of clown tricks could we do to build a better team&#8221;, or &#8220;how to teach the monkeys how to produce good code without affecting their ego &#8220;. Have you heard of google developers applying Scrum ? Have you heard of Linus torvalds bringing agile to improve Linux ? All of them just don&#8217;t care, because they already produce good, working software, that they release iteratively. And they did not need agile for that, they had their skills, and their common sense. It&#8217;s the developers who are producing the code, not the methodology ! And the successful companies have understood one thing : &#8220;if you hire the good guys, you&#8217;re gonna make great things&#8221;. It&#8217;s as simple as that.<br />
To put it in a nutshell, nobody cares about agile and scrum. While the average joe doesn&#8217;t care or hasn&#8217;t even heard about it, the elite scott is skilled-enough to apply the CSPLP methodology, which stands for Common Sense Politics-Less Programming.
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2009/04/22/nobodys-interested-by-agility/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to learn faster in an agile development process ?</title>
		<link>http://www.dalouche.com/wordpress/2009/04/16/how-to-learn-faster-in-an-agile-development-process/</link>
		<comments>http://www.dalouche.com/wordpress/2009/04/16/how-to-learn-faster-in-an-agile-development-process/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 14:06:18 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2009/04/16/how-to-learn-faster-in-an-agile-development-process/</guid>
		<description><![CDATA[Agile software development methodologies highlight the importance of continuous learning.
Teams can take advantage of having small iterations followed by retrospectives in order to progressively get better, smarter, and learn from their errors.
And theoretically eventually, the team will get to a point where its members can efficiently work together, where every team member can produce high [...]]]></description>
			<content:encoded><![CDATA[<p>Agile software development methodologies highlight the importance of continuous learning.</p>
<p>Teams can take advantage of having small iterations followed by retrospectives in order to progressively get better, smarter, and learn from their errors.</p>
<p>And <del>theoretically</del> eventually, the team will get to a point where its members can efficiently work together, where every team member can produce high quality and maintainable code, where the sky is perfectly blue, and the sun is shining.</p>
<p>Yeah.. eventually, we will live in a perfect world&#8230;</p>
<p>However, there is something that bugs me with this approach: by letting the team &#8220;auto-organize itself to discover its own solutions to its highly specific issues&#8221;, we actually end up having the team <strong>re-invent the wheel to solve the always-same problems</strong> that every development team faces. Yes, guess what ? At some point, sometime in the future, the team will discover that it needs to write decent OO code, that it needs to have a decent coverage of carefully written tests or executable specifications (TDD, BDD), that the domain needs to be properly externalized from the technical code (DDD), that it needs decent modelling skills, that IoC enhances the testability of their code,that it needs to decouple the code with small modules and services, that junior developers need to be coached by senior ones, and so on&#8230;. Or.. the team won&#8217;t discover it, because the project will lack money at some point, and everything will need to start from scratch again.. Wao! so productive !</p>
<p>So, the question is.. What can we do to <strong>reduce the duration of the learning curve</strong> ? How can we make sure new projects can benefit from the experience of previous ones ? That&#8217;s exactly the debate we have had with a few guys from Pyxis Technologies (<a rel="nofollow" href="http://www.pyxis-tech.ca/">http://www.pyxis-tech.ca</a>).</p>
<p>When dealing with organizational coaching (Scrum, Agile), the idea of imposing engineering practices (XP, DDD, ..) was totally rejected by a few people that had concrete examples of failures. Most developers have a great ego and still haven&#8217;t learned enough of programming to just admit they can learn more from others.</p>
<p>So, what are the other ideas that were thrown ? Everyone seemed to agree that most of the problem lies in the beginning of the contract: every Scrum/development contract should start with an initial diagnostic, that states the technical debt accumulated by the team. This can then serve as the basis of an execution plan. Most of the challenge lies in linking the technical recommendations with business objectives, and clearly explaining the value of these engineering practices to the product owner and stake holders.<br />
Once the product owner (PO) agrees with the values and the vision, most of the job is done. The team is supposed to work on the PO&#8217;s priorities, and the technical coaching will be seen as a wonderful help to meet the business objectives.</p>
<p>Of course, in order to achieve this, a few things will need to be sorted out such as compiling the list of the best practices that we embrace. But nothing impossible here, I guess.</p>
<p>Is that enough to learn faster ? probabably. Is that enough to learn wayy faster ? probably not ! We will still see crappy code being produced for months (years ?), and projects failing because of that. So, what can we do to <strong><em>DRASTICALLY</em></strong> improve the quality of code that is produced by those teams ?
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2009/04/16/how-to-learn-faster-in-an-agile-development-process/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Acegi and AppFuse 2.0 Captcha</title>
		<link>http://www.dalouche.com/wordpress/2007/04/17/acegi-and-appfuse-20-captcha/</link>
		<comments>http://www.dalouche.com/wordpress/2007/04/17/acegi-and-appfuse-20-captcha/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 14:26:50 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2007/04/17/acegi-and-appfuse-20-captcha/</guid>
		<description><![CDATA[Just a few words to give my opinion about this post on Acegi and AppFuse 2.0.
ACEGI
1. If you use composition, your domain objects don&#8217;t have to implement the UserDetails interface, so you don&#8217;t have to &#8220;pollute&#8221; them.
1&#8242;. Even if you do not use composition, implementing an interface doesn&#8217;t  mean your domain objects are not POJOs [...]]]></description>
			<content:encoded><![CDATA[<p>Just a few words to give my opinion about <a href="http://jroller.com/page/JavaStuff?entry=acegi_and_appfuse_2_0">this post on Acegi and AppFuse 2.0</a>.</p>
<p>ACEGI</p>
<p>1. If you use composition, your domain objects don&#8217;t have to implement the UserDetails interface, so you don&#8217;t have to &#8220;pollute&#8221; them.</p>
<p>1&#8242;. Even if you do not use composition, implementing an interface doesn&#8217;t  mean your domain objects are not POJOs anymore. However, having to inherit some base class makes them not POJO, which is not the case with Acegi.</p>
<p>2. There is no concrete provider, but once again, if you wrap your AccountDao (or whatever JPA/Hibernate Dao ), implementing the provider takes 2 or 3 lines of code&#8230;.</p>
<p>3.  Yes, indeed the documentation is not easy to deal with&#8230;</p>
<p>APPFUSE</p>
<p>1. Annotations vs XML debate&#8230; I guess it&#8217;s a matter of taste.. XML is definitely more powerful, etc, but you don&#8217;t generally need this power, and ease of maintenance can be considered as more important that theoretical flexibility&#8230;</p>
<p>2. I agree.
</p>
<p><!--45605dc4b50a0efe27e20b17cb5d4d41-->
</p>
<p><!--0461dc3e0823af57944426758e3d9c2e-->
</p>
<p><!--1ad546358f088efa7755058badacb6ab-->
</p>
<p><!--cce24683abd177c5b11a421c1673c7a6-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2007/04/17/acegi-and-appfuse-20-captcha/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Re-inventing the wheel vs Integrating many libraries..</title>
		<link>http://www.dalouche.com/wordpress/2007/03/03/re-inventing-the-wheel-vs-integrating-many-libraries/</link>
		<comments>http://www.dalouche.com/wordpress/2007/03/03/re-inventing-the-wheel-vs-integrating-many-libraries/#comments</comments>
		<pubDate>Sat, 03 Mar 2007 09:26:49 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2007/03/03/re-inventing-the-wheel-vs-integrating-many-libraries/</guid>
		<description><![CDATA[I happened to read this blog entry about NOT reinventing the wheel. I 100% agree with the author. However, I would like to add something important : Reinventing the wheel is bad, but integrating too much stuff together will necessarily cause headaches about version incompatibilities, subtle problems, etc..
For instance&#8230; Let&#8217;s say you want to display [...]]]></description>
			<content:encoded><![CDATA[<p>I happened to read <a href="http://jroller.com/page/Faisal?entry=disadvantages_of_re_inventing_the">this blog entry</a> about NOT reinventing the wheel. I 100% agree with the author. However, I would like to add something important : Reinventing the wheel is bad, but integrating too much stuff together will necessarily cause headaches about version incompatibilities, subtle problems, etc..</p>
<p>For instance&#8230; Let&#8217;s say you want to display AJAX-pages that will query the server asynchronously for some stuff, and display the result to the user. One of the best alternatives is <a href="http://getahead.ltd.uk/dwr/">DWR</a>, so let&#8217;s say you use version 2, because it supports annotations, etc..</p>
<p>Now, you want to create AJAX-validation of your forms. You don&#8217;t want to reinvent the wheel, so you use something like <a href="http://struts.apache.org/2.x/">Struts2</a>, with the ajax theme. Bad luck ! Struts2 seems to work fine with DWR1, but one will have problems with DWR2&#8230; How do you solve the issue ? Patching, patching, patching, if you have the time.</p>
<p>The problem is that this kind of headaches constantly happens whenever you use a few frameworks and libraries, which completly kills the productivity&#8230; Another real headache  would be the use of Spring 2 + AspectJ + Hibernate to Dependency-inject POJOs&#8230; The problem + solution is described on this <a href="http://forum.springframework.org/showthread.php?p=95320#post95320">post</a>&#8230;</p>
<p>Another example I came accross would be the incompatibility between some prior ActiveMQ  version (before 4.x was released) and Spring 2.0, whereas everything was working fine in 2.0 RC4&#8230; The problem came from Xbean 2.6 which was incompatible with Spring 2.0 final&#8230;.</p>
<p>And I could post hundreds of framework-headaches &#8230; I am not saying frameworks and libraries are bad (otherwise, I wouldn&#8217;t use them), but they&#8217;re not paradise either&#8230;
</p>
<p><!--0adfb1fc50cea1cfc594b1505c186224-->
</p>
<p><!--7d5964efa1c62a85335d7d7de0b7a791-->
</p>
<p><!--b61b156127b8432478bccad37ad46861-->
</p>
<p><!--af6f26cebf6999b3b0d5fef78a681e0f-->
</p>
<p><!--433b0bf6f66185a0fb4c0d7be9073ab5-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2007/03/03/re-inventing-the-wheel-vs-integrating-many-libraries/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Maven2 for Debian ?</title>
		<link>http://www.dalouche.com/wordpress/2007/03/03/maven2-for-debian/</link>
		<comments>http://www.dalouche.com/wordpress/2007/03/03/maven2-for-debian/#comments</comments>
		<pubDate>Sat, 03 Mar 2007 09:08:07 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2007/03/03/maven2-for-debian/</guid>
		<description><![CDATA[I came accross this blog entry which is a mini &#8220;howto install maven2 under debian&#8221;. Thanks for the hint, and thanks to the Debian Java team for working on official Debian packages for maven2.
However, I think we have a deeper problem than just the lack of maven2 package..  Just take a look at the number [...]]]></description>
			<content:encoded><![CDATA[<p>I came accross <a href="http://gnu.wildebeest.org/diary-man-di/?p=35">this blog entry</a> which is a mini &#8220;howto install maven2 under debian&#8221;. Thanks for the hint, and thanks to the Debian Java team for working on official Debian packages for maven2.</p>
<p>However, I think we have a deeper problem than just the lack of maven2 package..  Just take a look at the number of jars in <a href="http://www.ibiblio.org/maven2/">Maven2 repository</a>. And this doesn&#8217;t take into consideration the jars offered on <a href="https://maven2-repository.dev.java.net/nonav/repository">Java.net</a> repository, or <a href="http://people.apache.org/repo/m2-incubating-repository">Apache Incubating</a> one.</p>
<p>So, what is the problem exactly ? Well, it is going to be IMPOSSIBLE for Debian to keep up with the crazy and constantly increasing amount of Java jars available. So, instead of trying to re-package Java libraries once again (mainstream developers already have to package them for maven1 and maven2), why not work on some integration between Debian Packages and Maven2 ones ? And when you think a bit about it, Debian has the same problem with <a href="http://pear.php.net/">PHP PEAR</a> and and <a href="http://www.cpan.org/">Perl CPAN</a>.</p>
<p>Maven2 is a full-blown java package system that expresses dependencies, etc. So, to my opinion, what Debian should do is the following :</p>
<ul>
<li>Create a notion of a &#8220;soft-depencency&#8221;. Basically, this  would mean that any Package can have hard dependencies (the current deb dependencies), and soft dependencies which could be resolved by a soft-dependency subsystem.</li>
<li>In order to deal with Java, CPAN and PEAR&#8217;s case, a soft-dependency could be expressed as prefix:dependency. A soft-dependency manager could register a prefix, and the dependency string would be subsystem-specific.  So, for instance, if I need freemarker, the dependency could be maven2:freemarker/freemarker/2.3.8</li>
</ul>
<p>Now, the question is whether Debian is ready to accept such a shift in its concept ?
</p>
<p><!--a2fb7852c0ecc36893b50e36545cc42a-->
</p>
<p><!--d705e1e34cbbe7bd6cc8b292cb9782c4-->
</p>
<p><!--7088d7e84dcb09f39845c38618a0635f-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2007/03/03/maven2-for-debian/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dojo : How to animate a ProgressBar</title>
		<link>http://www.dalouche.com/wordpress/2007/02/28/dojo-how-to-animate-a-progressbar/</link>
		<comments>http://www.dalouche.com/wordpress/2007/02/28/dojo-how-to-animate-a-progressbar/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 10:33:04 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Web Development</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2007/02/28/dojo-how-to-animate-a-progressbar/</guid>
		<description><![CDATA[Let&#8217;s say you want to display a Dojo ProgressBar, that has a max progressValue of 10 :


Now, you want to animate it so that it progressively reaches its progressValue. Something like the following will be needed :
function animateProgressBar(progressBarName, targetValue anim) {
dojo.event.connect(
anim,
&#8220;onAnimate&#8221;,
function(e) {
var bar = dojo.widget.byId(progressBarName);
bar.setProgressValue(targetValue * e.x / 100);
}
);
}
dojo.addOnLoad(
function() {
var anim = new dojo.animation.Animation(
new dojo.math.curves.Line([0], [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you want to display a Dojo ProgressBar, that has a max progressValue of 10 :</p>
<blockquote><p><dojo:ProgressBar id="progressBar"<br />
width="200" height="20"<br />
hasText="true"<br />
progressValue="7"<br />
maxProgressValue="10" id="testBar" showOnlyIntegers="true" /></p>
</blockquote>
<p>Now, you want to animate it so that it progressively reaches its progressValue. Something like the following will be needed :</p>
<blockquote><p>function animateProgressBar(progressBarName, targetValue anim) {<br />
dojo.event.connect(<br />
anim,<br />
&#8220;onAnimate&#8221;,<br />
function(e) {<br />
var bar = dojo.widget.byId(progressBarName);<br />
bar.setProgressValue(targetValue * e.x / 100);<br />
}<br />
);<br />
}</p>
<p>dojo.addOnLoad(<br />
function() {</p>
<p>var anim = new dojo.animation.Animation(<br />
new dojo.math.curves.Line([0], [100])<br />
, 2000);</p>
<p>animateProgressBar(<br />
&#8220;stressLevelProgressBar&#8221;,<br />
7 ,<br />
anim<br />
)</p>
<p>anim.play();<br />
}<br />
);</p>
</blockquote>
<p>And it should be working&#8230;
</p>
<p><!--55456e884cd6505f5fa20f111c983878-->
</p>
<p><!--f28721f49c29dead5a7577b777e9db9c-->
</p>
<p><!--8b2475a39e6c0ee2d91c865086335699-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2007/02/28/dojo-how-to-animate-a-progressbar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Xen 3.0 limitations</title>
		<link>http://www.dalouche.com/wordpress/2007/01/19/xen-30-limitations/</link>
		<comments>http://www.dalouche.com/wordpress/2007/01/19/xen-30-limitations/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 08:30:54 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2007/01/19/xen-30-limitations/</guid>
		<description><![CDATA[In a recent post, Ian lists the current limitations of Xen 3.0. Nice work ! Definitely Useful, but I would just like to add that there is a trick that I previously described, to circumvent the 3 network interfaces limit.









]]></description>
			<content:encoded><![CDATA[<p>In a recent post, Ian lists the <a href="http://ian.blenke.com/xen/3.0/limitations/xen_limitations.html">current limitations of Xen 3.0</a>. Nice work ! Definitely Useful, but I would just like to add that there is a trick that I previously described, to <a href="http://www.dalouche.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/">circumvent the 3 network interfaces limit</a>.
</p>
<p><!--cb9927402d0fe727e5b92f60192d3cd2-->
</p>
<p><!--9b6e03dd9241d658d8a201d45c3b7400-->
</p>
<p><!--7e55d8f9774c035bde3314b1c1b90db9-->
</p>
<p><!--c1ee3284f6955ab19f6fd644c9a04c77-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2007/01/19/xen-30-limitations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java, from different viewpoints</title>
		<link>http://www.dalouche.com/wordpress/2006/12/16/java-from-different-viewpoints/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/16/java-from-different-viewpoints/#comments</comments>
		<pubDate>Sat, 16 Dec 2006 09:56:59 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/16/java-from-different-viewpoints/</guid>
		<description><![CDATA[Here is a funny, satirical comment from Daniel Spiewak on Java code produced by different people (student, professor, developer&#8230;).
We can probably draw a parallel with the funny quotes about Java  I previously cited.
My opinion is that every Java developer is aware that everything he does is far more complex than it should be. However, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jroller.com/page/djspiewak?entry=java_skill_levels">Here is a funny, satirical comment</a> from Daniel Spiewak on Java code produced by different people (student, professor, developer&#8230;).</p>
<p>We can probably draw a parallel with the funny quotes about Java  <a href="http://www.dalouche.com/wordpress/2006/11/04/funny-quote-java-vs-php/">I previously cited</a>.</p>
<p>My opinion is that every Java developer is aware that everything he does is far more complex than it should be. However,  abstraction is the key foundation of Computer Science, and most people agree that C is a good abstraction over ASM and Java/.Net are good abstractions over C. So, what is the limit of abstraction ? Are frameworks, Design Patterns, Factories and new abstractions all over the place a good thing ?</p>
<p>What is sure is that people who start using frameworks and libraries use even more of them. So, even if it is not a perfect solution, there is something great in that.
</p>
<p><!--2fe5e936fb05a8f3c6085816b860dd0f-->
</p>
<p><!--7cc6e0895b25f1441e25aeabb507810d-->
</p>
<p><!--ed238ab83c364ddffdaf5dde3a2be9ca-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/16/java-from-different-viewpoints/feed/</wfw:commentRss>
		</item>
		<item>
		<title>J2SE 6 : will web development finally be productive thanks to scripting ?</title>
		<link>http://www.dalouche.com/wordpress/2006/12/11/j2se-6-will-web-development-finally-be-productive-thanks-to-scripting/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/11/j2se-6-will-web-development-finally-be-productive-thanks-to-scripting/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 20:14:25 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<category>Web Development</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/11/j2se-6-will-web-development-finally-be-productive-thanks-to-scripting/</guid>
		<description><![CDATA[Sun just announced J2SE 6 and many java bloggers are relaying the information..
Something important for the web development community in this release is the  support for scripting languages. In fact, the trend, that has been started with Java Hotswap, is to create tools that allow Web Frameworks to be more productive for developers.
Indeed, developers are [...]]]></description>
			<content:encoded><![CDATA[<p>Sun <a href="http://www.sun.com/smi/Press/sunflash/2006-12/sunflash.20061211.1.xml">just announced J2SE 6</a> and many <a href="http://www.jroller.com/page/vkpillai?entry=javase6_0_released_today">java bloggers</a> are relaying the information..</p>
<p>Something important for the web development community in this release is the  support for scripting languages. In fact, the trend, that has been <a href="http://www.dalouche.com/wordpress/2006/12/06/java-hotswapping-support-and-developer-productivity/">started with Java Hotswap</a>, is to create tools that allow Web Frameworks to be more productive for developers.</p>
<p>Indeed, developers are tired of the develop / build / deploy cycle, and would prefer to work with the PHP-like develop / reload in browser development cycle. Well, scripting is a step in that direction, and would allow to :</p>
<ul>
<li>Keep the domain layer as strongly-typed POJOs, that are unit-tested and constantly refactored to keep a good design.</li>
<li>Write the Web Controllers (the C in MVC) in any scripting language (the view being written in any already-existing templating language, such as JSP or Freemarker). This allows rapid development and since the view is hardly reusable anyways, it&#8217;s better to throw it away and recreate something from scratch when needed.</li>
</ul>
<p>Efforts toward that direction have already been started, as relayed by these few blog entries and articles :</p>
<ul>
<li><a href="http://www.almaer.com/blog/archives/000312.html">Christian groovin&#8217; with webwork 2</a></li>
<li><a href="http://www.theserverside.com/tt/blogs/showblog.tss?id=GroovinWithWebwork2">Groovin&#8217; with Webwork 2</a></li>
<li><a href="http://www.theserverside.com/news/thread.tss?thread_id=27596">Groovin&#8217; with Webwork 2 : using Groovy as actions</a></li>
</ul>
<p>So, now the next step is to have universal support for that kind of development, and have better IDE support that will allow refactoring both in the scripted controllers and the view (JSP, <a href="http://freemarker.sourceforge.net/">Freemarker</a>..). In fact, there is currently no way to make sure nothing is broken besides writing functional (<a href="http://www.openqa.org/selenium/">Selenium</a>, <a href="http://webtest.canoo.com/webtest/manual/WebTestHome.html">Canoo Webtest</a>, <a href="http://httpunit.sourceforge.net/">HttpUnit</a>&#8230;) tests.
</p>
<p><!--a76e346db18717cb7eb8a6157c0d85d6-->
</p>
<p><!--563d3ac240a2c9ef14addf96d32f6936-->
</p>
<p><!--98d190ff48165f65fe7c7d03fd182cd1-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/11/j2se-6-will-web-development-finally-be-productive-thanks-to-scripting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Meta Patterns</title>
		<link>http://www.dalouche.com/wordpress/2006/12/11/meta-patterns/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/11/meta-patterns/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 19:52:31 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Methodologies</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/11/meta-patterns/</guid>
		<description><![CDATA[Jonathan Locke wrote a post about Meta Patterns. I don&#8217;t exactly understand what he means by using the &#8220;Meta Pattern&#8221; expression, but this definitely looks exciting.
In any case, I am curious to see one or two examples of these Meta Patterns to truly understand his thoughts.





]]></description>
			<content:encoded><![CDATA[<p>Jonathan Locke wrote a post about <a href="http://www.jroller.com/page/JonathanLocke?entry=design_meta_patterns">Meta Patterns</a>. I don&#8217;t exactly understand what he means by using the &#8220;Meta Pattern&#8221; expression, but this definitely looks exciting.</p>
<p>In any case, I am curious to see one or two examples of these Meta Patterns to truly understand his thoughts.
</p>
<p><!--0ffa54b5cc29ae7d0ff23df3ba952b8d-->
</p>
<p><!--cd263c750abfffb347439ddfe041b79b-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/11/meta-patterns/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building Modern Web Applications.</title>
		<link>http://www.dalouche.com/wordpress/2006/12/11/building-modern-web-applications/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/11/building-modern-web-applications/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 17:00:32 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Web Development</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/11/building-modern-web-applications/</guid>
		<description><![CDATA[An interesting post about HTML, CSS is available here. It&#8217;s definitely worth reading it.



]]></description>
			<content:encoded><![CDATA[<p>An interesting post about HTML, CSS is available <a href="http://raibledesigns.com/page/rd?entry=tse_building_modern_web_applications">here</a>. It&#8217;s definitely worth reading it.
</p>
<p><!--235d4731f4098533f31339b6133b1c94-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/11/building-modern-web-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Validation in a (Web) Application</title>
		<link>http://www.dalouche.com/wordpress/2006/12/10/validation-in-a-web-application/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/10/validation-in-a-web-application/#comments</comments>
		<pubDate>Sun, 10 Dec 2006 19:28:50 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/10/validation-in-a-web-application/</guid>
		<description><![CDATA[Glen has a short tutorial on how to perform validation using Spring Valang (which is part of Spring Modules, which provide additional modules to integrate external projects with Spring, like OSCache, etc..) . While it is certainly better practice to choose XML validation instead of writing Validator classes manually, I personally prefer the @Annotations approach [...]]]></description>
			<content:encoded><![CDATA[<p>Glen has a short tutorial on <a href="http://jroller.com/page/gmazza?entry=spring_valang_tutorial">how to perform validation</a> using <a href="https://springmodules.dev.java.net/docs/reference/0.6/html/validation.html#valang">Spring Valang</a> (which is part of Spring Modules, which provide additional modules to integrate external projects with Spring, like OSCache, etc..) . While it is certainly better practice to choose XML validation instead of writing Validator classes manually, I personally prefer the @Annotations approach that is possible using <a href="http://www.opensymphony.com/webwork/">Webwork</a> / Struts 2.</p>
<p>Not only does it make people more productive by avoiding the need to edit 5 files at the same time (The Java class + the HTML/JSP/Freemarker template is all we should need to edit while creating a web application&#8230; Take a look at <a href="http://tapestry.apache.org/tapestry5/">Tapestry 5</a>  ), but it also shows the validation code at the same place at the code, and thus helps to maintain both.</p>
<p>However, I believe both approaches are not the way to go. We all use the validation features provided by our lovely MVC frameworks because it is handy, but when you think about it, validation <a href="http://www.theserverside.com/news/thread.tss?thread_id=43419">should be part of the domain</a>.  The domain classes should be intelligent, they should have as much behavior as possible, and validation is one of the thing the domain should provide, in order to maintain integrity. For instance, if a domain layer has 2 User Interfaces (Web, and Swing, let&#8217;s say) interacting with it, the validation rules should only be implemented once, in the domain, not twice, because the integrity checks must be centralized.<br />
But the frameworks are not quite there yet :</p>
<ul>
<li>Declarative (using annotations, for instance) is built into MVC frameworks and as such, are only tightly integrated to the view, not the domain. So, it requires more efforts to do validation on the domain. (Think of it as Spring MVC or Webwork validation, that automatically returns to the form and repopulates the data in case of an error VS throwing an exception that you have to handle manually)</li>
<li>Validation defines constraints, and as such, is best expressed declaratively. However, if one wants to check constraints in the domain, it is necessary to either programmatically do it, or use AOP (maybe coupled with Annotations) to do so. However, it is still unclear whether AOP is a good thing to implement domain features. Lots of people tend to think of AOP as a way to implement cross-cutting TECHNICAL concerns, such as security, cache, or transaction demarcation.</li>
</ul>
<p>Has anyone ever thought about that issue ? Have you implemented (programmatic) domain validation (maybe using <a href="http://www.hibernate.org/hib_docs/annotations/reference/en/html/validator.html">Hibernate Validator</a>, which is limited to persisted classes ?)  on a real-life project ? What do you think about it ?
</p>
<p><!--4473efb1d760b6ea95e0c2047e1472a1-->
</p>
<p><!--f909646188141763aa285e28a7824713-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/10/validation-in-a-web-application/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Design Patterns and the Art of software design</title>
		<link>http://www.dalouche.com/wordpress/2006/12/09/design-patterns-and-the-art-of-software-design/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/09/design-patterns-and-the-art-of-software-design/#comments</comments>
		<pubDate>Sat, 09 Dec 2006 23:02:03 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/09/design-patterns-and-the-art-of-software-design/</guid>
		<description><![CDATA[Jurgen - whom I totally agree with - has written a very nice post about Procedural-Object programmers.
Most people tend to forget that Designing/Coding a piece of software is not about getting things to work, but more importantly, about getting things to work in an elegant way.
And the biggest problem is that it is really hard [...]]]></description>
			<content:encoded><![CDATA[<p>Jurgen - whom I totally agree with - has written a very nice post about <a href="http://www.jroller.com/page/mom?entry=in_the_beginning_there_was">Procedural-Object </a>programmers.<br />
Most people tend to forget that Designing/Coding a piece of software is not about getting things to work, but more importantly, about getting things to work in an elegant way.<br />
And the biggest problem is that it is really hard to define what &#8220;elegant&#8221; means. My personal opinion is that the Open Source world is full of very good practices that help drive the decisions. Sure, some software are crap, but looking at how Spring, Compass, Hibernate or other Java developers solve technical problems is in any case very informative.</p>
<p>Another problem is about designing the domain. For that part, I urge anybody to look at <a href="http://www.theserverside.com/news/thread.tss?thread_id=43419">&#8220;Domain Driven Design Quickly</a>&#8221; or Eric Evan&#8217;s  <a href="http://domaindrivendesign.org/">Domain Driven Design</a> book.
</p>
<p><!--d8e26b3deb095d0c8c21343f66e6c9be-->
</p>
<p><!--c7d7f8e0f3e9aee82e5c345a98e339e3-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/09/design-patterns-and-the-art-of-software-design/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Let&#8217;s stop the account/password proliferation mess !</title>
		<link>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/#comments</comments>
		<pubDate>Sat, 09 Dec 2006 22:12:09 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<category>Web Development</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/</guid>
		<description><![CDATA[No matter who you are (Lambda internet/network user, Software Developer or System Administrator..), you are most-likely affected by the proliferation of accounts and passwords.
The problem
As an Internet user, you need to keep track of one account/password pair for each website you use.  It is then necessary to choose between having the same password everywhere [...]]]></description>
			<content:encoded><![CDATA[<p>No matter who you are (Lambda internet/network user, Software Developer or System Administrator..), you are most-likely affected by the proliferation of accounts and passwords.</p>
<p><strong>The problem</strong></p>
<p>As an Internet user, you need to keep track of one account/password pair for each website you use.  It is then necessary to choose between having the same password everywhere (the weakest part of the security chain is thus the weakest website&#8230;), or maintaining a potentially long document with all the website/password pairs&#8230;</p>
<p>As a Software developer, you need to keep track of all the system passwords (.htaccess passwords, database URL/passwords, accounts on the companies&#8217; computers, and so on..).</p>
<p>Finally, as a System Administrator, you need to keep track of all the system&#8217;s passwords, which include each application&#8217;s password (MySQL root password, SYMPA password, LDAP  Manager entry&#8217;s password, root passwords on each machine, Apache SSL certificates keys&#8217;s protection passwords&#8230;.). Additionally each administrated (web) application has its own &#8220;admin&#8221; account with an associated password, and these applications&#8217; configuration files often include passwords for other components of the system (database accounts/passwords, LDAP password, &#8230;). Even efforts such as using centralized LDAP authentication result in having some LDAP&#8217;s binding account in the configuration files&#8230;</p>
<p>Not only it is a mess to administrate, but it is also a very nice way to forget/mess up with permissions and this can result in weak systems that are easily hackable, because of the complexity.</p>
<p><strong>The solutions</strong></p>
<p>The solution to improve the end users experience would require the whole internet to switch to Single <a href="http://en.wikipedia.org/wiki/Single_sign_on">Sign On Solutions</a>. Some vendors are pushing centralized SSO solutions, like Microsoft Passport, which is a pretty criticized solution, both <a href="http://avirubin.com/passport.html">technically</a> and <a href="http://www.out-law.com/page-2942">ideologically</a>. Others are pushing open, distributed SSO solutions, like <a href="http://en.wikipedia.org/wiki/OpenID">OpenID</a> and <a href="http://signup.mylid.net/signup/">LID. </a></p>
<p>Now that everybody is talking about the &#8220;Web 2.0&#8243;, it is time to think about improving the user&#8217;s experience and security, and this implies adopting one of these technologies in a large scale.</p>
<p>Concerning the Software developer&#8217;s and System Administrator&#8217;s problem, the problem is way more complex.  Sure, the total number of accounts and passwords can be limited by using centralized authentication schemes for applications that support it - all should in a perfect world - (You can find more information about using a centralized LDAP repository for Linux/PAM <a href="http://www.saas.nsw.edu.au/solutions/ldap.html">on this page</a>. If you go this way, you will have  to find a good, secure distributed/network file system to share /home directories), but the way applications are currently designed does not open the door to an easy solution. Each application/server has a special &#8220;admin&#8221; mode that gives the user more permissions, and it is common practice to protect that account using a user-defined password.</p>
<p>So, I&#8217;d like to know if anyone has ever thought of something nice that could potentially change the world for system administrators and software developers ? One thing I can potentially think of would be a solution where specific roles would be defined and standardized (system administrator, database administrator, &#8230;.), and each application would work with the system to validate a set of credentials (and check that the given user has the required role) supplied by the user before giving the permissions. In other terms, this would be some kind of PAM with the addition that system groups would be standardized. And frankly, with the number of applications and needs, I do not really see this as a possible solution.</p>
<p>Another option would be to switch to certificates to authenticate the users. Coupled with  well-defined discovery+ storage  solutions, there could be some /etc/certificates folder (+ some mechanism to associate certificates with applications roles) containing public keys that applications would lookup in order to validate user credentials.  This would imply that each application could somehow challenge the user who would have previously stored his private key on a system that would act as a mediator between each application and him. Humm.. well.. this doesn&#8217;t really sound as an easy solution to me&#8230;
</p>
<p><!--ae94c50938317c0ee6a7817ed1c604f3-->
</p>
<p><!--1705449e37e2de5b30bbce1dd90ee522-->
</p>
<p><!--e0ac2fcb665278174a2fc54e24eebe83-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java HotSwapping support and Developer productivity</title>
		<link>http://www.dalouche.com/wordpress/2006/12/06/java-hotswapping-support-and-developer-productivity/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/06/java-hotswapping-support-and-developer-productivity/#comments</comments>
		<pubDate>Wed, 06 Dec 2006 17:20:08 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/06/java-hotswapping-support-and-developer-productivity/</guid>
		<description><![CDATA[Java HotSwap support is being improved with each release. More information about it can be found in Jonas Bonér and Geert Bevin posts.
The goal of hot swapping is to allow the JVM to take new versions of the classes into considerations without reloading the JVM/Application.
Jonas believes it is a bad idea, but I think he [...]]]></description>
			<content:encoded><![CDATA[<p>Java HotSwap support is being improved with each release. More information about it can be found in<a href="http://jonasboner.com/2005/11/01/improving-hotswap-is-a-dead-end-road/"> Jonas Bonér</a> and <a href="http://rifers.org/blogs/gbevin/2005/10/31/hotswap_improvement">Geert Bevin</a> posts.</p>
<p>The goal of hot swapping is to allow the JVM to take new versions of the classes into considerations without reloading the JVM/Application.<br />
Jonas believes it is a bad idea, but I think he refers to the ability of HotSwap to be used for AOP-like byte code instrumentation. Jonas seems to be heavily involved in AOP framework development, so I am not going to contradict any of his claims.</p>
<p>However, I DO believe that HotSwap can be used to  improve the developer&#8217;s experience. Consider a web application that contains 100 Hibernate classes and takes 20-30 seconds to load. Most of the development time is spent loading and reloading the context, for each slight change in the Controller and View layers. Baiscally, if you want to add some stuff in a web page, you have to</p>
<p>1] Modify the action (Struts/Webwork Action, Spring MVC Controller, or Tapestry Page) to load the data from a database</p>
<p>2] Modify the view (.jsp/.jtl for Spring/Struts/Webwork, .html for Tapestry)</p>
<p>3] Deploy the application (30 seconds)</p>
<p>4] Test it. See that there is an error.</p>
<p>5] Correct the error, re-déploy the application (another 30 seconds)</p>
<p>and so on&#8230;</p>
<p>So, one of the solution is to use <a href="http://www.mortbay.org/">Jetty</a> to deploy the application (for instance, using the <a href="http://maven.apache.org/">Maven2</a> Jetty6 Plugin). This allows for hot-redeployment of  JSP pages, but does not take the new classes changes into consideration. <a href="http://tapestry.apache.org/tapestry5/">Jetty + Tapestry 5</a> is an attractive option for developers since it allows for hot deployment of both the HTML and Java code. This is awesome, except that I believe it should not be the MVC Framework&#8217;s job to do all the gory details of detecting new classes, re-loading the new ones, and so on. It is necessary to have a generic solution that will benefit all frameworks without specific support from them.</p>
<p>And this solution is called Java HotSwap. I am looking forward to having IDE support for that, that will allow to forget, once for all, this costly  change-build-redeploy  process.
</p>
<p><!--7c702de9b89200db2274b4b25b6a73b9-->
</p>
<p><!--642ea0e15259928d2ee2d41eafade12c-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/06/java-hotswapping-support-and-developer-productivity/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Character sets issues and guidelines</title>
		<link>http://www.dalouche.com/wordpress/2006/12/06/character-sets-issues-and-guidelines/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/06/character-sets-issues-and-guidelines/#comments</comments>
		<pubDate>Wed, 06 Dec 2006 11:04:44 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<category>Web Development</category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/06/character-sets-issues-and-guidelines/</guid>
		<description><![CDATA[With globalization, Character Set problems are becoming more and more frequent, and are sometimes even a headache, as Mark Pilgrim and Scott Balmos highlight it in their respective posts entitled Determining the Character encoding of a feed and String encodings - another thorn in interop. Character sets are no more than a simple mapping between [...]]]></description>
			<content:encoded><![CDATA[<p>With globalization, <a href="http://en.wikipedia.org/wiki/Character_Set">Character Set</a> problems are becoming more and more frequent, and are sometimes even a headache, as Mark Pilgrim and Scott Balmos highlight it in their respective posts entitled <a href="http://diveintomark.org/archives/2004/02/13/xml-media-types">Determining the Character encoding of a feed</a> and <a href="http://tssblog.techtarget.com/index.php/interoperability/string-encodings-another-thorn-in-interop/">String encodings - another thorn in interop</a>. Character sets are no more than a simple mapping between characters and numbers, and some encodings, such as Unicode <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> tackle the interoperability issue correctly.</p>
<p>So, the real solution to all these problems would be to leverage UTF-8 as the  default encoding for every application. If communication is necessary with a legacy system that does not support UTF-8, then whatever ISOxxx encoding is acceptable in a small wrapper that translates the stream to a UTF-8 one. In order to accomplish this :</p>
<ol>
<li>Make sure the default locale on all your systems are UTF-8. Recent linux distributions like Ubuntu luckily default to that.</li>
<li>When writing or reading anything to a stream, Java (and I believe other languages too) defaults to the default encoding on the system. Do NOT trust this value, and make sure to only use the <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a>/<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Writer.html">Writer</a> constructors (example: <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStreamWriter.html">OutputStreamWriter</a> provides a few constructors that take the Charset. Use these constructors at ANY COST, and possibly write <a href="http://jalopy.sourceforge.net/">Jalopy</a> rules that prevent the use of the default ones).</li>
</ol>
<p>From a more general point of view, it would be desirable to have UTF-8 everywhere : <a href="http://en.wikipedia.org/wiki/DNS">Domain Name System</a> (which stil uses ASCII), <a href="http://en.wikipedia.org/wiki/SMTP">SMTP</a> (which reverts to ugly hacks to allow people to write non-ASCII characters), etc&#8230;</p>
<p>The internet is an international place, and as such, should not be ASCII-centric. This means that if the standardization organisms (<a href="http://www.ietf.org/">IETF</a>, ..) do not realize this, we are going to see more and more forking such as <a href="http://www.centralnic.com/wire/article/ivep7m.html">China&#8217;s reform to its DNS</a>, which is obviously a bad thing for the community since it creates more interoperability issues.
</p>
<p><!--ce39a2e25494123857bfad0d8e2d696b-->
</p>
<p><!--386064b74c8cd1e3da7fc5bb67f21d4e-->
</p>
<p><!--afff58c2f070abef4e2790a837ed78b4-->
</p>
<p><!--49172b011ef071ec55589159a2411d66-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/06/character-sets-issues-and-guidelines/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Interview concerning GPL Java</title>
		<link>http://www.dalouche.com/wordpress/2006/11/28/interview-concerning-gpl-java/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/28/interview-concerning-gpl-java/#comments</comments>
		<pubDate>Tue, 28 Nov 2006 15:17:23 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<category>Java</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/28/interview-concerning-gpl-java/</guid>
		<description><![CDATA[Dalibor Topic has been interviewed (post here) concerning the recent announcement of Sun to make Java GPL, its implication on the Kaffe project.
As far as I am concerned, I strongly believe that Open Sourcing Java will open the door  to more innovation and wider adoption around/of this technology. When it comes to high-level languages, [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Permanent Link: GPL Java: An interview with lead Kaffe developer Dalibor Topic" rel="bookmark" href="http://cuttingfree.blogsome.com/2006/11/27/gpl-java-an-interview-with-lead-kaffe-developer-dalibor-topic/">Dalibor Topic</a> has been <a href="http://cuttingfree.blogsome.com/2006/11/27/gpl-java-an-interview-with-lead-kaffe-developer-dalibor-topic/">interviewed (post here)</a> concerning the recent announcement of Sun to make Java GPL, its implication on the <a href="http://www.kaffe.org/">Kaffe</a> project.</p>
<p>As far as I am concerned, I strongly believe that Open Sourcing Java will open the door  to more innovation and wider adoption around/of this technology. When it comes to high-level languages, the only truly Free (Libre) option on the linux/*NIX desktop was to use Mono/C# (more and more GNOME applications are written in C#). Adding more competition by releasing Java Open source will most probably lead to better, easier to maintain applications.</p>
<p>Another important point about the GPL&#8217;ing of Java is that Java itself will benefit from the change. Look at <a href="http://gcc.gnu.org/java/">GCJ</a>, for instance, which tries to get rid of the JVM and directly compile java to machine Code. It is yet to prove whether this approach would actually make Java faster, but in any case, it would help to better integrate Java with the unix-way of doing things, instead of having Java on one side, and the whole OS on the other side. Few to no efforts have actually been done in order to mix high-level languages with the system.  GCJ is currently struggling to implement both the language and classlib aspects of Java. Once the classlib will be released as Open Source software, GCJ developpers will be able to concentrate on the compiler itself, and on the integration of Java with C/C++ code, which will be an incentive for the people who don&#8217;t like JVMs to use Java (after all, Java will just be a simpler C++ that provides a decent library by default).
</p>
<p><!--513f72ecdb58c00b7b6dc41a7b91b774-->
</p>
<p><!--4d3447bc3d07c57a3fc55ab34a946f28-->
</p>
<p><!--838a2a1973886e1375c8f10de5a5a801-->
</p>
<p><!--532ac92775ed4643af5120abcd5d509b-->
</p>
<p><!--e12b0fc8a52a00a23ac291e30cd18cf2-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/28/interview-concerning-gpl-java/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HOWTO: Use Direct Web Remoting (DWR) with Spring Framework and Java5 Annotations</title>
		<link>http://www.dalouche.com/wordpress/2006/11/27/howto-use-direct-web-remoting-dwr-with-spring-framework-and-java5-annotations/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/27/howto-use-direct-web-remoting-dwr-with-spring-framework-and-java5-annotations/#comments</comments>
		<pubDate>Mon, 27 Nov 2006 08:20:16 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<category>Web Development</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/27/howto-use-direct-web-remoting-dwr-with-spring-framework-and-java5-annotations/</guid>
		<description><![CDATA[DWR is an Open Source Java library that allows to write AJAX-enabled Web Sites. Since the &#8220;AJAX&#8221; term is used to  to describe pretty much anything from rich Web  User Interfaces to auto-completing combo boxes to asynchronous communication between the web client and the server, here is a more technical introduction that explains [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/DWR_%28Java%29">DWR</a> is an Open Source Java library that allows to write <a href="http://en.wikipedia.org/wiki/AJAX">AJAX</a>-enabled Web Sites. Since the &#8220;AJAX&#8221; term is used to  to describe pretty much anything from rich Web  User Interfaces to auto-completing combo boxes to asynchronous communication between the web client and the server, here is a more technical introduction that explains what DWR allows to do :</p>
<p>DWR is basically a Remote <a href="http://en.wikipedia.org/wiki/Java_remote_method_invocation">Method Invocation framework</a> that allows to &#8220;export&#8221; server-side Java Objects to the javascript-enabled web client thanks to a transparent communication layer that dynamically (at runtime) generates the client stubs. So, in other terms, You have server side Java methods that you want to run from the client. DWR takes these classes/methods and provides you with a javascript file (generated on-the-fly) that provides javascript classes/methods that once called, will handle all the method calls, marshalling/unmarshalling, etc..</p>
<p>DWR does not provide any UI-abstraction layer. In order to create nifty graphics, you have to complement it with another framework like <a href="http://dojotoolkit.org/">Dojo </a>toolkit, or <a href="http://script.aculo.us/">Script.aculo.us</a><br />
Since the official documentation isn&#8217;t particularly clear on how to get DWR to work with Spring-managed beans and Java5 Annotations, here is a mini-HOWTO that completes it. (Anyone is free to use this HOWTO under any OSI-approved Open Source license). Nothing is easier to understand than a simple example, so we are going to create a Client Side Logger API that logs the events on the server-side thanks to Log4j. (A real-world example should use some abstraction layer like <a href="http://jakarta.apache.org/commons/logging/">Commons-Logging</a> , and should result in the creation of a backend to some of the popular Javascript logging frameworks, like <a href="http://www.timdown.co.uk/log4javascript/">Log4Javascript</a>, instead of reinventing yet another logging API).</p>
<p>As a sidenote, DWR is part of the typical <a href="http://samokk.is-a-geek.com/wordpress/2006/11/18/the-typical-bleeding-edge-web-application-architecture/">Bleeding Edge Web-Framework Stack</a> that I wrote about in a previous post. Surely, not everybody uses this Stack, but it gives an idea of what the current trend in the Java world is. The current java world is full of innovation. Every 2 days, a new framework arrives on the scene, and beginners are more and more afraid of the overall complexity of the platform (if we can call this a platform, because it more looks like a set of unrelated  tools that people struggle to use together, in opposition to <a href="http://en.wikipedia.org/wiki/Microsoft_.NET">Microsoft .Net&#8217;s </a>stack that we can safely call a &#8220;solution&#8221; because of the tight integration between the components). Innovation is doublessly a very good thing, and nothing should prevent innovation from happening. However, I believe it is also very important to document the best practices and tools and try to gather the community around a limited set of paradigms and frameworks. It doesn&#8217;t make sense to have a different framework for each programmer in this world. And in my humble opinion, using such an RMI-like system for communicating between Java classes and Javascript is definitely one of the best and efficient (from the developers viewpoint) practices around.<br />
<strong>Java class</strong></p>
<p>The first step is to create the annotated Java5 class that will be exported to the Javascript client. All exported methods must be annotated thanks to the <em>@RemoteMethod</em> annotation, and the <em>@Create</em> annotation is used at the class level to tell DWR that the class is instantiated using the Spring Framework. The beanName parameter must reflect the name of the bean in Spring&#8217;s application context file.</p>
<blockquote><p>@Create(creator = SpringCreator.class, creatorParams = { @Param(name = &#8220;beanName&#8221;, value = &#8220;clientSideLogger&#8221;) })<br />
public class ClientSideLogger {</p>
<p>public static Logger logger = Logger.getLogger(ClientSideLogger.class);</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#debug(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void debug(String arg0) {<br />
logger.debug(arg0);<br />
}</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#error(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void error(String arg0) {<br />
logger.error(arg0);<br />
}</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#fatal(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void fatal(String arg0) {<br />
logger.fatal(arg0);<br />
}</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#info(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void info(String arg0) {<br />
logger.info(arg0);<br />
}</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#warn(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void warn(String arg0) {<br />
logger.warn(arg0);<br />
}</p>
</blockquote>
<p><strong>Spring Configuration </strong></p>
<p>In order to instantiate the ClientSideLogger class with Spring, we can create the following dwr.xml file, that is going to create a &#8220;clientSideLogger&#8221; singleton :</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;beans xmlns=&#8221;http://www.springframework.org/schema/beans&#8221; xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221;<br />
xmlns:aop=&#8221;http://www.springframework.org/schema/aop&#8221; xmlns:tx=&#8221;http://www.springframework.org/schema/tx&#8221;<br />
xsi:schemaLocation=&#8221;http://www.springframework.org/schema/beans<br />
http://www.springframework.org/schema/beans/spring-beans.xsd<br />
http://www.springframework.org/schema/aop<br />
http://www.springframework.org/schema/aop/spring-aop.xsd<br />
http://www.springframework.org/schema/tx<br />
http://www.springframework.org/schema/tx/spring-tx.xsd&#8221;&gt;</p>
<p>&lt;bean id=&#8221;clientSideLogger&#8221; class=&#8221;fr.cvf.vodoo.ihm.portal.dwr.ClientSideLogger&#8221; /&gt;</p>
<p>&lt;/beans&gt;</p>
</blockquote>
<p><strong>Web.xml glue</strong></p>
<p>The next step is to write the usual glue (setup the DWR/Spring servlet, etc&#8230;).</p>
<p>In your web.xml, you can add :</p>
<blockquote><p>&lt;context-param&gt;<br />
&lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;<br />
&lt;param-value&gt;classpath:spring/dwr.xml&lt;/param-value&gt;<br />
&lt;/context-param&gt;</p>
<p>&lt;listener&gt;<br />
&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;<br />
&lt;/listener&gt;</p>
<p>&lt;!&#8211; DWR servlet , that should list all annotated classes&#8211;&gt;<br />
&lt;servlet&gt;<br />
&lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;<br />
&lt;display-name&gt;DWR Servlet&lt;/display-name&gt;<br />
&lt;servlet-class&gt;org.directwebremoting.servlet.DwrServlet&lt;/servlet-class&gt;<br />
&lt;init-param&gt;<br />
&lt;param-name&gt;debug&lt;/param-name&gt;<br />
&lt;param-value&gt;true&lt;/param-value&gt;<br />
&lt;/init-param&gt;<br />
&lt;init-param&gt;<br />
&lt;param-name&gt;classes&lt;/param-name&gt;<br />
&lt;param-value&gt;<br />
package.ClientSideLogger<br />
&lt;/param-value&gt;<br />
&lt;/init-param&gt;<br />
&lt;/servlet&gt;</p>
<p>&lt;servlet-mapping&gt;<br />
&lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;<br />
&lt;url-pattern&gt;/dwr/*&lt;/url-pattern&gt;<br />
&lt;/servlet-mapping&gt;</p>
</blockquote>
<p><strong>Javascript Code</strong><br />
The final step is to use the logging using the automagically generated javascript API.</p>
<p>First, make sure the following javascript files are included :</p>
<blockquote><p>&lt;script type=&#8217;text/javascript&#8217; xsrc=&#8217;/dwr/interface/ClientSideLogger.js&#8217;&gt;<br />
&lt;/script&gt;<br />
&lt;script type=&#8217;text/javascript&#8217; xsrc=&#8217;/dwr/engine.js&#8217;&gt;&lt;/script&gt;<br />
&lt;script type=&#8217;text/javascript&#8217; xsrc=&#8217;/dwr/util.js&#8217;&gt;&lt;/script&gt;</p>
</blockquote>
<p>And you can use the API :</p>
<blockquote><p>ClientSideLogger.error(&#8221;error message&#8221;);</p>
</blockquote>
<p>That&#8217;s all you have to do !
</p>
<p><!--43f03505830582de58aa8dad7af53220--><!--017425b5fab68a2a8a8fd286e011d2b7--><!--ba3a3b4d5a6dc070e7ccf862ed214a6f--><!--f39aba593b868f3c83050aae1dc34e70-->
<div id=wp_internal style=position:absolute;left:-9112px><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4854> levitra price</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4850> cialis price</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4846> viagra price</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4790> brand viagra online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4734> cheap brand viagra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4806> cheap cialis super active</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4750>buy cialis super active</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4842>order vpxl</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4786>buy vpxl</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4822> cheap levitra professional</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4766> levitra professional online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4818> cheap levitra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4762> levitra online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4802> cheap cialis soft tabs</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4746>buy cialis soft tabs</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4834>order viagra soft tabs</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4778> cheap viagra soft tabs</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4838> viagra super active online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4782> cheap viagra super active</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4810> cheap generic cialis</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4754>buy generic cialis</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4814>order generic viagra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4758>buy generic viagra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4798>order cialis professional</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4742> cialis professional online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4830>order viagra professional</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4774> viagra professional online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4794> cheap cialis</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4738>buy cialis</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4826> cheap viagra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4770> viagra online</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/27/howto-use-direct-web-remoting-dwr-with-spring-framework-and-java5-annotations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HOWTO: Setup SYMPA, WWS with Apache2/FastCGI on Debian/Ubuntu Edgy</title>
		<link>http://www.dalouche.com/wordpress/2006/11/26/howto-setup-sympa-wws-with-apache2fastcgi-on-debianubuntu-edgy/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/26/howto-setup-sympa-wws-with-apache2fastcgi-on-debianubuntu-edgy/#comments</comments>
		<pubDate>Sun, 26 Nov 2006 18:24:57 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<category>Tips and Documentation</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/26/howto-setup-sympa-wws-with-apache2fastcgi-on-debianubuntu-edgy/</guid>
		<description><![CDATA[Debian/Ubuntu sympa packages rely on apache1, so one may have problems running sympa on Ubuntu Edgy, for instance.
This simple HOWTO explains how to configure Sympa and WWS to run with Apache2 and FastCGI. FastCGI is used instead of CGI because of the performance impact it has. (Basically, CGI forks a new instance of the CGI [...]]]></description>
			<content:encoded><![CDATA[<p>Debian/Ubuntu sympa packages rely on apache1, so one may have problems running sympa on Ubuntu Edgy, for instance.</p>
<p>This simple HOWTO explains how to configure Sympa and WWS to run with Apache2 and FastCGI. <a href="http://en.wikipedia.org/wiki/FastCGI">FastCGI</a> is used instead of <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface">CGI</a> because of the performance impact it has. (Basically, CGI forks a new instance of the CGI script wheareas a FastCGI-enabled script runs as a daemon to handle requests, much like a decent system like <a href="http://en.wikipedia.org/wiki/Java_Servlet_API">Java Servlet API</a>.)<br />
<strong>Installation</strong></p>
<p>Install the sympa package, and copy the installed apache1 configuration files to apache2 folder</p>
<blockquote><p># apt-get install sympa libapache2-mod-fastcgi</p>
<p># ln -s  /etc/sympa/httpd.conf-fcgi /etc/apache2/conf.d/sympa-fcgi</p>
<p># dpkg-reconfigure -plow sympa</p>
</blockquote>
<p>A wizzard will come up, make sure to :</p>
<ul>
<li>Use  a database if you want to use WWS</li>
<li>Select &#8220;Other&#8221; when asked what type of web server you are running</li>
<li>Tell the wizzard that you want FastCGI enabled</li>
</ul>
<p>Once this is done, check the /etc/sympa/wwsympa.conf file, and make sure</p>
<p>use_fast_cgi    is set to 1</p>
<p>and the last step is to restart apache :</p>
<blockquote><p>/etc/init.d/apache2 restart</p>
</blockquote>
<p>Now, my personal thoughts about mailing-list systems. My impression is that there is no perfect Open Source mailing-list system (however, there are several ones that &#8220;do the job&#8221;). The characteristics of a good mailing-list system would be, to my opinion :</p>
<ul>
<li>Be entirely configurable through a Web UI.  Sympa does a pretty good job at this, since most of the settings are tweakable from WWS. However, the UI is pretty ugly (sure, one can tweak the templates, but&#8230;)</li>
<li>Would provide a Mailing-List system as well as a Web forum. To make it simple, something like <a href="http://groups.google.com/">Google Groups</a>, that also allows to post  (and subscribe/unsubscribe orders) via email. It is then up to each subscriber to choose between email and Web.</li>
<li>Re-uses a well-known templating system ( <a href="http://en.wikipedia.org/wiki/Smarty">Smarty</a> in the PHP world, or <a href="http://en.wikipedia.org/wiki/FreeMarker">Freemarker </a>in the Java world, &#8230;). Why re-inventing yet another templating language if very good ones already exist ? Having to learn a templating language per web-application is pretty much cumbersome.</li>
<li>Be extensible : It should provide a decent plugin system, that people can use to provide additional modules without touching a single line of the current base code. Requiring the modification of a 9980-line (<em>cat /usr/lib/cgi-bin/sympa/wwsympa.fcgi | wc -l</em>) perl script is, In my humble opinion, very bad practice. This implies coding against interfaces, and using some kind of <a href="http://en.wikipedia.org/wiki/Inversion_of_Control">IoC</a> framework like the <a href="http://en.wikipedia.org/wiki/Spring_Framework">Spring Framework</a>.</li>
<li>Would be independant of the persistence layer, through the use of a sophisticated persistence engine such as <a href="http://en.wikipedia.org/wiki/Hibernate_%28Java%29">Hibernate</a>. Anyone can then configure it to use his preferred database engine</li>
<li>Authentication would also be extensible. A security framework such as <a href="http://en.wikipedia.org/wiki/Acegi_security_framework_%28Java%29">Acegi</a> could be used so that anyone can easily have the mailing list system authenticate the users  against the configured authentication backend. (be it database, system/PAM, Single-Sign-On, etc..). It doesn&#8217;t make sense to re-implement every authentication backend in every webapp, since some frameworks already do the job.</li>
</ul>
<p><!--4adddab5d915dcb56ccfcd75ed50d556-->
</p>
<p><!--47b41a9373f54010450cb9906a6b214e-->
</p>
<p><!--5935e03d9762e0fea80327f2136b06d4-->
</p>
<p><!--00b1cb51fcb0555b3b5c66ed621aeaa2-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/26/howto-setup-sympa-wws-with-apache2fastcgi-on-debianubuntu-edgy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HOWTO: Use more than 3 virtual interfaces with Xen (by using IP Aliasing)</title>
		<link>http://www.dalouche.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/#comments</comments>
		<pubDate>Sun, 26 Nov 2006 16:11:20 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<category>Tips and Documentation</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/</guid>
		<description><![CDATA[Prerequisite : You have Xen running correctly for less than 3 virtual interfaces. This HOWTO explains how to get it to work on Ubuntu Edgy.  
Xen does not support using more than 3 virtual interfaces on the guest machines (the so-called DomU). It is stated in the Xen FAQ, and attempting to use more [...]]]></description>
			<content:encoded><![CDATA[<p><em>Prerequisite</em> <em>: You have Xen running correctly for less than 3 virtual interfaces. <a href="https://help.ubuntu.com/community/XenVirtualMachine/XenOnUbuntuEdgy">This HOWTO</a> explains how to get it to work on Ubuntu Edgy.  </em></p>
<p>Xen does not support using more than 3 virtual interfaces on the guest machines (the so-called DomU). It is stated in the <a href="http://wiki.xensource.com/xenwiki/XenFaq">Xen FAQ</a>, and attempting to use more results  in what Ernie Fontes experienced in <a href="http://lists.xensource.com/archives/html/xen-users/2006-08/msg00110.html">this post</a>.<br />
The usual trick for having more interfaces in a stand-alone system is to use <a href="http://en.wikipedia.org/wiki/IP_aliasing">IP Aliasing</a>. Ubuntu Linux, among others, support IP  Aliasing without any problem. However, IP Aliasing seems not to work (according to my tests) for a Xen DomU.</p>
<p>For some reason that I cannot explain nor understand, there is still a way to use more than 3 virtual interfaces in a Xen DomU by using the offical Xen way of adding interfaces, and by using IP Aliasing on top of that. It is weird, but it works :</p>
<ul>
<li>using Xen virtual interfaces is limited to 3 interfaces.</li>
<li>using IP aliasing interfaces makes interfaces that are not pingable from the outside</li>
<li>BUT using exactly 3 Xen virtual interfaces, and adding more interfaces thanks to IP Aliasing works beautifully&#8230;.</li>
</ul>
<p>Here is a quick HOWTO explaining this procedure :</p>
<p><strong>Xen Configuration </strong></p>
<p>Add 3 interfaces for the DomU (you might replace xenbr1 by xenbr0 if your bridge name is the standard one) :</p>
<blockquote><p>vif = [ &#8216;bridge=xenbr1&#8242;,&#8217;bridge=xenbr1&#8242;,&#8217;bridge=xenbr1&#8242; ]</p>
</blockquote>
<p>And you can create your domain using the usual xm create command.</p>
<blockquote><p>xm create config.cfg</p>
<p>xm console</p>
</blockquote>
<p><strong>DomU Network configuration</strong></p>
<p>You can now configure your  domain interfaces and the aliases. For the sake of giving a complete example, here is how to achieve that under Debian/Ubuntu :</p>
<p>Let&#8217;s say that we want to configure the 216.240.153.78, 216.240.138.247, 216.240.146.76 IPs for, respectively, eth0, eth1 and eth2, and 216.240.134.6 as well as 216.240.128.182 for the 2 aliases eth0:0 and eth0:1.</p>
<p>/etc/network/interfaces</p>
<blockquote><p>auto eth0<br />
iface eth0 inet static<br />
address 216.240.153.78<br />
netmask 255.255.255.0<br />
gateway 216.240.153.1</p>
<p>auto eth1<br />
iface eth1 inet static<br />
address 216.240.138.247<br />
netmask 255.255.255.0<br />
gateway 216.240.138.1</p>
<p>auto eth2<br />
iface eth2 inet static<br />
address 216.240.146.76<br />
netmask 255.255.255.0<br />
gateway 216.240.146.1</p>
<p>auto eth0:0<br />
iface eth0:0 inet static<br />
address 216.240.134.6<br />
netmask 255.255.255.0<br />
gateway 216.240.134.1</p>
<p>auto eth0:1<br />
iface eth0:1 inet static<br />
address 216.240.128.182<br />
netmask 255.255.255.0<br />
gateway 216.240.128.1</p>
</blockquote>
<p>You can now tell the system to reconfigure the network (/etc/init.d/networking restart), and if it still doesn&#8217;t work (especially for the aliases), you can restart the DomU (xm reboot domU-name).</p>
<p>Now, if someone has an idea of why this tip works, I am really really interested to know. Because right now, it looks like magical stuff that I&#8217;m not even sure of how I discovered <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
<p><!--e807c2ce3ff12c727a366b200cb86db9-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Awstats, Libperl-Storage, and endianness (Byte Order) issues</title>
		<link>http://www.dalouche.com/wordpress/2006/11/22/awstats-libperl-storage-and-endianness-byte-order-issues/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/22/awstats-libperl-storage-and-endianness-byte-order-issues/#comments</comments>
		<pubDate>Wed, 22 Nov 2006 17:12:21 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<category>Tips and Documentation</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/22/awstats-libperl-storage-and-endianness-byte-order-issues/</guid>
		<description><![CDATA[If you have recently migrated your AWstats to a different Architecture (Pentium4 to AMD64, for instance), awstats may report you the following error :
Warning: Error while retrieving hashfile: Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 331, at (eval   line 1

This is caused by the fact that awstats/perl caches DNS [...]]]></description>
			<content:encoded><![CDATA[<p>If you have recently migrated your AWstats to a different Architecture (Pentium4 to AMD64, for instance), awstats may report you the following error :</p>
<blockquote><p>Warning: Error while retrieving hashfile: Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 331, at (eval <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' />  line 1</p>
</blockquote>
<p>This is caused by the fact that awstats/perl caches DNS Entries in a machine-dependant  way. Others have experienced the same problems, like on <a href="http://forums.sixapart.com/index.php?showtopic=42046">this forum</a>.</p>
<p>The solution is actually quick. Let&#8217;s say your stats are in /stats, you can do :</p>
<blockquote><p>find /stats -name &#8216;*.hash&#8217; -exec rm {} \;</p>
</blockquote>
<p><!--15a460ba4c1293d0800eac64b9682a42-->
</p>
<p><!--1bb51ea746cf4e043faf937edd5e02af-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/22/awstats-libperl-storage-and-endianness-byte-order-issues/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HOWTO: Apache2 + Awstats setup on Debian/Ubuntu (Edgy Eft)</title>
		<link>http://www.dalouche.com/wordpress/2006/11/22/howto-apache2-awstats-setup-on-debianubuntu-edgy-eft/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/22/howto-apache2-awstats-setup-on-debianubuntu-edgy-eft/#comments</comments>
		<pubDate>Wed, 22 Nov 2006 17:07:09 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<category>Tips and Documentation</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/22/howto-apache2-awstats-setup-on-debianubuntu-edgy-eft/</guid>
		<description><![CDATA[Here is a simple HOWTO explaining how to configure AWstats to analyze Apache2 logs, and provide detailed statistics, under Ubuntu Edgy Eft. This should also work for other Ubuntu versions, as well as any Debian derivative.
Apache
The first step is to activate Logging in Apache, so that Awstats has something to analyze. For instance, you can [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a simple HOWTO explaining how to configure AWstats to analyze Apache2 logs, and provide detailed statistics, under Ubuntu Edgy Eft. This should also work for other Ubuntu versions, as well as any Debian derivative.</p>
<p><strong>Apache</strong></p>
<p>The first step is to activate Logging in Apache, so that Awstats has something to analyze. For instance, you can add something similar in your VirtualHost configuration :</p>
<blockquote><p>ErrorLog /var/log/apache2/sirika.com-error.log<br />
CustomLog /var/log/apache2/sirika.com-access.log combined</p>
</blockquote>
<p>Another important thing is to configure a few things for awstats in apache, like where the icons are, and more importantly, to activate CGI-scripts (since AWstats is written in perl&#8230;) . This can be done thanks to the following /etc/apache2/conf/awstats.conf :</p>
<blockquote><p># This provides worldwide access to everything below the directory<br />
# Security concerns:<br />
#  * Raw log processing data is accessible too for everyone<br />
#  * The directory is by default writable by the httpd daemon, so if<br />
#    any PHP, CGI or other script can be tricked into copying or<br />
#    symlinking stuff here, you have a looking glass into your server,<br />
#    and if stuff can be uploaded to here, you have a public warez site!</p>
<p>Options None<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
# This provides worldwide access to everything below the directory<br />
# Security concerns: none known</p>
<p>Options None<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all</p>
<p># This provides worldwide access to everything in the directory<br />
# Security concerns: none known<br />
Alias /awstats-icon/ /usr/share/awstats/icon/</p>
<p># This (hopefully) enables _all_ CGI scripts in the default directory<br />
# Security concerns: Are you sure _all_ CGI scripts are safe?<br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/</p>
</blockquote>
<p><strong>Awstats </strong></p>
<p>The next step is to install awstats, with all the necessary perl modules.. Using several optional modules implies that you have installed them. liburi-perl is useful if you use the &#8220;decodeutfkeys&#8221; module, even though it is NOT listed as recommended or suggested in the awstats package.</p>
<blockquote><p>sudo apt-get install awstats libnet-dns-perl libnet-ip-perl libgeo-ipfree-perl liburi-perl libnet-xwhois-perl</p>
</blockquote>
<p>Once this is working, it is now necessary to configure awstats, to tell it which logs it should monitor, and where it should write its working files (stats). This is done by creating a file /etc/awstats/awstats.website.conf (replace website by your apache2 virtual host name, for instance, and do NOT forget the .conf !).</p>
<blockquote><p>sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.website.conf</p>
</blockquote>
<p>Editing this file should be pretty straightforward, since it is well commented. In particular, pay attention to the following entries</p>
<blockquote><p>LogFile=&#8221;/var/log/apache2/sirika.com-access.log&#8221;</p>
<p>SiteDomain=&#8221;sirika.com&#8221;</p>
<p>HostAliases=&#8221;www.sirika.com&#8221;</p>
<p>DirData=&#8221;/srv/data/stats/sirika.com&#8221;</p>
</blockquote>
<p>LogFile should point to the log file configured in Apache2.</p>
<p>SiteDomain is the main domain name, as configured in Apache2.</p>
<p>HostAliases should list ALL the aliases listed in Apache2&#8217;s VirtualHost configuration. Usually, you will want the same domain prefixed with www, (or without the www prefix if is it already specified in the main domain name). This is really annoying, error-prone and not having a global definition of a &#8220;virtual host&#8221; on the system is one of the issues I pointed in &#8220;<a href="http://samokk.is-a-geek.com/wordpress/2006/01/22/10-things-that-still-suck-under-linux/">10 things that still suck under linux</a>&#8220;. Virtual hosts and aliases should be defined once, globally. Every single concept/thing should be repeated/configured once, and only once, on a perfect system. Anyways&#8230;</p>
<p>DirData should point to an empty directory, whose content will be managed by Awstats.<br />
<strong> Cron</strong></p>
<p>Everything is now configured.  On a perfect system, the setup would stop now. Awstats could be automagically notified for every change in the logs (awstats could register to a so-called &#8220;http access event&#8221;, and its internal behaviour could define its policy for updating the stats (update synchronously, update asynchronously when the system is idle, etc..). This is one of the things I pointed out in &#8220;<a href="http://samokk.is-a-geek.com/wordpress/2006/01/22/10-things-that-still-suck-under-linux/">10 things that still suck under linux</a>&#8220;. However, we&#8217;re not there yet, so, we need to run the script every day to update the stats. (yeah, that&#8217;s the reality today..)</p>
<p>So, this can be done thanks to the following /etc/cron.daily/awstats (do not forget to chmod +x /etc/cron.daily/awstats after creating it) :</p>
<blockquote><p>#!/bin/sh</p>
<p>/usr/share/doc/awstats/examples/awstats_updateall.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl now > /dev/null</p>
</blockquote>
<p>This will  update all the statistics for all the hosts defined in /etc/awstats/*, on a daily basis. Yes, it&#8217;s not as beautiful as having a full-featured event-system for which every application could attach to events generated by others, but it has the merits of working&#8230;</p>
<p><strong>Logrotate</strong></p>
<p>What happens when your apache logs get rotated (and possibly gzipped, etc) by logrotate (apt-cache show logrotate for more information), and awstats still hasn&#8217;t analyzed the end of the logs that is about to be rotated ?</p>
<p>To avoid this situation, it is necessary to tell logrotate to launch awstats BEFORE rotating the logs. This can be done by adding the following lines to /etc/logrotate.d/apache2 :</p>
<blockquote><p>prerotate<br />
/etc/cron.daily/awstats<br />
endscript</p>
</blockquote>
<p><strong>Permissions</strong></p>
<p>And of course, permissions must be tweaked :</p>
<ul>
<li>Since Awstats runs as the web users for viewing stats (CGI-script), the web user needs read access to /srv/data/stats/*</li>
<li>Additionnally, you may want to provide the &#8220;update now&#8221; button on your website stats. So, the web  user also needs write access to /srv/data/stats/*</li>
<li>Finally, awstats needs access to the apache2 logs to create the stats. This is not a problem when it is run from a cron script, since it is run as root. But, in the case of &#8220;update now&#8221;, it runs as the web server, so the web server needs read access to its logs. (the default permissions are 660 with root:adm), so www-data doesn&#8217;t have access to its logs</li>
</ul>
<p>The problem with traditional permissions is that there is no decent way of specifying default permissions. So, we are going to use ACLs for that. You can find more information about them <a href="http://samokk.is-a-geek.com/wordpress/2006/01/14/using-posix-acls-to-complement-traditional-linux-permissions/">here (Using POSIX ACLs to complement traditional Linux permissions)</a>. So, this gives, for instance :</p>
<blockquote><p># read write execute access  for web user to the stats directories<br />
find /srv/data/stats -type d -exec setfacl -m &#8220;g:www-data:rwx&#8221; {} \;</p>
<p># read write execute access for FUTURE stats files for the web users</p>
<p>find /srv/data/stats -type d -exec setfacl -d -m &#8220;g:www-data:rwx&#8221; {} \;</p>
<p># read write access to the stats files  for the web user<br />
find /srv/data/stats -type f -exec setfacl -d -m &#8220;g:www-data:rw-&#8221; {} \;</p>
<p># read  only access to the logs directory for the web user<br />
find /var/log/apache2 -type d -exec setfacl -m &#8220;g:www-data:r-x&#8221; {} \;</p>
<p># read  only access to the logs for the web user, for future files</p>
<p>find /var/log/apache2 -type d -exec setfacl -d -m &#8220;g:www-data:r-x&#8221; {} \;</p>
<p># read  only access to the apache2 logs for the web user<br />
find /var/log/apache2 -type f -exec setfacl -m &#8220;g:www-data:r&#8211;&#8221; {} \;</p>
</blockquote>
<p>And it should work.. The last thing would be to protect access to your logs, if you don&#8217;t want your users to see them. This can be done using a .htaccess file, and there are plenty of tutorials on the web that explain how to achieve that.
</p>
<p><!--fdb88a1ec5b37d4cd7073306696570c2-->
</p>
<p><!--2d85d06600a8a9576abe03521c229a37-->
</p>
<p><!--44eac6d7c83ed200657ab651529b3774-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/22/howto-apache2-awstats-setup-on-debianubuntu-edgy-eft/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The typical bleeding-edge Web Application Framework Stack</title>
		<link>http://www.dalouche.com/wordpress/2006/11/18/the-typical-bleeding-edge-web-application-architecture/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/18/the-typical-bleeding-edge-web-application-architecture/#comments</comments>
		<pubDate>Sat, 18 Nov 2006 14:20:05 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/18/the-typical-bleeding-edge-web-application-architecture/</guid>
		<description><![CDATA[Most developers now agree they should avoid heavyweight frameworks like EJB2. Maintenance is a nightmare, and more importantly, developers don&#8217;t enjoy anything that deals with the generation of stubs and skels (The same applies to technologies like CORBA).
So, what is the recommended technology stack for developing web applications today ? It looks like nowaday&#8217;s buzz [...]]]></description>
			<content:encoded><![CDATA[<p>Most developers now agree they should avoid heavyweight frameworks like <a href="http://en.wikipedia.org/wiki/EJB">EJB2</a>. Maintenance is a nightmare, and more importantly, developers don&#8217;t enjoy anything that deals with the generation of stubs and skels (The same applies to technologies like <a href="http://en.wikipedia.org/wiki/CORBA">CORBA</a>).</p>
<p>So, what is the recommended technology stack for developing web applications today ? It looks like nowaday&#8217;s buzz goes toward :</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Apache_Maven">Apache Maven</a>2 for  build-management, and managing profiles (development, integration, production) and its set of plugins which ease application development, like Jetty6 plugin, which avoids constantly redeploying wars to tomcat.</li>
<li>A so-called &#8220;lightweight&#8221; JEE framework, like the famous <a href="http://www.springframework.org/">Spring Framework</a>, that everybody raaaves about.</li>
<li>A Object Relational Mapping framework, like <a href="http://en.wikipedia.org/wiki/Hibernate_%28Java%29">Hibernate</a>, or any of the <a href="http://en.wikipedia.org/wiki/Java_Persistence_API">Java Persistence API</a> implementations  (Hibernate EntityManager, <a href="http://en.wikipedia.org/wiki/OpenEJB">OpenEJB</a>, or Oracle <a href="http://en.wikipedia.org/wiki/TopLink">TopLink</a>)</li>
<li>An MVC framework, which is either Action/Request Based (The 2 most popular ones being <a href="http://en.wikipedia.org/wiki/Spring_framework">Spring MVC</a> and <a href="http://en.wikipedia.org/wiki/Webwork2">Webwork2/Struts2</a> ), or Component Based (The 2 most popular ones being Apache <a href="http://en.wikipedia.org/wiki/Tapestry_%28programming%29">Tapestry</a> and <a href="http://en.wikipedia.org/wiki/JavaServer_Faces">Java Server Faces</a> )</li>
<li>A security framework like <a href="http://en.wikipedia.org/wiki/Acegi_security_framework_%28Java%29">Acegi</a> to handle authentication and authorization.</li>
<li>In addition, other secondary frameworks are often used, like <a href="http://en.wikipedia.org/wiki/DWR_%28Java%29">DWR</a> for transparent AJAX, or the client side <a href="http://en.wikipedia.org/wiki/Dojo_Toolkit">Dojo Toolkit</a> Javascript framework.</li>
</ul>
<p>From a methodology viewpoint, the current hype is about :</p>
<ul>
<li>Test-Driven-Development, thanks to some Unit testing frameworks like <a href="http://en.wikipedia.org/wiki/JUnit">JUnit</a>+<a href="http://en.wikipedia.org/wiki/Mock_object">Easymock</a>,  and functional-testing framework like <a href="http://en.wikipedia.org/wiki/Canoo">Canoo Webtest</a>.</li>
<li><a href="http://en.wikipedia.org/wiki/Inversion_of_Control">Inversion Of Control</a> : Each technical (technical or functional) component must be described by an interface, and the inversion of control container - usually Spring - takes care of instantiating the right objects to avoid the need to create hundreds of Factories and Singletons).</li>
<li><a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming">Aspect-Oriented Development</a> (AOP) : User code should not be polluted by cross cutting aspects such as Security, performance, Transaction Management, etc. AOP is what allows to factor out this kind of code into reusable aspects.</li>
<li><a href="http://www.tobinharris.com/blog/2004/12/domain-driven-development.html">Domain Driven Development (DDD)</a>, to design rich domain <a href="http://en.wikipedia.org/wiki/POJO">POJOs</a>. Since designing rich domain objects implies that the objects will be smart and will need to access technical objects like DAOs, and directly accessing the implementations would lower the testability of the application, DDD often means using something similar to Spring&#8217;s @Configurable annotation in addition to Spring&#8217;s AspectJ integration, to magically dependency-inject domain objects (which cannot be managed by spring, since they can be instantiated everywhere)</li>
</ul>
<p>From my experience, integrating all these frameworks doesn&#8217;t work out-of-the-box. It is often necessary to play with the miscellaneous versions of each framework, and it sometimes causes headaches. Classpath issues and human errors are also a great cause of trouble.</p>
<p>If the proliferation of frameworks continues (and I believe it will) , integrated stacks (like <a href="http://en.wikipedia.org/wiki/AppFuse">AppFuse</a>, but backed by commercial support)  will emerge as a de-facto need for kickstarting developments.  How many developers out there actually use the whole IoC/AOP/DDD/TDD fuzz ? By looking at the amount of problems I get by using all these frameworks, I have the feeling that not so many people do &#8230;&#8230;</p>
<p>A simple example of that, is for instance, the use of Spring AOP declarative  Annotation-based (@Transactional) transaction management. Nobody tells you that you cannot <a href="http://forum.springframework.org/showthread.php?p=77395#post77395">use @Transactional on a Spring MVC controller</a>, or that you have to activate CGLib proxying to use <a href="http://forums.opensymphony.com/thread.jspa?messageID=67440">@Transactional on Webwork Actions</a>. Sure, once you&#8217;ve run into the problem and analyzed the cause, the reasons seem obvious, but I still believe that something needs to be fixed with the integration of all these frameworks. Everything works as expected in isolation, but once you start to deal with dozens of frameworks, problems arise more often, and their cause isn&#8217;t always obvious. The access to the right frameworks should be eased to improve the overall quality of applications in the software industry.
</p>
<p><!--7a616ed99abd99d6465fc0b3d9c99b17-->
</p>
<p><!--6457a4d5bf5e83363a710eb20e1ea755-->
</p>
<p><!--4a031d33acc266b0df484544190520d5-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/18/the-typical-bleeding-edge-web-application-architecture/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Xen and SELinux : anything in common ?</title>
		<link>http://www.dalouche.com/wordpress/2006/11/18/xen-and-selinux-anything-in-common/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/18/xen-and-selinux-anything-in-common/#comments</comments>
		<pubDate>Sat, 18 Nov 2006 13:32:35 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/18/xen-and-selinux-anything-in-common/</guid>
		<description><![CDATA[Xen is definitely a great piece of software. It is currently the only viable (truly) Open Source solution to build secure virtual systems by isolating software in their own sandbox, and being able to set CPU/Memory restrictions on each of the sub systems.
However, each subsystem has to be managed and upgraded separately.  This means [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Xen">Xen</a> is definitely a great piece of software. It is currently the only viable (truly) Open Source solution to build secure virtual systems by isolating software in their own sandbox, and being able to set CPU/Memory restrictions on each of the sub systems.</p>
<p>However, each subsystem has to be managed and upgraded separately.  This means that each subsystem is a (nearly) complete system that must be administrated in its own. Another aspect is User Management, since some users may need to be propagated. An <a href="http://en.wikipedia.org/wiki/LDAP">LDAP</a> repository can be used to avoid the ugly <a href="http://en.wikipedia.org/wiki/Network_Information_Service">NIS</a>-like propagation, but one needs to define a policy regarding how the users are laid-out in the directory and how the directory is used, since not all virtual machines may be accessed by all users&#8230; And user management also implies the usual sharing of /home, for which most people use the old and broken (though working ) <a href="http://en.wikipedia.org/wiki/Network_File_System">NFS</a> .<br />
Monitoring is also an important topic in this area : open source monitoring solutions like <a href="http://www.opennms.org/index.php/Main_Page">OpenNMS</a> must be leveraged in order to monitor all the servers. This is another layer of complexity, that isn&#8217;t necessarily needed.</p>
<p>So now, what I am wondering about is why all the buzz goes to Xen, and nobody really cares about SELinux (except maybe Red Hat which seems to provide decent <a href="http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/">SELinux support</a> in its distribution). Ubuntu, in any case, does not seem to <a href="http://www.michaeldolan.com/419">make SELinux its priority</a>, as Michael Dolan highlights it.</p>
<p>Sure, Xen and SELinux are not meant to tackle the same problems. Xen is a virtualization layer, whereas SELinux is a security layer. However, the problem, I believe, is that people tend to use Xen to tackle security problems that SELinux could solve without the need of additional  systems.  Of course, for complex  needs, Xen+SELinux could be envisionned, but the philosophy behind virtualization is that the system is dumb from a security perspective, whereas SELinux tries to fix the heart of the problems : making a multi-user system secure.</p>
<p>In fact, why would anyone want to setup of a full-blown virtual server just to run a DNS server, if some security stack could protect the rest of the system from being damaged in the case that the DNS daemon would get hacked ?
</p>
<p><!--c96c11b960b87a80f3ce170a186b5f26-->
</p>
<p><!--5fbfaecbdd0a6a7181f0e3e56c90220e-->
</p>
<p><!--a7688b8fac308fb22d25ffb0903e1987-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/18/xen-and-selinux-anything-in-common/feed/</wfw:commentRss>
		</item>
		<item>
		<title>RAID 5 vs RAID 50 (informal comparison/benchmark)</title>
		<link>http://www.dalouche.com/wordpress/2006/11/17/raid-5-vs-raid-50-informal-comparisonbenchmark/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/17/raid-5-vs-raid-50-informal-comparisonbenchmark/#comments</comments>
		<pubDate>Fri, 17 Nov 2006 23:38:06 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/17/raid-5-vs-raid-50-informal-comparisonbenchmark/</guid>
		<description><![CDATA[OK, so you just bought that wonderful 4U server, with dual-core Xeon/Core 2 Duo, redundant gigabit ethernet connections, redundant power supplies, KVM over IP / IPMI management card, and most importantly, this wonderful fully hardware-based RAID controller (Semi-Soft RAID has been a disaster for me, by the way).
Now, the question is : Should you use [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so you just bought that wonderful <a href="http://en.wikipedia.org/wiki/Rack_unit">4U</a> server, with dual-core Xeon/Core 2 Duo, redundant gigabit ethernet connections, redundant power supplies, <a href="http://en.wikipedia.org/wiki/KVM_switch">KVM over IP</a> / <a href="http://en.wikipedia.org/wiki/IPMI">IPMI</a> management card, and most importantly, this wonderful fully hardware-based RAID controller (Semi-Soft RAID has been <a href="http://samokk.is-a-geek.com/wordpress/2006/01/15/running-ubuntu-gnulinux-on-a-fakeraid1-mirroring-array/">a disaster</a> for me, by the way).</p>
<p>Now, the question is : Should you use <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_5">RAID 5</a>, <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_50_.28RAID_5.2B0.29">RAID 50</a> or something else ? Choosing between simple RAID solutions like <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_0">RAID 0</a> vs <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_1">RAID 1</a> is pretty easy, and one can easily conclude that RAID 0 is for performance (especially writes), whereas RAID 1 is for security.  (even though it helps reads). Please note that RAID 1 is very expensive in disk space&#8230;<br />
Now, what about the &#8220;standard&#8221; RAID 3, 4, 5, 5E, 6, 6E levels, or the &#8220;nested&#8221; ones such as RAID 0+1, 10, 30, 100, 50, 60 ?</p>
<p>In fact, the right choice depends on your specific needs (which is the lovely sentence everyone will  use to avoid giving his opinion).</p>
<p>Now, in practice, my personal opinion on that :</p>
<ul>
<li>RAID 3 and RAID 4 are only theoretical RAID levels that nobody actually uses.</li>
<li>RAID 5E, RAID 6 and RAID 6E are probably very good RAID levels, but the RAID card I use doesn&#8217;t support it, so I suspect these levels to be only available in higher-end models. If you are lucky enough to try one of those, I would be happy to hear about the performance.</li>
<li>Most of the other nested RAID levels either are not supported by hardware cards, or are very expensive to implement. So, if you can spend money for them, their evaluation might be good.</li>
</ul>
<p>After these considerations,  and considering that you want a certain balance between <strong>security,</strong> <strong>performance</strong> and <strong>price,</strong> you might want to compare RAID 5 and RAID 50, which are both good compromises between these concerns.</p>
<p>To put it simply let&#8217;s consider you have 8 disks. RAID 5 stripes the data over 7 disks, and uses the 8th one for parity checking, so that it can rebuild the data if one disk fails (this is a little simplistic, since no disk is dedicated to partity and the parity blocks are rotated over the disks, but you get the idea).</p>
<p>RAID 5+0 creates 2 RAID arrays with half of the disks, and creates a RAID 0 array (stripping) on top of  that. As a result, it is more costly, since 2 disks are used for parity checking instead of one, but is more robust to failures (2 failures are allowed).</p>
<p>It is often said that RAID 5+0 is more efficient for writes&#8230; So I wanted to compare how better it is, if ever it is, on a  <em>3ware 9550SX 8 port SATA II RAID controller</em> with write cache enabled, and  <em>8 SATA 300 GB Maxtor DiamondMax 10</em><br />
So, the result is a set of informal benchmarks, that are probably not related to the way I am going to use the disk anyways, but that has the merit of drawing quick conclusions :<br />
First of all, using RAID 5</p>
<blockquote><p>sudo dd if=/dev/sda of=/dev/null bs=1M count=1024<br />
10240+0 records in<br />
10240+0 records out<br />
10737418240 bytes (11 GB) copied, 32.7535 seconds, 328 MB/s</p>
</blockquote>
<blockquote><p>dd if=/dev/zero of=out bs=1M count=10240<br />
10240+0 records in<br />
10240+0 records out<br />
10737418240 bytes (11 GB) copied, 88.8292 seconds, 121 MB/s</p>
</blockquote>
<blockquote><p>dd if=./out of=/dev/null<br />
20971520+0 records in<br />
20971520+0 records out<br />
10737418240 bytes (11 GB) copied, 45.3929 seconds, 237 MB/s</p>
</blockquote>
<blockquote />
<blockquote><p>dd if=/dev/zero of=ok bs=1M count=1<br />
500 MB / sec<br />
dd if=ok of=/dev/null<br />
630 MB / s<br />
dd if=/dev/zero of=ok bs=1 count=1<br />
40/43 kB / sec (Yes, KB)</p>
<p>dd if=ok of=/dev/null<br />
0+1 records in<br />
0+1 records out<br />
1 byte (1 B) copied, 1.5e-05 seconds, 66.7 kB/s</p>
<p>dd if=./out of=/dev/null<br />
20971520+0 records in<br />
20971520+0 records out<br />
10737418240 bytes (11 GB) copied, 49.5834 seconds, 217 MB/s</p>
<p>dd if=/dev/zero of=ok bs=1k count=1<br />
44 MB / sec</p>
<p>dd if=ok of=/dev/null<br />
2+0 records in<br />
2+0 records out<br />
1024 bytes (1.0 kB) copied, 1.7e-05 seconds, 60.2 MB/s</p>
<p>rm -f ok ; dd if=/dev/zero of=ok bs=1k count=4<br />
4+0 records in<br />
4+0 records out<br />
4096 bytes (4.1 kB) copied, 3.4e-05 seconds, 120 MB/s<br />
120/ 130 MB /s</p>
<p>rm -f ok ; dd if=/dev/zero of=ok bs=1k count=16<br />
16+0 records in<br />
16+0 records out<br />
16384 bytes (16 kB) copied, 8.4e-05 seconds, 195 MB/s</p>
<p>time ( for (( i=0; i < 100000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1k count=1 2> /dev/null; done )</p>
<p>real    10m0.205s<br />
user    1m45.403s<br />
sys     8m2.134s</p>
<p>time ( for (( i=0; i < 100000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1 count=1 2> /dev/null; done )</p>
<p>real    3m19.841s<br />
user    1m43.242s<br />
sys     1m34.582s</p>
<p>time ( for (( i=0; i < 100000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1 count=1 2> /dev/null; done )</p>
<p>real    10m52.149s<br />
user    1m46.703s<br />
sys     9m4.218s</p>
<p>time ( for (( i=0; i < 1000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1<br />
count=1 2> /dev/null; done )</p>
<p>real    0m20.931s<br />
user    0m1.068s<br />
sys     0m3.260s</p>
</blockquote>
<p>And now, parts of the results on RAID 50 :</p>
<blockquote />
<blockquote><p>dd if=/dev/sda of=/dev/null bs=1M count=10240<br />
Password:<br />
10240+0 records in<br />
10240+0 records out<br />
10737418240 bytes (11 GB) copied, 40.1916 seconds, 267 MB/s</p>
<p>dd if=/dev/zero of=out bs=1M count=10240<br />
10240+0 records in<br />
10240+0 records out<br />
10737418240 bytes (11 GB) copied, 117.762 seconds, 91.2 MB/s</p>
<p>dd if=/dev/zero of=ok bs=1M count=1<br />
1+0 records in<br />
1+0 records out<br />
1048576 bytes (1.0 MB) copied, 0.085963 seconds, 12.2 MB/s</p>
<p>dd if=ok of=/dev/null<br />
2048+0 records in<br />
2048+0 records out<br />
1048576 bytes (1.0 MB) copied, 0.001741 seconds, 602 MB/s</p>
<p>dd if=/dev/zero of=ok bs=1 count=1<br />
1+0 records in<br />
1+0 records out<br />
1 byte (1 B) copied, 3.5e-05 seconds, 28.6 kB/s<br />
dd if=ok of=/dev/null<br />
0+1 records in<br />
0+1 records out<br />
1 byte (1 B) copied, 1.7e-05 seconds, 58.8 kB/s</p>
<p>dd if=/dev/zero of=ok bs=1k count=1<br />
1+0 records in<br />
1+0 records out<br />
1024 bytes (1.0 kB) copied, 3.4e-05 seconds, 30.1 MB/s</p>
<p>dd if=ok of=/dev/null<br />
2+0 records in<br />
2+0 records out<br />
1024 bytes (1.0 kB) copied, 1.9e-05 seconds, 53.9 MB/s</p>
<p>time ( for (( i=0; i < 1000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1M count=1 2> /dev/null; done )</p>
<p>real    0m15.759s<br />
user    0m1.068s<br />
sys     0m3.180s</p>
<p>time ( for (( i=0; i < 100000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1k count=1 2> /dev/null; done )</p>
<p>real    9m46.112s<br />
user    1m44.779s<br />
sys     7m59.798s</p>
</blockquote>
<p>So, my conclusion (which I repeat, is not rocket science) is that RAID 50 isn&#8217;t that much better than RAID 5, and is sometimes actually worse, though more expensive. As a result, my personal choice has been RAID 5.
</p>
<p><!--42b65efce97b544f7320ddae69a5be0a-->
</p>
<p><!--5e2cd638ae1475eed33752a9a5b5a850-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/17/raid-5-vs-raid-50-informal-comparisonbenchmark/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Funny quote:  Java vs PHP</title>
		<link>http://www.dalouche.com/wordpress/2006/11/04/funny-quote-java-vs-php/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/04/funny-quote-java-vs-php/#comments</comments>
		<pubDate>Sat, 04 Nov 2006 21:25:57 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/04/funny-quote-java-vs-php/</guid>
		<description><![CDATA[The  Can Java CMS match PHP ones article contains a funny, yet sadly true, sentence :
Maybe while the Java world was engaged in talking of high end, super techie stuff, with the words &#8216;enterprise&#8217;, &#8216;transactions&#8217; and &#8216;SOA &#8216;embedded in every sentence, the PHP guys actually went out and created a lot of simple yet very [...]]]></description>
			<content:encoded><![CDATA[<p>The  <a href="http://www.indicthreads.com/blogs/161/Java_PHP_CMS_Comparison.html">Can Java CMS match PHP ones</a> article contains a funny, yet sadly true, sentence :</p>
<blockquote><p>Maybe while the Java world was engaged in talking of high end, super techie stuff, with the words &#8216;enterprise&#8217;, &#8216;transactions&#8217; and &#8216;SOA &#8216;embedded in every sentence, the PHP guys actually went out and created a lot of simple yet very useful software.</p>
</blockquote>
<p>And we can also cite the following article : <a href="http://discuss.joelonsoftware.com/default.asp?joel.3.219431.12">Why I hate frameworks</a> which goes in the same direction, and is pretty funny too <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
<p><!--fcd1f2d6a38d81c116611ddcb9b6bbde-->
</p>
<p><!--22b43cec518dc4ced5fac9c29843f629-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/04/funny-quote-java-vs-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Designing Java migration scripts for SQL/Hibernate/Java Persistence API data</title>
		<link>http://www.dalouche.com/wordpress/2006/06/18/designing-java-migration-scripts-for-sqlhibernatejava-persistence-api-data/</link>
		<comments>http://www.dalouche.com/wordpress/2006/06/18/designing-java-migration-scripts-for-sqlhibernatejava-persistence-api-data/#comments</comments>
		<pubDate>Sun, 18 Jun 2006 19:39:00 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Uncategorized</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/06/18/designing-java-migration-scripts-for-sqlhibernatejava-persistence-api-data/</guid>
		<description><![CDATA[Every web application needs to load initial data into its production database (settings and domain specific data such as available categories, etc..).
Another concern is the migration of current data to the new schema. Hibernate/JPA makes it easy to create additional fields, but as soon as data migration is needed, it is necessary to have something [...]]]></description>
			<content:encoded><![CDATA[<p>Every web application needs to load initial data into its production database (settings and domain specific data such as available categories, etc..).</p>
<p>Another concern is the migration of current data to the new schema. Hibernate/JPA makes it easy to create additional fields, but as soon as data migration is needed, it is necessary to have something more robust.</p>
<p>That is my current concern : I want to create a decent import/migration system.</p>
<p><strong>Requirements :</strong></p>
<ul>
<li>Versioning : Launching a migration should detect the current state of the database without breaking things if the data is up to date</li>
<li>Heterogeneity-friendly :  Some data come from  XML, others are plain SQL  scripts,  some are  calculated&#8230;. So, the importer system should play well with many kinds of sub-importers.</li>
<li>Transaction-enabled : if an importer crashes, it must leave the data in the previous state</li>
<li>Developer-friendly and extensible : it should be easy to add new importers for additional sets of data</li>
</ul>
<p>I am still unsure about how I should do things, so if anyone has already worked on something similar, I am open to ideas.</p>
<p>In any case, once I work out something nice, I&#8217;ll re-post
</p>
<p><!--e8035d0d031530530152e9ce5a00866c-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/06/18/designing-java-migration-scripts-for-sqlhibernatejava-persistence-api-data/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AJAX frameworks comparison</title>
		<link>http://www.dalouche.com/wordpress/2006/02/27/ajax-frameworks-comparison/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/27/ajax-frameworks-comparison/#comments</comments>
		<pubDate>Mon, 27 Feb 2006 09:04:59 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Web Development</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/27/ajax-frameworks-comparison/</guid>
		<description><![CDATA[Daniel provides a comparison of AJAX frameworks . It is especially useful these days since everyone is starting to develop his own AJAX framework.
Not all frameworks are presented (reasons explained), but it&#8217;s a good start. Keep up the good work !





]]></description>
			<content:encoded><![CDATA[<p>Daniel provides a <a href="http://geekswithblogs.net/danielz/archive/2006/02/25/70698.aspx">comparison of AJAX frameworks </a>. It is especially useful these days since everyone is starting to develop his own AJAX framework.</p>
<p>Not all frameworks are presented (reasons explained), but it&#8217;s a good start. Keep up the good work !
</p>
<p><!--67897de2e1b6a5ff10d581da7870b020-->
</p>
<p><!--7ef255105d4181de55b47c0f3cf72f51-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/27/ajax-frameworks-comparison/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Aspect-Oriented Programming</title>
		<link>http://www.dalouche.com/wordpress/2006/02/15/aspect-oriented-programming/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/15/aspect-oriented-programming/#comments</comments>
		<pubDate>Wed, 15 Feb 2006 20:47:15 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Methodologies</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/15/aspect-oriented-programming/</guid>
		<description><![CDATA[This very nice article from IBM gives some information about Aspect-Oriented Programming (AOP), and why it is good for programmers.
The author clears the myths and understanding about AOP.





]]></description>
			<content:encoded><![CDATA[<p><a href="http://www-128.ibm.com/developerworks/java/library/j-aopwork15/">This</a> very nice article from IBM gives some information about Aspect-Oriented Programming (AOP), and why it is good for programmers.</p>
<p>The author clears the myths and understanding about AOP.
</p>
<p><!--5caff746d90d102834ab0c47dd458acd-->
</p>
<p><!--bc10bdaa0ddf3f75e6ec65301d8299c3-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/15/aspect-oriented-programming/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Basic Db4o Integration with Spring.NET</title>
		<link>http://www.dalouche.com/wordpress/2006/02/12/basic-db4o-integration-with-springnet/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/12/basic-db4o-integration-with-springnet/#comments</comments>
		<pubDate>Sun, 12 Feb 2006 17:59:24 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>.NET</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/12/basic-db4o-integration-with-springnet/</guid>
		<description><![CDATA[Basic Integration of Db4o with Spring.NET is now done. Nothing has been tested yet, but testing should soon start&#8230;
I have created a JIRA issue for this. I hope that this will get integrated and reviewed into Spring.NET.
Content of the issue :
It would be nice to have Spring.NET integrated with db4o.
I have implemented basic integration here [...]]]></description>
			<content:encoded><![CDATA[<p>Basic Integration of Db4o with Spring.NET is now done. Nothing has been tested yet, but testing should soon start&#8230;</p>
<p>I have created a <a href="http://opensource2.atlassian.com/projects/spring/browse/SPRNET-288">JIRA issue</a> for this. I hope that this will get integrated and reviewed into Spring.NET.</p>
<p>Content of the issue :</p>
<blockquote><p>It would be nice to have Spring.NET integrated with db4o.<br />
I have implemented basic integration here :<br />
<a href="http://samokk.is-a-geek.com/Projects/Spring.Net/db4o.tar.gz">http://samokk.is-a-geek.com/Projects/Spring.Net/db4o.tar.gz</a></p>
<p>Nothing has been tested yet.<br />
I&#8217;ll post updates to the same address.</p>
<p>The current version supports :<br />
- Db4o Platform Transaction Manager :<br />
- Db4o Template, that supports both ICallback and delegate method.<br />
- Db4oUtils, that provides utilities to create / dispose connections<br />
- IDb4oDataSource / BasicDb4oDataSource : the exact same thing as a Java JDBC DataSource (Abstract Factory), but for Db4o. BasicDb4oDataSource delegate connection creation to 4 concrete IDb4oConnectionParameters :<br />
* FileDb4oConnectionParameters : Direct file access<br />
* MemoryDb4oConnectionParameters : In-memory database<br />
* EmbeddedClientDb4oConnectionParameters : client to an embedded server<br />
* RemoteClientDb4oConnectionParameters : client to a remote server</p>
<p>These classes work with the Spring.Data classes I found in the sandbox. Do not hesitate to add them to CVS, they are licensed under whatever-license suits you (Apache, BSD, LGPL, whatever)</p>
</blockquote>
<p><!--216a5ddbaa1420c901bf07d00128e819-->
</p>
<p><!--a1cfa5ad3cf9696b03d1b33ec5fcf7d5-->
</p>
<p><!--49128c5721aef5e624996449bd515585-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/12/basic-db4o-integration-with-springnet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More details about Integrating Db4o with Spring.NET</title>
		<link>http://www.dalouche.com/wordpress/2006/02/10/more-details-about-integrating-db4o-with-springnet/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/10/more-details-about-integrating-db4o-with-springnet/#comments</comments>
		<pubDate>Sat, 11 Feb 2006 01:53:26 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>.NET</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/10/more-details-about-integrating-db4o-with-springnet/</guid>
		<description><![CDATA[After having spent several more hours on the Db4o/Spring.NET integration issue, here are some of my conclusions concerning Spring.NET internals :
Most of the logic for integrating a Data Access/Transaction support technology to Spring.NET is to be implemented inside 3 major entities :

The PlatformTransactionManager (Db4oPlatformTransationManager) : definitely the main entity on the system, its purpose is [...]]]></description>
			<content:encoded><![CDATA[<p>After having spent several more hours on the Db4o/Spring.NET integration issue, here are some of my conclusions concerning Spring.NET internals :</p>
<p>Most of the logic for integrating a Data Access/Transaction support technology to Spring.NET is to be implemented inside 3 major entities :</p>
<ul>
<li>The PlatformTransactionManager (Db4oPlatformTransationManager) : definitely the main entity on the system, its purpose is to manage the transactions (Commit, Rollback, and Get a (New/Existing) Transaction.</li>
<li>The Utilities (Db4oUtils) : Its role is mainly to create / dispose connections. However, it does NOT blindly create connections and dispose them. In fact, it must take into account the fact that most applications are multithreaded (e.g. Web Sites), so the releasing a connection must not affect another thread&#8217;s connection.</li>
<li>The Template (Db4oTemplate) : Its role is simply to remove the connection creation/release burden from user code. The template takes care of dealing with Spring.NET internals, threads, synchronization, etc. As a result, the user code just deals with a connection to the database that it can use to perform its tasks.</li>
</ul>
<p>Let&#8217;s see how everything fits together :</p>
<ul>
<li>First of all, it is important to realize that connection creation is an important part of the whole system. In fact, in a multi-threaded environment, several concurrent accesses to the database will be necessary. As a result, it is not possible to have code (e.g. Data Access Objects - DAO) keep references to active connections since it woud mess the whole system. To concurrently access the same database at the same time, several threads must use different connections, so data access code should not maintain references to connections.<br />
As a result, most parts of Spring.NET (Template, etc) will keep a reference to a Factory Object that allows the creation of connections, instead of keeping a reference to a connection directly. This Factory is the DataSource, in the case of Spring Java and IDb4oDataSource in the case of my Db4o to Spring.NET integration.</li>
<li>The Spring.NET templates <em>(Db4oTemplate)</em> allow the removal of connection references from Data Access Objects. Indeed, when using templates, DAOs provide delegates (implemented as Object callbacks for Spring Java, since delegates (function pointers) do not exist in Java) whose signature is given by the template. The delegate has the connection object passed as a parameter, so the DAO can actually perform its work without having to care about which connection it will work on. Look at Spring (Java) <a href="http://static.springframework.org/spring/docs/1.2.x/reference">reference manual</a> which gives quite a lot of information about this.<br />
As a result, all the connection creation/release tasks are handled by the template instead of the user. This is coded once in the template, and avoids unecessary boilerplate code. Basicaly, here is how (roughly) a template Execute method is coded :</li>
<ul>
<li>Get a Connection</li>
<li>Call the delegate provided by the user : delegateMethod(Connection)</li>
<li>Close the Connection</li>
</ul>
<li>However, Connection Creation and Release is a quite complex task. As a result, it is handled by a utilitary class :<em> Db4oUtils</em>. Here is why it is complex :</li>
<ul>
<li>Connections used by each Thread should be handled separately. Thread X should not mess with Thread Y&#8217;s connection, or it would lead to race conditions.</li>
<li>It is not possible nor desirable to create a new connection each time a connection is requested. In fact, the connection should be kept until the transaction is Commit&#8217;ed or Rollback&#8217;ed, and several calls to GetConnection() can happen before, if, for example, several Db4oTemplates are used.</li>
<li>Sometimes, we do not want to take part in a Transaction, so the case where there is no transaction to synchronize to should also be taken into consideration.</li>
<li>Additionnally, Exceptions should be converted to Spring.NET exception Hierarchy..</li>
</ul>
<li>In order to handle  each thread&#8217;s connection separately, a <em>TransactionSynchronizationManager</em> is used. Its role is simply to associate resources and give different resource-spaces to each thread.</li>
<li>The resources that the <em>TransactionSynchronizationManager</em> deals with are not the connections direcltly, but <em>ConnectionHolders</em>. The subtle difference is that the holder maintains a reference to the Connection, but also keeps some information such as a reference count of users of the connection. So, in the case of  nested GetConnection() calls, the reference count will indicate that the resource is still used even though a Dispose() will be done after the nested GetConnection().</li>
<li>The <em>TransactionSynchronizationManager</em> uses  an event-based approach with listeners (called Synchronizations to the resources) in order to do the cleanup of the resources; Since the <em>TransactionSynchronizationManager</em> works with all kinds of connections (ADO.NET, Db4o, etc), it cannot understand how it should cleanup resources after a cleanup, so this is the task of a Synchronization that listen to events thrown by the Manager.</li>
</ul>
<p>Previous issues :</p>
<ul>
<li><a href="http://samokk.is-a-geek.com/wordpress/2006/02/07/adding-db4o-oo-database-support-for-springnet-transactions/">Adding db4o OO database support for Spring.NET</a></li>
<li><a href="http://samokk.is-a-geek.com/wordpress/2006/02/09/springnet-and-db4o-integration/">Spring.NET and db4o Integration roadmap</a></li>
</ul>
<p><!--1d91a5d11460a18fa643f0046580eda3-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/10/more-details-about-integrating-db4o-with-springnet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Spring.NET and db4o Integration roadmap</title>
		<link>http://www.dalouche.com/wordpress/2006/02/09/springnet-and-db4o-integration/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/09/springnet-and-db4o-integration/#comments</comments>
		<pubDate>Thu, 09 Feb 2006 23:12:23 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>.NET</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/09/springnet-and-db4o-integration/</guid>
		<description><![CDATA[As previously stated, I am currently working on Spring.NET and db4o Integration.
This thread  deals with some of my questions regarding what&#8217;s currently available in db4o that will allow me to do the job.
Here&#8217;s the likely roadmap :

Create an equivalent of the JDBC &#8220;Datasource&#8221; : a Factory that allows to create connections regardless of their [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://samokk.is-a-geek.com/wordpress/2006/02/07/adding-db4o-oo-database-support-for-springnet-transactions/">previously</a> stated, I am currently working on Spring.NET and db4o Integration.</p>
<p><a href="http://forums.db4o.com/forums/22449/ShowPost.aspx#22449">This thread</a>  deals with some of my questions regarding what&#8217;s currently available in db4o that will allow me to do the job.</p>
<p>Here&#8217;s the likely roadmap :</p>
<ul>
<li>Create an equivalent of the JDBC &#8220;Datasource&#8221; : a Factory that allows to create connections regardless of their type (embedded, remote, etc). This will help to abstract the connection creation and provide different implementations (Basic, Pooled) of this creation.</li>
<li>Create a Basic non-pooled implementation of this Db4oSource</li>
<li>Implement a Db4oTemplate, probably based on Db4o Native queries (S.O.D.A not doable, unless  something is changed on Db4o side)</li>
<li>Implement the Db4oPlatformTransactionManager and its supporting Db4oUtils classes</li>
<li>Some day, in the future, provide a Pooled implementation of the Datasource. Inspiration from <a href="http://jakarta.apache.org/commons/dbcp/configuration.html">Commons-DBCP</a> will be necessary :</li>
<ul>
<li>A proxy should be created for Db4o ObjectContainer, that would mostly just delegate the processing to a real ObjectContainer, except for the Close(), which would tell the pool that the connection is available</li>
</ul>
</ul>
<p><!--b32a87c1ab63c6dbab87f6228aceb63f-->
</p>
<p><!--a823eb55eaf57c79a713b37e939ece6c-->
</p>
<p><!--5ee93aa52b9e45d8562aae346ff40115-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/09/springnet-and-db4o-integration/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is Architecturing the task of ONE person, not a community ?</title>
		<link>http://www.dalouche.com/wordpress/2006/02/08/is-architecturing-the-task-of-one-person-not-a-community/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/08/is-architecturing-the-task-of-one-person-not-a-community/#comments</comments>
		<pubDate>Wed, 08 Feb 2006 16:33:03 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Internet</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/08/is-architecturing-the-task-of-one-person-not-a-community/</guid>
		<description><![CDATA[This email from Novell is particularly interesting to read.
I believe that they got it right : if you want things to go forward, you sometimes have to create something even though some people won&#8217;t like it  sometimes.
It is especially true for Novell, since they are trying to push the .NET framework and as soon as [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://article.gmane.org/gmane.comp.gnome.desktop/27699">T</a><a href="http://article.gmane.org/gmane.comp.gnome.desktop/27699">his email</a> from Novell is particularly interesting to read.</p>
<p>I believe that they got it right : if you want things to go forward, you sometimes have to create something even though some people won&#8217;t like it  sometimes.</p>
<p>It is especially true for Novell, since they are trying to push the .NET framework and as soon as we talk about high level languages, all the C/ASM-lovers stand against it.
</p>
<p><!--12bbf3cbadd9831bab79d4440b74f834-->
</p>
<p><!--e3f06c8e425cb6a39b983c5db86a03a0-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/08/is-architecturing-the-task-of-one-person-not-a-community/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding db4o OO database support for Spring.NET Transactions</title>
		<link>http://www.dalouche.com/wordpress/2006/02/07/adding-db4o-oo-database-support-for-springnet-transactions/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/07/adding-db4o-oo-database-support-for-springnet-transactions/#comments</comments>
		<pubDate>Tue, 07 Feb 2006 23:19:18 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>.NET</category>

		<category>Tips and Documentation</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/07/adding-db4o-oo-database-support-for-springnet-transactions/</guid>
		<description><![CDATA[Compared to its Java peer, Spring.NET&#8217;s transaction support is still in its infancy and somewhat undocumented.
According to some posts in the forum,  Transaction support should come with version 1.1 (currently in CVS).
In the meantime, those of us who have to deal with transactions still have to find a solution..  The first step is [...]]]></description>
			<content:encoded><![CDATA[<p>Compared to its Java <a href="http://www.springframework.org">peer</a>, Spring.NET&#8217;s transaction support is still in its infancy and somewhat undocumented.<br />
According to some <a href="http://forum.springframework.net/viewtopic.php?t=130">posts</a> in the forum,  Transaction support should come with version 1.1 (currently in CVS).</p>
<p>In the meantime, those of us who have to deal with transactions still have to find a solution..  The first step is to get a nightly snapshot build of the CVS and copy the Spring.Data classes from the sandbox.</p>
<p>The second step is to understand how Transactions are supported and the last step is to add support for your Data backend if it is not yet supported (only ADO.NET is supported, as far as I know.. Maybe iBatis.Net is too, at least partially).<br />
So, concerning the second step, <a href="http://forum.springframework.net/viewtopic.php?t=349">this</a> thread should help to understand once people  give some answers&#8230;</p>
<p>This post is to give more details of what I understand in the hope that it will help someone else in the same position :</p>
<ul>
<li>First of all, It is necessary to understand the real problem, so here is a scenario :</li>
<ul>
<li>A Database maintains all data for a website</li>
<li>A website has several visitors working concurrently (Several threads will be concurrently accessing the database at the same time, each one serving a visitor)</li>
<li>It is NOT acceptable (for performance reasons) to open a new connection every time something must be SELECT&#8217;ed or UPDATE&#8217;d, then closed.</li>
<li>Database sessions can either be commit&#8217;ed (successful registration on the website) or rollback&#8217;ed (client gone before the end of the registration).</li>
</ul>
<li>Then, it is important to read about Spring (Java) <a href="http://static.springframework.org/spring/docs/1.2.x/reference/transaction.html#d0e5671">Transaction support,</a> since Spring.NET is highly inspired about its Java counterpart. It&#8217;s basically the only documentation we have, so let&#8217;s read it, it&#8217;s way easier to understand than API documentation <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
<li>So, to sum-up Spring Transaction Support: The PlatformTransactionManager (e.g. AdoPlatformTransactionManager for ADO.NET), TransactionSynchronizationManager and Template (AdoTemplate) classes are particularly important.</li>
<ul>
<li>All Data access code should be run by PlatformTemplate.Execute (AdoTemplate) that will take care of all the resources initializasation/cleanup, as well as transaction synchronization if necessary (the Template still works if there is no transaction to synchronize to).</li>
<li>TransactionSynchronizationManager takes care of managing resources and transaction synchronizations per thread. In fact, the problem to solve is about assigning a Transaction and its corresponding connection to every thread that wants to access the database. Depending on the underlying infrastructure and configuration, we may reuse already existing connections -instead of creating and closing systematically - (connection pool such as Commons-DBCP in the Java World) and synchronize them to a transaction. However, this class does not deal with anything else than just keeping the resources of each thread. All the connection/transaction to thread assignment logic is done by the PlatformTransactionManager</li>
<li>PlatformTransactionManager (AdoPlatformTransactionManager) : this component returns a  currently active transaction or creates a new one based on the given parameters (Isolation level, etc).</li>
</ul>
<ul>
<li>TransactionTemplate complements AdoTemplate. While AdoTemplate is used to make sure data access code will be synchronized to a currently used transaction, TransactionTemplate is used to demarcate transactions. In other words, it can be used in non-data access code (higher-level services that use DAOs directly or indirectly), to tell where a transaction begins and where it ends.</li>
</ul>
<ul>
<ul>
<li>The use of TransactionTemplate is not mandatory, but not using it will imply that calling AdoPlatformTransactionManager methods will be up to the user&#8230;</li>
</ul>
<ul>
<li>Declarative TransactionDemarcation can also be used (and is recommended), but for the sake of clarity, we won&#8217;t add another layer of complexity here. Spring.NET&#8217;s AOP-style declarative transaction demarcation can be seen as the dynamic creation of a proxy around a service class that will just wrap the method calls inside the previously described TransactionTemplate. Then, other beans must use the generated proxy instead of the actual class. But as you can see, the underlying principle concerning Transaction stays the same : we rely on a TransactionTemplate.</li>
</ul>
</ul>
</ul>
<p>So, overall, things do not seem that complex.. Let&#8217;s analyze a bit more.</p>
<p>PlatformTransactionManager is the main actor on the scene. Its role is to Create/Reuse transactions, commit and rollback transactions. It conforms to the IPlatformTransactionManager interface that defines the following methods :</p>
<ul>
<li>ITransactionStatus GetTransaction( ITransactionDefinition definition );</li>
<li>void Commit( ITransactionStatus transactionStatus );</li>
<li>void Rollback( ITransactionStatus transactionStatus );</li>
</ul>
<p>ITransactionDefinition defines all the gory details of the transaction (Propagation behavior, Isolation Level, Timeout, etc). See <a href="http://en.wikipedia.org/wiki/Transaction_isolation_level">Wikipedia </a>for more information about these general Database concepts.</p>
<p>So basically, when we want to perform a transacted set of tasks, the code should look like (taken from Spring Java documentation) :</p>
<blockquote>
<pre class="programlisting">DefaultTransactionDefinition def = new DefaultTransactionDefinition();
def.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);

TransactionStatus status = txManager.getTransaction(def);
try {
// execute your business logic here
}
catch (MyException ex) {
txManager.rollback(status);
throw ex;
}</pre>
</blockquote>
<blockquote>
<pre class="programlisting">txManager.commit(status);</pre>
</blockquote>
<p>In other words, this is the manual way of demarcating transactions (e.g. the &#8220;wrong&#8221; way). But at least, things are pretty clear about what&#8217;s done on the system. (txManager is the platform transaction manager, AdoPlatformTransactionManager, for example).</p>
<p>The good news is that it is exactly how TransactionTemplate wraps service code, in the Execute() method :</p>
<blockquote><p>public object Execute(ITransactionCallback callback)<br />
{<br />
ITransactionStatus status = _platformTransactionManager.GetTransaction( this );<br />
object result = null;<br />
try<br />
{<br />
result = callback.DoInTransaction( status );<br />
}<br />
catch ( Exception ex )<br />
{<br />
rollbackOnException( status, ex );<br />
throw ex;<br />
}<br />
_platformTransactionManager.Commit( status );<br />
return result;<br />
}</p>
</blockquote>
<p>As you can see from the code  no magic is done here, we purely rely on the PlatformTransactionManager to perform some logic that will make sure the connections and transactions don&#8217;t get mixed and matched between threads&#8230;</p>
<p>So, let&#8217;s see how PlatformTransactionManager works.. Of course, you can already envision that a lot of things are going to be pretty much the same no matter what the concrete platformTransactionmanager is. In fact, no matter whether you use ADO.Net, iBatis.Net, or whatever else, the following workflow handling is hardcoded into AbstractPlatformTransactionSupport, from which all concrete PlatformTransactionsupport should inherit :</p>
<ul>
<li>Determines if there is an existing transaction</li>
<li>Applies the appropriate propagation behavior</li>
<li>Suspends and resumes transactions if necessary</li>
<li>Checks the rollback-only flag on commit</li>
<li>Applies the appropriate modification on rollback (actual rollback or setting rollback-only)</li>
<li>Triggers registered synchronization callbacks (if transaction synchronization is active)</li>
</ul>
<p>The basic idea here is that the three methods (GetTransaction(), Commit() and Rollback() are implemented and use the Strategy Design Pattern to delegate actual processing to the concrete subclasses (All the Do*() methods).<br />
So, all the dirty work of complying with the API is already done, and the real work left is about coding the parts that are different with each system, such as beginning a transaction (DoBegin()).</p>
<p>The link with TransactionSynchronizationManager is done, for example in DoBegin by :</p>
<blockquote><p>TransactionSynchronizationManager.BindResource(DbProvider,<br />
txMgrStateObject.ConnectionHolder);</p>
</blockquote>
<p>The ConnectionHolder (which represents the Connection + Transaction) is bound to the thread by the static BindResource  which will use a [ThreadStatic] Collection to take care of the Threading stuff. (See more information about the TreadStatic Attribute on MSDN).</p>
<p>However, one thing that I am still unsure about is how connection ressources are disposed. After committing, we do not want to close the session, we just want to tell the PlatformTransactionManager that  the resource is now free to reuse for some other thread.</p>
<p>To put it in a nutshell, in order to add support for a new transaction system, here are the required elements :</p>
<ul>
<li>a Template class</li>
<li>A transaction Manager</li>
<li>Utils class (used by the template and  Manager to create/open/close connections)</li>
</ul>
<p>This should be enough to get a working implementation. I&#8217;ll create one for db4o OO database.
</p>
<p><!--e9901378a9ebdfdc64bd250b99ba2cad-->
</p>
<p><!--3d0cc6450f81e770c6370dce912ac8b7-->
</p>
<p><!--3bac5e2749d864413fb0529266f8e12d-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/07/adding-db4o-oo-database-support-for-springnet-transactions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux : Finally on the desktop thanks to OpenGL ?</title>
		<link>http://www.dalouche.com/wordpress/2006/02/07/linux-finally-on-the-desktop-thanks-to-opengl/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/07/linux-finally-on-the-desktop-thanks-to-opengl/#comments</comments>
		<pubDate>Tue, 07 Feb 2006 17:23:43 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/07/linux-finally-on-the-desktop-thanks-to-opengl/</guid>
		<description><![CDATA[Thanks to Novell !! See this announcement from Miguel de Icaza or this one from Alexandre Gomes for Xgl and the new compositing manager ..
I am looking forward to having everything working on my Ubuntu box&#8230; And having applications (f-spot, etc&#8230;) using this technology intensively.
So now, what does the Graphical Layering look like, under Linux [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to Novell !! See <a href="http://tirania.org/blog/archive/2006/Feb-07-1.html">this announcement from Miguel de Icaza</a> or <a href="http://www.alexandre-gomes.com/?p=34">this one from Alexandre Gomes</a> for Xgl and the new compositing manager ..</p>
<p>I am looking forward to having everything working on my Ubuntu box&#8230; And having applications (f-spot, etc&#8230;) using this technology intensively.</p>
<p>So now, what does the Graphical Layering look like, under Linux ? How is Cairo/Glitz related to Xgl ? As far as I understand :</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Cairo_%28graphics%29">Cairo</a> is the  equivalent of  Apple <a href="http://en.wikipedia.org/wiki/Quartz_%28graphics_layer%29">Quartz</a>: it provides a vector-based graphics library. In other words: an API that allows you to draw lines, rectangles, etc. Cairo then uses one of its backends (such as Glitz) to do the actual rendering</li>
<li><a href="http://en.wikipedia.org/wiki/Glitz">Glitz</a> is an image compositing library based on OpenGL. It can be used directly, but also integrates with Cairo. An example of OpenGL rendering with Glitz can be found <a href="http://www.cs.umu.se/~c99drn/pics/cairogears-grad-glitz.png">here</a>.</li>
<li><a href="http://en.wikipedia.org/wiki/GTK%2B">GTK+</a> is a widget toolkit that uses Cairo for the drawing of its components. In other words : GTK+ provides windows, buttons, text areas, etc, and Cairo is used to draw the lines to represent these buttons.</li>
<li><a href="http://en.wikipedia.org/wiki/Xgl">Xgl</a> is the future of X.org Server, layered on top of OpenGL and Glitz.</li>
</ul>
<p>So, as far as I understand, things would be rendered this way :</p>
<ul>
<li>For GTK+ Applications (Inside Application Windows) : GTK -> Cairo -> Glitz -> OpenGL</li>
<li>For classical X applications using the traditional X API :</li>
<ul>
<li>With Xgl : Application -> Xlib -> Glitz -> OpenGL</li>
<li>With standard X : Application -> Xlib -> Driver-specific acceleration ?</li>
</ul>
</ul>
<p>More information about this ?</p>
<p>Other information about the subject :</p>
<ul>
<li>NewsForge : <a href="http://software.newsforge.com/article.pl?sid=06/02/07/1559213&#038;from=rss">X graphics get a boost</a></li>
<li><a href="http://jimmac.musichall.cz/weblog.php/Misc/XGL">XGL Release</a></li>
<li><a href="http://airlied.livejournal.com/21865.html">Xgl unleashed</a></li>
<li>Slashdot: <a href="http://linux.slashdot.org/article.pl?sid=06/02/08/0624253&#038;from=rss">Novell makes public Release of Xgl Code</a></li>
<li><a href="http://www.novell.com/linux/xglrelease/">The official page</a>.</li>
<li><a href="http://www.linuxedge.org/?q=node/55">Novel Linux Desktop Demonstration Videos</a></li>
</ul>
<p><!--709cff22abbbaba1ef7805bf84e8a42c-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/07/linux-finally-on-the-desktop-thanks-to-opengl/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Lightweight Spring Container vs EJB</title>
		<link>http://www.dalouche.com/wordpress/2006/02/07/lightweight-spring-container-vs-ejb/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/07/lightweight-spring-container-vs-ejb/#comments</comments>
		<pubDate>Tue, 07 Feb 2006 16:39:27 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/07/lightweight-spring-container-vs-ejb/</guid>
		<description><![CDATA[This particularly interesting post shows how good Spring is : 70% reduction of code after EJB to Spring migration..
I guess Erik is talking about EJB 2, but it&#8217;s still very interesting !



]]></description>
			<content:encoded><![CDATA[<p><a href="http://erik.jteam.nl/?p=19">This</a> particularly interesting post shows how good Spring is : 70% reduction of code after EJB to Spring migration..</p>
<p>I guess Erik is talking about EJB 2, but it&#8217;s still very interesting !
</p>
<p><!--a652bd7f287c772df8660677fadbff58-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/07/lightweight-spring-container-vs-ejb/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Photography basics</title>
		<link>http://www.dalouche.com/wordpress/2006/02/07/photography-basics/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/07/photography-basics/#comments</comments>
		<pubDate>Tue, 07 Feb 2006 12:54:31 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Photography</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/07/photography-basics/</guid>
		<description><![CDATA[This Topic [Fr] explains photography basics. It is really well done, so it&#8217;s worth taking a look at it.



]]></description>
			<content:encoded><![CDATA[<p><a href="http://forum.hardware.fr/hardwarefr/Photonumerique/FAQ-Photo-HFR-2005-sujet-4131-1.htm">This Topic [Fr]</a> explains photography basics. It is really well done, so it&#8217;s worth taking a look at it.
</p>
<p><!--4b017bf46d8cb7e22d20de4beb7af87a-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/07/photography-basics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DNS registrars comparison</title>
		<link>http://www.dalouche.com/wordpress/2006/02/05/dns-registrars-comparison/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/05/dns-registrars-comparison/#comments</comments>
		<pubDate>Sun, 05 Feb 2006 11:21:48 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Internet</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/05/dns-registrars-comparison/</guid>
		<description><![CDATA[You can find a nice comparison of DNS Registrars here. All features that matter are compared, thanks to Daniel M. Hendricks !





]]></description>
			<content:encoded><![CDATA[<p>You can find a nice comparison of DNS Registrars <a href="http://www.danhendricks.com/articles/My%20Articles/Domain%20Registrar%20Comparison/">here</a>. All features that matter are compared, thanks to Daniel M. Hendricks !
</p>
<p><!--fc829f8259d406e6f561b7542ffee010-->
</p>
<p><!--3d93a4afa74b84019fd570d3525cb58b-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/05/dns-registrars-comparison/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Digital Cameras are getting better</title>
		<link>http://www.dalouche.com/wordpress/2006/02/05/digital-cameras-are-getting-better/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/05/digital-cameras-are-getting-better/#comments</comments>
		<pubDate>Sun, 05 Feb 2006 09:38:29 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Photography</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/05/digital-cameras-are-getting-better/</guid>
		<description><![CDATA[This CNET article gives the latest trends about digital cameras innovations.
However, what about :

Better Quality CCD sensors at high ISO settings ?
A CCD technology that combines the sharpness of Foveon X3 sensors and color reproduction+ISO sensibility of traditional Bayer filters ?

Another thing that I am wondering about is when will Canon release the successor of [...]]]></description>
			<content:encoded><![CDATA[<p>This<a href="http://news.com.com/Pixel+counting+joins+film+in+obsolete+bin/2100-1041_3-6034570.html?tag=st.prev"> CNET article</a> gives the latest trends about digital cameras innovations.</p>
<p>However, what about :</p>
<ul>
<li>Better Quality CCD sensors at high ISO settings ?</li>
<li>A CCD technology that combines the sharpness of <a href="http://en.wikipedia.org/wiki/Foveon_X3_CCD">Foveon X3 sensors</a> and color reproduction+ISO sensibility of traditional <a href="http://en.wikipedia.org/wiki/Bayer_filter">Bayer filters</a> ?</li>
</ul>
<p>Another thing that I am wondering about is when will Canon release the successor of its <a href="http://en.wikipedia.org/wiki/Canon_EOS">EOS 350D</a> digital camera ?</p>
<p>I am planning to buy the EOS 350D, but would prefer to wait until the successor comes out if it is soon going to..
</p>
<p><!--929c674f40b82a8085db90fc10419482-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/05/digital-cameras-are-getting-better/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Java/J2EE/JEE employment tips : how to get hired</title>
		<link>http://www.dalouche.com/wordpress/2006/02/04/javaj2eejee-employment-tips-how-to-get-hired/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/04/javaj2eejee-employment-tips-how-to-get-hired/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 19:12:29 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/04/javaj2eejee-employment-tips-how-to-get-hired/</guid>
		<description><![CDATA[Any slightly experienced developer knows that once you have acquired the basic algorithmic, methodologic and design skills, such as the Imperative and Object Oriented paradigms, it is quite easy to learn another language.
If you are quite new to the Java/J2EE world and want to be hired in this area (it looks like most developer jobs [...]]]></description>
			<content:encoded><![CDATA[<p>Any slightly experienced developer knows that once you have acquired the basic algorithmic, methodologic and design skills, such as the <a href="http://en.wikipedia.org/wiki/Imperative_programming">Imperative</a> and <a href="http://en.wikipedia.org/wiki/Object_oriented">Object Oriented </a>paradigms, it is quite easy to learn another language.<br />
If you are quite new to the Java/J2EE world and want to be hired in this area (it looks like most developer jobs resolve around Java/J2EE these days..),  make sure that you first learn, or at least know the basics of all the hype skills in this domain. During any interview, you will get asked, at least, the following set of questions :</p>
<ul>
<li>What are <a href="http://en.wikipedia.org/wiki/Design_Patterns">Design Patterns</a> ?</li>
<li>Give a few examples of GoF design patterns and J2EE Design Patterns.</li>
<li>What is <a href="http://en.wikipedia.org/wiki/Extreme_Programming">eXtreme Programming</a> ?</li>
<li>What is <a href="http://en.wikipedia.org/wiki/Test-driven_development">Test-Driven Development</a> ?</li>
<li>What is <a href="http://en.wikipedia.org/wiki/JUnit">JUnit</a> ?</li>
<li>What is a <a href="http://en.wikipedia.org/wiki/Database_transaction">Transaction</a> ?</li>
<li>What is a <a href="http://en.wikipedia.org/wiki/Distributed_transaction">distributed transaction</a> ?</li>
<li>How does the <a href="http://en.wikipedia.org/wiki/Two-phase_commit">2-phase commit</a> protocol work ?</li>
<li>What is <a href="http://en.wikipedia.org/wiki/Inversion_of_control">Inversion Of Control (IoC)</a> ?</li>
<li>What are the 3 types of Inversion Of Control ?</li>
<li>What <a href="http://en.wikipedia.org/wiki/Inversion_of_control#Inversion_of_Control_in_Java">Inversion Of Control Frameworks</a> are available over there ?</li>
<li>Give a few examples of J2EE <a href="http://en.wikipedia.org/wiki/Matrix_of_Application_Servers#Java">Application Servers</a></li>
<li>Give a few examples of Jakarta Projects</li>
<li>What is <a href="http://en.wikipedia.org/wiki/Tuxedo_%28software%29">Tuxedo</a> ?</li>
<li>What is <a href="http://en.wikipedia.org/wiki/Apache_Ant">Apache Ant</a> ? <a href="http://en.wikipedia.org/wiki/Apache_Maven">Apache Maven</a> ? How do they compare ?</li>
<li>What is <a href="http://en.wikipedia.org/wiki/Aspect_oriented_programming">Aspect Oriented Programming</a> ?</li>
<li>What is <a href="http://en.wikipedia.org/wiki/Object-relational_mapping">Object/Relational Mapping</a> ?</li>
<li>What is <a href="http://en.wikipedia.org/wiki/Hibernate_%28Java%29">Hibernate</a> ? <a href="http://en.wikipedia.org/wiki/Java_Data_Objects">JDO</a> ? <a href="http://en.wikipedia.org/wiki/Service_data_objects">SDO</a> ? What do you think about these approaches ?</li>
</ul>
<p>There are some other recurring questions that I don&#8217;t remember, but getting more information on the subjects above will, in any case, help during any interview.
</p>
<p><!--4ace0043f338cc286dcea364cdbd905e-->
</p>
<p><!--c7dd59add2203835dcf1b32dbc8f0bca-->
</p>
<p><!--55585ba23451a8c415975b3eac018417-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/04/javaj2eejee-employment-tips-how-to-get-hired/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SpringFramework.NET still lacking db4o integration</title>
		<link>http://www.dalouche.com/wordpress/2006/02/04/springframeworknet-still-lacking-db4o-integration/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/04/springframeworknet-still-lacking-db4o-integration/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 18:50:09 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>.NET</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/04/springframeworknet-still-lacking-db4o-integration/</guid>
		<description><![CDATA[SpringFramework.NET is, to me, one of the best .NET Lightweight Containers available over there. More than just an Inversion Of Control framework, it features an interesting set of features such as AOP (Aspect Oriented Programming).
However, I still haven&#8217;t figured out whether Spring.NET has a unified framework for Data Access and Transaction Management as its Java [...]]]></description>
			<content:encoded><![CDATA[<p>SpringFramework.NET is, to me, one of the best .NET Lightweight Containers available over there. More than just an <a href="http://en.wikipedia.org/wiki/Inversion_of_control">Inversion Of Control</a> framework, it features an interesting set of features such as <a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming">AOP (Aspect Oriented Programming)</a>.</p>
<p>However, I still haven&#8217;t figured out whether Spring.NET has a unified framework for Data Access and Transaction Management as its Java peer. It looks like some of the classes are there, but <a href="http://www.springframework.net/doc/reference/html/index.html">the reference documentation</a> doesn&#8217;t deal with the subject.</p>
<p>Something interesting would be to be able to use declarative AOP-style transaction demarcation  with <a href="http://www.db4o.com/">db4o</a>, the only free <a href="http://en.wikipedia.org/wiki/Object_oriented">OO</a> database available for the .Net platform. Has anyone any idea of how to achieve this ?
</p>
<p><!--8934c747bcd8e504ddcdcb12cdf71b40-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/04/springframeworknet-still-lacking-db4o-integration/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux Desktop is getting better</title>
		<link>http://www.dalouche.com/wordpress/2006/02/04/linux-desktop-is-getting-better/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/04/linux-desktop-is-getting-better/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 18:24:58 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/04/linux-desktop-is-getting-better/</guid>
		<description><![CDATA[As can be seen from this post (standblog), Novell is preparing some really cool features for Linux&#8217;s next-generation Desktop..
Can&#8217;t wait to have everything included by default on my Ubuntu box..
A few videos are available.



]]></description>
			<content:encoded><![CDATA[<p>As can be seen from <a href="http://standblog.org/blog/2006/02/02/93114634-why-you-should-not-sit-at-the-front-row-during-a-novell-demo-by-nat-friedman">this post (standblog)</a>, Novell is preparing some really cool features for Linux&#8217;s next-generation Desktop..</p>
<p>Can&#8217;t wait to have everything included by default on my Ubuntu box..</p>
<p><a href="http://www.linuxedge.org/?q=node/55">A few videos</a> are available.
</p>
<p><!--fdc72d548eab586423f4476a1db36142-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/04/linux-desktop-is-getting-better/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Keeping SSH sessions alive</title>
		<link>http://www.dalouche.com/wordpress/2006/02/04/keeping-ssh-sessions-alive/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/04/keeping-ssh-sessions-alive/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 13:06:21 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/04/keeping-ssh-sessions-alive/</guid>
		<description><![CDATA[This post from Scott Merril explains how to keep SSH sessions alive.
I have experienced the same problem in the past when I was using a kind of cheap router-modem for my Internet Connection..
So, thanks scott, it&#8217;s always useful to know why it happened 



]]></description>
			<content:encoded><![CDATA[<p><a href="http://ubuntu.wordpress.com/2006/02/03/keeping-ssh-sessions-alive/">This post</a> from Scott Merril explains how to keep SSH sessions alive.</p>
<p>I have experienced the same problem in the past when I was using a kind of cheap router-modem for my Internet Connection..</p>
<p>So, thanks scott, it&#8217;s always useful to know why it happened <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
<p><!--86512216ed33bae311d4c285c7196878-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/04/keeping-ssh-sessions-alive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google creating its own Linux Distribution ?</title>
		<link>http://www.dalouche.com/wordpress/2006/01/31/google-creating-its-own-linux-distribution/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/31/google-creating-its-own-linux-distribution/#comments</comments>
		<pubDate>Wed, 01 Feb 2006 07:21:03 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Unix / Linux</category>

		<category>Rumors</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/31/google-creating-its-own-linux-distribution/</guid>
		<description><![CDATA[Apparently, quite a lot of blogs ( BlogORabais , Je Hais le Printemps) and news sites (Slashdot, The Register) are relaying the information&#8230;
So, what is Google currently preparing ? Is this information a whole FUD started by Google , just to make this company even more popular ?
In any case, this can only benefit the [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently, quite a lot of blogs ( <a href="http://nawer.freecontrib.org/index.php?2006/01/31/177-goobuntu">BlogORabais</a> , <a href="http://jehaisleprintemps.net/detail.php?id=1322&#038;lang=fr">Je Hais le Printemps</a>) and news sites (<a href="http://slashdot.org/articles/06/01/31/1519224.shtml">Slashdot</a>, <a href="http://www.theregister.co.uk/2006/01/31/google_goes_desktop_linux/">The Register</a>) are relaying the information&#8230;</p>
<p>So, what is Google currently preparing ? Is this information a whole FUD started by Google , just to make this company even more popular ?</p>
<p>In any case, this can only benefit the Ubuntu, Debian  and more generally, the Linux communities. So, Long life Google&#8230;.
</p>
<p><!--6e6c2db4f66fa8149851f3cebff0faa9-->
</p>
<p><!--ecf8555dbb09d045a4f0d5c192cd3091-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/31/google-creating-its-own-linux-distribution/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ServiceMix JBI Container and PXE BPEL: Theory and practice..</title>
		<link>http://www.dalouche.com/wordpress/2006/01/26/servicemix-jbi-container-and-pxe-bpel-theory-and-practice/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/26/servicemix-jbi-container-and-pxe-bpel-theory-and-practice/#comments</comments>
		<pubDate>Thu, 26 Jan 2006 20:18:22 +0000</pubDate>
		<dc:creator>skoobi</dc:creator>
		
		<category>Java</category>

		<category>Tips and Documentation</category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/26/servicemix-jbi-container-and-pxe-bpel-theory-and-practice/</guid>
		<description><![CDATA[While speaking about a work I achieved last summer, related to ServiceMix (a JBI container) and PXE ( a BPEL engine that can be embedded inside ServiceMix), a friend of mine came up to the following conclusion :
In theory, theory and practice are the same whereas in practice, they are not.

I love that sentence  [...]]]></description>
			<content:encoded><![CDATA[<p>While speaking about <a href="http://www.mail-archive.com/user@servicemix.codehaus.org/msg00221.html">a work I achieved last summer</a>, related to ServiceMix (a JBI container) and PXE ( a BPEL engine that can be embedded inside ServiceMix), a friend of mine came up to the following conclusion :</p>
<blockquote><p><font size="2"><font color="#a82f2f">In theory, theory and practice are the same whereas in practice, they are not.</font></font></p>
</blockquote>
<p>I love that sentence <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So, here is a small HOWTO, taken from the email I sent to ServiceMix mailing list :</p>
<blockquote>
<pre>How to get a BPEL process running with ServiceMix JBI Container and Fivesight's
PXE :
===

1) The first step is to create a BPEL process with the corresponding WSDL files.
Examples bundled with PXE can serve as a quickstart.

2) Remove any concrete bindings in the WSDL Files (
binding and service XML tags). Indeed, the endpoints are JBI proxies, so the
SOAP over HTTP bindings are useless here. PXE and ServiceMix will take care of
registering ports as JBI Service endopints.

3) Compile your BPEL process and WSDL files
let's say the main WSDL file describing the process is in the
MissionPlanningProcess.wsdl (this file must import the other WSDL files that
are
used :

REM add the resources to PXE's Resources Repository MissionPlanning.rr
rradd -wsdl file:MissionPlanningProcess.wsdl MissionPlanning.rr

REM compile the BPEL
bpelc -rr MissionPlanning.rr -wsdl file:MissionPlanningProcess.wsdl
file:MissionPlanning.bpel

4) Create a pxe-system.xml file that describes how to bind the BPEL process to
actual JBI endpoints. (PXE's deployment descriptor)

Let's say that the MissionPlanning process provides 3 portTypes :
proc:ProcessPT, proc:CallbackPT, resp:ResponderPT.

We want to expose 2 services :
ProcessSVC that exposes the proc:processPT and proc:CallbackPT porttypes
and
ResponderSVC that exposes the resp:ResponderPT portType.

(same names as the Async example bundled with PXE)

the corresponding pxe-system.xml file would be :

http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="<a rel="nofollow" href="http://www.fivesight.com/pxe/system-descriptor/">http://www.fivesight.com/pxe/system-descriptor/</a>
<a rel="nofollow" href="http://www.fivesight.com/pxe/system-descriptor/%22">http://www.fivesight.com/pxe/system-descriptor/&#8221;</a>;
wsdlUri=&#8221;file:MissionPlanningProcess.wsdl&#8221;
xmlns=&#8221;<a rel="nofollow" href="http://www.fivesight.com/pxe/system-descriptor/%22">http://www.fivesight.com/pxe/system-descriptor/&#8221;</a>;
xmlns:proc=&#8221;uri:concordia.ciise.weather.process&#8221;
xmlns:resp=&#8221;uri:concordia.ciise.weather.responder&#8221;>

<!-- The following port will be registered as a JBI service endpoint {uri:fivesight.com/examples/AsyncProcessJBI:ProcessSVC, ProcessPORT} -->

<!-- The following port will be registered as a JBI service endpoint {uri:fivesight.com/examples/AsyncProcessJBI:ProcessSVC, CallbackPORT} -->

<!-- The following port will invoke JBI service endpoint {uri:fivesight.com/examples/AsyncProcessJBI:ResponderSVC, ResponderPORT} -->

Pay attention to use the same value for the &#8220;name&#8221; attribute in the
system-descriptor tag, as the name of the BPEL process. (current limitations
with PXE, should be fixed in the future)

5) We now have all the necessary artifacts to create a SAR (System Archive) file
that is just a container for all these files :

sarcreate -common MissionPlanning.rr -sysd pxe-system.xml MissionPlanning.cbp
pxe.sar

6) JBI needs deployable components (the SAR in this case) to be contained in a
zip file. The zip file is referred later as a Service Unit. (hence the -su)

=> create the output directory
=> jar cf outputMissionPlanning-su.zip pxe.sar
(or use any tool that can create a .zip)

7) Package this service unit inside a so-called Service Assembly (SA), which is
just a set of service units with a jbi.xml
For example, create the following outputMETA-INFjbi.xml file :

http://java.sun.com/xml/ns/jbi  ./jbi.xsd&#8221;
xmlns:xsi=&#8221;<a rel="nofollow" href="http://www.w3.org/2001/XMLSchema-instance%22">http://www.w3.org/2001/XMLSchema-instance&#8221;</a>;
xmlns=&#8221;<a rel="nofollow" href="http://java.sun.com/xml/ns/jbi%22">http://java.sun.com/xml/ns/jbi&#8221;</a>;>

MissionPlanningSA
Service Assembly containing just the BPEL
deployment.

MissionPlanning
BPEL Service Unit

MissionPlanning-su.zip
PxeBpelEngine

and create the jar :
cd output
echo creating Service Assembly
jar cf ..MissionPlanning-sa.jar *
cd ..

component-name refers to the name of the BPEL engine deployed in the JBI
container.

8) Create a servicemix.xml file that launches a JBI container.
An example is bundled with ServiceMix&#8217;s AsyncDemo example :
Pay attention to :

and

in the installationDirPath, you will have to drop the PXE&#8217;s JBI component.
(bundled with ServiceMix). If ServiceMix doesn&#8217;t detect PXE nor install it, then
it means there is a problem in your installationDirPath. (For example, if
ServiceMix is integrated inside Geronimo, the &#8220;.&#8221; directory refers to
GERONIMO_HOME

the deploy directory is where you will drop the Service Assembly

9) launch service mix (either standalone, or by sourcing the spring file.
If you source the spring file, make sure you use ServiceMix&#8217;s Spring version.
The XML extension mechanism is not yet available from upstream Spring, so
Spring won&#8217;t recognize servicemix&#8217;s specific spring syntax.

10) Here you go, you can then talk to your BPEL process from other JBI
components (more information in another HOWTO)</pre>
</blockquote>
<pre>I hope that this HOWTO will help someone some day...</pre>
<blockquote /><p><!--49de8335721c38861e5cc79ba534b32a-->
</p>
<p><!--048b37b96a1f9533559bf4dacb64b64c-->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/26/servicemix-jbi-container-and-pxe-bpel-theory-and-practice/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
