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

<channel>
	<title>Ramblings And Musings &#187; Linux</title>
	<atom:link href="http://roopindersingh.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://roopindersingh.com</link>
	<description>Roopinder Singh</description>
	<lastBuildDate>Thu, 19 Nov 2009 15:50:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>XP-Dev.com : Another milestone</title>
		<link>http://roopindersingh.com/2009/03/01/xp-devcom-another-milestone/</link>
		<comments>http://roopindersingh.com/2009/03/01/xp-devcom-another-milestone/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 19:02:08 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bug tracking]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[issue tracking]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[xp-dev]]></category>

		<guid isPermaLink="false">http://roopindersingh.com/?p=447</guid>
		<description><![CDATA[So, it has been 3 months and a bit since the upgrade to the new platform that runs the current version of XP-Dev.com, and it has been eventful. There was the release that took a whole day, and then were some functional releases as well. The latest release bring some really cool features to XP-Dev.com.
Another [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xp-dev.com/"><img class="alignright" title="XP-Dev.com" src="http://static.xp-dev.com/media/newlogo.png" alt="" width="225" height="30" /></a>So, it has been 3 months and a bit since the <a href="http://roopindersingh.com/2008/11/18/new-xp-devcom-finally-released/">upgrade to the new platform</a> that runs the current version of <a href="http://xp-dev.com/">XP-Dev.com</a>, and it has been eventful. There was <a href="http://xp-dev.com/blogs/view/2/new-release-announcement/">the release that took a whole day</a>, and then were some functional releases as well. The <a href="http://xp-dev.com/blogs/view/97/release-version-27/">latest release</a> bring <a href="http://xp-dev.com/wiki/1/Release-Notes-Version-27">some really cool features</a> to <a href="http://xp-dev.com">XP-Dev.com</a>.</p>
<p>Another milestone has been reached, and the functionality gap has been narrowing drastically the past 3 months. However, I will be brave enough to admit that the gap is still there, and at least for me, there&#8217;s still a mountain to climb ahead.</p>
<p>Enjoy the new releases, and as usual, your feedback is appreciated. Do give a <a href="http://xp-dev.com/forum/1/">shout in the forums</a>, or just raise a <a href="http://xp-dev.com/support/">support ticket</a>. You can <a href="http://roopindersingh.com/contact/">contact me via this blog</a> as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2009/03/01/xp-devcom-another-milestone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Calculating CPU Utilisation in Linux</title>
		<link>http://roopindersingh.com/2009/01/31/calculating-cpu-utilisation-in-linux/</link>
		<comments>http://roopindersingh.com/2009/01/31/calculating-cpu-utilisation-in-linux/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 08:11:10 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Metrics]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://roopindersingh.com/?p=351</guid>
		<description><![CDATA[Metrics are really useful. It lets you monitor performance, and based on those metrics that you&#8217;ve gathered over time, you can make informed decisions on improving performance. One of these metrics is CPU utilisation.
Procfs in Linux is full of information, and CPU utilisation can be be calculated from the outputs of /proc/stat. Have a look [...]]]></description>
			<content:encoded><![CDATA[<p>Metrics are really useful. It lets you monitor performance, and based on those metrics that you&#8217;ve gathered over time, you can make informed decisions on improving performance. One of these metrics is CPU utilisation.</p>
<p><a href="http://en.wikipedia.org/wiki/Procfs">Procfs</a> in Linux is full of information, and CPU utilisation can be be calculated from the outputs of <code>/proc/stat</code>. Have a look at <code>man proc</code> for more details.</p>
<p>Here&#8217;s a small python app that reads <code>/proc/stat</code> and prints out the CPU utilisation time.</p>
<pre>#!/usr/bin/python
import time

FNAME='/proc/stat'

def readBody():
    fp = open(FNAME, 'r')
    lines = []
    try:
        lines.extend([l.strip() for l in fp])
    finally:
        fp.close()
    return lines

def splitBody():
    lines = []
    lines.extend(l.split() for l in readBody())
    return lines

class CPUTime:
    user = 0
    nice = 0
    system = 0
    idle = 0
    total = 0

    def parse(self, line):
        self.user = long(line[1])
        self.nice = long(line[2])
        self.system = long(line[3])
        self.idle = long(line[4])
        self.total = float(self.user + self.nice + self.system + self.idle)

    def __repr__(self):
        return 'user=%s, nice=%s, sys=%s, idle=%s, total=%s' % (self.user, self.nice, self.system, self.idle, self.total)

    def usageUser(self):
        return self._doPercentage(self.user)

    def usageNice(self):
        return self._doPercentage(self.nice)

    def usageSystem(self):
        return self._doPercentage(self.system)

    def usageIdle(self):
        return self._doPercentage(self.idle)

    def delta(self, other):
        self.user -= other.user
        self.nice -= other.nice
        self.system -= other.system
        self.idle -= other.idle
        self.total -= other.total

    def copy(self):
        t = CPUTime()
        t.user = self.user
        t.nice = self.nice
        t.system = self.system
        t.idle = self.idle
        t.total = self.total
        return t

    def _doPercentage(self, a):
        return a / self.total * 100.0;

def main():
    print 'Collecting first sample'

    first = CPUTime()
    first.parse(splitBody()[0])

    while True:
        time.sleep(1)
        second = CPUTime()
        second.parse(splitBody()[0])
        secondCopy = second.copy()
        second.delta(first)
        print 'user=%s, nice=%s, sys=%s, idle=%s' % (second.usageUser(), second.usageNice(), second.usageSystem(), second.usageIdle())
        first = secondCopy

if __name__ == '__main__':
    main()</pre>
<p>The source code can be downloaded from <a href="http://svn.xp-dev.com/svn/rs_scripts/trunk/get_cpu.py">http://svn.xp-dev.com/svn/rs_scripts/trunk/get_cpu.py<br />
</a> as well.</p>
<p>Here&#8217;s an example run output:</p>
<pre>rs@laptop:~/projects/scripts/pub$ ./get_cpu.py
Collecting first sample
user=2.5, nice=0.0, sys=0.5, idle=97.0
user=0.995024875622, nice=0.0, sys=1.49253731343, idle=97.5124378109
user=1.96078431373, nice=0.0, sys=0.490196078431, idle=97.5490196078
user=0.980392156863, nice=0.0, sys=0.980392156863, idle=98.0392156863
user=1.9512195122, nice=0.0, sys=0.975609756098, idle=97.0731707317
user=1.9801980198, nice=0.0, sys=0.990099009901, idle=97.0297029703
user=2.89855072464, nice=0.0, sys=1.44927536232, idle=95.652173913
user=2.42718446602, nice=0.0, sys=1.45631067961, idle=96.1165048544
user=6.34146341463, nice=0.0, sys=1.9512195122, idle=91.7073170732
user=1.9512195122, nice=0.0, sys=2.43902439024, idle=95.6097560976
user=3.98009950249, nice=0.497512437811, sys=1.49253731343, idle=94.0298507463
user=1.94174757282, nice=0.0, sys=0.970873786408, idle=97.0873786408
user=2.94117647059, nice=0.0, sys=0.490196078431, idle=96.568627451</pre>
<p>Feel free to take it and do something useful from it. It&#8217;s in the public domain.</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2009/01/31/calculating-cpu-utilisation-in-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Moving Over to Nginx</title>
		<link>http://roopindersingh.com/2008/12/16/moving-over-to-nginx/</link>
		<comments>http://roopindersingh.com/2008/12/16/moving-over-to-nginx/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 06:58:57 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://roopindersingh.com/?p=103</guid>
		<description><![CDATA[Running XP-Dev.com has its set of unique problems, and it has not always been easy. I&#8217;ve always tried to run the whole infrastructure on a shoe-string budget at the same time trying not to compromise on quality.

One of the problems is hardware resource.
The truth is: Apache is a memory hog, and to keep things scalable [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-275 alignright" title="nginx" src="http://roopindersingh.com/wp-content/uploads/2008/12/nginx.gif" alt="nginx" width="121" height="32" />Running <a href="http://xp-dev.com">XP-Dev.com</a> has its set of unique problems, and it has not always been easy. I&#8217;ve always tried to run the whole infrastructure on a shoe-string budget at the same time trying not to compromise on quality.</p>
<p><img class="size-medium wp-image-276 alignright" title="php" src="http://roopindersingh.com/wp-content/uploads/2008/12/php.gif" alt="" width="120" height="67" /></p>
<p>One of the problems is <strong>hardware resource</strong>.</p>
<p>The truth is: <a href="http://httpd.apache.org/">Apache</a> is a memory hog, and to keep things scalable for serving <a href="http://subversion.tigris.org/">Subversion</a> repositories, I decided to remove all <a href="http://php.net/">PHP</a> websites out from apache and run them under <a href="http://nginx.net/">nginx</a> and PHP-CGI (<code>sudo apt-get install php5-cgi</code>). To be honest, I did not notice any difference in performance of the web sites (apache/mod_php vs nginx/fastcgi/php-cgi), however, the main motivation of this exercise is to limit the maximum amount of memory that my non-critical PHP web sites take, and at the same ti</p>
<p>me, giving apache more room to grow for serving the Subversion repositories. I could have had two apache installations, and give them different limits (by tweaking <code>MaxSpare*</code>, <code>MaxRequests*</code> and friends), but that&#8217;s an outright pain to manage. Moreover, I needed a simple webserver that can just serve static content as well.</p>
<p>And lets not forget the users of virtual private servers (VPS) with limited amount of memory. Nginx and PHP-CGI is a much appropriate solution for those memory limited configurations.</p>
<p>I had a look around, and it was basically down to <a href="http://www.lighttpd.net/">lighttpd</a> or nginx as a replacement to serve the PHP websites, and I picked nginx as there were some odd bugs with lighttpd serving large files. The FastCGI performance is almost the same (I did not really do any scientific benchmarks). However, the part that really got me sold on these two was that it used a master-slave threading model, rat</p>
<p>her than the (out of date) one thread/process per client model, which does not scale at all. Both of them are event driven, rather than &#8220;client socket&#8221; driven. BTW, this includes the awesome J2EE web container <a href="http://www.mortbay.org/jetty/">Jetty</a> (if you use the <code>SelectChannelConnector</code>).</p>
<p>Migrating the websites across from apache to nginx/fastcgi/php-cgi was an absolute breeze and here are a few pointers that will help ease the burden.</p>
<h3>Strategy</h3>
<p>Just to clarify, in the apache/mod_php world, PHP files are served via the apache process itself. The strategy under nginx is to get nginx to pass on the request to another set of long running php-cgi processes that do the actual PHP processing. The response will then be passed back to nginx, which will send it back to the web browser.</p>
<h3>Documentation</h3>
<p>Use <a href="http://wiki.codemongers.com/Main">the English Nginx wiki</a> extensively. There&#8217;s a lot of documentation there on configuring and tweaking nginx, especially the <a href="http://wiki.codemongers.com/NginxModules">module reference pages</a>. Here&#8217;s <a href="http://wiki.codemongers.com/NginxFcgiExample">a quick and dirty howto</a> on getting nginx+fastcgi and php-cgi working.</p>
<h3>PHP FastCGI Start/Stop Scripts</h3>
<p>Save yourself the trouble of writing a custom PHP FastCGI start/stop script. Install lighttpd and use their <code>spawn-fcgi</code> script wrapper. Its really going to save you a lot of painful hours. I wrote a simple wrapper around that script as I wanted PHP cgi to startup on every server bootup, or if I wanted a quick restart of the processes. You might rant to adjust the variables <code>pidfile</code> and <code>cgidir</code> for your setup.</p>
<pre>#!/bin/bash

me=`whoami`
if [ $me != "root" ]; then
        echo Not root!
        exit 1
fi

pidfile=/root/php.PID
pid=`cat $pidfile`
cgidir=/var/run/php-cgi
sock=$cgidir/unix.sock

[ ! -d $cgidir ] &amp;&amp; echo creating $cgidir &amp;&amp; mkdir $cgidir &amp;&amp; chown www-data.www-data $cgidir

if [ "$pid" != "" ]; then
        echo Killing $pid
        kill $pid
        rm $pidfile
        sleep 1
fi

[ -f $sock ] &amp;&amp; chown www-data.www-data $sock

/usr/bin/spawn-fcgi -f /usr/bin/php-cgi -s $sock -C 5 -P $pidfile -u www-data -g www-data</pre>
<h3>Stop serving .htaccess</h3>
<p>Plenty of web apps out there have built in support for apache, and include .htaccess files in their distribution to reduce the configuration overhead for the installer. However, nginx will serve these files by default, which maybe fine for most of the cases, but its always good practice to deny access to it. Simple config for nginx does the trick</p>
<pre>location ~ /\.ht {
    deny  all;
}</pre>
<h3>Serving PHP files</h3>
<p>To serve PHP files, nginx will pass the request to the PHP-CGI handlers.</p>
<pre>location ~ .*\.php$ {
	fastcgi_pass   unix:/var/run/php-cgi/unix.sock;
	fastcgi_index  index.php;
	include /etc/nginx/fastcgi_params;
	fastcgi_param  SCRIPT_FILENAME  /home/rs/local/wordpress/$fastcgi_script_name;
}</pre>
<p>Notice that I&#8217;ve included a <code>/etc/nginx/fastcgi_params</code> file above. This file contains all the regular FastCGI directives, and I&#8217;ve put it in a seperate file to avoid too much repetition. The content of the file <code>/etc/nginx/fastcgi_params</code> is below:</p>
<pre>fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;</pre>
<h3>Wordpress Rewrite</h3>
<p>The final tip is for all those <a href="http://wordpress.org/">Wordpress</a> junkies out there. To get nice urls for Wordpress, you will need the following rewrite directive. If I&#8217;m not mistaken, one will be given to you for apache when you&#8217;re setting up custom urls via the admin screen, but not for nginx:</p>
<pre>if (!-e $request_filename) {
    rewrite ^(.+)$ /index.php?q=$1 last;
}</pre>
<p>And that&#8217;s about it. I really do hope these tips will help someone out there. I know it would have shaved a couple hours off my setup time had I known them beforehand.</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2008/12/16/moving-over-to-nginx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Be Unlimited and Name Servers</title>
		<link>http://roopindersingh.com/2008/12/01/be-unlimited-and-name-servers/</link>
		<comments>http://roopindersingh.com/2008/12/01/be-unlimited-and-name-servers/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 05:45:19 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://roopindersingh.com/?p=208</guid>
		<description><![CDATA[I’ve been a Be-Unlimited ADSL user for a while now, and of late, I’ve noticed that their DNS servers have been very unreliable. They did send an email to their users stating that they had some issues (I’ve deleted that mail! doh!) a few weeks back, and it was mentioned that the problem was resolved. [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been a Be-Unlimited ADSL user for a while now, and of late, I’ve noticed that their DNS servers have been very unreliable. They did send an email to their users stating that they had some issues (I’ve deleted that mail! doh!) a few weeks back, and it was mentioned that the problem was resolved. However, I’ve been keeping a close eye on it, and it seems it hasn’t been resolved entirely &#8211; roughly 1 out of every 5 queries to their name servers (that they provide via DHCP) times out.So, being really frustrated with hitting refresh so many times when browsing the web, I decided to just take the bullet and install my own BIND server locally. I’m not a big fan of running my own name server &#8211; its a pain as it eats up resource, and I really shouldn’t have to worry about resolving names from my home laptop &#8211; that’s the responsibility of the darn ISP! To get it working on Ubuntu is as simple as:</p>
<p>So, being really frustrated with hitting refresh so many times when browsing the web, I decided to just take the bullet and install my own BIND server locally. I’m not a big fan of running my own name server &#8211; its a pain as it eats up resource, and I really shouldn’t have to worry about resolving names from my home laptop &#8211; that’s the responsibility of the darn ISP! To get it working on Ubuntu is as simple as:</p>
<blockquote><p>sudo apt-get install bind9</p></blockquote>
<p>If you’re using DHCP, edit /etc/dhcp3/dhclient.conf. And ensure that there’s an entry for prepend domain-name-servers:</p>
<blockquote><p>prepend domain-name-servers 127.0.0.1;</p></blockquote>
<p>And thats it!</p>
<p>If you don’t want to run your own bind server, then you’re not out of luck just yet! You could OpenDNS and plugin their servers locally or on your router. I’ve set them up for my router as other PCs and devices use the router to resolve names.</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2008/12/01/be-unlimited-and-name-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Follow up on XP-Dev.com release</title>
		<link>http://roopindersingh.com/2008/11/20/follow-up-on-xp-devcom-release/</link>
		<comments>http://roopindersingh.com/2008/11/20/follow-up-on-xp-devcom-release/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 06:37:39 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[XP-Dev.com]]></category>

		<guid isPermaLink="false">http://roopindersingh.com/?p=184</guid>
		<description><![CDATA[A quick follow up post on the recent release of XP-Dev.com. There were some bugs that needed to be resolved. Some pretty critical ones, while others were just minor annoyances. However, the dust should have settled now. I&#8217;m not saying that there aren&#8217;t any bugs left, but most have been fixed. Of course, if you [...]]]></description>
			<content:encoded><![CDATA[<p>A quick follow up post on the <a href="http://roopindersingh.com/2008/11/18/new-xp-devcom-finally-released/">recent release</a> of <a href="http://xp-dev.com/">XP-Dev.com</a>. There were some bugs that needed to be resolved. Some pretty critical ones, while others were just minor annoyances. However, the dust should have settled now. I&#8217;m not saying that there aren&#8217;t any bugs left, but most have been fixed. Of course, if you do notice anything odd, please <a href="http://xp-dev.com/support/">raise a support ticket</a> and we&#8217;ll resolve it asap.</p>
<p>I decided to take it easy the past couple of days, as I&#8217;ve been working on XP-Dev.com like a maniac for the past 4 weeks. Just to give this some context &#8211; I began rewriting the whole of XP-Dev.com from 16th October 2008 and released it on 17th November 2008, which is about a months worth of work. I current site has 13k lines of Java (not including unit tests) and 2k lines of HTML/<a href="http://velocity.apache.org/">Velocity</a> templates. There&#8217;s about 1k lines of XML, but most of that is just <a href="http://www.springframework.org/">Spring</a> configuration (NOT their web framework &#8211; I&#8217;m only using Spring for IOC), and I had a day job to take care of. There was plenty of refactoring done during this time, and these numbers are only the final figures. All in all &#8211; a crazy month, but well worth it!</p>
<p>It is a complete re-write with a whole new custom MVC framework and object relational mapper (ORM) layer. I&#8217;m seriously considering releasing the MVC framwork as open source (the ORM needs some work!), which I think is pretty darn good &#8211; writing new dynamic pages and forms is a breeze! Now, I&#8217;m sure a lot of you might be wondering why I embarked on such an ambitious journey ? Well, stay tuned as I will be posting a series of blog posts on how I re-engineered and re-architected XP-Dev.com, and the reasons behind those decisions.</p>
<p>The new XP-Dev.com has only been released for 3 days and I did get quite a few mails from users who expressed their gratitude. I can&#8217;t begin to thank all of you for those kind emails and support tickets &#8211; it is really good to know that there are plenty of you out there who are happy users, and that the past month has been well worth it! I&#8217;ve got many more ideas to put into  XP-Dev.com, so, think of the recent release as the beginning of something new <img src='http://roopindersingh.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><img class="aligncenter" title="Linux Funny" src="http://static.roopindersingh.com/linux-small.jpg" alt="" width="400" height="320" /></p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2008/11/20/follow-up-on-xp-devcom-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Subversion Hosting</title>
		<link>http://roopindersingh.com/2008/11/01/free-subversion-hosting/</link>
		<comments>http://roopindersingh.com/2008/11/01/free-subversion-hosting/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 17:14:37 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[Project Tracking]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[XP-Dev.com]]></category>

		<guid isPermaLink="false">http://roopindersingh.com/?p=105</guid>
		<description><![CDATA[Many people over the past few months, have been asking the same questions over and over again about the services over at XP-Dev.com. I don&#8217;t mind answering them with the same answers, but I think it is time to put all of these questions into one place and discuss them.

Why are you offering Subversion Hosting [...]]]></description>
			<content:encoded><![CDATA[<p>Many people over the past few months, have been asking the same questions over and over again about the services over at <a href="http://xp-dev.com/">XP-Dev.com</a>. I don&#8217;t mind answering them with the same answers, but I think it is time to put all of these questions into one place and discuss them.</p>
<p style="text-align: center;"><a href="http://xp-dev.com/"><img class="aligncenter size-full wp-image-123" title="XP-Dev.com" src="http://roopindersingh.com/wp-content/uploads/2008/11/logo.png" alt="" width="305" height="55" /></a></p>
<p><strong>Why are you offering Subversion Hosting for free ? Is it too good to be true ?</strong></p>
<p>Let me set something straight:</p>
<blockquote><p>I offer it free because I really do not believe that anyone should pay for <strong>something so simple to setup and run</strong> as Subversion.</p></blockquote>
<p>Here is the reality: I setup <a href="http://httpd.apache.org/">Apache</a> using mod_svn, mod_dav, mod_ssl and mod_auth_mysql once. Believe me: only once and never ever ever ever (ever!) touched it again. No, I am not kidding &#8211; only once! No tinkering needed, it just runs like <a href="http://www.imdb.com/title/tt0109830/">Forrest Gump</a> (no pun intended to all you Gump fans out there).</p>
<p>It does cost $$$ to host it, including my time to add more features to it. Disk space and bandwidth is getting cheaper. They are not free, but then again, if you average it across the number of users that I have on <a href="http://xp-dev.com/">XP-Dev.com</a>, the figure looks really, really small. It is a cost nonetheless, which I&#8217;ll try to cover below.</p>
<p><strong>So, we&#8217;ve established it does cost money, how are you covering these costs ? Are you really rich ?</strong></p>
<p>OK. I wish I was rich, but the truth is &#8211; I am not. I could claim I was rich and lie to you all, but then I would not get any glory every time I look at my monthly bank statements.</p>
<p>So, where does the money come from to pay for the services ? Well, at the moment, I am paying for it. But I won&#8217;t be doing this forever.</p>
<p>I have got a few models to generate revenue and these models will be implemented in the next few months. I can&#8217;t reveal them to the public just yet, but rest assured that the usage of Subversion and project tracking on <a href="http://xp-dev.com/">XP-Dev.com</a> <strong>will always remain free</strong>. This is how I started and envisaged <a href="http://xp-dev.com/">XP-Dev.com</a>, and that is how it will always be.</p>
<blockquote><p>Free Subversion Hosting and Project Tracking on XP-Dev.com is a <strong>life-time guarantee</strong>.</p></blockquote>
<p><strong>You&#8217;re offering a free service. There&#8217;s a catch to it, right ? Are you selling our code to someone else ?<br />
</strong></p>
<p>No. Nada. No catch. I am not a petty code trader. I don&#8217;t go around knocking on other peoples doors saying &#8220;PHP codez $4 per line! .. $3.50 per line! .. $3.40 per line! ..&#8221;. I could not even be the least bothered about what everyone else is coding. I have my own ideas to push forward and materialise (one of them is <a href="http://xp-dev.com/">XP-Dev.com</a>, there are a lot more in the pipeline).</p>
<p>So, your code is safe on our servers. No one else other than the ones you have permissioned are looking at your repositories. We do have backups that run every night and copied over off-site, but they are all encrypted before leaving the server.</p>
<p>I put all my code on <a href="http://xp-dev.com/">XP-Dev.com</a>. I am a consumer of my own service. I believe that anyone who offers a service should always be their own users/clients/customers. You should see your service from the customers point of view.</p>
<p>If someone else looked at my code and data, I&#8217;d be really worried. I respect that tremendously and try my very best to lock down the server.</p>
<blockquote><p>What you see is what you get &#8211; WYSIWYG. There are no catches at all. Your code and data are safe. We have a &#8220;no prying eyes&#8221; and &#8220;mind your own business&#8221; policy.</p></blockquote>
<p><strong>OK. So it is a genuine service that is FREE with no strings attached. Then I suppose it will have to be an overloaded, slow service ?</strong></p>
<p>Never! This is one of the things that come out from being a consumer of your own service. If the services do get slow, there&#8217;s going to be one really noisy, angry, verbal user &#8211; me. And I&#8217;m really scared of him.</p>
<p>On a serious note, I&#8217;d be disappointed with myself if the service ever comes to a unacceptable quality. At the moment it&#8217;s fast and quick and I intend on keeping it that way. If it every becomes slow, I&#8217;ll be there in front of the queue shouting.</p>
<p>I&#8217;m not too sure if this is a good thing, or a bad thing &#8211; I&#8217;ve only ever worked in the Front Office for Investment Banks building real-time (well, its <em>near real-time</em>) trading and pricing system. They are all high performance scalable systems. The systems I work on can cost a trader anywhere between $100,000 to $500,000 if latency went up a nudge above 10ms (yes, that&#8217;s milliseconds!). <a href="http://xp-dev.com/">XP-Dev.com</a> is a testament of my experience building &amp; architecting these crazy systems (trust me, they are crazy!).  If performance degrades, it will be a major failure on my part and I&#8217;m a really proud person <img src='http://roopindersingh.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p><strong>It is a great service. How can I help ?</strong></p>
<p>This reply is a cliche. There are a few ways you can help.</p>
<p>If you are not a user, register now!</p>
<p>If you are a user, and have any problems, queries or just want to say thank you, then please <a href="/contact/">tell me</a>, or email <a href="mailto:admin@xp-dev.com">admin@xp-dev.com</a>. Every single non-spam email that goes there gets a reply. If you don&#8217;t get a reply in a few hours, then it&#8217;s probably SpamAssassin acting up. You should use <a href="/contact/">this form</a> instead.</p>
<p>If you are a user, or not even one just yet &#8211; you can help by telling your friends, mom, dad, brothers, sisters, relatives, neighbours, cats, dogs, fish and everyone else about <a href="http://xp-dev.com/">XP-Dev.com</a>. Digg it, Buzz it, Reddit. Do whatever. Just keep spreading the word. I really appreciate it.</p>
<p>If you have any other questions or concerns, please post them as comments to this blog entry, or do <a href="/contact/">contact me</a> directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2008/11/01/free-subversion-hosting/feed/</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
		<item>
		<title>CodeWeavers for Free!</title>
		<link>http://roopindersingh.com/2008/10/28/codeweavers-for-free/</link>
		<comments>http://roopindersingh.com/2008/10/28/codeweavers-for-free/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 09:09:38 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog-local/?p=35</guid>
		<description><![CDATA[
CodeWeavers have long been the helping hand in getting Windows applications running nicely in Linux and Mac. Now, due to the Great Lame Duck Presidential Challenge, they are giving away their products for free &#8211; just for TODAY! Get your serial number and grab a copy for yourself. I&#8217;ve grabbed my copy already.
]]></description>
			<content:encoded><![CDATA[<p style="float: right;"><img title="Codeweavers Logo" src="http://static.roopindersingh.com/9.jpeg" alt="Codeweavers Logo" /></p>
<p>CodeWeavers have long been the helping hand in getting Windows applications running nicely in Linux and Mac. Now, due to the <a href="http://lameduck.codeweavers.com/free/">Great Lame Duck Presidential Challenge</a>, they are giving away <a href="http://www.codeweavers.com/products/">their products</a> for free &#8211; just for TODAY! Get your serial number and grab a copy for yourself. I&#8217;ve grabbed my copy already.</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2008/10/28/codeweavers-for-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu As A Server</title>
		<link>http://roopindersingh.com/2008/10/11/ubuntu-as-a-server/</link>
		<comments>http://roopindersingh.com/2008/10/11/ubuntu-as-a-server/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 07:35:15 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog-local/?p=34</guid>
		<description><![CDATA[ 
Wikipedia, who use a mix of Red Hat and Fedora distributions for their infrastructure are moving over to Ubuntu, as part of an effort to standardise their infrastructure.
Ubuntu is very extremely popular as a desktop Linux distribution, but seem to have taken a while to penetrate the server market. If you have a look [...]]]></description>
			<content:encoded><![CDATA[<p style="float:right;"><img title="Ubuntu" src="http://static.roopindersingh.com/8-thumb.png" alt="Ubuntu" /> <img title="Wikipedia" src="http://static.roopindersingh.com/7-thumb.png" alt="Wikipedia" /></p>
<p><a href="http://www.wikipedia.org/">Wikipedia</a>, who use a mix of <a href="http://www.redhat.com/">Red Hat</a> and <a href="http://fedoraproject.org/">Fedora</a> distributions for their infrastructure are <a href="http://arstechnica.com/news.ars/post/20081009-wikipedia-adopts-ubuntu-for-its-server-infrastructure.html">moving over to Ubuntu</a>, as part of an effort to standardise their infrastructure.</p>
<p><a href="http://www.ubuntu.com/">Ubuntu</a> is very extremely popular as a desktop Linux distribution, but seem to have taken a while to penetrate the server market. If you have a look at <a href="http://distrowatch.com/">Distrowatch.com</a>, Ubuntu has had the top position in their Page Hit Rank since 2005, which just generally means that it is pretty darn popular!</p>
<p>My general take on Ubuntu is that it has always been promoted as a desktop distribution. I remember having a discussion with a former colleague about using Ubuntu as a server. He laughed out loud in disbelieve and discounted the fact at face value. It will take time to adjust to the fact that Ubuntu is actually a very viable server distribution as there&#8217;s a stigma attached to it &#8211; imagine a system administrator coming up to you with a solution to a business proposal and suggesting &#8220;Oh yes sir, we&#8217;ll be using the Windows XP&#8221;. To the average Joe, that&#8217;ll be a textbook failure in making first impressions. Ubuntu&#8217;s image is that deep in the desktop zone.</p>
<p>However, not many people know this fact &#8211; the current server that hosts this blog runs on Ubuntu, and as far as I can remember, Ubuntu has always had a &#8220;minimal&#8221;/&#8221;server&#8221; installation option along with their standard &#8220;desktop&#8221; option. In the not so far past, I ran a bunch of servers from home behind an ADSL line (hardly the enterprise environment!) and as soon as Ubuntu came out, I wiped out the mix of <a href="http://www.debian.org/">Debian</a>/<a href="http://www.gentoo.org/">Gentoo</a>/<a href="http://www.freebsd.org/">FreeBSD</a> that I was running and installed Ubuntu everywhere &#8211; desktops and servers!</p>
<p>Why would I do such a thing ? Why would I use a desktop distribution on a server ? Why would Wikipedia use Ubuntu on their enterprise environment which process 50,000 HTTP requests during peak times ?</p>
<p>Well &#8211; the answer is actually very simple. <a href="http://www.canonical.com/">Canonical</a> took Debian, gave it a major cleanup, ease of use and (importantly) standardised the whole distribution. They basically wanted something that was easy to use and maintain. There would be a few releases a year and they will be properly supported, but only for a certain period of time. The best part is that the distribution feels like it was not standardised from a desktop point of view, i.e. a top-down approach. It really feels like they took a bottom-up approach in modifying and cleaning up Debian &#8211; which results in a great distribution that has everything consistent! It takes more work to implement the bottom-up approach, as you&#8217;re not only cleaning up <a href="http://www.gnome.org/">Gnome</a> or <a href="http://kde.org/">KDE</a>, but you&#8217;re cleaning up the thousands, upon thousands of standard software packages that come with Ubuntu.</p>
<p>So, having Ubuntu basically means that I get ultra awesome support for security patches and bug fixes, and at the same time, I get a Debian distribution that is extremely clean, standardised and consistent. All the default config files are at the right locations. It makes it faster, easier and more intuitive to setup a package under Ubuntu as the default options for most packages are good enough.</p>
<p>I can see why it makes sense for Wikipedia to switch to Ubuntu &#8211; it keeps the servers very standardised, which in turn means administration costs are kept low and architecture is less prone to failure. My only hope is to actually see more adoption of Ubuntu in the data centres worldwide. So, if you&#8217;re in a team that uses Linux, or even Windows, do convince them to switch over to Ubuntu.</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2008/10/11/ubuntu-as-a-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google G1</title>
		<link>http://roopindersingh.com/2008/09/22/google-g1/</link>
		<comments>http://roopindersingh.com/2008/09/22/google-g1/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 04:48:56 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog-local/?p=30</guid>
		<description><![CDATA[At long last, the Google G1 will be released to the public, initially in New York. The handset is made by HTC (called the HTC Dream) and the mobile service by T-Mobile. All sounds great &#8211; but when will we see it in the UK and how much ?! This is a good thing as [...]]]></description>
			<content:encoded><![CDATA[<p>At long last, the <a href="http://www.guardian.co.uk/technology/2008/sep/22/google.mobilephones">Google G1 will be released</a> to the public, initially in New York. The handset is made by HTC (called the HTC Dream) and the mobile service by T-Mobile. All sounds great &#8211; but when will we see it in the UK and how much ?! This is a good thing as we really need a solid competitor to the Apple iPhone. I do realise that smart phones have been around for a while now, but what we really want is a competitor that can challenge Apple&#8217;s &#8220;cool&#8221; factor at the right price, and Google is the perfect candidate for that.</p>
<p>I&#8217;ve been playing with the idea of having a &#8220;always online&#8221; smart phone so that I can check my emails at any time, do the occasional web surfing and help sort out user issues and queries from <a href="http://xp-dev.com/">XP-Dev.com</a> and <a href="http://duzle.com/">Duzle.com</a>. So far, my best solution has been to grab hold of a <a href="http://en.wikipedia.org/wiki/AT&amp;T_Tilt">HTC TyTN II</a> and a sim-only deal from either O2 or Vodafone that give tons of bandwidth for internet usage. The <a href="http://www.google.co.uk/products?q=htc%20tytn%20ii">HTC phone will set me back some £400</a>, and the contract about £30 a month (12 months contract) (TCO: £760). An iPhone costs <a href="http://www.o2.co.uk/iphone/paymonthly">£45 a month</a> on an 18 month contract (TCO: £810).</p>
<p>So, the HTC idea is cheaper &#8211; my only quirk: it runs Windows. 3 months down the line with the HTC, I can see myself getting frustrated with Windows Mobile. I might even try installing Linux and risk bricking the phone. However, since the Google G1 out, it just adds a different perspective to the choices that I have. Morever, its not Windows. It uses <a href="http://code.google.com/android/">Google Andriod</a>, which is a big bonus point in my books. Suddenly, the ideal smart phone has come about &#8211; the only thing that&#8217;s going to hold me back could be the price.</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2008/09/22/google-g1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java 6 on FreeBSD, anyone?</title>
		<link>http://roopindersingh.com/2008/08/28/java-6-on-freebsd-anyone/</link>
		<comments>http://roopindersingh.com/2008/08/28/java-6-on-freebsd-anyone/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 03:59:55 +0000</pubDate>
		<dc:creator>rs</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog-local/?p=26</guid>
		<description><![CDATA[
Java on FreeBSD has been working for a long time. While most things worked, it was never officially supported, as it was not a complete implementation. Not everything on the JVM worked as expected on FreeBSD. Well, that has changed (I might be late to join the party on this one!) and Java 6 is [...]]]></description>
			<content:encoded><![CDATA[<p><img style="float:right;" title="Beastie" src="http://static.roopindersingh.com/2.png" alt="Beastie" /></p>
<p>Java on FreeBSD <a href="http://www.eyesbeyond.com/freebsddom/java/">has been working for a long time</a>. While most things worked, it was never officially supported, as it was not a complete implementation. Not everything on the JVM worked as expected on FreeBSD. Well, that has changed (I might be late to join the party on this one!) and <a href="http://www.freebsdfoundation.org/downloads/java.shtml">Java 6 is officially supported now</a>, and the downloads include pre-built binaries.</p>
<p>BTW, they&#8217;ve dropped official support for the Java 5 JVM. From <a href="http://www.freebsd.org/java/">their Java project page</a>:</p>
<pre>Packages for JDK/JRE 1.5.0 are still available for download although they are not supported any longer.</pre>
<p>I stopped using FreeBSD since I started using a multi-core desktop and FreeBSD did not have SMP support . <a href="http://www.freebsd.org/smp/">Even that has changed</a>, and they have come a long way from FreeBSD 5. I&#8217;ll be keeping a close watch on them. Who knows, maybe the whole of <a href="http://xp-dev.com/">XP-Dev.com</a> might run on FreeBSD in the future ?</p>
]]></content:encoded>
			<wfw:commentRss>http://roopindersingh.com/2008/08/28/java-6-on-freebsd-anyone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
