<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Alban Seurat</title>
	
	<link>http://www.albanseurat.com</link>
	<description>Everything should be made as simple as possible, but no simpler.</description>
	<lastBuildDate>Mon, 11 Apr 2011 18:53:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Alkpone" /><feedburner:info uri="alkpone" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Oracle &amp; Java : Coming back to the 90s</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/BiHIghvoaCE/</link>
		<comments>http://www.albanseurat.com/2010/12/oracle-java-coming-back-to-the-90s/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 18:20:20 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.albanseurat.com/?p=524</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/12/oracle-java-coming-back-to-the-90s/";</script>Remember Delphi ? Visual Basic? Borland C++ ? What I&#8217;ve seen these weeks with Oracle letting Apache leaving the JCP Executive Committee  seems to lead to the &#8220;old days&#8221; where we had to buy a closed platform to work on. It was before Internet, the open source movement, Linux, Git, etc. A world where we [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/12/oracle-java-coming-back-to-the-90s/";</script><p>Remember Delphi ? Visual Basic? Borland C++ ?</p>
<p>What I&#8217;ve seen these weeks with Oracle letting Apache leaving the JCP Executive Committee  seems to lead to the &#8220;old days&#8221; where we had to buy a closed platform to work on. It was before Internet, the open source movement, Linux, Git, etc.</p>
<p>A world where we have to rely on a company to have support, when we can&#8217;t make our C++ COM object working properly without MSDN subscription. A world where Delphi was a good tool for creating GUI (sic). A world were Visual Basic was one of the most used language.</p>
<p><span id="more-524"></span>Oracle has understood that the Java Language itself doesn&#8217;t worth any  money, the JVM does. They don&#8217;t want to let an open source  alternative to compete with their own. They already start to sell an  &#8220;advanced&#8221; JVM with support. That is the main reason why the prevent Apache to have their JVM being distributed.</p>
<p>Hopefully, these days are over and Internet has open everything. Source code, Social activities, Location, Diplomat cables&#8230; and even sometimes our Mind (I&#8217;m too much an idealist sometimes <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<p>We have entered a new millennium with Internet and I feel like what Oracle has done this week is just like a short term thinking how to make some money. At some point, they will realize that it&#8217;s not profitable anymore to follow this strategy and change it.</p>
<p>Let me guess, in two or three years, if they continue to &#8220;close&#8221; the java ecosystem, a new rise will appear.<br />
Hum, <a href="http://llvm.org/" target="_blank">LLVM </a>based software will start  to raise (Objective-C, Scala, Go?, &#8230;). Apple and Google already support LLVM for their language. Chrome OS  already has some port within there NaCl plug-in approach.  LLVM is also used by Apple in many places in there platform. There is already some <a href="http://vmkit.llvm.org/" target="_blank">Java port to LLVM plateform</a>, we just miss  Scala integration and no-one will even care about Oracle trying to make money with the community works.</p>
<p>Java is Dead, Long live Java.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2010/12/oracle-java-coming-back-to-the-90s/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2010/12/oracle-java-coming-back-to-the-90s/</feedburner:origLink></item>
		<item>
		<title>Presenting OSGi to RiveriaJug</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/eSlGog3Gm9A/</link>
		<comments>http://www.albanseurat.com/2010/05/presenting-osgi-to-riveriajug/#comments</comments>
		<pubDate>Sat, 29 May 2010 14:29:25 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=494</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/presenting-osgi-to-riveriajug/";</script>I&#8217;ve been presenting yesterday to RivieriaJug some slides doing an OSGi overview. I&#8217;m sharing them here.]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/presenting-osgi-to-riveriajug/";</script><p>I&#8217;ve been presenting yesterday to <a href="http://www.rivierajug.org/xwiki/bin/view/Main/WebHome" target="_blank">RivieriaJug</a> some slides doing an OSGi overview. I&#8217;m sharing them here.</p>
<p style="text-align: center;"><iframe src="http://www.slideshare.net/slideshow/embed_code/4349981" width="400" height="337" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2010/05/presenting-osgi-to-riveriajug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2010/05/presenting-osgi-to-riveriajug/</feedburner:origLink></item>
		<item>
		<title>Why performance doesn’t matter!</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/kd1Fqo6L7nQ/</link>
		<comments>http://www.albanseurat.com/2010/05/why-performance-doesnt-matter/#comments</comments>
		<pubDate>Thu, 20 May 2010 22:31:30 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=469</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/why-performance-doesnt-matter/";</script>Actually it does matter. It is just not always the right moment to optimize your code. There are several patterns applied properly at the start of most project helping you worrying about performance at a later stage. Obviously this won&#8217;t help if you need to do highly CPU demanding processing (neuronal network, nuclear bomb simulation, [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/why-performance-doesnt-matter/";</script><p><a href="http://www.alkpone.com/wp-content/uploads/2010/05/Cheetah-fast.jpg" rel="lightbox[469]"><img class="aligncenter size-medium wp-image-506" title="Cheetah-fast" src="http://www.alkpone.com/wp-content/uploads/2010/05/Cheetah-fast-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Actually it does matter. It is just not always the right moment to optimize your code. There are several patterns applied properly at the start of most project helping you worrying about performance at a later stage. Obviously this won&#8217;t help if you need to do highly CPU demanding processing (neuronal network, nuclear bomb simulation, &#8230;).</p>
<p><span id="more-469"></span></p>
<p><strong>First</strong>, the most  important design pattern to apply for performance and scalability is to being stateless. Keeping state in memory from the start of the project is premature optimization, it will prevent further development because you will have to leave with this small tiny stuff which does fast but not flexible for change. I&#8217;ve been working in different scenario and not being stateless has ALWAYS been a massive issue which require a lot of re-factoring for &#8230; nothing (in term of features). Never, whatsoever, do a state-full component, never. Take parameter, Compute, save in a persistence layer. That&#8217;s all! Ok, it&#8217;s a little provocative.</p>
<p>If you have done your design right, it will be very easy afterward to proxy your code and cache it only when it&#8217;s necessary, doing this in a second development phase allow to add/remove at will (even more when using <a href="http://en.wikipedia.org/wiki/Dependency_injection" target="_blank">Dependency Injection</a> pattern) your cache.</p>
<p>You will also have simpler unit test in place since you will not have to test when you keep state in memory, so it will be easier to re-factorize afterward.</p>
<p><strong>Second</strong>, design/develop against &#8220;contract&#8221;/interface, you should always specify APIs first. Relying on an interface allows you to change the implementation afterward if you need more performance and re-factorize a specific API. It doesn&#8217;t cost in term of performance (<a href="http://www.codersource.net/c/c-tutorials/c-virtual-function.aspx" target="_blank">virtual invocation</a> has minor impact in C++ and <a href="http://www.brics.dk/~mis/dOvs/jvmspec/ref--35.html" target="_blank">mandatory in JAVA</a> anyway).</p>
<p>It permits also to &#8220;inject&#8221; a cache in the middle without changing the contract between the two parties for instance if you have a network I/O between them.</p>
<p><strong>Third</strong>, always favoring API over DTOs/Values Object, DTOs over state-full component. Their is a very simple reason of doing that, it&#8217;s easier to proxy an API using its contract than optimizing a DTO/value object.</p>
<p>Obviously you won&#8217;t be able to do that all the times and you might need to transfer Object/Message or even having a state-full component (Session Management in a web farm for instance&#8230;), but the rules would be to always think API first, DTO only if necessary and state-full component <span style="text-decoration: line-through;">when you&#8217;ve got your manager asking for something very quick and dirty <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</span></p>
<p><strong>Forth</strong>, (it grows&#8230;), always prefer event based approach. To gives you some examples, if you do processing which imply I/O, actually, if you do computer programming, you will always encounter I/O.</p>
<p>Anyway, let&#8217;s say you want to create a very fast and powerful HTTP server (<a href="http://translate.google.com/translate?js=y&amp;prev=_t&amp;hl=fr&amp;ie=UTF-8&amp;layout=1&amp;eotf=1&amp;u=http%3A%2F%2Fwww.lesmotsontunsens.com%2Fseguela-rolex-rate-sa-vie-50-ans-video-3391&amp;sl=fr&amp;tl=en" target="_blank">something everyone should have made before 50 if he doesn&#8217;t want to fail in its life</a> <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), you will then create a multi-threaded server which create a new thread for each new client. You will miserably fail. How a CPU can handle 10000 thread with 2Mo each (by default on most OS) of memory allocated to it.</p>
<p>Most (all) of the modern operating system allows you to listen to events (in different manner) coming from the operating system. It&#8217;s help a lot, by removing the cost of calling a system call which implies various cost i will not explain here, and having a thread waiting for something to happen, being awaken, etc.</p>
<p>To design a powerful HTTP server (lighttpd, Nynx, &#8230;), you will have few threads (one by CPU is enough if you just want to serve static pages) and you will just register to events coming from the Operating System. Less context switch, 1 thread by CPU, less system calls and no wait which imply on a multi-CPU platform a lot of drawback when we talk about data bus (in the motherboard).</p>
<p>This pattern has to be applied every time you have I/O which can be blocked or slow compare to your processing. SAX handling when you parse an XML document is an event approach, Observation pattern is an event approach, etc&#8230;</p>
<p><strong>Fifth</strong>, which is quite straight-forward, follow <a href="http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612" target="_blank">GoF design patterns</a>, and more generically the <a href="http://en.wikipedia.org/wiki/Separation_of_concerns" target="_blank"><strong><em>separation of concerns</em></strong></a> principle. It&#8217;s not necessary to know 200 design patterns to cover 300 use-cases, just the GoF are fine enough to manage your needs and if you fill it&#8217;s not the right move, just look at <a href="http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29" target="_blank">this page</a> to figure out if you really need more.</p>
<p>Let me give you an example.</p>
<p>I&#8217;ve been involved during my career in a project where one of the goal was to render web page using some sort of configuration files which contains details of the page. The legacy code was a bunch of functions actually doing &#8220;printf&#8221; stuff. It was a mess, un-maintainable, slow and not really bug-free.</p>
<p>My first re-factoring action has been to model our page using the <a href="http://en.wikipedia.org/wiki/Composite_pattern" target="_blank">Composite pattern</a> representing an object tree of the page and using the <a href="http://en.wikipedia.org/wiki/Visitor_pattern" target="_blank">Visitor pattern</a> to make CSS, JS and HTML being rendered (CSSVisitor, JSVisitor, &#8230;). It make the page been rendered several times faster (HTML very clean, JS and CSS being cache by the browser) and even more flexible since we can render any kind of content from our model. Nice, simple, <a href="http://www.alkpone.com/2009/08/the-kiss-principle/" target="_blank">KISS</a>.</p>
<p>To summarize, this &#8220;principles&#8221; are the <em><strong>primary steps</strong></em> for a performing and scalable application.</p>
<p>It will not prevent you to do profiling nor putting cache in place afterward, but it will help you do that efficiently without compromising the bunch of features your product owner, customer, whatever the name of your &#8220;features requester&#8221; is called have asked for.</p>
<p>Performance is ALWAYS a trade-off between I/O and memory, at the end, it will always end-up being a cache to prevent I/O to happens. You can re-invent multiple technique to improve performance, but even if you look at the CPU level, with its register and its cache, there is no  secret, &#8220;caching&#8221; is the only viable option.</p>
<p>Now, it&#8217;s time to profile and optimize your algorithms <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> , think about putting load balancing (easy since your services are stateless), put in place caches at many levels (within your code with WeakHashMap, against a database with NoSQL databases, some HTTP proxy if you want to serve web pages, &#8230;). Having created your source code following this rules will permits to do that quickly almost without re-factoring.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2010/05/why-performance-doesnt-matter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2010/05/why-performance-doesnt-matter/</feedburner:origLink></item>
		<item>
		<title>OSGI / SCA – the winning couple</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/-W8pOHD8y0U/</link>
		<comments>http://www.albanseurat.com/2010/05/osgi-sca-the-winning-couple/#comments</comments>
		<pubDate>Mon, 17 May 2010 21:52:10 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=438</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/osgi-sca-the-winning-couple/";</script>First, some brief overview of the two technologies. OSGi is a framework aims to create an component/plug-in software. I&#8217;ve already mention OSGi in a previous post. SCA stand for Service Component Architecture. Oracle, IBM and others came up with the conclusion than SOA is just a buzz word and without a plain framework, everyone can [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/osgi-sca-the-winning-couple/";</script><p>First, some brief overview of the two technologies. OSGi is a framework aims to create an component/plug-in software. I&#8217;ve already mention OSGi in a <a href="http://www.alkpone.com/2009/08/distributed-osgi-an-elegant-way-to-distribute-our-software/" target="_self">previous post</a>.</p>
<p>SCA stand for Service Component Architecture. Oracle, IBM and others came up with the conclusion than SOA is just a buzz word and without a plain framework, everyone can say they do SOA development but actually doing something else &#8230; They have created several specifications to help to produce a SOA software. Key features are separation of concern, component oriented, dynamic binding, aggregation/composition of services/components.</p>
<p><span id="more-438"></span></p>
<p>SCA target high level / business services whereas OSGi is more targeting modularity at lower level.</p>
<p>Micro-kernel is becoming more and more popular (jboss, glassfish,&#8230;). OSGi coming from mobile has standardize a lot of &#8220;kernel services&#8221; (logging, configuration, provisioning), and now start to enter the enterprise, it&#8217;s helps a lot. Whereas JEE focus was on middle-ware infrastructure, OSGi gives a lot to manage what was left to developers. Dynamic loading in it&#8217;s hearth, OSGi make the perfect micro-kernel for those we want &#8220;always on&#8221; servers.</p>
<p>Obviously you will be able to leverage enterprises technology using Spring as it integrate OSGI very nicely using Spring-OSGi-Extender (Spring DM). It manage at startup to wire automatically OSGi services and components (bundles). This could become your first layer, this would be called the OSGi-Extender layer.</p>
<p>Core services might be our own business modules with your domain, repository and value objects or 3rdparty library/services like JPA implementation. Fortunately, OSGi enterprise 4.2 <a href="http://www.infoq.com/news/2010/03/osgi-enterprise-42-released" target="_blank">being just released</a>, it&#8217;s where you will see this modules. SCA is even mentioned in this specification.</p>
<p>This composition of services/composant will be done and expose as a business service with multiple endpoint. It&#8217;s where we can see that the couple OSGi/SCA brings a lot and helps  you focus on your business. OSGi modules to manage technical component for keeping <a href="http://www.alkpone.com/2009/08/dry-or-soft/" target="_self">DRY principles</a> and SCA to expose business endpoint with automatic wiring and security enabled.</p>
<p><a href="http://www.alkpone.com/wp-content/uploads/2010/05/runtime-wire.jpg" rel="lightbox[438]"><img class="aligncenter size-medium wp-image-458" title="runtime-wire" src="http://www.alkpone.com/wp-content/uploads/2010/05/runtime-wire-300x142.jpg" alt="" width="300" height="142" /></a></p>
<p>This schema taken from Apache Tuscany page express how SCA does the wiring between business services. As a typical SOA, you will expose your &#8220;contract&#8221;. Within SCA, you will configure additionally how you want to expose it (using RMI, WS or any kind of protocol supported by the SCA implementation you choose).<br />
By doing so, you let decide protocol at deployment stage, not at development stage. It make your software very flexible and let you focus on your business code.</p>
<p>Managing modules/components and there dependencies require to use an automatized tools (maven, nexus) but it&#8217;s a different subject.</p>
<p>For reference, <a href="http://tuscany.apache.org/" target="_blank">Apache Tuscany</a> is an SCA implementation, in there next release (2.0) they will provide an <a href="http://www.alkpone.com/2009/08/distributed-osgi-an-elegant-way-to-distribute-our-software/" target="_self">Distributed OSGi</a> using SCA). <a href="http://architects.dzone.com/articles/apache-aries" target="_blank">Apache aegis</a> is an incubator projects providing most of jee &#8220;cores services&#8221; (jpa,jta,jmx,&#8230;).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2010/05/osgi-sca-the-winning-couple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2010/05/osgi-sca-the-winning-couple/</feedburner:origLink></item>
		<item>
		<title>C++0x support in modern compilers</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/FodEnYXHOGk/</link>
		<comments>http://www.albanseurat.com/2010/05/c0x-support-in-modern-compilers/#comments</comments>
		<pubDate>Mon, 10 May 2010 21:23:43 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=420</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/c0x-support-in-modern-compilers/";</script>C++0x is the standard which describe the new C++ language specification. It&#8217;s still draft. The main focus of the C++ committee is the development of the core libraries. In the language itself, the committee will introduce lambda functions (like Clojure, scala, groovy, ruby, php, &#8230;), nullptr variable (interpreted as a pointer whereas today NULL is [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/c0x-support-in-modern-compilers/";</script><p><a href="http://en.wikipedia.org/wiki/C%2B%2B0x" target="_blank">C++0x</a> is the standard which describe the new C++ language specification. It&#8217;s still draft. The main focus of the C++ committee is the development of the core libraries. In the language itself, the committee will introduce lambda functions (like Clojure, scala, groovy, ruby, php, &#8230;), nullptr variable (interpreted as a pointer whereas today NULL is a defined integer most of the times, it depends on the compiler) and few other minor changes.</p>
<p>Both Visual Studio 2010 and gcc brings support C++0x with their latest versions.  I&#8217;m very curious myself to test lambda functions. For those of you who want to try them, you will find here the 2 tables describing which features each of the compiler comply with.</p>
<p>Visual Studio 2010 : <a href="http://blogs.msdn.com/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx" target="_blank">http://blogs.msdn.com/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx</a></p>
<p>Gcc 4.5 : <a href="http://gcc.gnu.org/gcc-4.5/cxx0x_status.html" target="_blank">http://gcc.gnu.org/gcc-4.5/cxx0x_status.html</a></p>
<p>It&#8217;s obviously too early to use it for production development, but worth spend some times to test these new &#8220;features&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2010/05/c0x-support-in-modern-compilers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2010/05/c0x-support-in-modern-compilers/</feedburner:origLink></item>
		<item>
		<title>Annotation or not</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/eyBpfR_nryg/</link>
		<comments>http://www.albanseurat.com/2010/05/annotation-or-not/#comments</comments>
		<pubDate>Sat, 08 May 2010 15:38:10 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=408</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/annotation-or-not/";</script>Java, as a mainstream programming language evolves to always trying to fit the latest needs. One big leap has been introduced in Java 5, with several language changes. One of them was the possibility to do some meta-programming. Big word isn&#8217;t it? Indeed, meta-programming. In Object Oriented Language like Java, you will usually construct your [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/05/annotation-or-not/";</script><p><a href="http://www.alkpone.com/wp-content/uploads/2010/05/902463b6-35dc-4013-9ce7-21d17814b3dc.jpg" rel="lightbox[408]"><img class="aligncenter size-thumbnail wp-image-415" title="902463b6-35dc-4013-9ce7-21d17814b3dc" src="http://www.alkpone.com/wp-content/uploads/2010/05/902463b6-35dc-4013-9ce7-21d17814b3dc-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>Java, as a mainstream programming language evolves to always trying to fit the latest needs. One big leap has been introduced in Java 5, with several language changes. One of them was the possibility to do some meta-programming. Big word isn&#8217;t it? Indeed, meta-programming.</p>
<p>In Object Oriented Language like Java, you  will usually <em>construct</em> your software using object (cars, tires, engines &#8230;) and methods (move, turn, explode &#8230;) to <em>describe</em> your business into something computer will understand. Sound simple right?, in theory, this is pretty simple. Things become difficult when we need to save data, display things to a screen, connect to the network. Software engineer has invented APIs (Application Programming Interface) to help application developer to interact with 3rdParty libraries in general and display, network or system libraries in particular.</p>
<p>This is when our code start to be un-maintainable because we mix business code (cars, tires, engines) with technical <em>plumbing </em>(readfile, display, connect).</p>
<p><span id="more-408"></span>Java 5 has introduced annotations, a mechanism allowing to give information to our object without being part of it. Meta-programming. One simple example is the old &#8220;deprecated&#8221; keyword.</p>
<p>In java, you can say that a method will soon disappear, and to say that, you just need to &#8220;annotate&#8221; your method.</p>
<p>Today, many frameworks are &#8220;annotations&#8221; based, meaning you can describe your software behavior without even writting a line of code, just writting some annotations to your business code to make the &#8220;plumbing&#8221;.</p>
<p>After a while working with annotations, you will find it can become even more messy than an old <a href="http://en.wikipedia.org/wiki/Spaghetti_code" target="_blank">spagetty plate</a>. So, where are the limit, where should I use annotations, where should I not?</p>
<p>My opinion is, annotations are good for describing your code, but as soon as your annotation &#8220;does&#8221; something (@Inject, @In, @DoesSomethingWithoutTellingWhat <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), you should avoid them.</p>
<p>To give you some examples, Hibernate in java allow to annotate your model (tires, cars, engines, &#8230;) and say what IS your model and describe it. Hibernate will pickup from this meta-information and save your data into a database. At the opposite, you will find Jboss Seam where everything is made of annotations, you can actually &#8220;do&#8221; plenty of stuff using annotation, this is where i found annotations useless. It doesn&#8217;t help code readability nor performance. It&#8217;s just a lazy approach to do stuff you don&#8217;t understand.</p>
<p>Obviously people will like them because they can produce something working in 5 minutes. But what after these fives minutes, it will took more times to understand what the annotations are currently doing than reading simple line of codes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2010/05/annotation-or-not/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2010/05/annotation-or-not/</feedburner:origLink></item>
		<item>
		<title>Software Architects are just customs … officer.</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/oi8sDAMy7ws/</link>
		<comments>http://www.albanseurat.com/2010/03/software-architects-are-just-customs-officer/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:00:38 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=103</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/03/software-architects-are-just-customs-officer/";</script>Obviously, this title is a little provocative and there is a lot of shortcut . I am myself doing architecture and software development, and I have a recurrent  rhetorical question tickling in my head; where should a particular artifact be built. Indeed, a common pattern in software development is too find the right boundaries, the [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2010/03/software-architects-are-just-customs-officer/";</script><p style="text-align: left;">
<p style="text-align: left;">Obviously, this title is a little provocative and there is a lot of shortcut <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I am myself doing architecture and software development, and I have a recurrent  rhetorical question tickling in my head; where should a<br />
particular artifact be built.</p>
<p style="text-align: left;">Indeed, a common pattern in software development is too find the right boundaries, the right frontier, the right position, the right size:</p>
<ul>
<li>Where should I decompose my software into service,</li>
<li>Where this module should be separated from another,</li>
<li>Where is the frontier between meta-data (configuration, …) and data.</li>
<li>Where is particular class should settle, in the GUI part, the back-end part, …</li>
</ul>
<p><span id="more-103"></span></p>
<p>Mostly, we agree on principles, the hardest part is too put them in practice. Most the times, the remaining question is, where is the limit, the position, the size of a particular artifact (services, class, module, methods, …).</p>
<p>Manager has to deal with numbers, status, deadlines, very concrete facts. Architects has on different mindset; Principles, Patterns, more vague concepts even if they are often well described. Amusingly, one of this principles is to continue to code to not being too much in an ivory tower and forget all this numbers (sizing, deadlines, pragmatism, …).</p>
<p><a rel="attachment wp-att-109" href="http://www.alkpone.com/2010/03/software-architects-are-just-customs-officer/pton51l/"><img class="size-medium wp-image-109 aligncenter" src="http://www.alkpone.com/wp-content/uploads/2009/08/pton51l-300x300.jpg" alt="custom" width="300" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2010/03/software-architects-are-just-customs-officer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2010/03/software-architects-are-just-customs-officer/</feedburner:origLink></item>
		<item>
		<title>Single Sign-On : What does that bring ?</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/ur4fJtudJZk/</link>
		<comments>http://www.albanseurat.com/2009/10/single-sign-on-what-brings-it-to-you/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 21:17:14 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Architecture]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=349</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2009/10/single-sign-on-what-brings-it-to-you/";</script>Buzz word, we are all talking buzz word, SSO is one of them. What is Single Sign-On by the way? A brief description would say that Single Sign-on is a solution to allow an end-user to use different applications using the same credentials. To give you an example, when I use modern web sites like [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2009/10/single-sign-on-what-brings-it-to-you/";</script><p>Buzz word, we are all talking buzz word, SSO is one of them. What is Single Sign-On by the way?</p>
<p>A brief description would say that Single Sign-on is a solution to allow an end-user to use different applications using the same credentials. To give you an example, when I use modern web sites like Facebook, Dailymotion, yahoo I can use OpenID to connect to any of these applications. OpenID keeps my user information and I may connect to any of theses websites with my OpenID ID <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Another incarnation of SSO in the enterprise world is described by OASIS using SAML. Security Assertion Markup Language is an XML based standard for exchanging authentication and authorization data between security domains, that is, between an identity provider (a producer of assertions) and a service provider (a consumer of assertions).</p>
<p><span id="more-349"></span><img title="More..." src="http://www.alkpone.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<p style="text-align: center;"><a rel="attachment wp-att-357" href="http://www.albanseurat.com/?attachment_id=357"><img class="aligncenter" title="sso" src="http://www.alkpone.com/wp-content/uploads/2009/10/sso.jpg" alt="sso" width="429" height="285" /></a></p>
<p>During the design of your application, security is one of the concern which should be handled before even writing a line of code. A simple pattern to allow to interact within an SSO compliant environment is to manipulate a Cookie object which will be linked to a Session object needed to  keep information across different user request. It&#8217;s a common pattern for web design but it could be applied to any application.</p>
<p>Whether you are using a SSO being able to keep session state for you (in a Servlet environment for example), or managing your session yourself using a database for instance, the Identity server will be able to link a particular user to this session object.</p>
<p>In a web environment, you can use CAS for example to centralize your authentication and authorization (<a href="http://www.ibm.com/developerworks/web/library/wa-singlesign/" target="_blank">source</a>):</p>
<p style="text-align: center;"><img title="CAS" src="http://www.ibm.com/developerworks/web/library/wa-singlesign/figure1.gif" alt="" width="547" height="220" /></p>
<p>The following are the main steps in the authentication protocol.</p>
<ol>
<li>The user attempts to access an application.  The user is redirected to the CAS login URL. The user is presented with a username/password dialog box.</li>
<li>The user enters ID and password details and CAS attempts to authenticate the user. If authentication fails, the target application never hears about it &#8212; the user remains at the CAS server.</li>
<li>If authentication succeeds, then CAS redirects the user back to the target application, appending a parameter called a <em>ticket</em> to the URL. CAS then attempts to create an in-memory cookie called a <em>ticket-granting cookie</em>. This is done to allow for automatic re-authentication later &#8212; if present, then it indicates that the user has already successfully logged in and the user avoids having to re-enter his username and password.</li>
<li>The application then validates that this is a correct ticket and represents a valid user by calling the CAS <code>serviceValidate</code> URL and passing the ticket and service name as parameters. CAS checks that the supplied ticket is valid and is associated with the requested service. If validation is successful, CAS returns the username to the application.</li>
</ol>
<p>Using the username, you can provision your rights and roles from it. Either you can redo the same operation on every request or keeping this information within the current session. The link between the &#8220;cookie&#8221; and the session is then established. The session store the credentials necessary to access to any resources protected by security.</p>
<p>This pattern might be used within any environment. <a href="http://cwiki.apache.org/confluence/display/SHIRO/Index" target="_blank">Apache Shiro</a> (previously JSecurity) has been driven by this approach where authorization, authentication and session management are available within the same framework.</p>
<p style="text-align: center;"><img title="Shiro" src="http://cwiki.apache.org/confluence/download/attachments/122079/SecurityManagerMultiRealm.png" alt="" width="486" height="472" /></p>
<p>Adding Session Management within a security framework allow to take advantages of powerful features very easily. You can, for example, use Shiro in any environment (web or non web) where clustered or distributed sessions are desired. If sessions are federated across multiple applications, the user&#8217;s authentication state can be shared too. Log in once to any application and the others all recognize that log-in. Very simple in mind and very powerful to use, the only drawback of this framework is that is not compatible with JaaS, the java authentication and authorization standard.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2009/10/single-sign-on-what-brings-it-to-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2009/10/single-sign-on-what-brings-it-to-you/</feedburner:origLink></item>
		<item>
		<title>How-To: Mount an Ubuntu 9.04 on Debian 4 / Xen 3.2</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/iYfXKw7xdfc/</link>
		<comments>http://www.albanseurat.com/2009/09/how-to-mount-an-ubuntu-9-04-on-debian-4-xen-3-2/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 21:24:05 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=325</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2009/09/how-to-mount-an-ubuntu-9-04-on-debian-4-xen-3-2/";</script>Why choosing XEN Hypervisor for your virtualization. Two reason, on Linux, it&#8217;s the most advanced open-source virtualization system. Even if KVM is under heavy development, many features are still missing. Second reason is that Xen has a paravirtualization. The first part of the How-To would be to explain how to install Debian and Xen. I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2009/09/how-to-mount-an-ubuntu-9-04-on-debian-4-xen-3-2/";</script><p>Why choosing XEN Hypervisor for your virtualization.</p>
<p>Two reason, on Linux, it&#8217;s the most advanced <strong>open-source</strong> virtualization system. Even if KVM is under heavy development, many features are still missing. Second reason is that Xen has a <a href="http://en.wikipedia.org/wiki/Paravirtualization" target="_blank">paravirtualization</a>.</p>
<p><em>The first part of the How-To would be to explain how to install Debian and Xen. I&#8217;ve done this many times and I will probably do a How-To someday to explain how to create this first step. Let&#8217;s assume you are hosted on OVH (European Hosting Provider) and everything is already in place. <span id="more-325"></span></em></p>
<p>The first step would be to prepare the LVM to allow to expand easily your partitions.</p>
<blockquote><p>umount /dev/md2</p></blockquote>
<p><em>Let&#8217;s assume we have an RAID array and you already have well partitioned your disks (like OVH does)<br />
</em></p>
<p>We create dedicated volumes for our Ubuntu Server 9.04</p>
<blockquote><p>pvcreate /dev/md2</p>
<p>vgcreate /dev/md2 &lt;GROUP_NAME&gt;</p>
<p>lvcreate /dev/md2 &#8211;name &lt;VOLUME_NAME&gt; &#8211;size &lt;SIZE&gt; &lt;GROUP_NAME&gt;</p>
<p>mkfs -t ext3 /dev/&lt;GROUP_NAME&gt;/&lt;VOLUME_NAME&gt;</p></blockquote>
<p>This will create the dedicated LVM volume for your Virtual Machine Ubuntu 9.04.</p>
<p>Next you will install directly without reboot your operating system from debian. Do prepare your installation you need to mount the volume group within your local file system.</p>
<blockquote><p>mkdir /mnt</p>
<p>mount /dev/&lt;GROUP_NAME&gt;/&lt;VOLUME_NAME&gt; /mnt</p></blockquote>
<p>Now, we will prepare the installation scripts :</p>
<blockquote><p>http://ftp.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.15_all.deb</p>
<p>dpkg &#8211;install  debootstrap_1.0.15_all.deb</p></blockquote>
<p>Now, we have the scripts needed to install Ubuntu within a directory (our LVM partition).</p>
<blockquote><p>debootstrap &#8211;arch amd64 jaunty /mnt http://archive.ubuntu.com/ubuntu</p></blockquote>
<p>This phase will take few minutes, it will install Ubuntu 9.04. Once this done,  the next steps will be used to configure the target ubuntu system.</p>
<p>The first operation we need to do is to create a virtual terminal to allow xen to connect to this particular VM. We will modify <code>/mnt/etc/event.d/xvc0</code></p>
<blockquote><p># xvco &#8211; getty<br />
#<br />
# This service maintains a getty on xvco from the point the system is<br />
# started until it is shut down again.</p>
<p>start on stopped rc2<br />
start on stopped rc3<br />
start on stopped rc4<br />
start on stopped rc5</p>
<p>stop on runlevel 0<br />
stop on runlevel 1<br />
stop on runlevel 6</p>
<p>respawn<br />
exec /sbin/getty 38400 xvc0</p></blockquote>
<p>This will allow to start getty process to allow <code>xen console</code> to connect to this terminal. Now we need to create the terminal itself within the <code>/dev</code> filesystem.</p>
<blockquote><p>mknod /mnt/dev/xvc0 c 204 191</p></blockquote>
<p>Next step is to allow network connectivity by modifying the file <code>/mnt/etc/network/interfaces</code></p>
<blockquote><p># The loopback network interface<br />
auto lo<br />
iface lo inet loopback</p>
<p>auto eth0<br />
iface eth0 inet static<br />
address &lt;IP_DOMU&gt;<br />
netmask 255.255.255.255<br />
post-up /sbin/ip route add default dev eth0</p></blockquote>
<p>We need to setup now, the minimum file system needed to make our virtual machine working, we will modify the regular file <code>/mnt/etc/fstab</code></p>
<blockquote><p>proc            /proc           proc    defaults        0       0<br />
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1</p></blockquote>
<p>We can now configure the password for root and umount the VM filesystem</p>
<blockquote><p>chroot /mnt passwd</p>
<p>umount /mnt</p></blockquote>
<p>We are now going to create the configuration for xen to allow our system to run. We assume the xen configuration use vif-route to manage routing between Dom0 and DomU Operating System.</p>
<blockquote><p>kernel=&#8221;/boot/&lt;YOUR CURRENT KERNEL&gt;&#8221;<br />
memory = &#8220;2048&#8243;<br />
maxmem = &#8220;3072&#8243;<br />
name = &lt;DOM0_NAME&gt;<br />
vcpus=2<br />
vif = [ 'ip=XXX' ]            # replace with DomU&#8217;s IP<br />
netmask = &#8220;255.255.255.0&#8243;<br />
gateway = &#8220;XXX&#8221;                       # Dom0<br />
disk = [ 'phy:/dev/&lt;LVM_GROUP_NAME&gt;/&lt;LVM_VOLUME_NAME&gt;,hda1,w' ]<br />
root = &#8220;/dev/hda1&#8243;<br />
extra=&#8217;console=xvc0 xencons=xvc0&#8242;</p></blockquote>
<p>We can now create the VM with this configuration file set within <code>/etc/xen/&lt;VM_NAME&gt;</code></p>
<blockquote><p>xm create /etc/xen/&lt;VM_NAME&gt;</p>
<p>xm console VM_NAME</p></blockquote>
<p><em>Note: You might want to make your vm starting in the same times than the Host. In some configuration you will have an /etc/xen/auto directory where you can put your configuration file.</em></p>
<p>You can now use your Ubuntu on top of Xen 3.2 / Debian 4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2009/09/how-to-mount-an-ubuntu-9-04-on-debian-4-xen-3-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2009/09/how-to-mount-an-ubuntu-9-04-on-debian-4-xen-3-2/</feedburner:origLink></item>
		<item>
		<title>Why Mac OS X is my operating system</title>
		<link>http://feedproxy.google.com/~r/Alkpone/~3/DxZcVArUoaI/</link>
		<comments>http://www.albanseurat.com/2009/09/why-mac-os-x-is-my-operating-system/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 20:58:54 +0000</pubDate>
		<dc:creator>Alban Seurat</dc:creator>
				<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.alkpone.com/?p=178</guid>
		<description><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2009/09/why-mac-os-x-is-my-operating-system/";</script>Back in 2001, when Steve Jobs released Mac Os X, I was enthusiastic. At last, one operating system based on UNIX with all its powerful tools been available and still the best User Interface we can have. In this period, Linux was far away from Ubuntu 9.04 and Windows 2000, well, Windows, except with cygwin, [...]]]></description>
			<content:encoded><![CDATA[<script type="text/javascript">dzone_url = "http://www.albanseurat.com/2009/09/why-mac-os-x-is-my-operating-system/";</script><p>Back in 2001, when Steve Jobs released Mac Os X, I was enthusiastic.</p>
<p>At last, one operating system based on UNIX with all its powerful tools been available and still the best User Interface we can have. In this period, Linux was far away from Ubuntu 9.04 and Windows 2000, well, Windows, except with cygwin, they were no way to have a real powerful command line (ok I&#8217;m a geek <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). I remember saying to my friends that it was a good move from Apple.<span id="more-178"></span></p>
<p>Before Jobs came back to Apple, Mac OS 7/8 was a ugly OS based on the same approach than Win 3.1. That was six years after Windows  95 and the first preemptive scheduler offered to the end users.</p>
<p>In a great move, Jobs ask to its kernel developers to not been tight to any processor&#8230; 2005, Mac on Intel! Second great decision. Then, you were able to make run Windows and Linux (Ok, it was possible before, but with an very slow emulator.)</p>
<p>Apple had always had the strategy to package software with hardware altogether. Like its slogan (Think different), this approach has been partially deprecated during the 90&#8242;s where the industry focused on only its core business. Even company like Sony re-focus their activity on what is the most profitable and left aside plenty of products.  Many (and probably myself) had said during this period that Apple was dead. Keeping an exotic software (or hardware depending on people view) was too much expensive and prevent the company to sell their configuration.</p>
<p>Since, Steve jobs came back and with him, its desire to create products where all details are polished. Having this approach to bundle a complete solution (hard/software) make Apple force today.<a rel="attachment wp-att-179" href="http://www.alkpone.com/2009/09/why-mac-os-x-is-my-operating-system/macosxarch/"><img class="alignright size-medium wp-image-179" src="http://www.alkpone.com/wp-content/uploads/2009/08/macosXarch-300x224.gif" alt="macosXarch" width="300" height="224" /></a></p>
<p>To conclude, we have here a good hardware and a good software extremely well finalized (most of the times…). Therefore, the reasons why Mac OS X is my primary operating system today are quite simple : Unix tooling with a GUI focused on real user experience.</p>
<p>Maybe, Apple surf on the geek mode, maybe it&#8217;s just temporary, Windows 7 will be released soon and many people seems astonished. Still, no real Unix tooling <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and you should look at this <a href="http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars" target="_blank">link</a>. Future might be bright for Apple.</p>
<p>N.B: I took the liberty to post a french picture of Mac OS X architecture, I&#8217;d like the old style of it <img src='http://www.albanseurat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.albanseurat.com/2009/09/why-mac-os-x-is-my-operating-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.albanseurat.com/2009/09/why-mac-os-x-is-my-operating-system/</feedburner:origLink></item>
	</channel>
</rss>

