<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<atom:link href="http://tech.bligoo.com/rss/node" rel="self" type="application/rss+xml" /><title>Bligoo&#39;s Tech Blog</title>
<link>http://tech.bligoo.com/</link>
<description></description>
<pubDate>Mon, 21 Dec 2009 12:08:10 -0300</pubDate>
<generator>http://www.bligoo.com/</generator>
<language>es</language>
<item>
<title>Low Budget Application Scalability, the Tale of Bligoo.com</title>
<link>http://tech.bligoo.com/content/view/937414/Low-Budget-Application-Scalability-the-Tale-of-Bligoo-com.html</link>
<pubDate>Sun, 15 Aug 2010 22:41:14 -0400</pubDate>
<guid isPermaLink="false">http://tech.bligoo.com/content/view/937414/Low-Budget-Application-Scalability-the-Tale-of-Bligoo-com.html</guid>
<dc:creator>Emilio Davis</dc:creator>
<description><![CDATA[<p><img width="470" style="border: 0; margin: 4px;" alt="corner_main.jpg" src="http://www.sxsw.com/sites/2011.sxsw.com/themes/sxsw2011/images/corner_main.jpg?v=1281831934319" /></p>
<p>&nbsp;</p>
<p>I submmited a proposal for a panel in the next <a href="http://www.sxsw.com/">SXSW </a>that will happen&nbsp;in Austin Texas next march.</p>
<p>This is the description of the talk.&nbsp;</p>
<p>&nbsp;</p>
<blockquote>
<p>In this presentation we will show you how bootstrapped start-up Bligoo, a site creation platform from Chile, built it&rsquo;s site using the Apache/Jboss/MySQL stack with a freemium business model. The site has over 500.000 registered users from every corner of Latin America and Spain who have built over 30.000 sites and created over 2 million different pages. Bligoo receives more than 8 million visitors every month, currently running over only 3 mid-range servers. At a steady growth rate of 15% per month, they're prepared to grow to take over larger and larger markets. In the beginning, without VC money, in a small online advertising market in Latin America and without a clear idea of how to monetize our users, we were forced to develop a zero tolerance policy to combat &lsquo;code fat&rsquo;, algorithm laziness, and team under-productivity. In this process we have identified twelve tasks a company should execute in order to build a scalable web application during the early stages of a start-up without eating into the initial capital before reaching the tipping point. This process can handle a big spike of success or steady grow while keeping the revenue per user positive.</p>
<p>&nbsp;</p>
</blockquote>
<p>If you like the idea dont be shy, go ahead and vote for it at&nbsp;<a href="http://panelpicker.sxsw.com/ideas/view/7746">http://panelpicker.sxsw.com/ideas/view/7746</a></p>]]></description>
<wfw:commentRss>http://tech.bligoo.com/rss/comments/view/937414</wfw:commentRss>
</item>
<item>
<title>count(*) is the devil, stay away from it!</title>
<link>http://tech.bligoo.com/content/view/835479/count-is-the-devil-stay-away-from-it.html</link>
<pubDate>Wed, 16 Jun 2010 12:42:41 -0400</pubDate>
<guid isPermaLink="false">http://tech.bligoo.com/content/view/835479/count-is-the-devil-stay-away-from-it.html</guid>
<dc:creator>Emilio Davis</dc:creator>
<description><![CDATA[<p>MyISAM, an aged MySQL engine with no transactional support and awful scalabililty spoiled many developers with an ultra fast count(*) implementation. But is ultra fast only when there is no conditions in the where part of the sentence.</p>
<p>At least in InnoDB (the common replacement for MySQL, at least until Maria gets more traction) every count(*) has to make a temporary table with all the matching lines and the count the lenght of the table.</p>
<p>There are two ways to deal with count(*).</p>
<p>1.- Don't use count(*) rather count(primaryKey).</p>
<p>&nbsp;&nbsp; &nbsp; In InnoDB the primary key is always part of any index so, if the condition is decent and you have an index for it the temporaty table willl be in the index ergo much much faster.</p>
<p>&nbsp;</p>
<p>2.- Just dont use count(*).</p>
<p>&nbsp;&nbsp; &nbsp; In many cases the use of count is just lazy thinking. For example developers use the count just to see if its non-zero</p>
<p>&nbsp;<b>&nbsp; &nbsp; $count=do_sql("select count(*) from table where condition");</b></p>
<p><b>&nbsp;&nbsp; &nbsp; if($count &gt; 0){</b></p>
<p><b>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do_something();</b></p>
<p><b>&nbsp;&nbsp; &nbsp; }</b></p>
<p>&nbsp;&nbsp; &nbsp; That can be replaced with a much faster:</p>
<p>&nbsp;&nbsp; &nbsp;<b>&nbsp;$item=do_sql("select primaryKey from table where condition limit 1");</b></p>
<p><b>&nbsp;&nbsp; &nbsp; &nbsp;if($item is not null){</b></p>
<p><b>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do_something();</b></p>
<p><b>&nbsp;&nbsp; &nbsp; &nbsp;}</b></p>
<p>&nbsp;&nbsp; &nbsp;Is so much faster because when you limit the result mysql creates the same result table but stops right after it has 1 item.</p>
<p>&nbsp;</p>]]></description>
<wfw:commentRss>http://tech.bligoo.com/rss/comments/view/835479</wfw:commentRss>
</item>
<item>
<title>Stop global warming - Stop NoSQL</title>
<link>http://tech.bligoo.com/content/view/678251/Stop-global-warming-Stop-NoSQL.html</link>
<pubDate>Thu, 10 Dec 2009 11:51:26 -0300</pubDate>
<guid isPermaLink="false">http://tech.bligoo.com/content/view/678251/Stop-global-warming-Stop-NoSQL.html</guid>
<dc:creator>Emilio Davis</dc:creator>
<description><![CDATA[<p>Made me laugh for a while :)</p>
<p>
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/LhnGarRsKnA&fs=1"></param>
<param name="allowFullScreen" value="true"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/LhnGarRsKnA&fs=1" wmode="transparent" allowfullscreen="true" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>
</p>]]></description>
<wfw:commentRss>http://tech.bligoo.com/rss/comments/view/678251</wfw:commentRss>
</item>
<item>
<title>Webprendedor 2009 - Web Apps Scalability workshop (slides)</title>
<link>http://tech.bligoo.com/content/view/665375/Webprendedor-2009-Web-Apps-Scalability-workshop-slides.html</link>
<pubDate>Sat, 21 Nov 2009 09:24:14 -0300</pubDate>
<guid isPermaLink="false">http://tech.bligoo.com/content/view/665375/Webprendedor-2009-Web-Apps-Scalability-workshop-slides.html</guid>
<dc:creator>Emilio Davis</dc:creator>
<description><![CDATA[<p>This are the slides of the talk I gave in #wp09 about scalability. They are in spanish but I will translate them to english in the near future.</p>
<p>&nbsp;</p>
<p><!--external_code_start-->
<div style="width:425px;text-align:left" id="__ss_2552111"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/edavism/webprendedor-2009-escalabilidad-2552111" title="Webprendedor 2009 Escalabilidad">Webprendedor 2009 Escalabilidad</a>
<object style="margin:0px" width="425" height="355">
<param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webprendedor2009escalabilidad-091121062023-phpapp01&rel=0&stripped_title=webprendedor-2009-escalabilidad-2552111" />
<param name="allowFullScreen" value="true"/>
<param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webprendedor2009escalabilidad-091121062023-phpapp01&rel=0&stripped_title=webprendedor-2009-escalabilidad-2552111" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed>
</object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/edavism">edavism</a>.</div>
</div>
<!--external_code_end--></p>]]></description>
<wfw:commentRss>http://tech.bligoo.com/rss/comments/view/665375</wfw:commentRss>
</item>
<item>
<title>Webprendedor 2009 - Web Apps Scalability workshop</title>
<link>http://tech.bligoo.com/content/view/660559/Webprendedor-2009-Web-Apps-Scalability-workshop.html</link>
<pubDate>Sun, 15 Nov 2009 00:38:39 -0300</pubDate>
<guid isPermaLink="false">http://tech.bligoo.com/content/view/660559/Webprendedor-2009-Web-Apps-Scalability-workshop.html</guid>
<dc:creator>Emilio Davis</dc:creator>
<description><![CDATA[<p><img width="420" src="http://bligoo.com/media/users/0/14/images/public/23666/logo.png?v=1258255760489" title="logo.png" style="border: 0; margin: 4px;" /></p>
<p>This Nov 20th I will give a talk on the challenge of scalating a web application, main topics will be:</p>
<ul>
<li><strong>Plan to grow</strong>: While building your app, <strong>ALWAYS</strong> consider scalability.</li>
<li><strong>Know your technology stack</strong>: From the file system to the edge cache.</li>
<li><strong>Keep it simple</strong>: DB sharding, just say no.</li>
<li><strong>Be ready to change</strong>: Have you considered NoSQL already?</li>
<li><strong>Don't be lazy</strong>: Great for prototyping not necesarily means good for production.</li>
<li><strong>Performance tunning</strong>: chasing the next bottleneck.</li>
</ul>
<p>Check http://www.webprendedor.com for the rest of the workshops and related info.</p>]]></description>
<wfw:commentRss>http://tech.bligoo.com/rss/comments/view/660559</wfw:commentRss>
</item>
<item>
<title>Hibernate executeUpdate gotcha!!</title>
<link>http://tech.bligoo.com/content/view/658643/Hibernate-executeUpdate-gotcha.html</link>
<pubDate>Sun, 15 Nov 2009 00:51:00 -0300</pubDate>
<guid isPermaLink="false">http://tech.bligoo.com/content/view/658643/Hibernate-executeUpdate-gotcha.html</guid>
<dc:creator>Emilio Davis</dc:creator>
<description><![CDATA[<p><img style="-webkit-user-select: none; float: left;" src="https://www.hibernate.org/tpl/jboss/img/01_oben_logo.gif" /><a href="http://www.hibernate.org">Hibernate</a> is one of the best object/relational persistence and query service. Basically it lets you code your application using POJOs and it takes care of persisting it to a RDBMS back-end. If you couple this with a HA/High performance cache service like <a href="http://www.jboss.org/jbosscache">JbossCache</a> as a second level cache you get a very fast, high availability, easy to code solution, to manage the data in your application.</p>
<p>
In Hibernate you can "find" the objects you need (using a primary key), modify them and the back-end will make sure the changes are propagated to the database. Hibernate also lets you use a SQL like query language (HSQL) to perform data transformation ("update MyObject set property = newvalue") however, if you are using a second level cache it will <strong>evict all</strong> the objects of that class not only the affected by the query so it will be a <strong>big hit on performance</strong>.</p>
<p>To avoid this problem you have two choices:</p>
<ol>
<li>Do domain level data manipulation, i.e. use the entity manager to find the objects you want to modify and set the properties one by one. In this case the cache will be updated without the need to evict all the region.</li>
<li>By-pass hibernate: you can open a jdbc conection using the datasource and execute your query there. This method will make your cache partially inconsistent and you have to see if you can live with it.</li>
</ol>]]></description>
<wfw:commentRss>http://tech.bligoo.com/rss/comments/view/658643</wfw:commentRss>
</item>
<item>
<title>Welcome to Bligoo</title>
<link>http://tech.bligoo.com/content/view/658642/Welcome-to-Bligoo.html</link>
<pubDate>Thu, 12 Nov 2009 11:12:26 -0300</pubDate>
<guid isPermaLink="false">http://tech.bligoo.com/content/view/658642/Welcome-to-Bligoo.html</guid>
<dc:creator>Emilio Davis</dc:creator>
<description><![CDATA[<p>&nbsp;</p><div style="text-align: center">

<object width="100%" height="340">
	<param name="movie" value="http://www.youtube.com/v/0K2woowMH3M&hl=en&fs=1&"></param>
	<param name="wmode" value="transparent"></param>
	<param name="allowFullScreen" value="true"></param>
	<param name="allowscriptaccess" value="always"></param>
	<embed src="http://www.youtube.com/v/0K2woowMH3M&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="340"  wmode="transparent" ></embed>
</object>

</div>
<p>Hello! This is your first post. We wrote it down for you so you could see how it looks like, but feel free to erase or modify it if you want to: write down anything you want.</p>
<p>For any doubts or questions, please go to <a href="http://ayuda.bligoo.com/">Bligoo's Kitchen</a> and let everybody know what your doubts are, so yours can help others. We will orientate you through the process of creating your community and contacting others in Bligoo.</p>
<p>Good luck and thank you very much for using Bligoo as your community platform. We'll keep growing so we can provide a better service for you, day by day. Now, let's bligg!</p>]]></description>
<wfw:commentRss>http://tech.bligoo.com/rss/comments/view/658642</wfw:commentRss>
</item>
</channel>
</rss>

