<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OCTO talks !</title>
	<atom:link href="http://blog.octo.com/en/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.octo.com/en/</link>
	<description>Le blog d&#039;OCTO Technology, cabinet d&#039;architectes en systèmes d&#039;information</description>
	<lastBuildDate>Tue, 18 Jun 2013 11:18:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Breakfast event &#8216;the Giants of the Web&#8217; in Brussels</title>
		<link>http://blog.octo.com/en/breakfast-event-the-giants-of-the-web-in-brussels/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=breakfast-event-the-giants-of-the-web-in-brussels</link>
		<comments>http://blog.octo.com/en/breakfast-event-the-giants-of-the-web-in-brussels/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 13:42:03 +0000</pubDate>
		<dc:creator>Hanneke De Visser</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=41055</guid>
		<description><![CDATA[UNLOCK THE SECRETS OF THE GIANTS OF THE WEB 10 tips for improving your business In the US and everywhere else, the Giants of the Web are reinventing the way IT is done. These revolutionaries are Amazon, Facebook, Google, Netflix, and LinkedIn, to name but a few. OCTO is releasing Les Géants du Web, a new book [...]<div class='yarpp-related-rss'>

Suggestion d'articles :<ol>
<li><a href='http://blog.octo.com/en/event-sourcing-nosql/' rel='bookmark' title='Event Sourcing &amp; noSQL'>Event Sourcing &#038; noSQL</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;">UNLOCK THE SECRETS OF THE GIANTS OF THE WEB</p>
<p style="text-align: center;">10 tips for improving your business</p>
<p><a href="http://blog.octo.com/wp-content/uploads/2013/04/3-blog-en-1.png"><img class="size-medium wp-image-41056 aligncenter" alt="3-blog-en (1)" src="http://blog.octo.com/wp-content/uploads/2013/04/3-blog-en-1-300x129.png" width="300" height="129" /></a></p>
<h2></h2>
<div id="pitch">
<p><strong></strong>In the US and everywhere else, the Giants of the Web are reinventing the way IT is done.</p>
<p>These revolutionaries are <strong>Amazon, Facebook, Google, Netflix, and LinkedIn</strong>, to name but a few.</p>
<p>OCTO is releasing <a href="http://www.geantsduweb.com/" target="_blank" rel="nofollow"><em>L</em></a><a href="http://www.geantsduweb.com/" target="_blank" rel="nofollow"><em>es Géants du Web</em></a>, a new book explaining what has changed in the world of IT.</p>
<p><a title="Join us " href="http://www.octo.com/en/events/12">Join us</a> at our breakfast event where Ludovic Cinquin, VP of OCTO Technology and co-author of <em>Les Géants du Web</em>, will speak about the innovative practices that make the Giants of the Web so successful. Come and share in our passion!<span id="more-41055"></span></p>
<p>To give you a brief insight, we will talk about how these Giants:</p>
<ul>
<li>Reduce their Time To Market by using practices like <strong><em>Lean Startup</em></strong> and<strong><em>Continuous Deployment</em></strong>,</li>
<li>Address ever-growing challenges relating to increases in traffic by adopting <strong><em>NOSQL</em></strong> and <strong><em>Commodity Hardware</em></strong> technologies, and</li>
<li>Maintain excellence and high-quality by abiding by <strong>Pizza Team</strong>principles and by keeping their teams <strong>Feature-oriented</strong> while never forgetting the importance of measurement.</li>
</ul>
<p>This free event is geared toward anyone interested in drawing inspiration from the Giants’ business culture: <strong>marketing teams, project managers, architects, managers, IT directors,</strong> and <strong>geeks </strong>of all creeds.</p>
<p>Please note that registration is required!</p>
<h3><span style="font-size: 1.17em;">Schedule</span></h3>
<p><strong>8:15AM:</strong></p>
<p><strong></strong>Reception</p>
<p><strong><strong>8:45AM</strong> - 10:00AM:</strong></p>
<p>The Top Ten Business Practices of the Giants of the Web – A presentation</p>
<p><strong>10:00AM – 10:30AM: </strong></p>
<p>Wrap-up &#8211; Q&amp;A</p>
<p><strong><span style="font-size: 1.17em;">Location:</span></strong></p>
<div>Hotel Le Méridien<br />
Carrefour de l&#8217;Europe<br />
Brussels 1000</div>
<div>Belgium<br />
(next to Brussels Central Station)</div>
<h3>Speaker<br />
<strong>Ludovic Cinquin </strong>- CEO France</h3>
</div>
<p>The seminar will be held in French with support material in English.</p>
<p style="text-align: center;"><a title="Please click here to register" href="http://www.octo.com/en/events/12?utm_source=pdj20130528&amp;utm_medium=email&amp;utm_term=%7BEmail%7D&amp;utm_campaign=pdj20130528">Click here to register</a></p>
 <img src="http://blog.octo.com/?feed-stats-post-id=41055" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Suggestion d'articles :</p><ol>
<li><a href='http://blog.octo.com/en/event-sourcing-nosql/' rel='bookmark' title='Event Sourcing &amp; noSQL'>Event Sourcing &#038; noSQL</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/breakfast-event-the-giants-of-the-web-in-brussels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OCTO will organize a workshop &#8220;User eXperience&#8221; with Adaptive Path &#8211; April  10th, 11th and 12th</title>
		<link>http://blog.octo.com/en/octo-will-organize-a-workshop-user-experience-with-adaptive-path-april-10th-11th-and-12th/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=octo-will-organize-a-workshop-user-experience-with-adaptive-path-april-10th-11th-and-12th</link>
		<comments>http://blog.octo.com/en/octo-will-organize-a-workshop-user-experience-with-adaptive-path-april-10th-11th-and-12th/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 11:15:03 +0000</pubDate>
		<dc:creator>Nelly Grellier</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=39367</guid>
		<description><![CDATA[&#160; Since 2007, OCTO intervenes on problems involving User eXperience as a key element in helping its clients achieve innovative products and applications, useful and usable in tune with the complexity of their business challenges. After our first meeting during USI 2012, we are delighted to welcome the Adaptive Path team for a workshop which [...]<div class='yarpp-related-rss'>

Suggestion d'articles :<ol>
<li><a href='http://blog.octo.com/en/jugl-february-code-quality/' rel='bookmark' title='ANNOUNCEMENT: Java User Group in Lausanne on February the 10th'>ANNOUNCEMENT: Java User Group in Lausanne on February the 10th</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.octo.com/wp-content/uploads/2013/02/03-format-BLOG1.png"><img class="aligncenter size-full wp-image-39368" title="03---format-BLOG" src="http://blog.octo.com/wp-content/uploads/2013/02/03-format-BLOG1.png" alt="" width="485" height="209" /></a></p>
<p>&nbsp;</p>
<p>Since 2007, OCTO intervenes on problems involving <strong>User eXperience</strong> as a key element in helping its clients <strong>achieve innovative products and applications</strong>, useful and usable in tune with the complexity of their business challenges. After our first meeting during USI 2012, we are delighted to welcome the Adaptive Path team for a workshop which will walk you through UX from strategy to practice, promising intesity despite a playful approach.</p>
<p><strong> Jesse James Garrett&#8217;s team</strong>, <strong>Adaptive Path</strong>, will give for this workshop UX Essentials (<a href="http://bit.ly/VZDBUD"> Programm details &#8211; pdf version</a>) entirely dedicated to UX, provided<strong> for the first time in France on April the 10th, 11th and 12th !</strong></p>
<p>&nbsp;</p>
<p style="text-align: center;">« <em>After my keynote at USI, I looked forward to working with OCTO again. I am happy we have this opportunity to work together to bring UX thinking to France!</em> »</p>
<p style="text-align: center;"><strong>Jesse James Garrett</strong>, Chief Creative Officer, <strong>Adaptive Path.</strong></p>
<p>Each day includes fun, hands-on activities designed to build skills and provide a framework that participants can immediately put into practice.</p>
<p>This workshop is led by Adaptive Path practitioners and will examine the key elements that contribute to creating great experiences.</p>
<p>Participants will spend a day immersed in <strong>strategy</strong>, followed by a day focussed on <strong>research</strong>, then wrapping it all up with a day devoted to putting those insights into action.</p>
<p>&nbsp;</p>
<p style="text-align: center;"><a href="http://www.octo.com/en/events/7-experience-utilisateur-enjeux-et-leviers"><strong>I want to subscribe to the UX Essentials </strong><strong>worskhop </strong></a></p>
 <img src="http://blog.octo.com/?feed-stats-post-id=39367" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Suggestion d'articles :</p><ol>
<li><a href='http://blog.octo.com/en/jugl-february-code-quality/' rel='bookmark' title='ANNOUNCEMENT: Java User Group in Lausanne on February the 10th'>ANNOUNCEMENT: Java User Group in Lausanne on February the 10th</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/octo-will-organize-a-workshop-user-experience-with-adaptive-path-april-10th-11th-and-12th/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Lint checks to Android Maven builds</title>
		<link>http://blog.octo.com/en/add-lint-checks-to-android-maven-builds/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=add-lint-checks-to-android-maven-builds</link>
		<comments>http://blog.octo.com/en/add-lint-checks-to-android-maven-builds/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 07:00:36 +0000</pubDate>
		<dc:creator>Stéphane Nicolas</dc:creator>
				<category><![CDATA[Project support]]></category>
		<category><![CDATA[analysis]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[lint]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[quality]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=38042</guid>
		<description><![CDATA[Android offers a great tool to leverage the quality of apps : Lint. Lint can check missing translations, unused resources and other common mistakes in Android programming. Nevertheless, up to now it was not possible to use Lint inside automated builds (i.e. on a Continuous Integration server like Jenkins). This situation just changed with release [...]<div class='yarpp-related-rss yarpp-related-none'>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Android offers a great tool to leverage the quality of apps : <a href="http://tools.android.com/tips/lint">Lint</a>. Lint can check missing translations, unused resources and other common mistakes in Android programming. </p>
<p>Nevertheless, up to now it was not possible to use Lint inside automated builds (i.e. on a Continuous Integration server like Jenkins). This situation just changed with release 3.5.1 of the <a href="http://code.google.com/p/maven-android-plugin/">Android Maven Plugin</a>.<br />
<span id="more-38042"></span></p>
<p>OCTO Contributed to release 3.5.1+ of Android Maven Plugin to offer integration of Lint as a simple maven goal : <tt>android:lint</tt>. The complete documentation of this goal can be found on <a href="http://maven-android-plugin-m2site.googlecode.com/svn/lint-mojo.html">the official documentation of the Maven Plugin goals</a>. This articles provides a rapid overview of the <tt>android:lint</tt> goal&#8217;s usage and parameters.</p>
<h1>Create a new Android project and its maven configuration </h1>
<p><em>If you know how to create an Android project using Maven, or already have such a project, you can go directly to <a href="#next">next section</a>.</em></p>
<p>Let&#8217;s start a new Android project using <a href="http://stand.spree.de/wiki_details_maven_archetypes">acquinet maven archetypes</a>. In a terminal, go to your working directory and type the following command :<br/></p>

<div class="wp_codebox"><table><tr id="p380427"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p38042code7"><pre class="bash" style="font-family:monospace;">mvn archetype:generate \
  <span style="color: #660033;">-DarchetypeArtifactId</span>=android-with-test \
  <span style="color: #660033;">-DarchetypeGroupId</span>=de.akquinet.android.archetypes \
  <span style="color: #660033;">-DarchetypeVersion</span>=1.0.9 \
  <span style="color: #660033;">-DgroupId</span>=com.foo.bar \
  <span style="color: #660033;">-DartifactId</span>=my-android-project \
  <span style="color: #660033;">-Dpackage</span>=com.foo.bar.android</pre></td></tr></table></div>

<p>In Eclipse, right-click in you package explorer view and select &#8220;Import&#8221;  to import the project using the wizard &#8220;Import existing maven projects&#8221; :<br />
<a href="http://blog.octo.com/wp-content/uploads/2013/01/screenshot-0.png"><img src="http://blog.octo.com/wp-content/uploads/2013/01/screenshot-0-300x201.png" alt="" title="Importing android maven projects in Eclipse" width="300" height="201" class="aligncenter size-medium wp-image-38047" /></a></p>
<p>Using the latest version of Eclipse (Juno), you will have to hack the imported projects to build them inside Eclipse : </p>
<p><a href="http://blog.octo.com/wp-content/uploads/2013/01/screenshot-1.png"><img src="http://blog.octo.com/wp-content/uploads/2013/01/screenshot-1-300x207.png" alt="" title="Remove the test folder from project&#039;s source path in Eclipse" width="300" height="207" class="aligncenter size-medium wp-image-38048" /></a></p>
<ul>
<li>Right-click on the first project</li>
<li>go to properties >> Java Build Path >> Sources tab</li>
<li>Remove the <tt>src/test/java</tt> folder</li>
<li>Apply the same procedure to the test project</li>
</ul>
<p>An alternative, for now, is also to create a <tt>src/test/java folder</tt> in your project. As you can see, everything got <a href="http://blog.octo.com/developper-des-applications-android-avec-maven/">much simpler than 2 years ago</a>.</p>
<p>You can now go back to your terminal and build the project (both the app and its tests) using maven : <br/></p>

<div class="wp_codebox"><table><tr id="p380428"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p38042code8"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;</span>mvn clean <span style="color: #c20cb9; font-weight: bold;">install</span>
...
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Reactor Summary:
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> 
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> my-android-project - Parent ....................... SUCCESS <span style="color: #7a0874; font-weight: bold;">&#91;</span>0.143s<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> my-android-project - Application .................. SUCCESS <span style="color: #7a0874; font-weight: bold;">&#91;</span>3.228s<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> my-android-project-it - Integration tests ......... SUCCESS <span style="color: #7a0874; font-weight: bold;">&#91;</span>7.966s<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> BUILD SUCCESS
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Total <span style="color: #000000; font-weight: bold;">time</span>: 12.234s
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Finished at: Mon Jan 07 <span style="color: #000000;">14</span>:<span style="color: #000000;">57</span>:<span style="color: #000000;">48</span> CET <span style="color: #000000;">2013</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Final Memory: 22M<span style="color: #000000; font-weight: bold;">/</span>206M
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">------------------------------------------------------------------------</span></pre></td></tr></table></div>

<p>If you reach that point, then everything is setup properly and you now have a working Android Maven project that will also build inside Eclipse.</p>
<h1 id="next">Add Lint checks to your Maven build</h1>
<p>First, check that you are using the right version of the Android Maven Plugin. This plugin is managed by the parent pom of your project. It should look like : <br/></p>

<div class="wp_codebox"><table><tr id="p380429"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code" id="p38042code9"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
....
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginRepositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>oss.sonatype.org-jayway-snapshots<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Jayway OpenSource SNAPSHOTs on Sonatype.org<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://oss.sonatype.org/content/repositories/jayway-snapshots/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginRepositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginManagement<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                ....
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.jayway.maven.plugins.android.generation2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>android-maven-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3.5.1-SNAPSHOT<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                ....
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginManagement<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>When you are sure to use the right version, you can now configure the Android Maven Plugin in your application&#8217;s project pom.xml file : <br/></p>

<div class="wp_codebox"><table><tr id="p3804210"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code" id="p38042code10"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        ...
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.jayway.maven.plugins.android.generation2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>android-maven-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>lint<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>lint<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>install<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;sdk<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;platform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>17<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/platform<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/sdk<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;lint<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;skip<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/skip<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;failOnError<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/failOnError<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/lint<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;undeployBeforeDeploy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/undeployBeforeDeploy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;extensions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/extensions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        ...
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>You will now see that Lint is executed during the install phase of a maven for your project. These 3 lines should be logged during your maven build : <br/></p>

<div class="wp_codebox"><table><tr id="p3804211"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p38042code11"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&gt;</span> mvn clean <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-i</span> Lint
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Performing lint analysis.
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Writing Lint XML report <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>path to your project<span style="color: #000000; font-weight: bold;">&gt;/</span>my-android-project<span style="color: #000000; font-weight: bold;">/</span>my-android-project<span style="color: #000000; font-weight: bold;">/</span>target<span style="color: #000000; font-weight: bold;">/</span>lint<span style="color: #000000; font-weight: bold;">/</span>lint.xml
<span style="color: #7a0874; font-weight: bold;">&#91;</span>INFO<span style="color: #7a0874; font-weight: bold;">&#93;</span> Lint analysis completed successfully.</pre></td></tr></table></div>

<h1>Customizing Lint usage via the Android Maven plugin</h1>
<p>The new <tt>android:lint</tt> goal of the Android Maven Plugin supports quite a lot of features, most of them are directly related to the lint program (use <tt>lint --help</tt> to display all lint options).</p>
<p>You can use either command line parameters in the form of <tt>android.lint.*</tt> or, inside the <tt>&lt;lint&gt;&lt;/lint&gt;</tt> section of your pom.xml file you can use the following options : </p>
<h2> Controlling Lint invocation </h2>
<dl>
<dt>skip=true|false </dt>
<dd> whether or not to execute lint. False by default.</dd>
<dt>failOnError=true|false</dt>
<dd> if true, any lint error (not warnings) will stop the build. Defaults to false. This flag is useful for Continuous Integration builds as it allows you to enforce lint usage. </dd>
</dl>
<h2> Controlling Lint granularity </h2>
<dl>
<dt>ignoreWarnings=true|false</dt>
<dd> if true, don&#8217;t report lint warnings, only errors are reported. False by default.</dd>
<dt>warningsAsErrors=true|false</dt>
<dd> if true, all lint warnings will be treated as errors. Defaults to false.</dd>
</dl>
<h2> Controlling Lint output </h2>
<dl>
<dt>enableHtml=true|false </dt>
<dd> if true, lint will write a HTML report in the target/lint folder. False by default.</dd>
<dt>htmlOutputPath=&lt;path&gt; </dt>
<dd> path of the HTML report, only taken into account if previous property is set to true.</dd>
<dt>enableXml=true|false </dt>
<dd> if true, lint will write a XML report in the target/lint folder. True by default.</dd>
<dt>xmlOutputPath=&lt;path&gt; </dt>
<dd> path of the XML report, only taken into account if previous property is set to true.</dd>
</dl>
<h2> Controlling Lint input </h2>
<p>As usual : using lint, you can use a file named <tt>lint.xml</tt> at the root of your project to define the different level of severity of lint issues. This file will also be taken into account by the Android Maven Plugin.</p>
<dl>
<dt>enableSources=true|false </dt>
<dd> if true, lint will check the project&#8217;s source folder. True by default.</dd>
<dt>sources=&lt;path&gt; </dt>
<dd> path of the folder of the sources folder of your project. Defaults to <tt>${project.build.sources}</tt></dd>
<dt>enableClasspath=true|false </dt>
<dd> if true, lint will check the byte code of your project&#8217;s classes. False by default.</dd>
<dt>classpath=&lt;path&gt; </dt>
<dd> path of the folder of the classes of your project. Defaults to <tt>${project.build.outputDirectory}</tt></dd>
<dt>enableLibraries=&lt;path&gt; </dt>
<dd> if true, lint will check the byte code of your project&#8217;s dependencies. False by default.</dd>
<dt>libraries=&lt;path&gt; </dt>
<dd> path of the jars of the libraries of your project. Defaults to all jars of dependencies with a scope that is not &#8220;provided&#8221;. </tt></dd>
</dl>
<h1>Lint goal and maven phases</h1>
<p>We must issue a warning here : the last two properties of the lint configuration are disabled by default. Using them is sensitive as they can have side-effects : both classes and libraries of a maven project are only present during certain phases of a maven build. For the classes, your project must have been compiled (during the compile phase). For the libraries, the dependencies' artifacts must have been resolved by maven (during the <a href="http://maven.apache.org/plugins/maven-dependency-plugin/resolve-mojo.html">generate-sources</a> phase of maven).</p>
<p>For this reason, we strongly encourage you to use the <tt>android:lint</tt> goal during the install phase of your application : <br/></p>

<div class="wp_codebox"><table><tr id="p3804212"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code" id="p38042code12"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        ...
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.jayway.maven.plugins.android.generation2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>android-maven-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>lint<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>lint<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>install<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/phase<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #808080; font-style: italic;">&lt;!-- your lint config here--&gt;</span>              
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        ...
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<h1>Conclusion</h1>
<p>The new <tt>android:lint</tt> goal of the Android Maven plugin will let you add quality checks to your Android projects. You can either use it on the command line or inside an automated built on a continuous integration server. You can even make your build fail if you have any lint error or any lint warning. We hope Android developers will welcome this tool and that lint checks will be more and more widespread in the Android community.</p>
<p>At OCTO, we are proud to have contributed to the Android Maven Plugin. We think that this new maven goal is a good way to enhance the robustness of our applications. However, something is still missing according to us : a lint plugin for <a href="http://www.sonarsource.org/">Sonar</a> in order to visualize all lint issues directly inside our Sonar dashboards. That's our next R&#038;D target, anyone interested in coordinating their efforts can just leave a message below this post.</p>
 <img src="http://blog.octo.com/?feed-stats-post-id=38042" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss yarpp-related-none'>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/add-lint-checks-to-android-maven-builds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaker at USI 2013? Now possible thanks to the call for paper!</title>
		<link>http://blog.octo.com/en/speaker-at-usi-2013-now-possible-thanks-to-the-call-for-paper/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=speaker-at-usi-2013-now-possible-thanks-to-the-call-for-paper</link>
		<comments>http://blog.octo.com/en/speaker-at-usi-2013-now-possible-thanks-to-the-call-for-paper/#comments</comments>
		<pubDate>Fri, 01 Feb 2013 14:56:18 +0000</pubDate>
		<dc:creator>Céline Pageaux</dc:creator>
				<category><![CDATA[Consulting chronicles]]></category>
		<category><![CDATA[call for paper]]></category>
		<category><![CDATA[USI2013]]></category>
		<category><![CDATA[USIEvents]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=38857</guid>
		<description><![CDATA[Last year we created a system called « call for paper », which allows anyone to propose their session and be part of the official program! Its success was made apparent through over 50 proposed sessions and nearly 20 callbacks! Once again this year, we invite you to propose your session, with the deadline set [...]<div class='yarpp-related-rss yarpp-related-none'>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Last year we created a system called « call for paper », which allows anyone to propose their session and be part of the official program! Its success was made apparent through over 50 proposed sessions and nearly 20 callbacks!</p>
<p style="text-align: center;"><a href="http://blog.octo.com/wp-content/uploads/2013/02/Sans-png.png"><img class="alignnone size-full wp-image-38873" title="Sans png" src="http://blog.octo.com/wp-content/uploads/2013/02/Sans-png.png" alt="" width="113" height="118" /></a></p>
<p style="text-align: left;">Once again this year, we invite you to propose your session, with the deadline set on the <strong>4th of March, 2013</strong>:</p>
<ul>
<li>Do you have a <strong>biography</strong>, a session <strong>title</strong> and <strong>resume</strong>, and a high-definition <strong>picture</strong>?</li>
<li>Are you an opinion leader, a referent on one or more IT subjects, a super geek, a manager, or part of IS department?</li>
</ul>
<p>Then you&#8217;re ready! We need your contibutions, your ideas, and your knowledge to make the 5th yearly USI an event as great as the reputation that proceeds it. As many as 700 guests are expected this year!</p>
<p>The USI team will determine, after having studied your proposition, the length of your session (<strong>20 or 40 minutes</strong>). For a callback, the first criteria will be the <strong>quality of the proposed session&#8217;s resume</strong> (depth and form). Thus we count on you to send your best work, one that will astound members of the jury.<br />
The USI team will study every proposition and select those that seem the most interesting. You may be invited to come present your session beforehand, and the <strong>final list</strong> of accepted candidates will be announced at the <strong>end of March 2013</strong>.</p>
<p>You can also <strong>see the list of proposed sessions</strong> online, and vote for the ones that you most want to see at USI 2013. The USI site has everything you need to post sessions on popular social networks, allowing you to easily share your session with those around you. So don&#8217;t hesitate!</p>
<p style="text-align: center;"><a href="http://www.usievents.com/en/call_for_paper_explained"><img class="alignnone size-medium wp-image-38859 aligncenter" title="Sans titre" src="http://blog.octo.com/wp-content/uploads/2013/02/Sans-titre-300x92.png" alt="" width="300" height="92" /></a></p>
<p style="text-align: center;"><a href="http://www.usievents.com/en/call_for_paper_explained">Click here to submit a session for USI</a></p>
<p style="text-align: center;">A glass to your candidacy then, and thank you!<br />
The USI team</p>
 <img src="http://blog.octo.com/?feed-stats-post-id=38857" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss yarpp-related-none'>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/speaker-at-usi-2013-now-possible-thanks-to-the-call-for-paper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build your own “cloud machine” at home</title>
		<link>http://blog.octo.com/en/build-your-own-cloud-machine-at-home/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-your-own-cloud-machine-at-home</link>
		<comments>http://blog.octo.com/en/build-your-own-cloud-machine-at-home/#comments</comments>
		<pubDate>Mon, 28 Jan 2013 17:24:53 +0000</pubDate>
		<dc:creator>Arnaud-François FAUSSE</dc:creator>
				<category><![CDATA[Infrastructure and operations]]></category>
		<category><![CDATA[cloud virtualization appliance]]></category>
		<category><![CDATA[home made]]></category>
		<category><![CDATA[motherboard]]></category>
		<category><![CDATA[PSU]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=38661</guid>
		<description><![CDATA[You are reading this article, so it’s likely that you are a geek who loves to test software products and make complex infrastructure mocks like an OpenStack cloud. Seeing four or five desktops stacked in your living room doesn’t make your wife happy. Right? Your dream is to have a very monolithic machine made of [...]<div class='yarpp-related-rss'>

Suggestion d'articles :<ol>
<li><a href='http://blog.octo.com/en/hybride-cloud-and-amazon-based-iaas/' rel='bookmark' title='Hybrid Cloud and Amazon based IaaS &#8211; 1'>Hybrid Cloud and Amazon based IaaS &#8211; 1</a></li>
<li><a href='http://blog.octo.com/en/hybrid-cloud-and-amazon-based-iaas-2/' rel='bookmark' title='Hybrid Cloud and Amazon based IaaS &#8211; 2'>Hybrid Cloud and Amazon based IaaS &#8211; 2</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>You are reading this article, so it’s likely that you are a geek who loves to test software products and make complex infrastructure mocks like an <a title="OpenStack mockup" href="https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/blob/master/OpenStack_Folsom_Install_Guide_WebVersion.rst" target="_blank">OpenStack</a> cloud.<br />
Seeing four or five desktops stacked in your living room doesn’t make your wife happy. Right? Your dream is to have a very monolithic machine made of several motherboards, switch, disks, power supply, DVD reader and network cards. It was also my dream, and once I decided to turn it to reality. In fact it was a must to study cloud technologies in good conditions. OK, it took me some time and money but it was a good investment! Let’s have a look at my “cloud machine:</p>
<p><span id="more-38661"></span></p>
<p><a href="http://blog.octo.com/wp-content/uploads/2013/01/AFFCloud-Front.jpg"><img class="size-medium wp-image-38666 alignleft" style="margin: 5px;" title="AFFCloud-Front" src="http://blog.octo.com/wp-content/uploads/2013/01/AFFCloud-Front-225x300.jpg" alt="" width="225" height="300" /></a><a href="http://blog.octo.com/wp-content/uploads/2013/01/AFFCloud-Left.jpg"><img class="wp-image-38667 alignleft" style="margin: 5px;" title="AFFCloud-Left" src="http://blog.octo.com/wp-content/uploads/2013/01/AFFCloud-Left-225x300.jpg" alt="" width="225" height="300" /></a><a href="http://blog.octo.com/wp-content/uploads/2013/01/AFFCloud-Rear.jpg"><img class="size-medium wp-image-38668 alignleft" style="margin: 5px;" title="AFFCloud-Rear" src="http://blog.octo.com/wp-content/uploads/2013/01/AFFCloud-Rear-225x300.jpg" alt="" width="225" height="300" /></a></p>
<p>&nbsp;</p>
<h1></h1>
<h1></h1>
<h1></h1>
<h1></h1>
<h1></h1>
<h1></h1>
<h1></h1>
<h1></h1>
<h1>Key features of the “cloud machine”</h1>
<p>This machine is made of:</p>
<ul>
<li>3 motherboards, 2 with virtualization capability</li>
<li>1 managed switch</li>
<li>1 backplane with 4 disks (3 HD, 1 SSD)</li>
<li>1 DVD reader/burner</li>
<li>1 power supply</li>
<li>1 power supply control board</li>
<li>Plenty of cables!</li>
</ul>
<p>The architecture is as follows:</p>
<p style="text-align: center;"><a href="http://blog.octo.com/wp-content/uploads/2013/01/Capture-d’écran-2013-01-28-à-17.29.47.png"><img class="aligncenter  wp-image-38678" title="AFFCloud-ArchiTech" src="http://blog.octo.com/wp-content/uploads/2013/01/Capture-d’écran-2013-01-28-à-17.29.47-300x217.png" alt="" width="300" height="217" /></a></p>
<p>&nbsp;</p>
<h1>Choice of motherboards</h1>
<p>Since my objective was to study cloud/virtualization and especially KVM, at least 2 CPU needed to support virtualization instructions. I was also looking for a small form factor because my home is rather small! I wanted all hardware Linux compatible and finally, my budget was also limited.</p>
<p>I chose to restrict my search to commodity hardware and to miniITX form factor. Most of miniITX available cards are based on Atom; so they don’t support virtualization instructions. I was disappointed by the lack of Atom Z series in commodity boards. But AMD saved me, by releasing the APU series. Finally, I chose the <a title="ASROCK Motherboard" href="http://www.asrock.com/mb/AMD/E350M1/index.fr.asp" target="_blank">ASROCK E350M1</a>.</p>
<p>This card provides very good value for the price, is simple to install and manage. But the key issue of commodity hardware is the lack of management functions: no IPMI, no ability to reset through the network, no SMB access… Then, I decided to use two ASROCK E350M1 as “compute” nodes, and to find a board with remote management capabilities as a “controller node”. Looking for such motherboard I chose the Supermicro <a title="SuperMicro" href="http://www.supermicro.nl/products/motherboard/ATOM/ICH9/X7SPA.cfm?typ=H&amp;IPMI=Y" target="_blank">X7SPA-HF</a>. This board is rather expensive but has some interesting capabilities: IPMI onboard, access to SMB, 2 Ethernet ports, passive cooling…</p>
<h1>Choice of the network cards</h1>
<p>Transferring gigabytes of disk images on the network requires serious bandwidth. I could not afford 10Gbps cards for obvious price reasons, so I chose the <a title="Intel PRO/1000CT" href="http://www.intel.com/content/www/us/en/network-adapters/gigabit-network-adapters/gigabit-ct-desktop-adapter-brief.html" target="_blank">Intel PRO/1000 CT</a> which supports jumbo frames (useful for heavy payload) and some other interesting features. It is affordable and close to what is found in mid range servers environments.</p>
<p>Additionally their form factor is compatible with compact integration.</p>
<h1>Choice of the switch</h1>
<p>Ability to make VLANs was a primary requirement. But the price was a key issue since most managed switches are made for large installations and not for SoHo applications. I chose the <a title="GS108T" href="http://www.netgear.com/business/products/switches/prosafe-plus-switches/GS108E.aspx#two" target="_blank">Netgear ProSafe GS108T</a> which offers great value for the price and allows to prototype most of usual network cloud configurations (VLAN, DHCP snooping…).</p>
<h1>Choice of RAM and disks</h1>
<p>I chose common low cost hardware that one finds on good shops on the Internet. Compute nodes can bear up to 8 GO.</p>
<p>The disk backplane, an <a title="ICYBOX backplane" href="http://www.raidsonic.de/en/products/backplanes.php?we_objectID=6804" target="_blank">ICY Box IB-2222SSK</a>, is a very important device for the mechanical integration. However, I had some compatibility problems with the disks and the ICY Box. First, the mechanical aspect of the device (difficult to insert the disk in one slot) and second, Samsung disks that could not start rotating visibly for obscure power supply reasons. I managed to make it working with Hitatchi disks and I am finally pleased with this configuration. I advice to test some alternative solutions (not easy to find on the market however…). Nothing to say about the DVD reader/burner, except it’s a SATA interfaced device.</p>
<h1>Choice of power supply and control</h1>
<p>This is the most custom made device of the Cloud machine, as well as the mechanical structure. In fact, PC power supplies are not designed to drive more than one motherboard.</p>
<p>To catch the design stakes, you have to know how an ATX power supply is controlled. Look at <a title="ATX spec" href="http://en.wikipedia.org/wiki/ATX" target="_blank">ATX article on Wikipedia</a>  and ATX12V PSDG2.01.pdf (search on Google).</p>
<p>There are two main issues:</p>
<ul>
<li>Make sure that Power on sequence (power and reset) is correct for the 3 motherboards using only one power on button;</li>
<li>Shutdown of power supply shall be effective only if the 3 motherboards are in shutdown state.</li>
</ul>
<p>I intended to design a control board to make all these controls. In fact, I only did a first version, very simple (based on TTL gates) which insures the correct power on sequence. But shutdown is done only from the Supermicro board. At the moment this design is sufficient, but I plan to make a control board based on <a title="Microchip" href="http://www.microchip.com" target="_blank">Microchip PIC micro-controller</a> that will implement all necessary logic.</p>
<p>The power supply is a 650W EPS, but a low cost 450W ATX would be sufficient.</p>
<h1>Mechanical design and structure</h1>
<p>Stacking motherboard is a pattern that makes me dreaming ;-) and I chose to reproduce such <a title="Stacking motherboards" href="http://www.datacenterdynamics.com/focus/archive/2011/04/facebook-google-yahoo-%E2%80%93-pue-trifecta-face" target="_blank">arrangement</a>.</p>
<p>Overall dimensions of the cloud machine are 23cm x 26cm x 52 cm.</p>
<p>I chose to put the power supply on the bottom part of the structure for several reasons:</p>
<ul>
<li>The PSU fan blows up, pushing warm air in its upwards natural flow;</li>
<li>The center of gravity is close to the bottom of the structure.</li>
</ul>
<p>The drawback of this design is that dust falls into the PSU when it’s turned off.</p>
<p>Electric ground is connected to the whole structure through the PSU screwing.</p>
<p>All parts of the “Cloud machine” are in aluminum except steel thread bars that support the motherboards. I have a welding torch and <a title="Aluminum solder" href="http://www.aladdin3in1.com/products/solder/low-melt.php" target="_blank">aluminum solder</a> which is fairly easy to use. A simple metal saw, a basic drill and some metal files make you able to do it as I did.</p>
<h1>Further improvements</h1>
<p>The next version of the control board will implement :</p>
<ul>
<li>Enhanced power supply control (common synchronized switch off);</li>
<li>The ability to reset the ASROCK motherboards from the Supermicro motherboard (using USB port and a USB microcontroller on the control board).</li>
</ul>
<h1>Conclusion</h1>
<p>It took me several week-ends to achieve this machine and I am really pleased to use it for my new software mocks. I spent around 2000 € in total. I had almost a heart attack when I saw that ASROCK motherboards didn’t support virtualization. But after BIOS update, they did as promised!!</p>
<p>The next blog article will present how this Cloud machine is installed with Linux and operated using PXE and SSH.</p>
<p>Have fun making your custom machines!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
 <img src="http://blog.octo.com/?feed-stats-post-id=38661" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Suggestion d'articles :</p><ol>
<li><a href='http://blog.octo.com/en/hybride-cloud-and-amazon-based-iaas/' rel='bookmark' title='Hybrid Cloud and Amazon based IaaS &#8211; 1'>Hybrid Cloud and Amazon based IaaS &#8211; 1</a></li>
<li><a href='http://blog.octo.com/en/hybrid-cloud-and-amazon-based-iaas-2/' rel='bookmark' title='Hybrid Cloud and Amazon based IaaS &#8211; 2'>Hybrid Cloud and Amazon based IaaS &#8211; 2</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/build-your-own-cloud-machine-at-home/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hadoop in my IT department: benchmark your cluster</title>
		<link>http://blog.octo.com/en/hadoop-in-my-it-department-benchmark-your-cluster/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hadoop-in-my-it-department-benchmark-your-cluster</link>
		<comments>http://blog.octo.com/en/hadoop-in-my-it-department-benchmark-your-cluster/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 08:00:30 +0000</pubDate>
		<dc:creator>Rémy SAISSY</dc:creator>
				<category><![CDATA[General -- DO NOT USE @en]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=37958</guid>
		<description><![CDATA[The stress test is a very important step when you go live. Good stress tests help us to: ensure that the software meets its performances requirements ensure that the service will deliver a fast response time even under a heavy load get to now the scalability limits which in turn is useful to plan the [...]<div class='yarpp-related-rss'>

Suggestion d'articles :<ol>
<li><a href='http://blog.octo.com/en/hadoop-in-my-it-department-how-to-plan-a-cluster/' rel='bookmark' title='Hadoop in my IT department: How to plan a cluster?'>Hadoop in my IT department: How to plan a cluster?</a></li>
<li><a href='http://blog.octo.com/en/using-hadoop-for-value-at-risk-calculation-part-5/' rel='bookmark' title='Using Hadoop for Value At Risk calculation Part 5'>Using Hadoop for Value At Risk calculation Part 5</a></li>
<li><a href='http://blog.octo.com/en/using-hadoop-for-value-at-risk-calculation-part-2/' rel='bookmark' title='Using Hadoop for Value At Risk calculation Part 2'>Using Hadoop for Value At Risk calculation Part 2</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>The stress test is a very important step when you go live.</p>
<p>Good stress tests help us to:</p>
<ul>
<li>ensure that the software meets its performances requirements</li>
<li>ensure that the service will deliver a fast response time even under a heavy load</li>
<li>get to now the scalability limits which in turn is useful to plan the next steps of the development</li>
</ul>
<p>Hadoop is not a web application, a database or a webservice. You don&#8217;t stress test a Hadoop job with a heavy load. Instead, you need to becnhmark the cluster which means assessing its performances by running a variety of jobs each focused on a specific field (indexing, querying, predictive statistics, machine learning, &#8230;).</p>
<p>Intel has released HiBench, a tool dedicated to run such benchmarks. In this article, we will talk about this tool.</p>
<h1><span id="more-37958"></span><img title="Lire la suite…" src="http://blog.octo.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></h1>
<h1></h1>
<h1>What is HiBench?</h1>
<p>HiBench is a  est un collection of shell scripts published under the <em>Apache Licence 2</em> on GitHub : <a href="https://github.com/intel-hadoop/HiBench" target="_blank">https://github.com/intel-<wbr>hadoop/HiBench</wbr></a></p>
<p>It allows to stress test a Hadoop cluster according to several usage profile.</p>
<h2></h2>
<h2>Micro Benchmarks</h2>
<h3>WordCount</h3>
<p>This test dispatches the counting of the number of words from a data source.</p>
<p>The data source is generated by a preparation script of HiBench which relies on the <em>randomtextwriter </em>of Hadoop.</p>
<p>This test belongs to a class of jobs which extracts a small amount of information from a large data source.</p>
<p>It is a <em><strong>CPU bound </strong></em>test.</p>
<h3>Sort</h3>
<p>This test dispatches the sort of a data source.</p>
<p>The data source is generated by a preparation script which relies on the <em>randomtextwriter </em>d&#8217;Hadoop.</p>
<p>This test is the simplest one you can imagine. Indeed, both Map and Reduce stages are identity functions. The sorting is done automatically during the Shuffle &amp; Merge stage of  MapReduce.</p>
<p>It is <em><strong>I/O bound</strong></em>.</p>
<h3>TeraSort</h3>
<p>This test too dispatches the sort of a data source.</p>
<p>The data source is generated by the <em>Teragen </em>jobs which creates by default  1 billion of 100 bytes lines.</p>
<p>These lines are then sorted by the <em>Terasort</em>.<em> </em>Unlike<em> </em><em>Sort</em>, <em>Terasort</em> provides its own input and output format and also its own <em>Partitioner </em>which ensures that the keys are equally distributed among all nodes.</p>
<p>Therefore, it is an improved <em>Sort</em> which aims at providing an equal load between all nodes during the test.</p>
<p>With this specificity, this test is:</p>
<ul>
<li><em><strong>CPU bound</strong></em> for the Map stage</li>
<li><em><strong>I/O bound</strong></em> for the Reduce stage</li>
</ul>
<h3>Enhanced DFSIO</h3>
<p>This test is dedicated to HDFS. It aims at measuring the agregated I/O rate and throughput of HDFS during reads and writes.</p>
<p>During its preparation stage, a data source is generated and put on HDFS.</p>
<p>Then, two tests are run:</p>
<ul>
<li>A read of the generated data source</li>
<li>A write of a large amount of data</li>
</ul>
<p>The write test is basically the same thing as the preparation stage.</p>
<p>This test is <em><strong>I/O bound</strong></em><strong></strong>.</p>
<h2></h2>
<h2><em>Web Search</em></h2>
<h3>Nutch indexing</h3>
<p>This test focuses on the performances of the cluster when it comes to indexing data.</p>
<p>In order to do it, the preparation stage generates the data to be indexed.</p>
<p>Then, indexing is performed with <a href="http://nutch.apache.org" target="_blank">Apache Nutch</a>.</p>
<p>This test is <strong><em>I/O bound</em></strong> with a high CPU utilization during the Map stage<em>.</em></p>
<h3>Page Rank</h3>
<p>This test measures the performances of the cluster for <em>PageRanking </em>jobs.</p>
<p>The preparation phase generates the data source in the form of a graph which can be processed using the <a href="http://en.wikipedia.org/wiki/PageRank" target="_blank">PageRank</a> algorithm.</p>
<p>Then, the actual indexing is performed by a chain of 6 MapReduce jobs.</p>
<p>This test is <strong><em>CPU bound</em></strong>.</p>
<h2></h2>
<h2>Machine Learning</h2>
<h3>Naive Bayes Classifier</h3>
<p>This test performs a probabilistic classification on a data source.</p>
<p>It is explained in depth on <a href="http://en.wikipedia.org/wiki/Naive_Bayes_classifier" target="_blank">Wikipedia</a>.</p>
<p>The preparation stage generates the data source.</p>
<p>Then, the test chains two MapReduce jobs with <a href="http://mahout.apache.org"><em>Mahout</em></a>:</p>
<ul>
<li><em>seq2sparse</em> transforms a text data source into vectors</li>
<li><em>trainnb</em> computes the final model using vectors</li>
</ul>
<p>This test is <strong><em>I/O bound</em></strong> with a high CPU utilization during the Map stage of the <em>seq2sparse.</em></p>
<p>When using this test, we didn&#8217;t observe a real load on the cluster. It looks like it is necessary to either provide its own data source or to greatly increase the size of the generated data during the preparation stage.</p>
<h3>K-Means clustering</h3>
<p>This test partitions a data source into several clusters where each element belongs to the cluster with the nearest mean.</p>
<p>It is explained in depth on <a href="http://en.wikipedia.org/wiki/K-means_clustering" target="_blank">Wikipedia</a>.</p>
<p>The preparation stage generates the data source.</p>
<p>Then, the algorithm runs on this data source through <em>Mahout</em>.</p>
<p>The K-Means clustering algorithm is composed of two stages:</p>
<ul>
<li>iterations</li>
<li>clustering</li>
</ul>
<p>Each of these stages runs MapReduce jobs and has a specific usage profile.</p>
<ul>
<li><strong><em>CPU bound</em></strong> for iterations</li>
<li><strong><em>I/O bound</em></strong> for clustering</li>
</ul>
<h2></h2>
<h2>Analytical Query</h2>
<p>This class of tests performs queries that correspond to the usage profile of business analysts and other database users.</p>
<p>The data source is generated during the preparation stage.</p>
<p>Two tables are created:</p>
<ul>
<li>A <em>rankings</em> table</li>
<li>A <em>uservisits</em> table</li>
</ul>
<p>This is a common schema that we can meet in many web applications.</p>
<p>Once that the data source has been generated, two <em>Hive</em>  requests are performed:</p>
<ul>
<li>A joint</li>
<li>An agregation</li>
</ul>
<p>These tests are <strong><em>I/O bound</em></strong>.</p>
<h1></h1>
<h1>Using HiBench</h1>
<h2>Run a stress test</h2>
<p>Run HiBench is not very hard:</p>
<ul>
<li>retrieve the sources on GitHub</li>
<li>Ensure that nobody is using the cluster</li>
<li>Ensure that you have correctly configured your environment variables</li>
</ul>
<p>Then, the file <em>bin/hibench-config.sh</em> contains all the options to tune before startting the stress test. It includes the HDFS directory where you want to write both source and result data, the path of the final report file on the local filesystem, &#8230;</p>
<p>Once configured, ensures that the HDFS directory where you want to write your data source and your results exists on the cluster and run the command <em>bin/run-all.sh.</em> Now you can take a coffee&#8230; or two.</p>
<h2>Interpretation of the results</h2>
<p>Results are written into the <em>hibench.report </em>file with the following CSV format:</p>
<p><em>test_name end_date &lt;jobstart_timestamp,jobend_</em><wbr><em>timestamp&gt; size_in_bytes duration_ms throughput</em></wbr></p>
<p>Beware that the actual result file does not contain the column header  above.</p>
<p>The DFSIOE test also writes a CSV and an interpretation of its results in its subdirectory <em>dfsioe.</em></p>
<h1></h1>
<h1>Limitations</h1>
<h2>Latest Hadoop support</h2>
<p>Presently, HiBench runs on Hadoop 1.0. This means that the latest versions of Cloudera or Hortons Works distributions for example won&#8217;t be able to run all tests since they rely on Hadoop 2.</p>
<p>However, the effort necessary to support Hadoop 2 is not that big for the majority of the tests since it is mainly a matter of updating configuration parameter names.</p>
<p>Also, HiBench alone is not enough for a good report of a stress test. It is necessary to also retrieve the informations provided by the JobTracker/ResourceManager like the mean execution time of Maps, Reduces, Shuffle and Merges of every job in order to build an accurate final report.</p>
<h2>A public benchmark repository, a big lack</h2>
<p>This is a lack that HiBench tried to address through its wiki page which invites you to post your results but with no success until now.</p>
<p>Building a public benchmark repository in order to provide a set of meaningful metrics to compare a cluster is still an uncover issue but  would be interesting and quite useful.</p>
<h1></h1>
<h1>What are the alternatives?</h1>
<p>An alternative exists to HiBench, but it is more focused on a specific usage profile.</p>
<h2>GridMix</h2>
<p>GridMix is included in Hadoop besides the example jobs like TeraSort, Sort, &#8230;</p>
<p>However, it generates MapReduce jobs which are focused on sorting large amount of data and does not cover other profiles like Machine Learning.</p>
<h1></h1>
<h1>Conclusion</h1>
<p>In spite of these drawbacks, HiBench greatly simplifies the benchmarking of a Hadoop cluster.</p>
<p>In the future, this domain will certainly see new tools with more functionalities and a better coverage or different usage profiles. It is only the beginning.</p>
 <img src="http://blog.octo.com/?feed-stats-post-id=37958" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Suggestion d'articles :</p><ol>
<li><a href='http://blog.octo.com/en/hadoop-in-my-it-department-how-to-plan-a-cluster/' rel='bookmark' title='Hadoop in my IT department: How to plan a cluster?'>Hadoop in my IT department: How to plan a cluster?</a></li>
<li><a href='http://blog.octo.com/en/using-hadoop-for-value-at-risk-calculation-part-5/' rel='bookmark' title='Using Hadoop for Value At Risk calculation Part 5'>Using Hadoop for Value At Risk calculation Part 5</a></li>
<li><a href='http://blog.octo.com/en/using-hadoop-for-value-at-risk-calculation-part-2/' rel='bookmark' title='Using Hadoop for Value At Risk calculation Part 2'>Using Hadoop for Value At Risk calculation Part 2</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/hadoop-in-my-it-department-benchmark-your-cluster/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hadoop in my IT department: How to plan a cluster?</title>
		<link>http://blog.octo.com/en/hadoop-in-my-it-department-how-to-plan-a-cluster/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hadoop-in-my-it-department-how-to-plan-a-cluster</link>
		<comments>http://blog.octo.com/en/hadoop-in-my-it-department-how-to-plan-a-cluster/#comments</comments>
		<pubDate>Mon, 26 Nov 2012 11:12:55 +0000</pubDate>
		<dc:creator>Rémy SAISSY</dc:creator>
				<category><![CDATA[Infrastructure and operations]]></category>
		<category><![CDATA[IT architect's workshop]]></category>
		<category><![CDATA[bigdata]]></category>
		<category><![CDATA[Hadoop]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=36263</guid>
		<description><![CDATA[Ok, you have decided to setup a Hadoop cluster for your business. Next step now, planning the cluster… But Hadoop is a complex stack and you might have many questions: HDFS deals with replication and Map Reduce create files… How can I plan my storage needs? How to plan my CPU needs? How to plan [...]<div class='yarpp-related-rss'>

Suggestion d'articles :<ol>
<li><a href='http://blog.octo.com/en/hadoop-distributed-file-system-overview-configuration/' rel='bookmark' title='Hadoop Distributed File System : Overview &amp; Configuration'>Hadoop Distributed File System : Overview &#038; Configuration</a></li>
<li><a href='http://blog.octo.com/en/introduction-to-datastax-brisk-an-hadoop-and-cassandra-distribution/' rel='bookmark' title='Introduction to Datastax Brisk : an Hadoop and Cassandra distribution'>Introduction to Datastax Brisk : an Hadoop and Cassandra distribution</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Ok, you have decided to setup a Hadoop cluster for your business.</p>
<p>Next step now, planning the cluster… But Hadoop is a complex stack and you might have many questions:</p>
<ul>
<li>HDFS deals with replication and Map Reduce create files… How can I plan my storage needs?</li>
<li>How to plan my CPU needs?</li>
<li>How to plan my memory needs? Should I consider different needs on some nodes of the cluster?</li>
<li>I heard that Map Reduce moves its job code where the data to process is located… What does it involve in terms of network bandwidth?</li>
<li>At which point and how far should I consider what the final users will actually process on the cluster during my planning?</li>
</ul>
<p>That is what we are trying to make clearer in this article by providing explanations and formulas in order to help you to best estimate your needs.</p>
<p><span id="more-36263"></span></p>
<p><img title="Lire la suite…" src="http://blog.octo.com/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" /></p>
<h1>Some important aspects of the Hadoop architecture</h1>
<p>Planning a Hadoop cluster requires a minimum knowledge the Hadoop architecture.</p>
<h2>The distributed computation</h2>
<p>At his heart, Hadoop is a distributed computation platform. This platform&#8217;s programming model is Map Reduce.</p>
<p>In order to be efficient, Map Reduce has two prerequisites:</p>
<ul>
<li>Datasets must be splitable in smaller and independant blocks</li>
<li>Data locality: means that the code must be moved where the data lies, not the opposite.</li>
</ul>
<p>The first prerequisite depends on both the type of input data which feeds the cluster and what we want to do with it.</p>
<p>The second prerequisite involves having a distributed storage system which exposes where exactly data is stored and allows the execution of code on any storage node.</p>
<p>This is where HDFS is useful.</p>
<p>Hadoop is a Master / Slave architecture:</p>
<ul>
<li>The <em>JobTracker</em> (<em>ResourceManager</em>in Hadoop 2)
<ul>
<li>Monitor jobs that are running on the cluster</li>
<li>Needs a lot of memory and CPU (<em>memory bound</em> and <em>cpu bound</em>)</li>
</ul>
</li>
<li>The <em>TaskTracker</em> (<em>NodeManager</em> + <em>ApplicationMaster</em>in Hadoop 2)
<ul>
<li>Runs tasks of a jobs on each node of the cluster. Which means <em>Maps</em> and <em>Reduces</em></li>
<li>Its jobs need a lot of memory and CPU (<em>memory bound</em> and <em>cpu bound</em>)</li>
</ul>
</li>
</ul>
<p>The critical component in this architecture is the <em>JobTracker/ResourceManager</em>.</p>
<h2>The distributed storage</h2>
<p>HDFS is a distributed storage filesystem. It runs on top of another filesystem like ext3 or ext4.</p>
<p>In order to be efficient, HDFS must satisfy the following prerequisites:</p>
<ul>
<li>Hard drives with a high throughput</li>
<li>An underlying filesystem which supports the HDFS read and write pattern: one big read or write at a time (64MB, 128MB or 256MB)</li>
<li>Network fast enough to cope with intermediate data transfer and block replication</li>
</ul>
<p>HDFS is a Master / Slave architecture:</p>
<ul>
<li>The <em>NameNode</em> and the <em>Secondary NameNode</em>
<ul>
<li>Stores the filesystem meta informations (directory structure, names, attributes and file localization) and ensures that blocks are properly replicated in the cluster</li>
<li>It needs a lot of memory (<em>memory bound</em>)</li>
</ul>
</li>
<li>The <em>DataNode</em>
<ul>
<li>Manages the state of an HDFS node and interacts with its blocks</li>
<li>Needs a lot of I/O for processing and data transfer (<em>I/O bound</em>)</li>
</ul>
</li>
</ul>
<p>The critical components in this architecture are the <em>NameNode</em> and the <em>Secondary NameNode</em>.</p>
<p>&nbsp;</p>
<p>These are two distinct but complementary architectures.</p>
<p>It is possible to not use HDFS with Hadoop. <em>Amazon</em> with their Elastic MapReduce <em></em>for example rely on their own storage offer, <em>S3</em> and a desktop tool like <em>KarmaSphere Analyst</em> embeds Hadoop with a local directory instead of HDFS.</p>
<h1>Some important technicals facts to plan a cluster</h1>
<p>No need to be an Hadoop expert but the following few facts are good to know when it comes to cluster planning.</p>
<h2>How HDFS manages its files</h2>
<p>HDFS is optimized for the storage of large files. You write the file once and access it many times.</p>
<p>In HDFS, a file is split into several blocks. Each block is asynchronously replicated in the cluster. Therefore, the client sends its files once and the cluster takes care of replicating its blocks in the background.</p>
<p>A block is a contigous area, a blob of data on the underlying filesystem, Its default size is 64MB but it can be extended to 128MB or even 256MB, depending on your needs.</p>
<p>The block replication, which has a default factor of 3, is useful for two reasons:</p>
<ul>
<li>Ensure data recovery after the failure of a node. Hard drives used for HDFS must be configured in JBOD, not RAID</li>
<li>Increase the number of maps that can work on a bloc during a MapReduce job and therefore speedup processing</li>
</ul>
<p>From a network standpoint, the bandwith is used at two moments:</p>
<ul>
<li>During the replication following a file write</li>
</ul>
<ul>
<li>During the balancing of the replication factor when a node fails</li>
</ul>
<h2>How the NameNode manages the HDFS cluster</h2>
<p>The NameNode manages the meta informations of the HDFS cluster.</p>
<p>This includes meta informations (filenames, directories, &#8230;) and the location of the blocks of a file.</p>
<p>The filesystem structure is entirely mapped into memory.</p>
<p>In order to have persistence over restarts, two files are also used:</p>
<ul>
<li>a<em> fsimage</em> file which contains the filesystem metadata</li>
<li>the <em>edits</em> file which contains a list of modifications performed on the content of <em>fsimage</em>.</li>
</ul>
<div>The in memory image is the merge of those two files.</div>
<div>When the NameNode starts, it first loads <em>fsimage</em> and then applies the content of <em>edits</em> on it to recover the latest state of the filesystem.</div>
<div></div>
<div>An issue would be that over time, the <em>edits</em> file keeps growing undefinitely and ends up by:</div>
<div>
<ul>
<li>consuming all disk space</li>
<li>slowdown restarts</li>
</ul>
</div>
<div></div>
<div>The <em>Secondary NameNode</em> role is to avoir this issue by regularly merging <em>edits </em>with <em>fsimage</em>, thus pushing a new <em>fsimage </em>and resetting the content of <em>edits.</em></div>
<p>The trigger for this compaction process is configurable. It can be:</p>
<ul>
<li>The number of transactions performed on the cluster</li>
<li>The size of the <em>edits </em>file</li>
<li>The elapsed time since the last compaction</li>
</ul>
<p>The following formula can be applied to know how much memory a <em>NameNode</em> needs:</p>
<p><em>&lt;needed memory&gt; = &lt;total storage size in the cluster in MB&gt; / &lt;Size of a block in MB&gt; / 1000000</em></p>
<p>In other words, a rule of thumb is to consider that a <em>NameNode</em> needs about 1GB / 1 million blocks.</p>
<h1>How to determine my sizing needs?</h1>
<h2>Determine storage needs</h2>
<p>Storage needs are split into three parts:</p>
<ul>
<li>Shared needs</li>
<li><em>NameNode</em> and <em>Secondary NameNode </em>specific<em> </em>needs</li>
<li><em>DataNode</em> specific needs</li>
</ul>
<h3>Shared needs</h3>
<p>Shared needs are already known since it covers:</p>
<ul>
<li>The OS partition</li>
<li>The OS logs partition</li>
</ul>
<p>Those two partitions can be setup as usual.</p>
<h3>NameNode and Secondary NameNode specific needs</h3>
<p>The <em>Secondary NameNode</em> must be identical to the <em>NameNode</em>. Same hardware, same configuration.</p>
<p>A 1TB partition should be dedicated to  files written by both the <em>NameNode</em> and the <em>Secondary NameNode. </em>This is large enough so you won&#8217;t have to worry about disk space as the cluster grows.</p>
<p>If you want to be closer to the actual occupied size, you need to take into account the parameters of the <em>NameNode</em>  we explained above (a combination of the trigger for the compaction, the maximum fsimage size and the <em>edits </em>size<em>)</em> and to multiply this result by the number of checkpoints you want to be retained.</p>
<p>In any case, the <em>NameNode</em> must have an NFS mount point to a secured storage among its <em>fsimage </em>and<em> edits </em>directories.</p>
<p>This mount point has the same size than the local partition for <em>fsimage </em>and <em>edits </em>mentionned above.</p>
<p>The storage of  the <em>NameNode</em> and the <em>Secondary NameNode</em> is typically performed on RAID configuration.</p>
<h3>DataNode specific needs</h3>
<p>Hardware requirements for <em>DataNode</em>s storage is:</p>
<ul>
<li><em>SAS 6Gb/s controller configured in JBOD (Just a Bunch of Disk)</em></li>
<li><em><em>SATA II</em>  <em>7200 rpm </em>hard drives between 1Tb and 3Tb</em></li>
</ul>
<p>Do not use RAID on a DataNode. HDFS provides its own replication mecanism.</p>
<p>The number of hard drive can vary depending on the  total desired storage capacity.</p>
<p>A good way to determine the latter is to start from the planned data input of the cluster.</p>
<p>It is also important to note that for every disk, 30% of its capacity is reserved to non HDFS use.</p>
<p>Let&#8217;s consider the following hypothesis:</p>
<ul>
<li> Daily data input: 100Gb</li>
<li>HDFS replication factor: 3</li>
<li>Non HDFS reserved space per disk: 30%</li>
<li>size of a disk: 3Tb</li>
</ul>
<p>With these hypothesis, we are able to determine the storage needed and the number of <em>DataNodes.</em></p>
<p>Therefore we have:</p>
<ul>
<li>Storage space used by daily data input : &lt;daily data input&gt; * &lt;replication factor&gt; = 300GB</li>
<li>Size of a hard drive dedicated to HDFS : &lt;Size of the hard drive &gt; * (1 &#8211; &lt;Non HDFS reserved space per disk&gt;) = 2.1TB</li>
<li>Number of <em>DataNodes</em> after 1 year (no monthly growth) : &lt;storage space used by daily data input&gt; * 365 / &lt;HDFS reserved space in a disk&gt; = 100TB / 2.1TB = 48 <em>DataNodes</em></li>
</ul>
<p>Two important elements are not included here:</p>
<ul>
<li>The monthly growth of the data input</li>
<li>The ratio of data generated by jobs processing a data input</li>
</ul>
<p>These informations depend on the needs of your business units and it must be taken into account in order to determine storage needs.</p>
<h2>Determine your CPU needs</h2>
<p>On both <em>NameNode</em> and <em>Secondary NameNode</em>, 4 physical cores running at 2Ghz will be enough.</p>
<p>For <em>DataNodes</em>, two elements help you to determine your CPU needs:</p>
<ul>
<li>The profile of the jobs that are going to run</li>
<li>The number of jobs you want to run on each <em>DataNode</em></li>
</ul>
<h3>Job profile</h3>
<p>Roughly, we consider that a <em>DataNode</em> can perform two kind of jobs: <em>I/O intensive</em> and <em>CPU intensive</em>.</p>
<h4>I/O intensive jobs</h4>
<p>These jobs are <em>I/O bound</em>.</p>
<p>For example:</p>
<ul>
<li>indexing</li>
<li>search</li>
<li>clustering</li>
<li>decompression</li>
<li>data import/export</li>
</ul>
<p>Here, a CPU running between 2Ghz and 2.4Ghz is enough.</p>
<h4>CPU intensive jobs</h4>
<p>These jobs are <em>CPU bound</em>.</p>
<p>For example:</p>
<ul>
<li>machine learning</li>
<li>statistics</li>
<li>semantic analysis</li>
<li>language analysis</li>
</ul>
<p>Here, a CPU running between 2.6Ghz and 3Ghz is enough.</p>
<h3>The number of jobs</h3>
<p>The number of physical cores determine the maximum number of jobs that can run in parallel on a <em>DataNode. </em>It is also important to keep in mind that there is a distribution between Map and Reduce tasks on <em>DataNodes</em> (typically 2/3 Maps and 1/3 Reduces).</p>
<p>To determine you needs, you can use the following formula:</p>
<p><em>(&lt;number of physical cores&gt; &#8211; 1) * 1.5 = &lt;maximum number of tasks&gt;</em></p>
<p>or, if you prefer to start from the number of tasks and adjust the number of cores according to it:</p>
<p><em>(&lt;maximum number of tasks&gt; / 1.5) + 1 = &lt;number of physical cores&gt;</em></p>
<p>The number 2 keeps 2 cores away for both the <em>TaskTracker</em> (MapReduce) and <em>DataNode</em> (HDFS) processes.</p>
<p>the number 1.5 indicates that a physical core, due to hyperthreading, might process more than one job at the same time.</p>
<h2>Determine your memory needs</h2>
<p>This is a two step process:</p>
<ul>
<li>Determine the memory of both <em>NameNode</em> and <em>Secondary NameNode</em></li>
<li>Determine the memory of <em>DataNodes</em></li>
</ul>
<p>In both cases, you should use DDR3 ECC memory.</p>
<h3>Determine the memory of both <em>NameNode </em>and <em>Secondary NameNode</em></h3>
<p>As explained above the <em>NameNode</em> manages the HDFS cluster metadata in memory. The memory needed for the <em>NameNode</em> process and the memory needed for the OS must be added to it.</p>
<p>The <em>Secondary NameNode</em> must be identical to the <em>NameNode</em>.</p>
<p>Given these informations we have the following formula:</p>
<p><em>&lt;Secondary NameNode memory&gt; =  <em>&lt;NameNode memory&gt;</em> = &lt;HDFS cluster management memory&gt; + &lt;2GB for the NameNode process&gt; + &lt;4GB for the OS&gt;</em></p>
<h3>Determine the memory of <em>DataNodes</em></h3>
<p>The memory needed for a<em> DataNode</em> is determined depending on the profile of jobs which will run on it.</p>
<p>For<em> I/O bound</em> jobs, between 2GB and 4GB per physical core.</p>
<p>For <em>CPU bound</em> jobs, between 6GB and  8GB per physical core.</p>
<p>In both cases, the following must be added:</p>
<ul>
<li>2GB for the <em>DataNode</em> process which is in charge of managing HDFS blocks</li>
<li>2GB for the <em>TaskTracker</em> process which is in charge of managing running tasks on the node</li>
<li>4GB for the OS</li>
</ul>
<p>Which leads to the following formulas:</p>
<p><em>&lt;DataNode memory for I/O bound profile&gt; = 4GB * &lt;number of physical cores&gt; + &lt;2GB for the DataNode process&gt; + &lt;2GB for the TaskTracker process&gt; + &lt;4GB for the OS&gt;</em></p>
<p><em>&lt;DataNode memory for CPU bound profile&gt; = 8GB * &lt;number of physical cores&gt; + &lt;2GB for the DataNode process&gt; + &lt;2GB for the TaskTracker process&gt; + &lt;4GB for the OS&gt;</em></p>
<h2>Determine your network needs</h2>
<p>The two reasons for which Hadoop generates the most network traffic are:</p>
<ul>
<li>The shuffle phase during which Map tasks outputs are sent to the Reducer tasks</li>
<li>Maintaining the replication factor (when a file is added to the cluster or when a <em>DataNode</em> is lost)</li>
</ul>
<p>In spite of it, network transfers in Hadoop follow an East/West pattern which means that even though orders come from the <em>NameNode</em>, most of the transfers are performed directly between <em>DataNodes</em>.</p>
<p>As long as these transfers do not cross the rack boundary, it is not a big issue and Hadoop does its best to perform only such transfers.</p>
<p>However, inter-rack transfers are sometimes needed, for example for the second replica of an HDFS block.</p>
<p>This is complex subject but as a rule of thumb, you should:</p>
<ul>
<li>Use a <a href="http://www.techopsguys.com/2011/11/15/dells-distributed-core/">Spine Fabric</a> network topology<a href="http://www.techopsguys.com/2011/11/15/dells-distributed-core/"><br />
</a></p>
<ul>
<li>Better throughput</li>
<li>Better resiliency to failures</li>
</ul>
</li>
<li>Avoid oversubscribtion of switches
<ul>
<li>A 1Gb 48 ports top of rack switch must have 5 ports at 10Gb on distribution switches</li>
<li>Avoids network slowdown for a cluster under heavy load (jobs + data input)</li>
</ul>
</li>
<li>If the cluster is <em>I/O bound</em>or if you plan to perform data input on recurrent data input which sature the 1GB and which cannot be performed outside of office hours, you should use:
<ul>
<li>10Gb Ethernet intra rack</li>
<li>N x 10Gb Ethernet inter rack</li>
</ul>
</li>
<li>If the cluster is <em>CPU bound</em>, you should use:
<ul>
<li>2 x 1Gb Ethernet intra rack</li>
<li>10Gb Ethernet inter rack</li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
 <img src="http://blog.octo.com/?feed-stats-post-id=36263" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Suggestion d'articles :</p><ol>
<li><a href='http://blog.octo.com/en/hadoop-distributed-file-system-overview-configuration/' rel='bookmark' title='Hadoop Distributed File System : Overview &amp; Configuration'>Hadoop Distributed File System : Overview &#038; Configuration</a></li>
<li><a href='http://blog.octo.com/en/introduction-to-datastax-brisk-an-hadoop-and-cassandra-distribution/' rel='bookmark' title='Introduction to Datastax Brisk : an Hadoop and Cassandra distribution'>Introduction to Datastax Brisk : an Hadoop and Cassandra distribution</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/hadoop-in-my-it-department-how-to-plan-a-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reinventing Banking &amp; Trading on iPad for Keytrade Bank</title>
		<link>http://blog.octo.com/en/reinventing-banking-banking-on-ipad/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reinventing-banking-banking-on-ipad</link>
		<comments>http://blog.octo.com/en/reinventing-banking-banking-on-ipad/#comments</comments>
		<pubDate>Fri, 16 Nov 2012 13:34:11 +0000</pubDate>
		<dc:creator>Rémy Virin</dc:creator>
				<category><![CDATA[Consulting chronicles]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[bank]]></category>
		<category><![CDATA[banking]]></category>
		<category><![CDATA[belgium]]></category>
		<category><![CDATA[delivery]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[keytrade]]></category>
		<category><![CDATA[trading]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=36676</guid>
		<description><![CDATA[This is the END. &#160; We created an iPad app for Keytrade Bank, and we just launched it!, You can download it here. Please contact us if you what to talk with us about this reference &#38; our expertise!   Mixed feelings: happiness because it’s really a major achievement, nostalgia because we really loved building this app [...]<div class='yarpp-related-rss'>

Suggestion d'articles :<ol>
<li><a href='http://blog.octo.com/en/improve-agile-adoption-with-shu-ha-ri/' rel='bookmark' title='Improve Agile adoption with &#8220;Shu Ha Ri&#8221;'>Improve Agile adoption with &#8220;Shu Ha Ri&#8221;</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>This is the END.</p>
<p>&nbsp;</p>
<p><span style="color: #000000;">We created an iPad app for <a href="https://www.keytradebank.com/"><span style="color: #000000;">Keytrade Bank</span></a>, and we just launched it!, <a href="https://itunes.apple.com/be/app/keytrade-bank-banking-trading/id563225306"><span style="text-decoration: underline; color: #000000;">You can download it here</span></a>.</span></p>
<p><span><em><strong><span style="color: #000000;">Please <a title="contact us" href="http://www.octo.com/en/where-we-are">contact us</a> if you what to talk with us about this reference &amp; our expertise!</span></strong></em><br />
<span style="color: #000000;"> </span></span></p>
<p>Mixed feelings: happiness because it’s <strong>really a major achievement</strong>, nostalgia because we really<strong> loved building this app</strong> and now we are just slightly nervous as we hope users will love to consult their accounts, transfer money and trade using the Keytrade app as much as we enjoyed creating it.</p>
<p>For the <strong>banking</strong> part, this app allows one to customize accounts (rename accounts, assign pictures to each account), to consult the list of transactions, to transfer money and to visualize the monthly In &amp; Out of an account with clear charts.</p>
<p>With respect to <strong>trading</strong>, our app offers a heatmap updated in real time with all the markets and all companies (when available from provider) and, of course, buying and selling stocks is possible from within the app. One can also consult the personal portfolio containing an overview of all trades.</p>
<p><span id="more-36676"></span></p>
<p>To get a better idea of this project, here are some metrics:</p>
<ul>
<li>8 months</li>
<li>2 Product Owners, one for Banking, one for Trading (from Keytrade Bank)</li>
<li>1 graphic designer (from Keytrade Bank)</li>
<li>1 UX designer</li>
<li>4,5 iOS developers (among them 1 from Keytrade Bank trained by OCTO) + 1 Scrum master</li>
<li>2 web-services developers (from Keytrade Bank)</li>
<li>21 Sprints</li>
<li>29 storyboards</li>
<li>1 user test session</li>
<li>302 User Stories &amp; 2 300 complexity points</li>
<li>46 Releases of the app</li>
<li>3 languages</li>
<li>45 K lines of code (frameworks excluded)</li>
<li>17 K lines of comment</li>
<li>1 035 Unit Tests</li>
</ul>
<p>&nbsp;</p>
<h1>Quality First</h1>
<p>Quality has been the primary focus from the start.</p>
<p>For example, when a developer finished implementing a user story, another one had to validate the feature and to review the code. When peers validated the story, the product owner (PO) had to test the feature to ensure it matched what he had asked for.</p>
<p>To lower the numbers of bugs, we used the TDD (Test Driven Development) method. We tested the logic and the model of the app.</p>
<p>To change the state of a story from “in progress” to “done” we had to respect a checklist: this is called a Definition of Done (DOD). For example, we had to check if the code was clean, well documented and tested, if it didn’t add warnings etc.</p>
<p>We also had a continuous integration server (Jenkins). On each commit, an automatic build ran the unit tests and gave us metrics like number of lines of code, code coverage, code duplication. My colleague Cyril Picat described in t<a href="http://blog.octo.com/en/ios-development-right-code-coverage/">his article how to add these metrics Jenkins for iOS</a>.</p>
<p>With all these standards we dramatically decreased the number of bugs. However since the project is quite large, one may discover bugs from time to time that will be fixed in the next versions.</p>
<p>Each week, we released a new version of the app to Keytrade employees’ iPads. This process can be time consuming, that’s why we decided to automate it. So we just had to press a button and the users received a notification on their iPads to install the new version.</p>
<p><strong>So, how did we do it?</strong></p>
<p>It’s really simple, we created a new job on Jenkins, which build the app thanks to the Xcode plugin, and then we pushed it to <a href="http://www.appaloosa-store.com/">Appaloosa</a>, OCTO deployment solution available as SAAS.</p>
<p>&nbsp;</p>
<h1>UX Rules !</h1>
<p>For us, User eXperience (UX) is really important. We believe a good UX changes everything. That’s why we had a UX designer during the whole project to challenge every usage, to create new patterns of banking and trading on tablets.</p>
<p>This was the first time that Keytrade worked with a UX designer. At first, people didn’t understand how and why creating user interfaces was complicated.</p>
<p>After a few months, we can see how UX improved our app, and how efficient it is to work with a UX designer during a project.</p>
<p>At the end of the project, we gave the opportunity to Keytrade’s <strong>real</strong> customers to test the app <strong>during a dedicated users testing session</strong>, before launching it on the Appstore. We received a lot of feedback, and of course, we worked one extra month to improve the app taking into account the remarks and recommendations!</p>
<p>Now, Keytrade Bank wants to hire a full time UX designer, … another proof that UX is not an option for quality apps !</p>
<p>The following images show us how UX helped us in our process.</p>
<p>This is an iteration process (Agile):</p>
<ul>
<li>First a UX designer drew the screen on a sheet of paper and in powerpoint</li>
<li>Then the product owner validated the storyboard with the UX designer and added Business Rules on the powerpoint for the development team</li>
<li>The graphic designer and the developers could start their work and iterated with the whole team.</li>
</ul>
<p><a href="http://blog.octo.com/wp-content/uploads/2012/11/keytrade1.png"><img class="aligncenter size-full wp-image-36688" title="keytrade" alt="" src="http://blog.octo.com/wp-content/uploads/2012/11/keytrade1.png" width="550" height="1213" /></a></p>
<p>&nbsp;</p>
<h1>Be Agile, be able to change everything, anytime.</h1>
<p>&nbsp;</p>
<p>At OCTO, we work using the Agile methodology. We believe Agile helps us to deliver <strong>better products</strong> that better<strong> fit the needs</strong>. It was the first project with Agile methodology for Keytrade.</p>
<p>At the project start, we had no idea of what we will create. We didn’t know how we should present data, what should be in the app, what shouldn’t.</p>
<p>The only thing we knew is that we wanted to change how people interacted in banking and trading on tablets. We wanted to be a reference, to be the #1 of the Appstore!</p>
<p>We created a lot of features, and we didn’t keep them all. We threw away a lot of concepts. We developed, designed, integrated the design, and fixed bugs on features that we didn’t ship.</p>
<p><strong>Why ?</strong></p>
<p>Because we wanted to give users the best we could deliver, a <strong>valuable product</strong>. We didn’t want to deliver useless features. Sometimes we deleted features; sometimes we rebuilt them from scratch.</p>
<p>It can be hard to accept, when you have worked for several hours and spent a lot of time and energy on a feature, but it’s important to go through with it for the quality of the final product.</p>
<p>&nbsp;</p>
<p><strong>Takeaways</strong></p>
<p>To help us in our Agile approach, we had some tools. In particular we used Kanban Tools and Google Docs. These 2 tools were synchronized thanks to custom Google apps scripts. These scripts are really powerful when using Google Docs.</p>
<p>Our product backlog was a spreadsheet, which was hosted on Google docs. When we added or modified a task, it was automatically updated on our Kanban.</p>
<p>The most important point was the great <strong>collaboration</strong> with the <strong>Keytrade teams</strong>: the graphical designer, the back-end developers &amp; the marketing team but also the business experts &amp; the top management.<br />
And first, to ease collaboration being in the same room helps a lot. We were in Keytrade premises 3 days a week. We were really close to the back office team, which is a good thing to quickly solve problems, and ease communication. This has been a strategic decision that saved us a lot of time.</p>
<p>Once a week, we demoed our progress to the Keytrade management team. This was important for us to have their feedback in order to know whether the product fitted their needs.</p>
<p>As a result, Keytrade wants to go further on Agile methodology and considers starting more Agile projects.</p>
<p>&nbsp;</p>
<p>To conclude, our whole team <strong>Keytrade+OCTO</strong> is really proud of what we have created! This is probably one of the best apps OCTO have worked on. At this very moment, while writing this article, Keytrade Bank is the first app of the Appstore (in Belgium). And the score of the app is 4+ on the store.</p>
<p>You can have a quick overview of this with the following screenshots, but the best way, is to <a href="https://itunes.apple.com/be/app/keytrade-bank-banking-trading/id563225306">test it</a>!</p>
<p><strong>This is the End of the V1…. But just the beginning for this app!</strong></p>
<p>&nbsp;</p>
<p><a href="http://blog.octo.com/wp-content/uploads/2012/11/keytrade-22.png"><img class="aligncenter size-full wp-image-36689" title="keytrade-2" alt="" src="http://blog.octo.com/wp-content/uploads/2012/11/keytrade-22.png" width="550" height="1552" /></a></p>
 <img src="http://blog.octo.com/?feed-stats-post-id=36676" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Suggestion d'articles :</p><ol>
<li><a href='http://blog.octo.com/en/improve-agile-adoption-with-shu-ha-ri/' rel='bookmark' title='Improve Agile adoption with &#8220;Shu Ha Ri&#8221;'>Improve Agile adoption with &#8220;Shu Ha Ri&#8221;</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/reinventing-banking-banking-on-ipad/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Android Testing :: testing private methods</title>
		<link>http://blog.octo.com/en/android-testing-testing-private-methods/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=android-testing-testing-private-methods</link>
		<comments>http://blog.octo.com/en/android-testing-testing-private-methods/#comments</comments>
		<pubDate>Fri, 07 Sep 2012 08:00:53 +0000</pubDate>
		<dc:creator>Stéphane Nicolas</dc:creator>
				<category><![CDATA[IT architect's workshop]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[automated tests]]></category>
		<category><![CDATA[Testability]]></category>
		<category><![CDATA[unit test]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=34041</guid>
		<description><![CDATA[This article is about testing private methods in android. This is a fairly common problem in android (even in Java at large) and can be solved easily. The technique proposed here provides the additionnal benefit of using a traditional way of solving the problem in the Java world. (suspense :) ) Using the android platform, you are [...]<div class='yarpp-related-rss'>

Suggestion d'articles :<ol>
<li><a href='http://blog.octo.com/en/how-to-test-private-methods/' rel='bookmark' title='How to test private methods?'>How to test private methods?</a></li>
<li><a href='http://blog.octo.com/en/functional-testing-of-a-mvvm-silverlight-application-with-fitnesse/' rel='bookmark' title='Functional testing of a MVVM Silverlight application with Fitnesse'>Functional testing of a MVVM Silverlight application with Fitnesse</a></li>
<li><a href='http://blog.octo.com/en/mutation-testing-a-step-further-to-the-perfection/' rel='bookmark' title='Mutation Testing, a step further to the perfection'>Mutation Testing, a step further to the perfection</a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<style type="text/css">
  span.code { font-family: monospace; font-size: 1.2em;
  }
</style>
<p>This article is about testing private methods in android. This is a fairly <a href="http://stackoverflow.com/q/10194897/693752">common</a> problem in android (even <a href="http://stackoverflow.com/a/34658/693752">in Java</a> at large) and can be solved easily. The technique proposed here provides the additionnal benefit of <a href="http://www.artima.com/suiterunner/private2.html">using a traditional way of solving the problem in the Java world</a>. (suspense :) )</p>
<p>Using the android platform, you are used to divide your application into two projects :</p>
<ul>
<li>one for the main source code of your application,</li>
<li>one for the tests</li>
</ul>
<p><span id="more-34041"></span></p>
<p>This is a mandatory structure on android, stongly emphasized by Google. Even, if you use the <a title="Maven Android Plugin Home Page" href="http://code.google.com/p/maven-android-plugin/">android-maven-plugin</a>, you follow this pattern, and it is also the case if you use <a title="Robolecric Home Page" href="http://pivotal.github.com/robolectric/">robolectric</a>. </p>
<p>Moreover, it is a common practice to name the packages of your application using the following convention (inside the AndroidManifest.xml files of both projects) :</p>
<ul>
<li><span class="code">foo.bar</span></li>
<li><span class="code">foo.bar.tests</span></li>
</ul>
<p>Where <span class="code">foo.bar</span> follows more or less your web domain name in the reverse order.</p>
<p>If you use the same package names to name the packages of your class, and this is a fairly common and intuitive practice, then you will face a big trouble : you will only be able to test your public methods : a test class inside a package named <tt>foo.bar.tests</tt> won&#8217;t be able to access the private and protected methods of a class in the package <span class="code">foo.bar</span>. For instance :</p>
<p><em>In your app under test :</em></p>

<div class="wp_codebox"><table><tr id="p3404119"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p34041code19"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">foo.bar</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Foo <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">int</span> m<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><em>In your test app :</em></p>

<div class="wp_codebox"><table><tr id="p3404120"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p34041code20"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">foo.bar.test</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.test.AndroidTestCase</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FooTest <span style="color: #000000; font-weight: bold;">extends</span> AndroidTestCase <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> testFoo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//m() is not accessible from Foo</span>
        assertEquals<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">2</span>, <span style="color: #000000; font-weight: bold;">new</span> Foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">m</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   <span style="color: #666666; font-style: italic;">//should not compile</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>This code would generate a compile error. The method <span class="code">m()</span> is only accessible to the classes that belong to the package <span class="code">foo.bar</span> and the notion of subpackages doesn&#8217;t exist in the Java programming language.</p>
<p>Consequently you have several options.</p>
<p><strong>1. Consider testing only public methods.</strong> Actually, this makes a lot of sense. Object-Oriented programming strongly emphasize the notion of contract and testing internals of a class can appear as violation of the notion of encapsulation.</p>
<p><i>Nevertheless, there are some cases where you really want to test some internal methods</i> as they are complex, or just as they contain more of the logic of the class than public methods, or because you divided the different problems faced by public methods into some more specialized private methods (and this is a very good practice in IT, the famous divide and conquer principle).</p>
<p><strong>2. Subclassing your class under test</strong> is an alternative : you can use protected methods in your class under test. And, in your tests, whenever you need to test a protected method, although you can&#8217;t invoke it directly, you can create a smaller inner class of the test class that extends the class under test and overrides every protected methods under test. This overridden method will just just invoke the super method, just to re-give it a package level visibility. The inner class protected methods will then be visible to the test class as they now belong to the same package.</p>
<p>Here is an example of this technique :</p>
<p><em>In your test app :</em></p>

<div class="wp_codebox"><table><tr id="p3404121"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code" id="p34041code21"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">foo.bar.test</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.test.AndroidTestCase</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FooTest <span style="color: #000000; font-weight: bold;">extends</span> AndroidTestCase <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> testFoo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//m() is not accessible from Foo </span>
        <span style="color: #666666; font-style: italic;">//but it is from FooUnderTest</span>
        assertEquals<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">2</span>, <span style="color: #000000; font-weight: bold;">new</span> FooUnderTest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">m</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">class</span> FooUnderTest <span style="color: #000000; font-weight: bold;">extends</span> Foo <span style="color: #009900;">&#123;</span>
        @Override
        <span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000066; font-weight: bold;">int</span> m<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">m</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div></div>
<p>Although it is a common and accepted practice in Java to give a normally private method a protected visibility just to accomodate the case, purists are still under shock (and I belong to that camp), but that&#8217;s nevertheless a standard in Java. But this example demonstrates the drawback of this technique as well : it requires a huge, almost useless, amount of code, just a workaround and syntactic solution to a Java problem, but contains no interesting logic and is, indeed, a useless and thus painful programming effort. Nevertheless it could please purists as there is no need to alter the system under test only for testing purposes.</p>
<p><strong>3. Using introspection is also possible.</strong> Reflexion allows to bypass the built-in visibility mechanism of Java. It allows to invoke any private / protected method on an object, or to use a private / protected field.</p>
<p>Here is an example :</p>
<p><em>In your test app :</em></p>

<div class="wp_codebox"><table><tr id="p3404122"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p34041code22"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">foo.bar.test</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.test.AndroidTestCase</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FooTest <span style="color: #000000; font-weight: bold;">extends</span> AndroidTestCase <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> testFoo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">Method</span> method <span style="color: #339933;">=</span> targetClass.<span style="color: #006633;">getDeclaredMethod</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;m&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000000; font-weight: bold;">Class</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        method.<span style="color: #006633;">setAccessible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">int</span> actual <span style="color: #339933;">=</span> method.<span style="color: #006633;">invoke</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> Foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Object</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        assertEquals<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">2</span>, actual <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Although this leads to some much more cryptic syntax and make you loose the ability to refactor your code easily (as you will have to hard code method under test names in your tests), this technique is only one that can be used to test a really private method. It will please purists as there is no need to alter the system under test only for testing purposes.</p>
<p><strong>4. Avoid naming your Java packages in the same way as you name you Application package : </strong> in other words, there is absolutely no obligation to use the same name in your Java package and inside your AndroidManifest.xml.<em><a title="Android Documentation about package names of test apps." href="http://developer.android.com/tools/testing/testing_android.html#PackageNames">It was a bad idea from Google to call a &#8220;package&#8221; the app identifier inside an AndroidManifest file</a>. This &#8220;package&#8221; is indeed an ID for your application inside google market for instance but it imposes no kind of constraints on Java packages inside your app and has indeed nothing to do with them.</em></p>
<div>
<p>Here is an example :</p>
<p><em>In your test app AndroidManifest.xml:</em></p>

<div class="wp_codebox"><table><tr id="p3404123"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p34041code23"><pre class="xml" style="font-family:monospace;"> ...
 package=&quot;foo.bar.test&quot;
 ...</pre></td></tr></table></div>

<p><em>In your test app Java classes :</em></p>

<div class="wp_codebox"><table><tr id="p3404124"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p34041code24"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">foo.bar</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//&lt;---That's the point !!</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">android.test.AndroidTestCase</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FooTest <span style="color: #000000; font-weight: bold;">extends</span> AndroidTestCase<span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> testFoo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">//m() is now accessible directly from Foo</span>
        assertEquals<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">2</span>, <span style="color: #000000; font-weight: bold;">new</span> Foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">m</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>How does this work ? Simply because test classes and classes under test will be loaded inside the same Dalvik VM, all classes loaded from both apps and test-apps will be merged at runtime. Thus there is no difference in placing a class in an app or another on this specific matter (but please note that a class under test can&#8217;t depend on any class that is found in the test app dex/apk, this would result in an exception <span class="code">&#8216;ClassNotFoundException : class loaded from the wrong dex&#8217;</span>).</p>
<p><strong>Conclusion</strong><br />
This latter approach is much simpler than anything else and relies on the common Java practice of giving the protected visibility level to private methods for the sole purpose of testing them.</p>
<p>By using the same package for your test classes and your classes under test, you can test very simply internal methods and the package structure of your test app is much clearer.</p>
<p>Moreover, there is an additional benefit : you can use the eclipse &#8220;create junit test&#8221; wizard on your class under test (right click on the class under test and find it in the &#8220;<span class="code">New&nbsp;&gt;&gt;&nbsp;JUnit&nbsp;Test&nbsp;Case</span>&#8221; option). Just change the source folder field of the wizard and choose your test app source folder instead of the app folder.</p>
<hr />
<p>This article is the first of a serie of articles that will be dedicated to testability of android applications, one of the axis of research inside the Mobile Development Team @ Octo Technology.</p>
</div>
 <img src="http://blog.octo.com/?feed-stats-post-id=34041" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss'>
<p>Suggestion d'articles :</p><ol>
<li><a href='http://blog.octo.com/en/how-to-test-private-methods/' rel='bookmark' title='How to test private methods?'>How to test private methods?</a></li>
<li><a href='http://blog.octo.com/en/functional-testing-of-a-mvvm-silverlight-application-with-fitnesse/' rel='bookmark' title='Functional testing of a MVVM Silverlight application with Fitnesse'>Functional testing of a MVVM Silverlight application with Fitnesse</a></li>
<li><a href='http://blog.octo.com/en/mutation-testing-a-step-further-to-the-perfection/' rel='bookmark' title='Mutation Testing, a step further to the perfection'>Mutation Testing, a step further to the perfection</a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/android-testing-testing-private-methods/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Batman rises in Monte-Carlo</title>
		<link>http://blog.octo.com/en/batman-rises-dans-monte-carlo/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=batman-rises-dans-monte-carlo</link>
		<comments>http://blog.octo.com/en/batman-rises-dans-monte-carlo/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 07:00:26 +0000</pubDate>
		<dc:creator>Henri Tremblay</dc:creator>
				<category><![CDATA[IT architect's workshop]]></category>

		<guid isPermaLink="false">http://blog.octo.com/?p=33251</guid>
		<description><![CDATA[I had the chance, with Alexis Flaurimont, to speak about the usefulness of parallel programming at Breizh C@mp this year. One of the goals was to demonstrate that parallel programming is a lot easier to code than a couple of years ago. During the presentation, we used the Monte Carlo method. It is, I must [...]<div class='yarpp-related-rss yarpp-related-none'>
</div>
]]></description>
				<content:encoded><![CDATA[<p>I had the chance, with Alexis Flaurimont, to speak about the usefulness of parallel programming at <a href="http://www.breizhcamp.org/" target="_blank">Breizh C@mp</a> this year. One of the goals was to demonstrate that parallel programming is a lot easier to code than a couple of years ago.</p>
<p>During the presentation, we used the <a href="http://en.wikipedia.org/wiki/Monte_Carlo_method" target="_blank">Monte Carlo method</a>. It is, I must confess, an embarrassingly parallel algorithm. Perfect to demonstrate that parallelization can greatly improve an application performances.</p>
<p><span id="more-33251"></span>The Monte Carlo method is usually explained by calculating Pi. It consists of calculating statistically something that we can&#8217;t calculate mathematically. Pi is in fact a bad example since it&#8217;s more efficient to calculate it using power series. I&#8217;ll let you read the Wikipedia article for a longer explanation but let just say that the idea is to randomly draw values and decide what they worth. The average worth value of all the draws will approximate the real answer. The more we draw, the closer we are from the real answer.</p>
<p>From where I stand, Pi just ain&#8217;t no fun. So I picked Batman instead. To calculate the area of the Batman logo to be precise. Much more amusing. I&#8217;ve based my calculation on the <a href="http://blog.octo.com/wp-content/uploads/2012/08/batman_equation.jpg">Batman equation&#8221;</a> that was circling around Internet last year.</p>
<p style="text-align: center;"><img class="aligncenter  wp-image-33490" title="Batman equation" src="http://blog.octo.com/wp-content/uploads/2012/08/batman_equation.jpg" alt="" width="1586" height="1638" /></p>
<p>With a lot of minutia and helped by <a href="http://www.wolframalpha.com/input/?i=batman+equation">Wolfram Alpha</a>, I&#8217;ve coded it in Java. Please note that the Wolfram Alpha equation is wrong. I&#8217;ll look at how to tell them without success. If someone knows how, please leave a comment. Here&#8217;s the fix:<br />
<a href="http://blog.octo.com/wp-content/uploads/2012/08/fix_batman_equation.jpg"><img class="aligncenter size-full wp-image-33492" title="fix_batman_equation" src="http://blog.octo.com/wp-content/uploads/2012/08/fix_batman_equation.jpg" alt="" width="892" height="84" /></a></p>
<p>The code is on <a href="https://github.com/henri-tremblay/batman" target="_blank">Github</a>. Visually, it looks like that:</p>
<p><a href="http://blog.octo.com/wp-content/uploads/2012/08/batman.avi">batman</a></p>
<p>There&#8217;s also a Pi calculating version, but, since it&#8217;s just a circle, as I said, it ain&#8217;t no fun. But useful to test the Monte Carlo implementation. Back to Batman. Quite nice visually, but that was more useful in conference than here. What we want here is to compare the performances. For that, we use a 30 seconds execution of each. The goal is to perform as much draws as we can. I did three implementations:</p>
<ul>
<li><strong>Sequential:</strong> A loop does on draw after the other</li>
<li><strong>Parallèle:</strong> A ForkJoinPool launch parallel loops on each available CPU</li>
<li><strong>GPU:</strong> <a href="http://code.google.com/p/aparapi/">Aparapi</a> is used to calculate on the GPU</li>
</ul>
<p>To give you an idea, here&#8217;s a snippet of the sequential code:</p>
<pre class="brush:java">MonteCarloCalculator calculator = instantiateAlgorithm(constructor, 0);
new MonteCarloCmd(calculator).run();</pre>
<p>Quite obvious. We call a calculator that loops. In parallel it&#8217;s a bit more complex but not much:</p>
<pre class="brush:java">ForkJoinPool pool = new ForkJoinPool(); // pool creation
for (int i = 0; i &lt; pool.getParallelism(); i++) {
   MonteCarloCalculator calculator = instantiateAlgorithm(constructor, i); // one calculator per CPU
   pool.execute(new MonteCarloCmd(calculator)); // we launch the parallel execution on the pool
}
try {
   latch.await(TIMEOUT, TimeUnit.SECONDS); // and wait for everything to be done
} catch (InterruptedException e) {
   throw new RuntimeException(e);
}
pool.shutdown(); // close the pool (that can be reused if needed)</pre>
<p>The real code on <a href="https://github.com/henri-tremblay/batman" target="_blank">GitHub</a> is a bit more complicated because I&#8217;ve put in place a listener pattern to give some feedback while it&#8217;s running. This implementation is in fact penalizing the parallel algorithm since it requires data aggregation using atomic references and optimistic updates during the run. Than wouldn&#8217;t be necessary in a traditional implementation.</p>
<p>For the curious among you, here the Java version of the Batman equation:</p>
<pre class="brush:java">// Wings bottom
if (pow(x, 2.0) / 49.0 + pow(y, 2.0) / 9.0 - 1.0 = 4.0 &amp;&amp; -(3.0 * sqrt(33.0)) / 7.0 = 3.0 &amp;&amp; -(3.0 * sqrt(33.0)) / 7.0 = 0) {
	return true;
}
// Tail
if (-3.0 = 0 &amp;&amp; 3.0 / 4.0 = 0) {
	return true;
}
// Ears inside
if (1.0 / 2.0 = 0 &amp;&amp; y &gt;= 0) {
	return true;
}
// Chest
if (abs(x) = 0 &amp;&amp; 9.0 / 4.0 - y &gt;= 0) {
	return true;
}
// Shoulders
if (abs(x) &gt;= 1.0
		&amp;&amp; y &gt;= 0
		&amp;&amp; -(abs(x)) / 2.0 - 3.0 / 7.0 * sqrt(10.0) * sqrt(4.0 - pow(abs(x) - 1.0, 2.0)) - y + (6.0 * sqrt(10.0)) / 7.0
				+ 3.0 / 2.0 &gt;= 0) {
	return true;
}
return false;</pre>
<p>To compare the implementations, a benchmark have been done on a Quadruple Extra Large GPU cluster at Amazon. We had 16 CPU cores and 996 GPU cores. Here are the results for the 30 seconds execution:</p>
<ul>
<li><strong>Sequential:</strong>179 786 000 draws</li>
<li><strong>Parallel:</strong> 709 731 000 draws</li>
<li><strong>GPU:</strong> 12 582 912 000 draws</li>
</ul>
<p>In parallel, we get let improvement than I was hoping for. We surely can do a better job. As I said, the implementation is penalizing the parallel execution. And it&#8217;s not that terrible since it shows a nice demonstration of the <a href="http://en.wikipedia.org/wiki/Amdahl's_law" target="_blank">Amdahl&#8217;s law</a>. One thing to remember: The sequential version is using only one CPU while the parallel one is using them all. While keeping a relatively simple implementation.</p>
<p>On the GPU side, the simplicity effect is less obvious. The good news are that Aparapi is quite refreshing. The library is translating the kernel (the part that runs on the GPU) bytecode into an OpenCL implementation which is called through JNI. It&#8217;s developed by AMD. You can cook a matrix calculation example in about 10 minutes. However, doing a Monte Carlo is a bit more complicated. Here are some issues you might encounter.</p>
<ul>
<li>You can use only really simple JDK classes. For instance, <code>java.util.Random</code> just doesn&#8217;t work</li>
<li>GPUs don&#8217;t like conditions (&#8220;if&#8221;). To get good performances, you have to modify your code into a linear computation</li>
<li>For some reason, bitwise (&amp;, |, ^) operations are silently not working</li>
</ul>
<p>On top of that, you won&#8217;t get with Aparapi the performances as high as you would get with CUDA. But the gap is slowly closing. For instance, there are new annotations helping the memory management. Data localisation in memory is really important on a GPU. Still, you surely noticed that, without any optimisation effort, the GPU version is 17 times faster than the parallel one!</p>
<p>I&#8217;ll conclude like this:</p>
<ul>
<li>Sequential, you already know about it, it&#8217;s reassuring, no need to think too much&#8230; and it&#8217;s slow</li>
<li>Parallel, not that complicated after all. A lot complexity hidden from the developer. Indeed, the GitHub code is in fact much more complicated than required</li>
<li>GPU, I&#8217;ll say it&#8217;s refreshingly easier than 2 years ago, but we are not in the commodity realm yet. It&#8217;s not that hard, but you need to make sure you really need it before using it</li>
</ul>
<p>Meanwhile, let Batman rise in parallel.<br />
<a href="http://blog.octo.com/wp-content/uploads/2012/09/puissance-en.png"><img src="http://blog.octo.com/wp-content/uploads/2012/09/puissance-en.png" alt="" title="puissance-en" width="720" height="550" class="aligncenter size-full wp-image-34188" /></a></p>
 <img src="http://blog.octo.com/?feed-stats-post-id=33251" width="1" height="1" style="display: none;" /><div class='yarpp-related-rss yarpp-related-none'>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.octo.com/en/batman-rises-dans-monte-carlo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://blog.octo.com/wp-content/uploads/2012/08/batman.avi" length="7754474" type="video/avi" />
		</item>
	</channel>
</rss>
