<?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>Pheromone Lab &#187; optimisation</title>
	<atom:link href="http://lab.pheromone.ca/tag/optimisation/feed/" rel="self" type="application/rss+xml" />
	<link>http://lab.pheromone.ca</link>
	<description>Inspiration, Experimentation, Innovation</description>
	<lastBuildDate>Thu, 02 Sep 2010 19:19:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Doing It Right And Simple</title>
		<link>http://lab.pheromone.ca/2010/01/06/doing-it-right-and-simple/</link>
		<comments>http://lab.pheromone.ca/2010/01/06/doing-it-right-and-simple/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 14:39:52 +0000</pubDate>
		<dc:creator>karl</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[refactoring]]></category>
		<category><![CDATA[social network]]></category>
		<category><![CDATA[web agency]]></category>

		<guid isPermaLink="false">http://lab.pheromone.ca/?p=226</guid>
		<description><![CDATA[Tim Bray in Doing it Wrong explains the big differences between the big traditional software companies with a lot of process and the Web companies and its associated culture. Obviously, the technology matters. This isn’t the place for details, but apparently the winning mix includes dynamic languages and Web frameworks and TDD and REST and [...]]]></description>
			<content:encoded><![CDATA[<p>Tim Bray in <a href="http://www.tbray.org/ongoing/When/201x/2010/01/02/Doing-It-Wrong">Doing it Wrong</a> explains the big differences between the big traditional software companies with a lot of process and the Web companies and its associated culture.</p>
<blockquote cite="http://www.tbray.org/ongoing/When/201x/2010/01/02/Doing-It-Wrong"><p>Obviously, the technology matters. This isn’t the place for details, but apparently the winning mix includes dynamic languages and Web frameworks and TDD and REST and Open Source and NoSQL at varying levels of relative importance.</p>
<p>More important is the culture: iterative development, continuous refactoring, ubiquitous unit testing, starting small, gathering user experience before it seems reasonable. All of which, to be fair, I suppose had its roots in last decade’s Extreme and Agile movements. I don’t hear a lot of talk these days from anyone claiming to “do Extreme” or “be Agile”. But then, in Web-land for damn sure I never hear any talk about large fixed-in-advance specifications, or doing the UML first, or development cycles longer than a single-digit number of weeks.</p>
</blockquote>
<p>But what Tim explains in the rest of his post is the controlled environment versus the wild forest. Many big software projects have been conceived in a controlled environment where everything is stable, where the odds are unlikely to happen. That said when you deploy software and are being confronted with the real traffic, with the awkward decisions of users with regards to your product, you are stepping in a wild directory, very wild. You have to be alert. You have to be able to be reactive. Things will not be perfect. <strong>It will be an iterative process</strong>. Tim Bray continues</p>
<blockquote><p>The point is that that kind of thing simply <strong>cannot be built</strong> if you start with large <strong>formal specifications and fixed-price contracts</strong> and change-control procedures and so on. So if your enterprise wants the sort of outcomes we’re seeing on the Web (and a lot more should), you’re <strong>going to have to adopt</strong> some of the cultures and technologies that got them built.</p>
</blockquote>
<p>The emphasis are mine. In the world of a Web agency, these are harder to put in place than a startup. It&#8217;s a triangle story. There are the product developed by the agency, the requirements of the client, and the <strong>contract</strong> with a limited budget.</p>
<p>If you are developing a traditional Web site with a CMS and a very limited user interaction, no social features, then you are in a safe zone. But if you are mandated to develop a very interactive Web site such as a social network, then you enter in a turbulent field. Either, the budget doesn&#8217;t scale or the philosophy around the project is awkward.</p>
<p>There is a very difficult balance to achieve. <strong>Doing it right and simple</strong> often conflicts with the desire of many features, because the budget seems too important for only one feature.</p>
<p>In twitter, for a very long time, there was one feature, only one feature. They have a team of more than 50 persons, They refactor their code all the time. They have have made big changes in the architecture a few times. Optimization and refactoring are part of the project, you have to plan and discuss it with the clients forefront to not have them surprised during the project.</p>
<p>Developing a social network is hard. It is a territory of unknowns. It is a jungle, where you might have to change the strategy a few times before getting it right. But the more, you pack your shoulders with features, with options, the more you set yourself in a lot of difficulties and budget explosion.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.pheromone.ca/2010/01/06/doing-it-right-and-simple/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Le Grand Club de RDS, améliorations</title>
		<link>http://lab.pheromone.ca/2009/11/04/le-grand-club-de-rds-ameliorations/</link>
		<comments>http://lab.pheromone.ca/2009/11/04/le-grand-club-de-rds-ameliorations/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 20:02:16 +0000</pubDate>
		<dc:creator>Jean-François Dumas</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[grandclub]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rds]]></category>
		<category><![CDATA[social network]]></category>

		<guid isPermaLink="false">http://lab.pheromone.ca/?p=168</guid>
		<description><![CDATA[Le projet groupes de Grand Club consiste plus ou moins en un clone des groupes de Facebook à la sauce sportive… Il sera mis en ligne graduellement dans les prochaines semaines. En plus du projet Groupes plusieurs projets d&#8217;améliorations sont constamment en cours sur le Grand Club et nous permettent de l&#8217;améliorer à chaque semaine. [...]]]></description>
			<content:encoded><![CDATA[<p>Le projet groupes de Grand Club consiste plus ou moins en un clone des groupes de Facebook à la sauce sportive… Il sera mis en ligne graduellement dans les prochaines semaines.</p>
<p>En plus du projet Groupes plusieurs projets d&#8217;améliorations sont constamment en cours sur le Grand Club et nous permettent de l&#8217;améliorer à chaque semaine.  Voici en gros le travail qui a été fait dans les dernières semaines afin d&#8217;améliorer la stabilité et la performance du Grand Club face à la demande toujours grandissante des usagers.</p>
<p><strong>Le language:</strong> <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition 1.8.6</a><br />
La version &#8216;Enterprise&#8217; de Ruby permet d&#8217;améliorer les performances générale du language et de corriger certaines défaillance de celui-ci. Oui, nous pensons déjà à le changer pour Ruby Enterprise 1.8.7&#8230;.</p>
<p><strong>La Fondation:</strong> <a href="http://www.rubyonrails.org">Ruby On Rails</a><br />
Nous avons passé à la version de Rails de 2.1.0 à 2.2.2 et nous comptons encore la changer pour la version 2.3.4 afin d&#8217;améliorer encore la performance de Rails.</p>
<p><strong>Database Performance:</strong><br />
Plusieurs requêtes ont été optimisés. Notre façon de faire les requêtes avec Rails (ActiveRecords) a également été revue afin d&#8217;être plus optimal. </p>
<p><strong>Caching:</strong> <a href="http://www.squid-cache.org/">Squid</a><br />
Squid est un proxy permettant de cacher les images, les css et les javascripts.  Ceci nous permet de servir les pages plus rapidement.  Il est également prévu de se servir de memcache pour cacher les pages du Grand Club afin de les servir plus rapidement encore.</p>
<p><strong>Moteur de recherche:</strong> Caching, Ferret Vs Sphinx<br />
Nous avons changer la façon de faire les recherches lors de certaines recherches en modifiant et optimisant les requêtes. De plus, les résultats de recherches sont maintenant caché pendant un certains temps. Par le passé, nous avons expérimentés plusieurs problèmes avec l&#8217;instabilité du moteur de recherche Ferret. C&#8217;est pour cette raison qu&#8217;un projet nous permettant de tester et d&#8217;implanter Sphinx (un autre moteur de recherche) a été mis sur pied.  La dernière étape dans les tests sur Sphinx sera mise en place dans les prochaines semaines. Si les tests vont bien nous serons en mesure d&#8217;implanter ce nouveau moteur de recherche.</p>
<p><strong>Dark Release: </strong><br />
Le principe de Dark release nous vient de Facebook.  Il consiste à mettre en ligne graduellement des nouveaux features.  Cette technique nous permet de suivre plus facilement les réactions de l&#8217;application et des serveurs.  Une subite montée en charge dû à un nouveaux features est ainsi mieux contrôlé.  Ce mécanisme nous permet également de couper temporairement un feature afin de supporter une charge plus grande.  On pourrait par exemple couper le lifestream, lors de la journée des transactions afin d&#8217;avoir un gain en performance.</p>
<p>Ceux qui ont contribué à rendre tout cela possible <a href="http://twitter.com/benoitgoyette">Benoît</a>, <a href="http://twitter.com/marvalP">Martin</a>, <a href="http://twitter.com/nourami">Amirouche</a>, <a href="http://twitter.com/LouisAsselin">Louis</a>, Marc-Antoine, Ana, <a href="http://twitter.com/yvesroy">Yves</a>, <a href="http://twitter.com/seniorgregor">Sébastien</a>, <a href="http://twitter.com/dandesrosiers">Daniel</a> et moi-même <a href="http://twitter.com/jfdumas">Jean-François</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.pheromone.ca/2009/11/04/le-grand-club-de-rds-ameliorations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bien compter avec SQL pour un compteur de vues</title>
		<link>http://lab.pheromone.ca/2009/07/24/bien-compter-avec-sql-pour-un-compteur-de-vues/</link>
		<comments>http://lab.pheromone.ca/2009/07/24/bien-compter-avec-sql-pour-un-compteur-de-vues/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 18:14:21 +0000</pubDate>
		<dc:creator>karl</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[grandclub]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.vdl2.ca/lelab/?p=55</guid>
		<description><![CDATA[Comment organiser les comptes de vues avec SQL et un site avec un gros trafic.]]></description>
			<content:encoded><![CDATA[<p>Le site du <a href="http://legrandclub.rds.ca/">Grand Club</a>, le réseau social de <a href="http://rds.ca/">RDS</a>, est développé en <a href="http://rubyonrails.org/">Rails</a>.</p>
<p>Le site Web a un gros trafic et de nombreuses interactions.  Sur les billets, il y a des compteurs de vue. À chaque fois qu&#8217;un <a href="http://legrandclub.rds.ca/profils/183218/posts/5981">billet</a> est accédé le nombre de vues est incrémenté dans la base de données de la façon suivante.</p>
<ol>
<li>Lecture du nombre de vues dans la base de données</li>
<li>Incrémentation dans l&#8217;application Rails</li>
<li>Écriture dans la base de données</li>
</ol>
<p>Le problème est lorsque le trafic devient important plusieurs processus concurrents lisent la valeur de la base de données actuelles, exemple: 42. Tous ces processus incrémentent la valeur à 43 et donc tentent d&#8217;écrire la même valeur dans la base de données. Le nombre de vues est donc inexact. La correction a été faite en changeant simplement le processus.</p>
<ol>
<li>À chaque lecture de la page, demander à la base de données d&#8217;incrémenter la valeur par un.</li>
</ol>
<p>C&#8217;est une erreur simpliste, mais corrigée. Il reste cependant un problème qui est cette fois ci de performances. L&#8217;incrémentation de la valeur dans la base de données représente une écriture. </p>
<p><a href="http://www.vdl2.ca/lelab/author/asselin/">Louis Asselin</a> et <a href="http://www.vdl2.ca/lelab/author/ot/">Olivier Théreaux</a> sont en recherche de solutions pour trouver un meilleur système utilisant possiblement un daemon de compteur, peut-être avec memcache. À suivre.</p>
]]></content:encoded>
			<wfw:commentRss>http://lab.pheromone.ca/2009/07/24/bien-compter-avec-sql-pour-un-compteur-de-vues/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
