Microsoft supports OpenID

Have you heard about OpenID? The simple idea that your web address is one form of identity, just like your email adddress or even your physical address? Well, back in December, we mentioned how OpenID has been gaining momentum like crazy, but today, things just went to a whole new level. Bill Gates announced that Microsoft CardSpace will support OpenID. Finally Microsoft realizes that their identity solutions were late to the party 😀

Read more at Six Apart.

OpenID or CardSpace

You might have heard about OpenID and Microsoft’s CardSpace. Both provide SSO functionality. I personally believe that OpenID is better because it works the way you want and not the way some third party wants it to work.

Few days back got into a big argument with one of my friends over whether OpenID is better than CardSpace. The outcome of the argument was that CardSpace was better because the Windows CardSpace client validates the consumer requesting the token and selects the identity; whereas in OpenID it the user that would choose which identity will be provided to the consumer.

Today I stumble upon VeriSign’s OpenID SeatBelt Firefox Plugin, it provides Windows CardSpace client like functionality for OpenID. SeatBelt has phishing detection as well. So I showed off SeatBelt to my friend and he was convinced.

To make this post complete why OpenID is better than CardSpace. To start with OpenID is better supported; it works in any operating system or platform not just Windows. Second OpenID is well documented. Third OpenID is decentralized, your machine has nothing much to do with signing in except for the session. Fourth to use OpenID the users do not have to download anything other than the browser it self, if they need protection against phishing they only have to download a tiny(224K) plug in for their browser.

If you think different please add your views to the comments, sorry Blogger doesn’t support CardSpace authentication for comments 😉

Adding social bookmarking links to blogger

I recently wanted to add social bookmarking links to all of my blog posts. As you might notice my blog is hosted on blogger, only way I could do that is by editing the template. I thought I would share how to get about editing the template such that you add social bookmarking links which will automatically add the post permalink and the title if possible.

To edit the template, Sign into your blogger.com account and goto Template -> Edit HTML and then select Expand Widget Templates. Search for <data:post.body/>, just after <data:post.body/><div style="clear: both;"> <!-- clear for photos floats --> insert the following code.

[code language='xhtml']

[/sourcecode]
Add the following code before ]]>.
[sourcecode language='css']/** Service links style **/
.service-links {
padding-top: 3px;
}
.service-links ul.links {
margin:0pt; padding:0pt;
}
.service-links ul.links li {
display:inline;
list-style-type:none;
padding: 0pt 0px;
background: none;
}
.service-links ul.links li img {
border: none;
padding: 3px;
}
.service-links ul.links li a {
border: none;
text-decoration: none;
}[/code]

Then save the template. Adding social bookmarking links and submitting your posts to social bookmarking networks would improve the visibility of your blog and help drive traffic to your blog.

WSO2 WSF/PHP with Lighttpd

I wanted to test drive WSO2 WSF/PHP on Lighttpd because I couldn’t find any documentation specific for Lighttpd, or any one complaining that it cannot be done. I set up a new VMWare image running Debian so that I can blog all the steps involved in getting WSO2 WSF/PHP working on Lighttpd running on Debian.

Step 1: Install Lighttpd, PHP5

I used apt-get to install Lighttpd and PHP5

 $ sudo apt-get install lighttpd php5 

Step 2: Download and install WSO2 WSF/PHP.

I downloaded the Debian package.

 $ axel -an 5 http://dist.wso2.org/products/wsf/php/wso2-wsf-php-1.2.0-debian.deb
$ dpkg -i wso2-wsf-php-1.2.0-debian.deb

Step 3: Enable WSO2 WSF/PHP

I created a new file /etc/php5/conf.d/wsf.ini and added the following line.

 extension=wsf.so 

Step 4: Enable FastCGI and PHP

Fastest method to run PHP on Lighttpd is FastCGI, so we will be enabling FastCGI.

 $ sudo lighty-enable-mod fastcgi

On Debian Lighttpd FastCGI configuration file contains the configuration for PHP4. We will have to edit /etc/lighttpd/conf-enable/10-fastcgi.conf to look like bellow.

server.modules   += ( "mod_fastcgi" )

## Start an FastCGI server for php5 (needs the php5-cgi package)
fastcgi.server = ( ".php" =>
((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 2,
"idle-timeout" => 20,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)

Step 5: Restart Lighttpd

You have to reload the Lighttpd configuration files.

 $ sudo /etc/init.d/lighttpd restart

You have successfully installed WSO2 WSF/PHP on PHP5 and Lighttpd. It is time to test whether it is a success. Simplest approach would be to see phpinfo() page. Create a php file with the following line of code and place it in the document root. Then using a web browser goto that URL. In the page search for wsf section. This contains all the configurations about the WSF extension.

I went throught to the trouble of actually consuming a SOAP web service to see whether this setup actually works and it was a success, but that is simply out of the scope of this post. These instructions should work on other Linux distributions with minor changes and any platform with few changes.

Fly WSO2 WSF/PHP with Lighttpd. Have fun.

Flying light with lighty

I moved all my sites to my all new server. There I’m running Lighttpd as the front facing web server. I do have Apache HTTP Server running for the sake of svn serving. It was not very hard to migrate sites from Apache HTTP Server to Lighttpd. Only feature I missed was .htaccess file support or substitute. I just had to migrate all the operations taking place in the .htaccess files to the Lighty configuration file.

Overall migration was smooth. I have nothing to complain, memory foot print is small as it could get. Since I’m serving only PHP and Python I’m making use of FastCGI and it is really fast. You wouldn’t believe me if I tell you the performance gains. I can serve 700 requests per second when it comes to my Geo-IP web service (I believe the limit was the resources on the test machine), the server is not even sweating. If I was running the same application on Apache HTTP Server it would barely serve 230 requests per second, 204% performance gain.

If you visit any of my sites except for the blog itself (which is hosted at Blogger.com) you would see the performance. mohanjith.net responds within a second, that’s lighting fast. All this with a Debian running on Xen with 128MB physical memory and 256MB swap.

I would recommend Lighty to any one with simple serving requirements. It saves lot of server resources.

Blogging from the GNOME blog

It feels really good to blog from the desktop it self. I used to dought that some of my friends were saying the world is moving to the desktop from the web. Now I see the truth.

To make this post I’m using GNOME Blog (gnome-blog), it is a simple desktop client which supports multiple blogging platforms including Blogger, Livejournal, MovableType and WordPress.

Main advantage of a blogging client is that you don’t have to click through a bunch of links and wait for a slow WYSIWYG editor to load.

If you are using Ubuntu just run:

$ sudo apt-get install gnome-blog

See the magic!

Edit:
Used blogger to edit the post to insert the <pre> tags

MOHA Geo, Geo-IP web service

I started a geo-ip web service, MOHA Geo because I was disappointed with inaccuracies in HostIp, and the time they took to correct them after submitting corrections.

I’m using MaxMind geo-ip data for my service. Currently there is only a JSON API and a HTML widget making use of the JSON API. The service is in a public beta right now. I want to see whether the geo-ip data is accurate and how much stress the server could take. Everyone is invited to use the web service and report any issues.

However there are plans to implement a XML API and also making more information available through the service. Best part is all this comes free of charge and without advertisements, forever. Only thing I would request is a link back; Not compulsory. You can see the HTML widget in action right here in the blog as well, see the right column block “You are from…”.

All the code behind the web service is also available under the open source license GNU GPL v3. You could also start your own web service with the code, ;).

Right now all the hosting expense is from my own account, I would hope I will receive some donations when I have to move to better hosting plan because I’m getting a lot of traffic.

Cool parodies, White and Nerdy, eBay

Couple of days back I was just browsing around searching for funny videos; I stumble upon doogtoons.com. There I got to watch couple of animated interviews and music videos of Weird Al Yankovic (Then at doogtoons they used YouTube, I probably was able to watch related videos as well). Most interesting of them all was White and Nerdy.

Then I thought I would dig it more and did a google to see whether there are any Wikipedia articles, to my surprise Weird Al was a real person, writing and performing parodies. I started to search and watch more and more videos of songs he had created. I thought of sharing the songs I found it interesting.

  1. White and Nerdy [2006] (parody of Ridin’ by Chamillionaire) – Video
  2. eBay [2003] (parody of I Want It That Way by The Backstreet Boys) – Video
  3. Like a Surgeon [1984] (parody of Like a Virgin by Madonna) – Video

While you are there at YouTube don’t forget to checkout other cool Weird Al videos as well, I just listed the coolest three out of the many. Also remember to check Wikipedia to see whether a particular song is really Weird Al’s because some of the videos are wrongly atributed to Weird Al.

Weid Al’s parodies are so cool, I was immediately converted to a fan. He knows how to make a mark in pop culture.

MakeNSIS on Linux

I was supposed to create a Windows installer recently, but I just hate using Windows. NSIS was the chosen installer creator. I was lucky to be able to compile the NSIS installer on Linux.

The installer just ran without any glitches on wine. So testing the installer as not an issue as well.

Let me guide you through installing NSIS on Linux and how to use it on Linux.

Requires

  1. Python
  2. SCons

Steps

  1. Download both the release and the source of x.xx.
  2. nsis-x.xx.zip nsis-x-xx-src.tar.gz

  3. Extract both into one parent parent directory
  4. <parent>
    |
    +-- nsis-x.xx
    +-- nsis-x.xx-src

  5. Change to the source directory
  6. $ cd nsis-x.xx-src

  7. Compile makensis using scon
  8. $ scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all

  9. Copy makensis to the release
  10. $ cp build/release/makensis/makensis ../nsis-x.xx/makensis

  11. Change to the <parent>
  12. $ cd ..

  13. Install – Copy makensis to the install location
  14. $ sudo cp -r nsis-x.xx/* /usr/local/share/nsis/

  15. Create the link from the bin directory to the makensis such that
    makensis is accessible from the command line.
  16. $ sudo link /usr/local/share/nsis/makensis /usr/bin/makensis