<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Michal Frackowiak&#039;s blog</title>
		<link>http://michal.wikidot.com</link>
		<description>Professional blog of Michal Frackowiak, founder of Wikidot.com</description>
				<copyright></copyright>
		<lastBuildDate>Fri, 13 Jan 2023 11:53:07 +0000</lastBuildDate>
		
					<item>
				<guid>http://michal.wikidot.com/blog:pieter</guid>
				<title>Pieter</title>
				<link>http://michal.wikidot.com/blog:pieter</link>
				<description>

&lt;p&gt;Definitely the worst news this year. Pieter, hang on. &lt;a href=&quot;http://hintjens.com/blog:115&quot;&gt;http://hintjens.com/blog:115&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 25 Apr 2016 08:37:45 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Definitely the worst news this year. Pieter, hang on. <a href="http://hintjens.com/blog:115">http://hintjens.com/blog:115</a></p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:haproxy</guid>
				<title>HAProxy and Chef - dynamic backend server list</title>
				<link>http://michal.wikidot.com/blog:haproxy</link>
				<description>

&lt;p&gt;After the recent &lt;a href=&quot;http://http://blog.wikidot.com/blog:scaling-issue&quot;&gt;load balancer upgrade at Wikidot&lt;/a&gt; people asked me about the magic behind automatic HAProxy configuration &amp;#8212; namely, how do we solve dynamical addition and removal of backend servers. It&#039;s not that complex, we use Chef.&lt;/p&gt;
&lt;p&gt;Below I will tell you how we do it.&lt;/p&gt;
&lt;p&gt;Assumptions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;We have a working Chef server.&lt;/li&gt;
&lt;li&gt;All nodes run Ubuntu, but it&#039;s not really important.&lt;/li&gt;
&lt;li&gt;All nodes run chef-client periodically (in our case, every 3 minutes).&lt;/li&gt;
&lt;li&gt;All web nodes have role &lt;tt&gt;web&lt;/tt&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As a result will develop a minimal &lt;tt&gt;haproxy&lt;/tt&gt; cookbook to be run on the HAProxy node that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Will set up HAproxy service.&lt;/li&gt;
&lt;li&gt;Will discover and connect to all backend servers.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 20 Nov 2014 10:02:32 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>After the recent <a href="http://http://blog.wikidot.com/blog:scaling-issue">load balancer upgrade at Wikidot</a> people asked me about the magic behind automatic HAProxy configuration &#8212; namely, how do we solve dynamical addition and removal of backend servers. It's not that complex, we use Chef.</p> <p>Below I will tell you how we do it.</p> <p>Assumptions:</p> <ol> <li>We have a working Chef server.</li> <li>All nodes run Ubuntu, but it's not really important.</li> <li>All nodes run chef-client periodically (in our case, every 3 minutes).</li> <li>All web nodes have role <tt>web</tt>.</li> </ol> <p>As a result will develop a minimal <tt>haproxy</tt> cookbook to be run on the HAProxy node that:</p> <ol> <li>Will set up HAproxy service.</li> <li>Will discover and connect to all backend servers.</li> </ol> <div class="content-separator" style="display: none:"></div> <p>I will skip the parts related to setting up Chef, nuances in HAProxy configuration, multiple roles and cookbooks and concentrate just on the auto-configuration part. If this in any way encourages you to set up a similar environment, it's good :-)</p> <p>Here are all important files in our <tt>haproxy</tt> cookbook:</p> <div class="code"> <pre><code>haproxy ├── metadata.rb ├── recipes │ └── default.rb └── templates └── default └── haproxy.cfg.erb</code></pre></div> <h2><span><tt>default.rb</tt></span></h2> <div class="code"> <pre><code># Install HAProxy repo and package itself apt_repository &quot;haproxy_repo&quot; do uri &quot;http://ppa.launchpad.net/vbernat/haproxy-1.5/ubuntu&quot; components ['main'] distribution node['lsb']['codename'] keyserver &quot;keyserver.ubuntu.com&quot; key &quot;1C61B9CD&quot; deb_src false end package 'haproxy' package 'socat' template &quot;/etc/haproxy/haproxy.cfg&quot; do source &quot;haproxy.cfg.erb&quot; owner &quot;haproxy&quot; group &quot;haproxy&quot; variables({ backend_nodes: search(:node, &quot;chef_environment:#{node.chef_environment} AND role:web&quot;).sort_by{ |n| n.name } }) notifies :reload, 'service[haproxy]' end service &quot;haproxy&quot; do supports status: true, restart: true, reload: true action [ :enable, :start ] end</code></pre></div> <p>What it does is that it adds the <a href="https://launchpad.net/~vbernat/+archive/ubuntu/haproxy-1.5">Vincent Bernat's HAProxy repo</a> first. You might skip it if you are fine with HAProxy in your distribution. We want 1.5 badly.</p> <p>Then it installs <tt>haproxy</tt> and <tt>socat</tt> (useful for admin stuff) packages.</p> <p>The next lines create the config file from an ERB template. The important line is:</p> <div class="code"> <pre><code>backend_nodes: search(:node, &quot;chef_environment:#{node.chef_environment} AND role:web&quot;).sort_by{ |n| n.name }</code></pre></div> <br /> Chef-client, when running this cookbook, contacts the Chef-server and does a search over instances asking for all nodes running in the same <tt>chef_environment</tt> and which <tt>role</tt> include <tt>web</tt>. We sort the results to make sure the order is consistent between runs. We pass this data to the template. <p>We can verify that the query actually returns the nodes we expect:</p> <div class="code"> <pre><code>$ knife search node 'chef_environment:production_2 AND role:web' | grep -E '(Name|Roles)' Node Name: i-d15eda3b Roles: web Node Name: i-6ec4088f Roles: web Node Name: i-6dc5098c Roles: web Node Name: i-3491e1de Roles: web Node Name: i-2d0e81cc Roles: web Node Name: i-ce5fdb24 Roles: web Node Name: i-d4c40835 Roles: web Node Name: i-cd5fdb27 Roles: web</code></pre></div> <p>One more thing &#8212; whenever the config file changes, we need to reload <tt>haproxy</tt> service. It's done by the line:</p> <div class="code"> <pre><code>notifies :reload, 'service[haproxy]'</code></pre></div> <p>This way, whenever list of backend servers change, or we provide a new version of template which affects the config file, <tt>haproxy</tt> gracefully reloads it's config.</p> <p>The <tt>service…</tt> part defines the <tt>haproxy</tt> service and makes it run by default.</p> <h2><span><tt>haproxy.cfg.erb</tt></span></h2> <div class="code"> <pre><code>global # Global config goes here defaults # Defaults go here frontend http-in bind *:80 default_backend http-backend backend http-backend balance roundrobin http-check expect status 200 option httpchk GET /ping.php &lt;% @backend_nodes.each do |node| %&gt; server &lt;%= node.name %&gt; &lt;%= node.ipaddress %&gt;:80 check fall 1 &lt;% end %&gt;</code></pre></div> <p>I have simplified the config a bit, but the essentials part are here. In the real config we have stuff like SSL termination, stats, several backends, throttling rules for abuse etc.</p> <p>What's critical is that the list of backend nodes are created from the <tt>@backend_nodes</tt> variable. And you know, that's it! The only thing left is add the cookbook to the <tt>haproxy</tt> node and drive traffic to it.</p> <div class="image-container aligncenter"><a href="http://michal.wdfiles.com/local--files/files/haproxy.jpg"><img src="http://michal.wdfiles.com/local--resized-images/files/haproxy.jpg/small.jpg" alt="haproxy.jpg" class="image" /></a></div> <p>Now it's important to run chef-client periodically on your HAProxy node. This way your list of backend servers would stay up-to-date. One thing I have not mentioned &#8212; it helps if you periodically remove dead nodes from Chef server.</p> <p>We have been running this setup for 2 weeks now on AWS and it works really, really well. We have 2 HAProxy nodes listed in DNS for *.wikidot.com with Route53 health check.</p> <p>If you have any questions, feel free to ask!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:back-from-holidays-new-challenges</guid>
				<title>Back from holidays - new challenges on the horizon</title>
				<link>http://michal.wikidot.com/blog:back-from-holidays-new-challenges</link>
				<description>

&lt;div class=&quot;image-container floatleft&quot;&gt;&lt;img src=&quot;http://farm5.static.flickr.com/4075/4898572127_81ace17d57_m_d.jpg&quot; alt=&quot;4898572127_81ace17d57_m_d.jpg&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;I have just returned from my summer family holidays in &lt;a href=&quot;http://en.wikipedia.org/wiki/Pieniny&quot;&gt;Pieniny&lt;/a&gt;. Spending 100% time with my wife and 3 kids was definitely a very needed refresh after a challenging year. I had enough time to think about plans for the next year and gather enough motivation for upcoming tasks.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 23 Aug 2010 09:52:16 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <div class="image-container floatleft"><img src="http://farm5.static.flickr.com/4075/4898572127_81ace17d57_m_d.jpg" alt="4898572127_81ace17d57_m_d.jpg" class="image" /></div> <p>I have just returned from my summer family holidays in <a href="http://en.wikipedia.org/wiki/Pieniny">Pieniny</a>. Spending 100% time with my wife and 3 kids was definitely a very needed refresh after a challenging year. I had enough time to think about plans for the next year and gather enough motivation for upcoming tasks.</p> <p>(BTW: For those interested in the uncensored stream of holiday photos check out my <a href="http://www.flickr.com/photos/michal_frackowiak/sets/72157624737835678/">Flickr Gallery</a>)</p> <p>So what is up for the next year? Actually, quite a lot, and I expect the next 10 months to be crucial for Wikidot and my other projects. It does not necessarily mean there will be a revolution of any kind, but Wikidot is a perfectly mature project and business right now, and it needs smart management and clear way for the future.</p> <p>Also, other projects I am part of (more or less involved) are going to surface this year. Either hit or miss, those projects are interesting and I will definitely keep my thumbs up when they go live.</p> <p>Last but not least, I will write more (I mean this blog too). Last few months were kind of difficult the work required a lot of my attention, leaving very little time for blogging.</p> <p>If you want to follow me closer, the best way is to <strong><a href="http://twitter.com/michalf">follow me on Twitter</a></strong>. Thanks!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:zend-code-analyzer-in-textmate</guid>
				<title>Zend Code Analyzer in TextMate</title>
				<link>http://michal.wikidot.com/blog:zend-code-analyzer-in-textmate</link>
				<description>

&lt;p&gt;&lt;a href=&quot;http://files.zend.com/help/Zend-Studio-Eclipse/code_analyzer.htm&quot;&gt;Zend Code Analyzer&lt;/a&gt; (part of &lt;a href=&quot;http://www.zend.com/products/studio/&quot;&gt;Zend Studio&lt;/a&gt;) is a powerful tool that analyzes PHP scripts and detects errors and warnings possibly generated by your code. I have been using Zend Studio for a while, and I miss this feature a lot when working with TextMate. Fortunately, thanks to great extensibility of TM, one can include code analysis in the PHP bundle within just a few minutes.&lt;/p&gt;
&lt;p&gt;After completing the steps below, you will be able to press a combination of keys and ZendCodeAnalyzer will analyze your PHP script and render its output like on the screen below:&lt;/p&gt;
&lt;div class=&quot;image-container aligncenter&quot;&gt;&lt;img src=&quot;http://img.skitch.com/20091218-qp7jyykgqytqu3depeak8rm88u.png&quot; width=&quot;450&quot; alt=&quot;20091218-qp7jyykgqytqu3depeak8rm88u.png&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 18 Dec 2009 23:26:00 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p><a href="http://files.zend.com/help/Zend-Studio-Eclipse/code_analyzer.htm">Zend Code Analyzer</a> (part of <a href="http://www.zend.com/products/studio/">Zend Studio</a>) is a powerful tool that analyzes PHP scripts and detects errors and warnings possibly generated by your code. I have been using Zend Studio for a while, and I miss this feature a lot when working with TextMate. Fortunately, thanks to great extensibility of TM, one can include code analysis in the PHP bundle within just a few minutes.</p> <p>After completing the steps below, you will be able to press a combination of keys and ZendCodeAnalyzer will analyze your PHP script and render its output like on the screen below:</p> <div class="image-container aligncenter"><img src="http://img.skitch.com/20091218-qp7jyykgqytqu3depeak8rm88u.png" width="450" alt="20091218-qp7jyykgqytqu3depeak8rm88u.png" class="image" /></div> <div class="content-separator" style="display: none:"></div> <p>And here is how.</p> <h3><span>1. Download Zend Studio (demo)</span></h3> <p>Go to <a href="http://www.zend.com/en/products/studio/downloads-prev">http://www.zend.com/en/products/studio/downloads-prev</a> and download a 30-day trial of Zend Studio 7.0.</p> <div class="image-container aligncenter"><img src="http://img.skitch.com/20091218-bmaw41ddg1mhu4n3kej6rk8dhw.jpg" alt="20091218-bmaw41ddg1mhu4n3kej6rk8dhw.jpg" class="image" /></div> <p>You can skip this option if you already have Zend Studio, but since you are using TextMate &#8212; I bet you don't. You might need to create an account at Zend, but this is all free. Note that the newest Zend Studio 7.1 does not have a standalone ZendCodeAnalyzer binary, and cannot be (yet) used in TextMate.</p> <h3><span>2. Copy the binary file</span></h3> <p>One way to get ZendCodeAnalyzer is to install Zend Studio and look for the file in the installation path. But I do not like to waste my time installing stuff I will not need. Besides, we are interested just in one single executable file.</p> <p>Open (mount) the downloaded dmg image. If you had just downloaded this, it should be mounted. Now paste those commands:</p> <div class="code"> <pre><code>mkdir /tmp/zca cd /tmp/zca unzip /Volumes/ZendStudio\ 7.0.*/ZendStudio.app/Contents/Resources/Java/Disk1/InstData/Resource1.zip \ '$IA_PROJECT_DIR$/resources/Mac/plugins_zg_ia_sf.jar' unzip '$IA_PROJECT_DIR$/resources/Mac/plugins_zg_ia_sf.jar' '*ZendCodeAnalyzer' sudo cp `find . -name ZendCodeAnalyzer` /usr/local/bin/zca sudo chmod a+x /usr/local/bin/zca cd rm -rf /tmp/zca</code></pre></div> <p>By doing so you end up having a <tt>zca</tt> executable in <tt>/usr/local/bin</tt>. Verify whether it works:</p> <div class="code"> <pre><code>zca --help</code></pre></div> <h3><span>4. Edit TextMate PHP bundle</span></h3> <p>Now you need to add a new command to the PHP bundle.</p> <ul> <li>Select <em>Bundles</em> &#187; <em>Bundle Editor</em> &#187; <em>Edit Commands&#8230;</em></li> <li>Add a new command &#8212; I called mine <em>Analyze Code</em></li> <li>Paste the following code:</li> </ul> <div class="code"> <pre><code>#!/usr/bin/env ruby require ENV['TM_SUPPORT_PATH'] + '/lib/textmate' result = `/usr/local/bin/zca #{ENV['TM_FILEPATH']} 2&gt;&amp;1` puts result.gsub /^Analyzing.*?\n/m, '' if result =~ /line (\d+)/ TextMate.go_to :line =&gt; $1 else puts &quot;No problems found&quot; end</code></pre></div> <ul> <li>Set other options as on the screenshot:</li> </ul> <div class="image-container aligncenter"><img src="http://img.skitch.com/20091218-p112kgt5j21xbwdedrhpu1cb8y.png" width="450" alt="20091218-p112kgt5j21xbwdedrhpu1cb8y.png" class="image" /></div> <p>(choose any other keyboard shortcut if you wish)</p> <ul> <li>Edit PHP Bundle menu and move the <em>Analyze Code</em> below <em>Validate Code</em> (pure esthetics)</li> </ul> <div class="image-container aligncenter"><img src="http://img.skitch.com/20091218-x5y47sgdgyf942tjq1ts8afcai.png" width="450" alt="20091218-x5y47sgdgyf942tjq1ts8afcai.png" class="image" /></div> <h3><span>5. Try it!</span></h3> <p>Let us try the analyzer on a simple code:</p> <div class="code"> <div class="hl-main"> <pre><span class="hl-inlinetags">&lt;?php</span><span class="hl-code"> </span><span class="hl-reserved">function</span><span class="hl-code"> </span><span class="hl-identifier">foo</span><span class="hl-brackets">(</span><span class="hl-var">$bar</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-var">$a</span><span class="hl-code"> = </span><span class="hl-number">3</span><span class="hl-code">; </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-quotes">&quot;</span><span class="hl-string">123</span><span class="hl-quotes">&quot;</span><span class="hl-code"> . </span><span class="hl-var">$c</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">echo</span><span class="hl-code"> </span><span class="hl-identifier">foo</span><span class="hl-brackets">(</span><span class="hl-quotes">&quot;</span><span class="hl-string">bar</span><span class="hl-quotes">&quot;</span><span class="hl-brackets">)</span><span class="hl-code">;</span></pre></div> </div> <p>The code itself is broken in many places, although it does not have any syntax errors. Now try the code analyzer and you should see something like in the first image up there.</p> <p>The command automatically moves the cursor to the first line that contains a problem.</p> <h2><span>Still missing</span></h2> <p>ZendCodeAnalyzer has been <a href="http://forums.zend.com/viewtopic.php?f=76&amp;t=4082&amp;p=14655">replaced by Semantic Analysis</a> in Zend Studio 7.1 and completely integrated into Eclipse framework. It does not provide a standalone version. Perhaps in the future such a version will be available from Zend, but not now.</p> <p>ZendCodeAnalyzer has some tuning options, mainly: <tt><span style="white-space: pre-wrap;">--enable&#32;&lt;warning-name&gt;</span></tt>, <tt><span style="white-space: pre-wrap;">--disable&#32;&lt;warning-name&gt;</span></tt>, <tt><span style="white-space: pre-wrap;">--recursive</span></tt> for including required files and <tt>&#8212;include-path</tt>. Perhaps it would be interesting to play with those to provide more in-depth code analysis.</p> <p><em>Show as Tool Tip</em> might not be the best way to display output of analyzer, but I could not figure out anything smarter.</p> <hr /> <p>Adding code analysis to TextMate is IMHO a game changer, it can potentially save you many headaches caused by various coding mistakes one can make. Although the above installation uses only basic functions of ZCA, it proved to be a very useful addition to the PHP bundle.</p> <p>If you also find it useful &#8212; please add your comment! I will highly appreciate any suggestions and improvements!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:another-world-in-js</guid>
				<title>Another World in JS</title>
				<link>http://michal.wikidot.com/blog:another-world-in-js</link>
				<description>

&lt;p&gt;For quite a while it is clear where HTML is heading. With canvas objects, HTML5 features one will be able to create not only rich web applications, but also desktop apps that communicate through the web.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 18 Dec 2009 10:04:40 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>For quite a while it is clear where HTML is heading. With canvas objects, HTML5 features one will be able to create not only rich web applications, but also desktop apps that communicate through the web.</p> <p>Anyway, today I have accidentally found a cool game written in JavaScript, using canvas. It really surprises me how much you can actually do with the browser nowadays. The game is:</p> <p style="text-align: center;"><span style="font-size:large;"><a href="http://www.megidish.net/awjs/">Another World</a></span></p> <p>&#8212; something I was playing on my old <a href="http://oldcomputers.net/atari520st.html">Atari 520ST</a> long time ago.</p> <div class="image-container aligncenter"><img src="http://img.skitch.com/20091218-jad9bsbhxe683tmwkuisky34rc.jpg" width="400" alt="20091218-jad9bsbhxe683tmwkuisky34rc.jpg" class="image" /></div> <p>It is not a full game, as author says: <em>Q. What's missing in this version?<br /> A. Only one level is supported, and that one is broken as well. There are graphical glitches, movement bugs, and no music or sound effects. As said before, it's only for messing with &lt;canvas&gt;</em></p> <p>But still, as a proof of concept, this is simply great.</p> <p>For more &quot;experiments&quot; with browsers, visit <a href="http://www.chromeexperiments.com">http://www.chromeexperiments.com</a>. Most of them should also work with Safari.</p> <p>As a side effect: isn't position of Adobe Flash a bit in danger? Oh, yes it is!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:make-ruby-1-9-default-on-ubuntu-9-10-karmic-koala</guid>
				<title>Make Ruby 1.9.1 default on Ubuntu 9.10 Karmic Koala</title>
				<link>http://michal.wikidot.com/blog:make-ruby-1-9-default-on-ubuntu-9-10-karmic-koala</link>
				<description>

&lt;p&gt;Ubuntu Karmic Koala comes with Ruby 1.9.1 &amp;#8212; at last. But default Ruby version is still 1.8.7, which means that &lt;tt&gt;ruby&lt;/tt&gt; and &lt;tt&gt;irb&lt;/tt&gt; will still link to 1.8.7, and the bright and shiny 1.9.1 will be available as &lt;tt&gt;ruby1.9.1&lt;/tt&gt; and &lt;tt&gt;irb1.9.1&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 16 Dec 2009 09:26:53 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Ubuntu Karmic Koala comes with Ruby 1.9.1 &#8212; at last. But default Ruby version is still 1.8.7, which means that <tt>ruby</tt> and <tt>irb</tt> will still link to 1.8.7, and the bright and shiny 1.9.1 will be available as <tt>ruby1.9.1</tt> and <tt>irb1.9.1</tt>.</p> <p>If you want <tt>ruby</tt> and <tt>irb</tt> to link to 1.9.1 version, look at the following piece of code that change the default ruby version. Applying this to a plain and fresh Ubuntu 9.10 Karmic Koala gives you full Ruby installation:</p> <div class="code"> <pre><code>aptitude -y update aptitude -y install ruby1.9.1 ruby1.9.1-dev \ rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 g++ # If you already have 1.8 installed update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.8 500 \ --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \ /usr/share/man/man1/ruby.1.8.gz \ --slave /usr/bin/ri ri /usr/bin/ri1.8 \ --slave /usr/bin/irb irb /usr/bin/irb1.8 \ --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.8 # Install ruby1.9.1 update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \ --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \ /usr/share/man/man1/ruby1.9.1.1.gz \ --slave /usr/bin/ri ri /usr/bin/ri1.9.1 \ --slave /usr/bin/irb irb /usr/bin/irb1.9.1 \ --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1 # choose your interpreter # changes symlinks for /usr/bin/ruby , # /usr/bin/irb, /usr/bin/ri and man (1) ruby update-alternatives --config ruby # now try ruby --version</code></pre></div> <p>I am also installing g++ and ruby1.9.1-dev packages because some of gems need those.</p> <p>BTW: Gemcutter.org is now the default gem source, out of the box.</p> <p>Good luck!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:amazon-uses-xeon-servers-for-ec2-m1-large-instances</guid>
				<title>Amazon uses Xeon servers for EC2 m1.large instances - please confirm</title>
				<link>http://michal.wikidot.com/blog:amazon-uses-xeon-servers-for-ec2-m1-large-instances</link>
				<description>

&lt;p&gt;I was surprised today to launch a new EC2 instance, type m1.large (64-bit, 7.5&amp;#160;GB RAM), which usually runs on Opteron CPUs, but to my surprise cat /proc/cpuinfo produces:&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Wed, 27 May 2009 07:05:42 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>I was surprised today to launch a new EC2 instance, type m1.large (64-bit, 7.5&#160;GB RAM), which usually runs on Opteron CPUs, but to my surprise cat /proc/cpuinfo produces:</p> <div class="code"> <pre><code>processor : 0 vendor_id : GenuineIntel cpu family : 6144 KB model : 23 model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz stepping : 6 cpu MHz : 2659.998 cache size : 6144 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca lahf_lm bogomips : 5323.56 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Xeon(R) CPU E5430 @ 2.66GHz stepping : 6 cpu MHz : 2659.998 cache size : 6144 KB physical id : 1 siblings : 1 core id : 0 cpu cores : 1 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr dca lahf_lm bogomips : 5323.56 clflush size : 64 cache_alignment : 64 address sizes : 38 bits physical, 48 bits virtual power management:</code></pre></div> <p>The availability zone is: us-east-1c.</p> <p>Is Amazon moving away from Opteron-based servers? I hope so. Xeon machines so far provide better performance, so I guess they decided to expand their farm with those. Great move!</p> <p>I could not find any confirmation or other reports on the subject, so please confirm!</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:top-twitter-links-are-not-what-you-might-expect</guid>
				<title>Top Twitter links are not what you might expect</title>
				<link>http://michal.wikidot.com/blog:top-twitter-links-are-not-what-you-might-expect</link>
				<description>

&lt;p&gt;My weekend project involved some &lt;a href=&quot;http://twitter.com&quot;&gt;Twitter&lt;/a&gt; datamining and link analysis (i.e. links that people tweet about). The results we gathered during the weekend were&amp;#8230; at least surprising.&lt;/p&gt;
&lt;p&gt;By looking at popular Twitter link aggregators like &lt;a href=&quot;http://tweetmeme.com&quot;&gt;Tweetmeme.com&lt;/a&gt; or &lt;a href=&quot;http://twitturly.com/&quot;&gt;twitt(url)y&lt;/a&gt; you might get the impression that Twitter is full of useful news, links to interesting stuff, a truly user-driven next-level communication.&lt;/p&gt;
&lt;p&gt;Below is the result of one-day data analysis, and it lists top links people were tweeting about on Friday:&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 27 Apr 2009 08:31:34 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>My weekend project involved some <a href="http://twitter.com">Twitter</a> datamining and link analysis (i.e. links that people tweet about). The results we gathered during the weekend were&#8230; at least surprising.</p> <p>By looking at popular Twitter link aggregators like <a href="http://tweetmeme.com">Tweetmeme.com</a> or <a href="http://twitturly.com/">twitt(url)y</a> you might get the impression that Twitter is full of useful news, links to interesting stuff, a truly user-driven next-level communication.</p> <p>Below is the result of one-day data analysis, and it lists top links people were tweeting about on Friday:</p> <div class="content-separator" style="display: none:"></div> <ol> <li>Entrepreneurs Wanted: <a href="http://oneyearplan.net/tmiller/?site=MyOwn2&amp;t=AutoTwitter">http://oneyearplan.net/tmiller/?site=MyOwn2&amp;t=AutoTwitter</a></li> <li>Mark McCulloch, The Network Marketing Expert: <a href="http://www.secretsofwealth.info/">http://www.secretsofwealth.info/</a></li> <li>Success University, Mark McCulloch.Com, Home Business, Home based business success coach: <a href="http://www.coachofsuccess.com/">http://www.coachofsuccess.com/</a></li> <li>monetize: <a href="http://monetizeyourdream.com/">http://monetizeyourdream.com/</a></li> <li>Malaria No More - Donate Bed Nets: <a href="https://give.malarianomore.org/SSLPage.aspx?pid=382">https://give.malarianomore.org/SSLPage.aspx?pid=382</a></li> <li>XXX BlackBook: (adult content, sorry, no link)</li> <li>Generate Hot New Leads Using Ebay!: <a href="http://www.getmegaleads.com/">http://www.getmegaleads.com/</a></li> <li>andy dick test on USTREAM: <a href="http://www.ustream.tv/channel/andy-dick-test">http://www.ustream.tv/channel/andy-dick-test</a></li> <li>The Twitter Tag Project - Mr. Milestone!: <a href="http://thetwittertagproject.com/milestone.php">http://thetwittertagproject.com/milestone.php</a></li> <li>Shocking Report' Finally Reveals How To Earn A REAL Six Figure Income Without Building A Huge Downline&#8230;: <a href="http://www.forestmarie.com/DefeatMLM/at.html">http://www.forestmarie.com/DefeatMLM/at.html</a></li> <li>Proactol | Official Proactol Store :: The Best Natural Slimming Pill: <a href="http://www.proactol.com/">http://www.proactol.com/</a></li> <li>Introducing MetaMorph: <a href="http://www.unemploymentkiller.com/">http://www.unemploymentkiller.com/</a></li> <li>7 Chakras: <a href="http://www.astral-projection.org/7chakras.htm">http://www.astral-projection.org/7chakras.htm</a></li> <li>Entrepreneurs Wanted: <a href="http://oneyearplan.net/tmiller/?site=MyOwn5&amp;t=100tweet">http://oneyearplan.net/tmiller/?site=MyOwn5&amp;t=100tweet</a></li> <li><a href="http://twitpic.com/3wzdm">http://twitpic.com/3wzdm</a></li> <li>Wideo Twisted Helena (autor: Labor) - MySpace Wideo: <a href="http://vids.myspace.com/index.cfm?fuseaction=vids.individual&amp;videoid=56342462">http://vids.myspace.com/index.cfm?fuseaction=vids.individual&amp;videoid=56342462</a></li> <li><a href="http://twitpic.com/3xs5n">http://twitpic.com/3xs5n</a></li> <li>arthquake Tracking Maps - WebPartner Channel: <a href="http://webpartner.com/?wp=chroom&amp;chid=jH6xAICdoU91za44hD">http://webpartner.com/?wp=chroom&amp;chid=jH6xAICdoU91za44hD</a></li> <li>PTWITTYTV on USTREAM: PTWITTY TV IS LIVE!!! twitter.com/iamdiddy. R&amp;B/Soul:</li> <li>World-mall: <a href="http://world-mall.org/free_targeted_traffic">http://world-mall.org/free_targeted_traffic</a></li> </ol> <p>&#8230;</p> <p>The list goes and goes. What is shocking is the popularity of &quot;Twitter-based marketing&quot; (a combination of spam, sales, marketing, ebooks).</p> <p>If you have never seen any of those links before, this is probably because you stick to your friends' timelines, and this is what most people do. But the increasing number of users trying to actually earn money by moving the well-know internet-based sales schemes to Twitter is at least surprising.</p> <p>The top links from above easily get thousands of tweets per day, leaving organically-created links far behind.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:redis-performance</guid>
				<title>Redis Performance on EC2 (aka weekend project coming)</title>
				<link>http://michal.wikidot.com/blog:redis-performance</link>
				<description>

&lt;p&gt;Weekend is coming and I have a very small pet-project for it. I would still keep the idea non-public, but it involves processing hundreds of entries per second, analyzing data from multiple sources. It would have a dead-simple web interface.&lt;/p&gt;
&lt;p&gt;The nature of the project requires really fast data backend, capable of storing and retrieving a few thousand items per second. The dataset would be approximately 5GB, average item size: 0.5KB.&lt;/p&gt;
&lt;p&gt;When it came to tools selection, after short considerations I have chosen &lt;a href=&quot;http://www.sinatrarb.com/&quot;&gt;Sinatra&lt;/a&gt; for web interface, and &lt;a href=&quot;http://code.google.com/p/redis/&quot;&gt;Redis&lt;/a&gt; as a memory-only (with disk dumps) key-value datastore. It should be capable of handling 100&amp;#160;000 requests per second and deal well with large datasets, so fits perfectly. It also differs from &lt;a href=&quot;http://www.danga.com/memcached/&quot;&gt;Memcached&lt;/a&gt; or &lt;a href=&quot;http://memcachedb.org/&quot;&gt;MemcachedDB&lt;/a&gt; because it has great higher-level structures like Lists and Sets, basic sorting and selection &lt;a href=&quot;http://code.google.com/p/redis/wiki/CommandReference&quot;&gt;commands&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 24 Apr 2009 10:26:03 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Weekend is coming and I have a very small pet-project for it. I would still keep the idea non-public, but it involves processing hundreds of entries per second, analyzing data from multiple sources. It would have a dead-simple web interface.</p> <p>The nature of the project requires really fast data backend, capable of storing and retrieving a few thousand items per second. The dataset would be approximately 5GB, average item size: 0.5KB.</p> <p>When it came to tools selection, after short considerations I have chosen <a href="http://www.sinatrarb.com/">Sinatra</a> for web interface, and <a href="http://code.google.com/p/redis/">Redis</a> as a memory-only (with disk dumps) key-value datastore. It should be capable of handling 100&#160;000 requests per second and deal well with large datasets, so fits perfectly. It also differs from <a href="http://www.danga.com/memcached/">Memcached</a> or <a href="http://memcachedb.org/">MemcachedDB</a> because it has great higher-level structures like Lists and Sets, basic sorting and selection <a href="http://code.google.com/p/redis/wiki/CommandReference">commands</a>.</p> <div class="content-separator" style="display: none:"></div> <p>Recently there is a lot of hype about (distributed) key-value storage, for more info I recommend a nice article by Richard Jones <a href="http://www.metabrew.com/article/anti-rdbms-a-list-of-distributed-key-value-stores/">Anti-RDBMS: A list of distributed key-value stores</a>. <a href="http://highscalability.com/">HighScalability blog</a> also has a lot of references and articles.</p> <p>Redis looks like the way to go. The only problem with it is that the whole dataset (database) must fit in the RAM, otherwise performance might degrade terribly (because of swapping). Performance itself is not an issue, and you would need several concurrent clients to actually face this as a limit.</p> <p>Anyway, initially I wanted to deploy the project at <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> - because of hyped scalability, price etc. But here comes a surprise &#8212; the performance simply sucks. I guess this is because the instances share common hardware and you might have actual memory bandwidth limited.</p> <p>Here are my results of running</p> <div class="code"> <pre><code>./redis-benchmark -n 100000</code></pre></div> <h1><span>Amazon Small instance ($0.10/h)</span></h1> <div class="code"> <pre><code>====== PING ====== 100042 requests completed in 11.95 seconds 50 parallel clients 3 bytes payload keep alive: 1 8369.61 requests per second ====== SET ====== 100023 requests completed in 12.13 seconds 50 parallel clients 3 bytes payload keep alive: 1 8247.28 requests per second ====== GET ====== 100004 requests completed in 14.26 seconds 50 parallel clients 3 bytes payload keep alive: 1 7010.94 requests per second ====== INCR ====== 100000 requests completed in 14.40 seconds 50 parallel clients 3 bytes payload keep alive: 1 6945.89 requests per second ====== LPUSH ====== 100000 requests completed in 12.24 seconds 50 parallel clients 3 bytes payload keep alive: 1 8171.27 requests per second ====== LPOP ====== 100000 requests completed in 14.22 seconds 50 parallel clients 3 bytes payload keep alive: 1 7033.83 requests per second</code></pre></div> <p>The small instance is a no-go if you want to use it for Redis. Keep in mind it is AMD-based and in general the High CPU instances (with Intel Xeons) outperform their AMD brothers dramatically.</p> <h1><span>Amazon High CPU Medium ($0.20/h)</span></h1> <div class="code"> <pre><code>====== PING ====== 100007 requests completed in 6.52 seconds 50 parallel clients 3 bytes payload keep alive: 1 15333.79 requests per second ====== SET ====== 100006 requests completed in 2.22 seconds 50 parallel clients 3 bytes payload keep alive: 1 44986.95 requests per second ====== GET ====== 100009 requests completed in 2.21 seconds 50 parallel clients 3 bytes payload keep alive: 1 45252.94 requests per second ====== INCR ====== 100000 requests completed in 2.35 seconds 50 parallel clients 3 bytes payload keep alive: 1 42625.75 requests per second ====== LPUSH ====== 100009 requests completed in 2.24 seconds 50 parallel clients 3 bytes payload keep alive: 1 44686.78 requests per second ====== LPOP ====== 100011 requests completed in 2.28 seconds 50 parallel clients 3 bytes payload keep alive: 1 43787.66 requests per second</code></pre></div> <p>This is much better, but still sucks. For a similar price you could get a dedicated box at <a href="http://softlayer.com">SoftLayer</a>, our current provider, with more than a double performance AND good upgrade options.</p> <p>Surprisingly, more expensive EC2 instances could not deliver any much higher performance, being in every respect less performant than any decent dedicated box. You could find more benchmarks at the <a href="http://code.google.com/p/redis/wiki/Benchmarks">Redis website</a>. Our office quad-core server was also able to get about 100&#160;000 inserts per second.</p> <p>I know the power of Amazon is not exactly the &quot;inexpensive hardware&quot;, but rather flexibility, range of added services, probably easier administration&#8230; but there are kind of services you really do not want to put in virtualized environment. Talking to &quot;bare metal&quot; is extremely important when running Redis, and probably any memory-intensive software.</p> <p>Also, since Redis datasets must fit in the memory, it would be nice to be able to get cheap boxes (slow drives are ok) with lots of ram. Still, it is worth considering if using Amazon EC2 is the best option.</p> <p>Still, I am considering running the project on EC2 in the initial period, but you really need to be careful about the choice.</p> <h1><span>How it refers to Wikidot?</span></h1> <p>When I was testing EC2 instances with PostgreSQL installed, populated with a copy of Wikidot.com database, I was getting only 50% of the performance of the dedicated server for queries that for sure all used only cached data, even on the fastest instances. So it looks like moving our database server to EC2 would significantly decrease our performance. At this moment it is not acceptable. <a href="http://developer.amazonwebservices.com/connect/thread.jspa?threadID=30531">This post</a> on Amazon forums would suggests memory bandwidth problems in EC2 instances.</p> <p>Previously I have been presenting a possible migration to Amazon EC2 services. After a while it looks like our whole database / webserver infrastructure would need to be reconsidered to benefit from EC2 architecture. In the end we will need to partition our datasets (sharding) and probably modify storage for uploaded files, but honestly I would rather move this moment in time as far as I can, and as long as we still have plenty of options within our current setup.</p> <hr /> <p>BTW: A weekend (short) project is a kind of project that should take only a few days to complete, or at least to build a reasonably working and functional prototype. It should be fun and educational, give a chance to explore new solutions and technologies. Perfectly I would welcome more people on-board.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:wikidot-gadgets</guid>
				<title>Wikidot Gadgets</title>
				<link>http://michal.wikidot.com/blog:wikidot-gadgets</link>
				<description>

&lt;p&gt;Honestly I do not care that much about widgets, gadgets, being eye-candy&amp;#8230; But sometimes we find cool things that we can put on our wikis and they can give some little joy.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Tue, 24 Mar 2009 11:56:55 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Honestly I do not care that much about widgets, gadgets, being eye-candy&#8230; But sometimes we find cool things that we can put on our wikis and they can give some little joy.</p> <p>Two things today:</p> <h1><span>Unicorns, Rainbows On Demand</span></h1> <p>As a vast majority of geek-oriented people out there I hate unicorns, capricorns, little ponies, magic rainbows and all that stuff. But the site we have discovered, <a href="http://cornify.com">Cornify.com - Unicorns and rainbows on demand</a> is so brilliant I could not resist.</p> <p>Click the button (several times) below to see what I am talking about ;-)</p> <p><a href="http://www.cornify.com" ><img src="http://www.cornify.com/assets/cornify.gif" width="61" height="16" border="0" alt="Cornify" /></a> </p> <p>A bit more description how to cornify your wiki is available on our <a href="http://snippets.wikidot.com/code:cornify">Snippets page</a></p> <h1><span>3D Tag Cloud</span></h1> <p>So what is so cool about rotating cloud tag? Well, I can impress people with it. It does not add any usability improvements, but obviously a rotating tag cloud catches attention and affect users' behaviour on your site. From the usability point of view &#8212; totally useless, but still cool ;-)</p> <p>Again, description and howto comes from <a href="http://snippets.wikidot.com/code:3d-tagcloud">Snippets wiki</a></p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:wikidot-on-cloud-2</guid>
				<title>Wikidot on Cloud - part 2</title>
				<link>http://michal.wikidot.com/blog:wikidot-on-cloud-2</link>
				<description>

&lt;p&gt;So as you have probably already read on my &lt;a href=&quot;http://michal.wikidot.com/blog:wikidot-on-cloud&quot;&gt;previous blog post&lt;/a&gt;, we are thinking about re-designing the Wikidot infrastructure to make it more failure-proof, elastic and more efficient. One of the concepts have is to use one of the &amp;quot;cloud solutions&amp;quot;, e.g. Amazon AWS (i.e. EC2 + S3).&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 09 Mar 2009 10:38:42 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>So as you have probably already read on my <a href="http://michal.wikidot.com/blog:wikidot-on-cloud">previous blog post</a>, we are thinking about re-designing the Wikidot infrastructure to make it more failure-proof, elastic and more efficient. One of the concepts have is to use one of the &quot;cloud solutions&quot;, e.g. Amazon AWS (i.e. EC2 + S3).</p> <p>So here are a few facts:</p> <ul> <li>In max 6 months from now we need to reorganize our server infrastructure anyway&#8212; simply because demand for Wikidot is growing.</li> <li>We want to create a more self-configuring (self-healing) infrastructure, removing as many single-points-of-failure as possible.</li> <li>We want to be able to scale just by throwing additional servers into the cluster, possibly within minutes, and be able to throw them away when we do not need them.</li> <li>Managing hardware is a pain and we would rather move our effort into higher-level management.</li> <li>We want better separation of various services we are running (like daily tasks, log analysis etc.). Some of them deserve separate servers.</li> </ul> <p>Some of the solutions that more or less comply with the above requirements:</p> <ul> <li>Simply add more hardware &#8212; it would work. it works for most applications. But is costly and not elastic. Difficult to add resources on-the-fly. With SoftLayer server provisioning is really good, we can have a new server within 2-3 hours.</li> <li>Virtualize our own hardware &#8212; SoftLayer has an offering here, we would need to look deeper into this. But is it really what we need? Our hardware would still be a point of failure.</li> <li>Use virtualized instances &#8212; we could get virtual instances from a 3rd party provider (is SL going to offer virtual servers?). The problem is however that we need some good performance from our boxes too, and thus we would need a good degree of control over it.</li> <li>Use a &quot;pure cloud solution&quot; like Google App Engine. GAE is out-of-question because we would need to rewrite our code, and I am not sure it can run something as complex as Wikidot, with a lot of background services etc.</li> <li>Use Amazon EC2 &#8212; guess what, it looks like an optimal solution.</li> </ul> <p>There is more info about EC2 <a href="http://aws.amazon.com/ec2/">here</a>. Basically you can rent instances (virtual servers) on a per-hour basis ($0.10 - $0.80 per hour), there is a nice API to manage your instances, storage, IP addresses etc. EC2 deserves a separate article obviously. I can only say that:</p> <ul> <li>I am using EC2 + S3 + SQS from one of my other project and it rocks in terms of performance and scalability. A properly-designed application can handle millions of visits per day without much magic.</li> <li>Pricing is nice, but does not necessarily mean we could save any $$ moving to AWS. You pay only for what you are using, no up-front fees or plans. Good for small startups that grow over time.</li> <li>AWS meets most of our above requirements.</li> </ul> <p>One of the nice things about EC2 is that you can get a new server within 2-5 minutes, use it as long as you wish, and terminate it. Everything is automated. There are dozens of Linux images available, tons of documentation and support from the community and Amazon itself (this one is paid extra).</p> <p>Since we already had experience with AWS, we decided to run a couple of tests last Friday, just to get a glimpse of the situation. So what we did was:</p> <ul> <li>We set up a simple cluster configuration (1 front-end web server + 1 database server)</li> <li>We installed Wikidot on it using a fresh database dump.</li> <li>We tried to simulate read-only traffic by taking access logs from Wikidot.com and throwing the requests to the test server in parallel.</li> </ul> <p>The only thing we are still concerned about is database performance in the virtualized (Xen) environment, over network-attached drives. Although in our tests the database was doing really fine, we need to do more read+modify tests.</p> <p>It looks like <a href="http://wik.is">Wik.is</a> (although a <a href="http://www.alexa.com/data/details/traffic_details/wik.is?site0=wik.is&amp;site1=wikidot.com&amp;y=r&amp;z=1&amp;h=300&amp;w=470&amp;c=1&amp;u%5B%5D=wik.is&amp;u%5B%5D=wikidot.com&amp;x=2009-03-09T11%3A28%3A38.000Z&amp;check=www.alexa.com&amp;signature=ABsvo9t8GFg9vTsBFk9Ubhv%2Bj5s%3D&amp;range=max&amp;size=Medium">bit less popular than Wikidot</a>) is using quite an <a href="http://wiki.developer.mindtouch.com/Wik.is/EC2_Infrastructure">interesting cluster on EC2</a>.</p> <p>Amazon AWS is getting a lot of attention recently, and the <a href="http://aws.typepad.com/aws/2008/10/big-day-for-ec2.html">recent changes and future enchancements</a> look really promising.</p> <p>After performing the tests we terminated the servers &#8212; Amazon charged us about $3 ;-)</p> <p>BTW: This opens one more interesting case for us. SaaS with Wikidot &#8212; <strong>would you like to get your very own Wikidot installation within minutes, hosted on a virtual server instance?</strong> Yes, we know how to do this, and we might automate the whole process someday.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:wikidot-on-cloud</guid>
				<title>Wikidot on Cloud</title>
				<link>http://michal.wikidot.com/blog:wikidot-on-cloud</link>
				<description>

&lt;p&gt;Everytime we have an emergency situation at Wikidot (as yesterday with our webserver) we try to stop and think how well protected we are from different kind of hardware and software failures, network problems and even larger disasters (like our datacenter being destroyed). Also yesterday we stepped down from our daily tasks and looked at the situation.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 06 Mar 2009 09:48:35 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Everytime we have an emergency situation at Wikidot (as yesterday with our webserver) we try to stop and think how well protected we are from different kind of hardware and software failures, network problems and even larger disasters (like our datacenter being destroyed). Also yesterday we stepped down from our daily tasks and looked at the situation.</p> <p>First of all, when designing current servers' configuration, we concentrated on having each piece of hardware as reliable as possible, which means:</p> <ul> <li>we are using only high-quality servers from <a href="http://softlayer.com">SoftLater</a> (they are using SuperMicro servers and pack it with really great hardware)</li> <li>our servers have redundant power supplies, in case one PSU dies (which is one of the most common problems), second one works and the tech support can replace the faulty one without any interruption</li> <li>we are using only mirrored redundant disks (in RAID1 or RAID10) with hight quality components: controllers from Adaptac and high-quality SAS 15k disks for system and database + large SATA disks for file uploads.</li> <li>all the services are being monitored by external resources &#8212; we are using <a href="http://www.pingdom.com">Pingdom</a> to monitor services availability + our own monitoring stack to check health of hardware.</li> <li>we automate as much as possible, this includes health checks, error logs etc.</li> <li>we are having a few autoreplication mechanisms for database and filesystems.</li> <li>we also have periodic backups stored on remotely on S3.</li> </ul> <p>So far, we are really, REALLY happy with <a href="http://softlayer.com">SoftLater</a>, our hosting provider. And this includes everything: great available hardware options, devoted support, datacenters with fast internet connection etc. If someone asks me about a datacenter, I always recommend SoftLayer. And as far as I know at least a few people moved there and are really happy with the choice.</p> <p>OK, so back to the subject. What we were discussing yesterday can be summarized as: &quot;we should not scale vertically, we should scale horizontally&quot;. What this means is that instead on relying on just a few servers we upgrade from time to time, we should create a more self-healing structure by adding more (less powerful) nodes and assume &quot;by design&quot; that some of them can fail without affecting availability of the service.</p> <p>Why is it important? Because we need to avoid single points of failure. So far our setup works perfectly, giving us a very good overall uptime (it is still 99.9%). But the question I am always asking myself is: if something goes very wrong, how much trouble will it cause for us and our users? How much work before we bring service up after unrecoverable hardware failures? Or filesystem errors? Sure we eventually will fix things and all the data will be available, but how quickly? How fast can our hosting provider provision new servers to replace failed ones?</p> <p>Although answers to the above questions can be still considered as satisfactory, with the growth of Wikidot and larger and larger datasets, current solutions simply become less and less effective. We would rather prefer another case: &quot;What do you need to do when one of your servers fail? &#8212; NOTHING.&quot;</p> <p>Just to give you a glimpse what my next blog post will be about and how we could improve our infrastructure: <strong>virtualization</strong> and <strong>cloud computing</strong>. Enough said for today ;-)</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:black-wednesday</guid>
				<title>Black Wednesday</title>
				<link>http://michal.wikidot.com/blog:black-wednesday</link>
				<description>

&lt;p&gt;There are weeks that nothing exciting (or fatal) happens. But there are days that a lot happens that make you think if this is really a coincidence. Yesterday was one of such days, and it was not even Friday 13th. So here is what happened:&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 05 Mar 2009 09:21:23 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>There are weeks that nothing exciting (or fatal) happens. But there are days that a lot happens that make you think if this is really a coincidence. Yesterday was one of such days, and it was not even Friday 13th. So here is what happened:</p> <ul> <li>I stayed at home, Lukasz was at the office. All of sudden network went down. Later we learned that half of our city (that get internet from TP S.A.) had problems.</li> <li>Later Piotr called that our office server is down and cannot boot up. It was one of the disks in RAID 10 array that failed and for some reason GRUB could not boot. It booted later after Piotr did some magic, now we just need to replace one drive asap.</li> <li>At 15.30 local time I got an alert email that Wikidot.com is down. Immediately i tried to log-in to the server - nothing. Ping - yes. Alive. But all services went down.</li> <li>After a few minutes we knew we must act. Piotr started re-assigning IP addresses of the web server to a backup server. Failed. Looks like the router could not handle this in real-time this time.</li> <li>Main server restart - nothing helps. We had a similar issue some time ago, we started the rescue mode (server boots from a rescue linux image, this is greatly automated by SoftLayer). Server is up. A year ago what prevented the system from booting was a forced fsck on one of the drives and this required a key pressed or so (as told by the SoftLayer support team). So we started disk checks. And this took almost an hour! S#*t!</li> <li>Meanwhile my friend called me as his car broke just 20 meters from our parking lot and he could not move it, so I went to help him.</li> <li>Server got up, everything was back to normal. Situation under control.</li> </ul> <p>I am not afraid of fatal Fridays any more. I fear of Wednesdays.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:canvas-based-editor</guid>
				<title>Canvas-based editor (in your browser)</title>
				<link>http://michal.wikidot.com/blog:canvas-based-editor</link>
				<description>

&lt;p&gt;Today Developer Tools Lab at Mozilla &lt;a href=&quot;http://labs.mozilla.com/2009/02/introducing-bespin/&quot;&gt;announced&lt;/a&gt; the tech-preview of a new, in-browser, canvas-based concept editor that tries to resemble native desktop-based editing software.&lt;/p&gt;
&lt;div class=&quot;image-container aligncenter&quot;&gt;&lt;img src=&quot;http://labs.mozilla.com/uploads/2009/02/webkit-editor.png&quot; width=&quot;400px&quot; alt=&quot;webkit-editor.png&quot; class=&quot;image&quot; /&gt;&lt;/div&gt;
&lt;p&gt;After looking at the screenshots, watching short introductory video, I dashed to &lt;a href=&quot;http://bespin.mozilla.com&quot;&gt;http://bespin.mozilla.com&lt;/a&gt; to try this out. I do not say this very often, but this is quite an excellent and amazing piece of work. Although I have been following the web development and new technologies and trends quite closely for the last couple of years, this is something that really convinces me that browser-based applications can once replace the native ones. Simply great.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Fri, 13 Feb 2009 08:40:48 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Today Developer Tools Lab at Mozilla <a href="http://labs.mozilla.com/2009/02/introducing-bespin/">announced</a> the tech-preview of a new, in-browser, canvas-based concept editor that tries to resemble native desktop-based editing software.</p> <div class="image-container aligncenter"><img src="http://labs.mozilla.com/uploads/2009/02/webkit-editor.png" width="400px" alt="webkit-editor.png" class="image" /></div> <p>After looking at the screenshots, watching short introductory video, I dashed to <a href="http://bespin.mozilla.com">http://bespin.mozilla.com</a> to try this out. I do not say this very often, but this is quite an excellent and amazing piece of work. Although I have been following the web development and new technologies and trends quite closely for the last couple of years, this is something that really convinces me that browser-based applications can once replace the native ones. Simply great.</p> <div class="content-separator" style="display: none:"></div> <p>See for yourself:</p> <p><a href="http://bespin.mozilla.com">http://bespin.mozilla.com</a></p> <p>PS. I was so impressed with this development that I had to stop my other important work and blog about it ;-)</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:php-thoughts</guid>
				<title>Some PHP thoughts</title>
				<link>http://michal.wikidot.com/blog:php-thoughts</link>
				<description>

&lt;p&gt;For several years now I have been using &lt;a href=&quot;http://en.wikipedia.org/wiki/PHP&quot;&gt;PHP&lt;/a&gt; for building several projects and web applications, including Wikidot. I dare say I know PHP very well, I was also one of the few first people in Poland to get the &lt;a href=&quot;http://en.wikipedia.org/wiki/Zend_Certified_Engineer&quot;&gt;Zend Certified Engineer&lt;/a&gt; certification (which nicely sits next to my &lt;a href=&quot;http://www.sun.com/training/certification/java/scjp.xml&quot;&gt;Sun Certified Java Programmer&lt;/a&gt; cert).&lt;/p&gt;
&lt;p&gt;PHP is extremely popular. Zend is putting a lot of money and effort to move PHP from the commodity market into enterprise and&amp;#8230; it seems to work. PHP has very nice learning curve, although to produce &lt;strong&gt;good code&lt;/strong&gt; in PHP it takes as long time and effort as in other languages. PHP is easy to deploy, runs well on commodity hardware&amp;#8230;&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 12 Feb 2009 08:53:54 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>For several years now I have been using <a href="http://en.wikipedia.org/wiki/PHP">PHP</a> for building several projects and web applications, including Wikidot. I dare say I know PHP very well, I was also one of the few first people in Poland to get the <a href="http://en.wikipedia.org/wiki/Zend_Certified_Engineer">Zend Certified Engineer</a> certification (which nicely sits next to my <a href="http://www.sun.com/training/certification/java/scjp.xml">Sun Certified Java Programmer</a> cert).</p> <p>PHP is extremely popular. Zend is putting a lot of money and effort to move PHP from the commodity market into enterprise and&#8230; it seems to work. PHP has very nice learning curve, although to produce <strong>good code</strong> in PHP it takes as long time and effort as in other languages. PHP is easy to deploy, runs well on commodity hardware&#8230;</p> <div class="content-separator" style="display: none:"></div> <p>But PHP sucks. And it really sucks badly for certain tasks, which we from time to time find out. So here is a short list, which by no means is complete, but compiles my thoughts of the language I have been using for the last 5 years:</p> <h2><span>Functional + Object-Oriented</span></h2> <p>PHP started as a purely functional language. The initial easiness was tempting for many web developers, therefore PHP exploded in popularity. The problem is that Zend wanted it to be a object-oriented. They tried twice. PHP 4 was the first attempt and it was bad. Terrible language constructs, mixing functional and OO features in a very complicated and unclear way.</p> <p>In PHP 5 the OO part was mostly redesigned and right now PHP 5 follows the Java-style - it has Interfaces, Classes, proper constructors, inheritance&#8230; Even syntax follows the one of Java.</p> <p>The pity is that PHP is still a functional language mixed with OOP. Come on, why is Array not a real object? Or a String? Why do we still need to use complicated built-in functions to manipulate them?</p> <h2><span>Quality of the open source code</span></h2> <p>Quality of the open source projects varies tremendously. Because PHP does not enforce you to use good programming style, developers tend to use a lot of shortcuts, homebrewed solutions and a lot of hacks. Most of the available code is PHP4-compatible, which means it uses different OO approach than PHP5.</p> <p>What is worse, libraries often pollute global namespace with their own variables (and constants) and functions which is a potential source of conflicts.</p> <p>Most importantly, when you are trying to use</p> <div class="code"> <pre><code>error_reporting(E_ALL|E_STRICT);</code></pre></div> <p>which will be default in PHP6, you will quickly find that most of the open-source libraries produce TONS of warnings and notices.</p> <p>What I have learned so far and is a general rule of thumb:</p> <ul> <li>Avoid PHP4-compatible libraries</li> <li>Look very carefully at PEAR stuff, it might be broken, see all pending bugs, see if it is maintained</li> <li>Test any library with the strict error reporting</li> </ul> <h2><span>Duality of errors/warnings + exceptions.</span></h2> <p>PHP5 uses Java-like Exception classes with <tt>try{} catch{}</tt> clauses. But it also uses legacy errors warnings, with all their handlers etc. This really does not play nice together. Especially if any of your external libraries tries to handle such errors by itself.</p> <p>What you should do in a perfect world is to map all the errors and warnings into Exceptions, like we do. (Except for Fatal errors that cannot be handled by an application). But then, you can be really unpleasantly surprised when you use the above <tt>error_reporting(E_ALL|E_STRICT)</tt>.</p> <h2><span>More like Java</span></h2> <p>As I am trying to point out, PHP tries to resemble Java. This is both good and bad.</p> <p>Good:</p> <ul> <li>Introduces clear language structures that we all know, classes, interfaces, exceptions etc.</li> <li>Easy to design application by people experienced in Java</li> <li>Yes, you can make your application behave like in Java with a set of custom error mappings, directory structures, autoloaders, pseudo-packages etc. But it is hacking.</li> </ul> <p>Bad:</p> <ul> <li>Several other conventions still apply: functions, warnings/errors, PHP4-like OO</li> <li>Very different underlying architecture from Java (share-nothing)</li> <li>Still an interpreted language</li> <li>It is not Java</li> </ul> <h2><span>OO features in Standard Library</span></h2> <p>Did you hear about the <a href="http://www.php.net/~helly/php/ext/spl/">Standard PHP Library</a>? Probably not. Me neither before I had to use iterator interfaces to create a well-behaving array-like objects or use chained class autoloaders.</p> <ul> <li>Why is this called a <strong>standard</strong> library?</li> <li>It only covers a small tiny portion of the language.</li> <li>Documentation is almost non-existant, looks like reserver for advanced programmers.</li> </ul> <h2><span>Zend Framework</span></h2> <p><a href="http://framework.zend.com/">Zend Framework</a> is an attempt by Zend itself to create THE way of using PHP. It is a really good project and we are using parts of it extensively. It is PHP5+ only, encourages good programming practices (including testing), have a nice set of classes. It somehow tries to fix the lowish quality of PEAR packages. But:</p> <ul> <li>It is late. Too late.</li> <li>Most parts on the Zend Framework should be coded in fast C modules, not in PHP itself. Try the performance of date/time/calendar operations and you will see what I mean.</li> <li>ZF tries to fix broken features and add new ones to PHP, but they are often sub-optimal.</li> </ul> <h2><span>Share nothing</span></h2> <p>The point I made about writing large constructs in PHP itself is very important. PHP is a &quot;share-nothing&quot; type of solution, every web request is handled separately and after it the PHP engine is reset into the default state. All the classes need to be re-loaded and initialized with every single web request! The larger your codebase libraries are, the less performance you get.</p> <p>The share-nothing architecture has some benefits: you do not need to care about freeing system resources, returning db connections to the pool etc. PHP does it for you, because once the request is processed, all resources are properly closed and released.</p> <h2><span>Garbage collection</span></h2> <p>PHP does not resolve circular references when performing its simple reference counting and copy-on-write garbage collection. Several times I had to rewrite the code because the garbage collector was unable to properly release memory from database model objects.</p> <h2><span>Web-only</span></h2> <p>Poor garbage collection also prevents any long-running programs to be written in PHP. Every program I have written in PHP that was running longer than a few days ended up by using all its available memory and crashing eventually.</p> <p>In fact PHP has been designed only to handle web requests. ONLY. It is quite good at it, but at nothing else. You will not write a FUSE project with PHP,daemon, mail server, irc server, ANYTHING persistent.</p> <p>PHP is not a standalone platform. Many projects combine PHP with Java, so that PHP handles web + logics and Java fits where persistance is required.</p> <hr /> <p>There are a lot of other problems I see with PHP: missing namespace support, no real unicode (try <tt>strlen('ąśćŁ')</tt>, debugging etc.</p> <p>I am really looking forward to PHP alternatives. Java is IMHO out-of-question, but Python and Ruby are tempting solutions that eventually I might migrate to.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:gtd</guid>
				<title>Getting Things Done</title>
				<link>http://michal.wikidot.com/blog:gtd</link>
				<description>

&lt;p&gt;Every now and then I hear about people following the &lt;a href=&quot;http://en.wikipedia.org/wiki/Getting_Things_Done&quot;&gt;Getting Things Done&lt;/a&gt; methodology to manage their time and tasks. And this includes a friend of mine, Michal from &lt;a href=&quot;http://nozbe.com/blog&quot;&gt;Nozbe&lt;/a&gt;, who has been creating GTD toolkits for at least 2 years now.&lt;/p&gt;
&lt;p&gt;A few days ago I was listening to some &lt;a href=&quot;http://www.43folders.com/podcast&quot;&gt;43folders podcasts&lt;/a&gt;, I decided to give GTD a try. Although there are countless resources and tutorials for GTD, I decided the best way to start is the David Allen&#039;s book itself. So here I have it.&lt;/p&gt;
&lt;div class=&quot;image-container aligncenter&quot;&gt;&lt;a href=&quot;http://michal.wdfiles.com/local--files/blog:gtd/IMG_0583.JPG&quot;&gt;&lt;img src=&quot;http://michal.wdfiles.com/local--resized-images/blog:gtd/IMG_0583.JPG/small.jpg&quot; alt=&quot;IMG_0583.JPG&quot; class=&quot;image&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 09 Feb 2009 23:04:41 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Every now and then I hear about people following the <a href="http://en.wikipedia.org/wiki/Getting_Things_Done">Getting Things Done</a> methodology to manage their time and tasks. And this includes a friend of mine, Michal from <a href="http://nozbe.com/blog">Nozbe</a>, who has been creating GTD toolkits for at least 2 years now.</p> <p>A few days ago I was listening to some <a href="http://www.43folders.com/podcast">43folders podcasts</a>, I decided to give GTD a try. Although there are countless resources and tutorials for GTD, I decided the best way to start is the David Allen's book itself. So here I have it.</p> <div class="image-container aligncenter"><a href="http://michal.wdfiles.com/local--files/blog:gtd/IMG_0583.JPG"><img src="http://michal.wdfiles.com/local--resized-images/blog:gtd/IMG_0583.JPG/small.jpg" alt="IMG_0583.JPG" class="image" /></a></div> <div class="content-separator" style="display: none:"></div> <p>GTD is a religion for some, methodology for others. I myself am looking for better way to organize my time, my projects and tasks. Especially since I want to spend as much time with my family as I can (work is not the only thing in life), I am exploring ways to optimize productivity and efficiency.</p> <p>Every person is different and can achieve productivity balance in different situations. I am certainly a kind of a person that can easily focus on particular problem. Creating Wikidot in just a few months is a good example. During the initial development, having only limited time to produce a working service, I developed a really strict and effective way of working, solving problems, and move forward. Studying theoretical physics and doing a PhD in astrophysics were quite interesting and demanding experiences too.</p> <p>The problem I (and probably vast majority of people) have is <span style="text-decoration: underline;">distractions</span>. And believe me, there are more and more of them. Sure it would be great to spend a few days solving a single problem, firewalling myself from the rest of the world, but work, family, daily duties, company management &#8212; all those important stuff need their place too. They are important and I want them to be important, but sometimes they are in apparent conflict with each other.</p> <p>My other reason is: I want to have more time to do interesting things. Which means I need to be more efficient with things I am doing right now.</p> <p>For the last couple of years I have implemented elements of GTD, some of them come naturally and some were based on tips found on the internet. Most of them, especially Zero Inbox, worked really well. Hopefully I will be able to approach project management more systematically now.</p> <p>So here is my first project: implement more GTD in my workflow. Next action: read the book.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:idroppedie6</guid>
				<title>I dropped IE6 - not yet :-(</title>
				<link>http://michal.wikidot.com/blog:idroppedie6</link>
				<description>

&lt;p&gt;If there is a single thing that web developers &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;client=safari&amp;amp;rls=en-us&amp;amp;q=%22i+hate+ie6%22&amp;amp;btnG=Search&quot;&gt;hate most&lt;/a&gt;, it is probably &lt;a href=&quot;http://en.wikipedia.org/wiki/Internet_Explorer_6&quot;&gt;Internet Explorer 6&lt;/a&gt;. It is buggy, it is outdated, it does not follow most of web standards and the most important thing is that&amp;#8230; people still use it.&lt;/p&gt;
&lt;p&gt;From my estimate, when creating initial version of Wikidot, making it work in IE 6 took extra 30% of total development time. Today, when adding functionality to Wikidot, special care must be taken to make sure it works with outdated browsers like IE6.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Thu, 05 Feb 2009 08:12:26 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>If there is a single thing that web developers <a href="http://www.google.com/search?hl=en&amp;client=safari&amp;rls=en-us&amp;q=%22i+hate+ie6%22&amp;btnG=Search">hate most</a>, it is probably <a href="http://en.wikipedia.org/wiki/Internet_Explorer_6">Internet Explorer 6</a>. It is buggy, it is outdated, it does not follow most of web standards and the most important thing is that&#8230; people still use it.</p> <p>From my estimate, when creating initial version of Wikidot, making it work in IE 6 took extra 30% of total development time. Today, when adding functionality to Wikidot, special care must be taken to make sure it works with outdated browsers like IE6.</p> <div class="content-separator" style="display: none:"></div> <p>Come on, why do we have to support browser that was released in 2001 and never really evolved since then? The problem is that many people, with older hardware and older versions of Windows, simply do not bother to upgrade their browser, &quot;because it still works&quot;. Also, in many corporate environments internal policies lock employees to use specific versions of software, including web browsers.</p> <p>Hopefully, as I look at Dec 2008 statistics for Wikidot usage, only 15% of our traffic comes from IE6. IE7 accounts for 25%. This is good. Do not take me wrong &#8212; IE7 is not that much better than IE6 when it comes to standard compliance, but it is much much better.</p> <p>Here is the full browser usage stats for Dec 2008:</p> <table class="wiki-content-table"> <tr> <th>Browser</th> <th>Hits</th> <th>Percent</th> </tr> <tr> <td>Firefox</td> <td>46881021</td> <td>45.3&#160;%</td> </tr> <tr> <td>MS Internet Explorer</td> <td>43449910</td> <td>42&#160;%</td> </tr> <tr> <td>Opera</td> <td>4314782</td> <td>4.1&#160;%</td> </tr> <tr> <td>Safari</td> <td>3073337</td> <td>2.9&#160;%</td> </tr> <tr> <td>Chrome</td> <td>2677587</td> <td>2.5&#160;%</td> </tr> <tr> <td>Mozilla</td> <td>1507299</td> <td>1.4&#160;%</td> </tr> <tr> <td>Unknown</td> <td>537899</td> <td>0.5&#160;%</td> </tr> <tr> <td>Netscape</td> <td>257150</td> <td>0.2&#160;%</td> </tr> <tr> <td>Konqueror</td> <td>89621</td> <td>0&#160;%</td> </tr> <tr> <td>Others</td> <td>365660</td> <td>0.3&#160;%</td> </tr> </table> <p>So, Firefox is the clear winner. This is good. Chrome does surprisingly well as for a new browser in the market.</p> <p>So with IE6 accounting only for 15% of the traffic, when can we drop support for it? This is the question that <a href="http://ajaxian.com/archives/i-wont-support-ie-6-in-2009">a lot of people ask</a>.</p> <p>I would say &#8212; for Wikidot.com, not anytime soon. But if we decide to create any new product, IE6 will not be supported for sure.</p> <p>And the reason I am writing about IE6 today is that I discovered a nice website, <a href="http://idroppedie6.com/">http://idroppedie6.com/</a> :</p> <div class="image-container aligncenter"><a href="/"><img src="http://idroppedie6.com/images/logo.png" width="400px" alt="logo.png" class="image" /></a></div> <p>It is a list of sites that actually dropped support for IE6. I was quite surprised to see <a href="http://gmail.com">http://gmail.com</a> on the list. Still the website is not extremely popular, I wish them good luck.</p> <p>As a conclusion I think that in 2010 IE6 support among new websites will be marginal. Web evolves, there are so many great new technologies, solutions and patterns that would simply take too much time to make them work with IE6. Would developers spend 30% more time on their project trying to reach extra 10% of users?</p> <p>Here is a nice chart created by <a href="http://weblogs.mozillazine.org/asa/archives/2009/01/ie6_on_the_way.html">Asa Dotzler</a>:</p> <div class="image-container aligncenter"><img src="http://farm4.static.flickr.com/3266/3159496996_e995d120a0_o.png" width="350px" alt="3159496996_e995d120a0_o.png" class="image" /></div> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:working-on-email-notifications</guid>
				<title>Working on email notifications</title>
				<link>http://michal.wikidot.com/blog:working-on-email-notifications</link>
				<description>

&lt;p&gt;As we hinted in several places, including the discussion at &lt;a href=&quot;http://pro.wikidot.com/ticket:216&quot;&gt;Pro tracker&lt;/a&gt;, we are currently working on email notifications, so that you can follow (watch) activity at Wikidot by receiving emails directly into your Inbox.&lt;/p&gt;
&lt;p&gt;The feature is really great (we have it enabled for a few testing accounts) and allows you to be instantly notified about page edits, forum discussions, page comments etc. for pages, categories or whole sites.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Tue, 03 Feb 2009 09:12:08 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>As we hinted in several places, including the discussion at <a href="http://pro.wikidot.com/ticket:216">Pro tracker</a>, we are currently working on email notifications, so that you can follow (watch) activity at Wikidot by receiving emails directly into your Inbox.</p> <p>The feature is really great (we have it enabled for a few testing accounts) and allows you to be instantly notified about page edits, forum discussions, page comments etc. for pages, categories or whole sites.</p> <div class="content-separator" style="display: none:"></div> <p>So far our favorite feature is page comments by email. If someone adds a comment to a page you are wathing, you are almost instantly notified about it. Here is an example. Let us say that James <a href="http://michalfrackowiak.com/blog:one-post-per-day/comments/show#post-374023">commented on my blog post</a>. Within minutes I got an email with full content of his comment.</p> <div style="border: 1px solid #777; margin: 0; padding: 5px; font-size: 85%"> <p>From: James Kanjo @<span style="white-space: pre-wrap;">automailer@wikidot.com</span>@<br /> Subject: New comment on page &quot;One post per day - will it work?&quot; at michalfrackowiak.com</p> <p>James Kanjo commented &quot;Re:&quot; on the page &quot;One post per day - will it work?&quot; at<br /> <a href="http://michalfrackowiak.com/blog:one-post-per-day/comments/show#post-374023">http://michalfrackowiak.com/blog:one-post-per-day/comments/show#post-374023</a></p> <p>Good idea Michal</p> <p>Squark shouldn't you make a similar commitment? Michal's not the only blogger we are anticipating more posts from!</p> <hr /> <p>You received this email because you are watching site <a href="http://michalfrackowiak.com">http://michalfrackowiak.com</a></p> <p>To stop these emails, go to <a href="http://www.wikidot.com/un/u/1-XXXXXXXXX">http://www.wikidot.com/un/u/1-XXXXXXXXX</a></p> </div> <p>The feature should be available for all users later this week. What we also think would be very nice is the &quot;reply by email&quot; option where you can simply hit a &quot;Reply&quot; button in your email program and your reply automatically gets posted as a comment too. But this will come later since it requires a bit more work.</p> <p>Obviously email notifications solve an important problem of users not being notified what is going on in their sites. We have seen many contributions to both public and private wikis left unnoticed by other members. Although we do provide full activity stream by RSS already, sadly RSS is still not common and easy enough to use to watch changes at Wikidot.</p> <p>So far we have seen this feature alone enormously improved our online activity at our own wikis. Hopefully this will also work for many other users.</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:wikidot-not-available</guid>
				<title>Wikidot Not Available</title>
				<link>http://michal.wikidot.com/blog:wikidot-not-available</link>
				<description>

&lt;p&gt;Today in the very morning we had a small problem with one of our Wikidot servers, which manifested in &lt;strong&gt;&amp;quot;service unavailable&amp;quot; message between 2 AM and 5 AM UTC&lt;/strong&gt;. The problem was easy to fix, but unfortunately because it was the middle of the night for us, we could not respond quickly enough and SMSes from our monitoring systems did not wake us up.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 02 Feb 2009 23:13:21 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Today in the very morning we had a small problem with one of our Wikidot servers, which manifested in <strong>&quot;service unavailable&quot; message between 2 AM and 5 AM UTC</strong>. The problem was easy to fix, but unfortunately because it was the middle of the night for us, we could not respond quickly enough and SMSes from our monitoring systems did not wake us up.</p> <h1><span>What really happened?</span></h1> <p>From what we were able to reconstruct, one of the file operations related to live backup of file uploads went crazy and started consuming loads of memory. Usually we are duplicating all files belonging to each of the sites in real-time to another server to have a hot-backup for both backup purposes and to have a hot-swap server in case the main server dies.</p> <p>The problem started at about 2 AM and we could see radical drop in memory used for disk caching. This is usually a bad sign and we have a monitoring set up for this, so when this happens we are getting warning emails. The problem with tracing memory-related issues in Linux is that utilities do not show memory consumed by the kernel itself, and this include memory for handling filesystems. (Try doing <tt>ls */*/*</tt> a couple of times on a really large filesystem and you will see memory vanish quite quickly).</p> <p>When memory went low, other services that rely on kernel disk caches (like the PostgreSQL database) started making a lot of disk operations, increasing system load and decreasing responsiveness. Under high load PostgreSQL is often unable to accept new connections form the PHP application.</p> <p>Then our PHP backend died, also because of memory issues, producing increased &quot;500 Internal Server Errors&quot;. From that moment nothing dramatic happened, besides the prolonged unavailability of the service.</p> <p>At this point please allow me to say: this is not the kind of situation that happens often. In fact, such large memory outage happened for the first time. <strong>Suddenly about 7&#160;GB of RAM disappeared</strong>. For most part of the day we were trying to trace the issue and are quite sure it was partly an unfortunate mixture of kernel operation and method of live backup of filesystem.</p> <p>So far however we have never had experienced similar issues.</p> <h1><span>How we reacted</span></h1> <p><strong>Wikidot is fully monitored</strong> from external servers for web availability, memory usage, other services. Monitoring services automatically send us emails and SMSes when anything suspicious happens. <strong>What failed was the <em>human factor</em></strong> and the fact all those reporting methods could not wake us up in the middle of the night.</p> <p>The problem was easy to fix once I got my hands on a computer. After stopping filesystem replication and restarting core services (www server) things got back to normal. Other services were restarted too to make sure things are ok.</p> <p>For most part of the day we were analyzing logs and trying to figure out what really happened. I guess Piotr has a better and more detailed opinion on the internal source of the problem, but we mostly agree on what I have written above.</p> <h1><span>How can we protect Wikidot for the future?</span></h1> <p>Random things always happen, it is more important how we react to them and how we try to avoid them. We really put a lot of effort into eliminating situations like this one. The obvious solution is to make our SMSes wake us at night. So far we had very little monitoring alerts (servers are running very even) and I assumed this would work.</p> <p>What is also important for our users, we have several safety measures to keep your data intact, including data replication and periodic full backups to external servers (to a different datacenters).</p> <p>Also we are analyzing server usage reports every day to prevent such events from happening.</p> <p>Until the current issue is fully resolved, we have removed the live file replication from the service and we will probably reimplement it in a different way.</p> <p>Apart from situations like that, I need to admit that our servers are working very reliably, with a very high uptime. According to external measures (from Pidgin), even including the today outage, we still have over 99.8% for the last couple of months.</p> <p>I really hope today's outage did not cause much inconvenience.</p> <p>Best regards</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://michal.wikidot.com/blog:one-post-per-day</guid>
				<title>One post per day - will it work?</title>
				<link>http://michal.wikidot.com/blog:one-post-per-day</link>
				<description>

&lt;p&gt;Habits are important for bloggers. And being a perfectionist is certainly a non-welcome for everyone who wish to publish a blog. Honestly, because I often like things to be perfect, this makes writing particularly difficult. But here is the thing - I am going to change it.&lt;/p&gt;
&lt;p&gt;by &lt;span class=&quot;printuser avatarhover&quot;&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;&lt;img class=&quot;small&quot; src=&quot;http://www.wikidot.com/avatar.php?userid=1&amp;amp;amp;size=small&amp;amp;amp;timestamp=1673610787&quot; alt=&quot;michal-frackowiak&quot; style=&quot;background-image:url(http://www.wikidot.com/userkarma.php?u=1)&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.wikidot.com/user:info/michal-frackowiak&quot;  &gt;michal-frackowiak&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
</description>
				<pubDate>Mon, 02 Feb 2009 09:50:39 +0000</pubDate>
												<content:encoded>
					<![CDATA[
						 <p>Habits are important for bloggers. And being a perfectionist is certainly a non-welcome for everyone who wish to publish a blog. Honestly, because I often like things to be perfect, this makes writing particularly difficult. But here is the thing - I am going to change it.</p> <div class="content-separator" style="display: none:"></div> <p>My problem with blogging is that I wanted to write a frequently updated blog with interesting and deep articles. And every day I had one or more great ideas, obviously worth writing about. But at the end of the day I never have time or strength to write long articles.</p> <p>But it appears (thanks for feedback) that many of my readers would rather just read things more frequently instead of well-polished articles. And I think I will follow this direction.</p> <p>From now on, my new resolution is to post every day. Not necessarily more. Just every day. A few ad-hoc rules are:</p> <ul> <li>No minimum number of words in the article.</li> <li>If I have nothing to say, I will not try to try. Instead I will link to resources I find interesting, but with at least a few words of comment.</li> <li>I will try to keep this blog on topics: wikidot, programming etc., but anything else that catches my attention is also OK.</li> <li>I will try to care more about proper English (thanks for help, Mom!), being a non-native speaker makes it more difficult.</li> </ul> <p>I will start today.</p> <p>So send me a bunch of nasty emails if you do not see at least 28 blog posts this month and at least one per day :-D</p> <p>by <span class="printuser avatarhover"><a href="http://www.wikidot.com/user:info/michal-frackowiak" ><img class="small" src="http://www.wikidot.com/avatar.php?userid=1&amp;amp;size=small&amp;amp;timestamp=1673610787" alt="michal-frackowiak" style="background-image:url(http://www.wikidot.com/userkarma.php?u=1)" /></a><a href="http://www.wikidot.com/user:info/michal-frackowiak" >michal-frackowiak</a></span></p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>