Firefox 3 and its impact on servers particularly those serving static content

June 18th, 2008

Firefox 3 has been released and by all accounts there has been enormous uptake of this fine browser.

If you aren’t familiar with the browser, I would encourage you to visit Deb Richardson’s brilliant Field Guide to Firefox 3 which describes a number of key Firefox 3 features in a very accessible manner.

One thing I would like to mention is that Firefox 3 has improved connection parallelism. The default limit for concurrent connections per hostname has been increased from 2 to 6 which is similar to IE8. Details can be found in this bug report here and for the technically inclined these are the new defaults

pref(”network.http.max-connections”, 30);
pref(”network.http.max-connections-per-server”, 15);
pref(”network.http.max-persistent-connections-per-server”, 6);
pref(”network.http.max-persistent-connections-per-proxy”, 8);

Whilst the improved connection parallelism is one factor in improved page load performance, web server administrators who are currently serving content via Apache need to factor in increased concurrent connections from Firefox 3 and tweak their MaxClients setting appropiately.

If they are using Apache to serve static content, maybe they should consider switching to lighttpd and nginx for serving such content.

Google’s Steve Souder has a great roundup on Parallel Connections in this blog entry.

Some comments on older posts got deleted

June 7th, 2008

Not sure how this occurred, will see if I can get some of them back via backups. Will have to automate blog backups and keep weekly snapshots

Twitter’s use for SMS sending and receiving

June 7th, 2008

Hong Kong is unique in the sense that whilst we have insane mobile penetration of 154.4 %, there is a huge price difference between voice plans and SMS plans.

Depending on a third party long distance provider, it is actually cheaper to call up somebody and speak for a few minutes (HK-US charges are 7 cents/min and an SMS costs at minimum HK$ 2) and convey more than send a SMS to that person

Thus, I find Twitter’s SMS integration very useful. I tell my family members to sign up to Twitter and then also enable their mobile devices. In India, Twitter has a shortcode 5566511.

In HongKong, wifi access is very ubiquitous via the GovWiFi program as well as efforts by FON as well as PCCW, HongKong’s dominant telco provider so hopefully with the upcoming launch of the iPhone in Hong Kong it can help me by allowing me to have access to Twitter

Technorati Tags:

Using a La Fonera as a sandbox SSID to provide safer access for visitors in the office

May 2nd, 2008

I was chatting with Ali Ebrahim over IM and mentioned to him that the La Fonera was quite useful as a quick mechanism to provide a sandbox SSID for visitors to his office who wanted to connect to the Internet. I’d like to elaborate on the exact mechanism

Offering access via the office WLAN or even via a wired connection opens up the risk of having an external entity access to an office’s internal network. I’ll leave it to your imagination as to what could possibly go wrong here (virus infection, internal file shares visible etc).

Whilst it is always possible to deny any form of Internet access to a visitor, it is possible via a La Fonera not only to provide access but at the same time be secure.

You may rightfully ask

Won’t it require the visitor/guest to be a fonero , that is run La Fonera/Fonera+ at his/her home/office so that he could connect to our office’s FON Access Point ? This may preclude the majority of visitors to an office

The answer is

  • Use the Friends and Family mechanism available by logging in on the FON User Zone.

The Friends and Family mechanism in the FON User Zone enables a fonero to setup local users on his FON Access Point with an associated password. This username and password is specific to that FON Access Point. You just need to setup one username/password. Multiple users can connect to that FON Hotspot via that username/password. I recommend modify the captive portal page to inform people about the username/password. The La Fonera defaults to having the bandwidth limited to 512 Kbit/sec to the Internet for connections made via its FON_whatever SSID. Connections made to the public SSID FON_whatever are on a separate VLAN and users cannot see any open shares on the office network.

Thus with this mechanism, one could allow access to the Internet to visitors/guests in an office environment by having them connect to the open FON_whatever SSID and still have them separate from the office internal network. You should keep your private SSID secure using WPA2 and use a difficult to guess password. It’s best to change the default password which is the serial number of the La Fonera as well as the default private SSID which is MyPlace

BTW, If you are using FON, I really recommend the Devicescape Connection Manager. It makes connecting to FON Hotspots pretty much a no-brainer. I really wish providers like Y5Zone and PCCW in Hong Kong would work with Devicescape and get their hotspots supported in the system. I’ve seen a number of their customers asking in the forums how to get Devicescape working with such hotspots. I’m also looking forward to a proper iPhone Devicescape app when Apple officially allows it

Technorati tags: , , , ,

A brief interlude with Yahoo Pipes

April 29th, 2008

Friend and fellow jamaat member Ali Ebrahim recently setup an instance of the Venus RSS aggregator to create Planet Bohra. He had pulled the twitter feed for mumineen.org but my grief was that when I clicked the link from inside Planet Bohra, I would be sent to the twitter page and not to the final destination.

I thought I would have to hack Planet to get around this. Thinking for a few minutes, I realised that maybe I should munge the twitter feed via Yahoo Pipes and started playing around with it (I had never used Yahoo Pipes before).

A short while later, I had something which did the trick and Ali was able to incorporate into Planet Bohra.

I should try and get together with Ali and see if we can do something more interesting via Yahoo Pipes.

Got one year free access to Encyclopedia Britannica

April 22nd, 2008

Found out via this post on Techcrunch, that Encyclopedia Britannica was now free for bloggers and those bloggers accepted into the program can provide direct links to articles within Britannica and its available to their readers in its entirety.

I applied into the program and got accepted and I thought I’d link to what Britannica writes about my community Dawoodi Bohras and compare that to what is available via Wikipedia.

Gaining control of your phone via HongKong’s Unsolicited Electronic Messages Ordinance

April 21st, 2008

It’s been a hassle being interrupted at the most inconvenient time by a tele-marketeer in Hong Kong who calls at every hour conceivable.

A couple of months ago, I came across this page at OFTA’s (Office of the Telecommunications Authority) website which described the procedure for registering a telephone number in the do-not-call registry.

It’s been peaceful ever since. So to all my readers in Hong Kong, if you haven’t done so, register your telephone numbers at the earliest.

Some gotchas when using AirDisk with Airport Extreme

March 24th, 2008

Got this via Ali Ebrahim who recently purchased a Time Capsule but the information should be valid also when using an external USB disk connected to an Airport Extreme Base Station

Basically it is that for the AirDisk you have some options:

  1. Entire disk password
  2. User account based passwords

You’d generally want to do (2) and the gotcha is that you can’t switch between the two without wiping all data on the disk clean.

Another gotcha is that you can’t migrate your existing TM backup to an AirPort enabled AirDisk. Meaning that whatever history is stored in your existing TM backup would be lost.

Technorati Tags:

Generating cache-friendly URLS for parallel image loading

February 24th, 2008

The use of parallel image loading to improve page load time has been documented in multiple places. One of the key things to understand when one is using this technique is to always generate the same URL for the same static asset even if it resides on a different page.

This will allow the end-user to take advantage of HTTP proxy caches.

I wrote these set of simple PHP functions to demonstrate how one could incorporate this when generating the container HTML page for a website which uses parallel static asset loading

<?php
function path_to_origin_suffix($path,$NUM_ALIASES=2)
{
 /** Take hex value of md5 of $path. Get the ord value of the last
     hex char. Output it mod $NUM_ALIASES
 **/
 if (1 == $NUM_ALIASES)
     return 0 ;
 $hex = md5($path);
 return ord($hex[31]) % $NUM_ALIASES;
}

function make_url($path,$scheme=”http”,$origin=”static.example.org”)
{
 /**
    Add leading slash to $path. Generate suffix to append to basic
hostname
    basic hostname is the phrase before the 1st ‘.’ in $origin
    Output a fully qualified URI encased in double quotes “”
 **/

 $pos = strpos($path,’/');
 if ($pos === FALSE || $pos != 0) {
  $path = sprintf(’/%s’,$path);
 }
 $suffix = path_to_origin_suffix($path);
 $array= preg_split(’/\./’,$origin,2);
 $host = “$array[0]$suffix.$array[1]“;
 $abs_href = “$scheme://$host$path” ;
 echo “\”$abs_href\”";
}

function test() {
 echo make_url(”/here/is/foobar”) , “\n” ;
 echo make_url(”here/is/foobar”), “\n” ;
 echo make_url(”/there/is/foobar”) , “\n” ;
 echo make_url(”/there/was/never/a/foobar”), “\n” ;
 echo make_url(”/please/mee/it/54″), “\n” ;
}

//test();
?>
   <html>
   <head><title>Parallel Static Asset Loading</title></head>
   <body>
   <img src=<?make_url(”/john/rambo.gif”)?> />
   <img src=<?make_url(”here/was/john/rambo.gif”)?> />
   </body>
   </html>

Hope this helps

Impact of OpenDNS on CDN services particularly when used in Asia

February 24th, 2008

At work, I am testing a CDN service run by Panther Express. I have been asking various colleagues and friends to run pings,traceroute and send me some HTTP response headers to analyze which Panther POP gets picked up where

Whilst working with a colleague in our Manila office, I found that he was being redirected to a Panther POP in San Jose California instead of being redirected to either a Hong Kong or Singapore POP as I expected.

I asked him for his /etc/resolv.conf entries and when he sent those to me, I found that one of the entries was that of OpenDNS dns cache. Whilst I truly appreciate OpenDNS’s work particularly its PhishTank system and API which we also use as part of SURBL, I think Asian users should understand that if they use OpenDNS then their DNS traffic leaves from the US and Content Delivery Networks like Akamai, Limelight, Mirror Image, Panther Express will route them to their US POP’s instead of their Asian POP’s

Once my colleague removed the OpenDNS entry, he was routed to the Asian POP for Panther Express

Technorati Tags:

Workaround for Quartz Filter not available in Print menu in Leopard

February 24th, 2008

I recently reinstalled my 20″ iMac (last 2006 model) from Tiger to Leopard. Today, whilst trying to print something on my HP PSC 1210 inkjet printer I found that it was not possible to print in black-and-white as I used to do in Tiger because the Quartz filter option was not available in Leopard

Here’s the workaround

  1. Go to print the document. Use the item “Open PDF in Preview” item under the PDF Services drop down menu at the bottom left of the print
    window.
  2. After the document appears in Preview, choose Save As… from the File menu.
  3. Either change the name or use the Replace option when prompted. Select the output format as PDF and use the Quartz Filter to select “Black and White”. Click the save button

Not happy with Apple for making it so complicated to print in black and white. Going to send some feedback to them

Joi Ito, Pindar Wong in discussion with me about Creative Commons in Hong Kong

January 23rd, 2008

On Monday 21st January 2008, I got a few hours notice that Joi Ito who wears many hats amongst which he is the Chairman of Creative Commons, board member of Mozilla Foundation, board member of SanrioDigital whose staff I work closely with regularly was visiting Outblaze’s offices.

Whilst Joi caught up with SanrioDigital staff members, Pindar Wong an Internet pioneer in Hong Kong who co-founded the first licensed ISP in Hong Kong dropped by to share a few words with Joi. The discussion amongst us veered towards the issues facing bringing Creative Commons to Hong Kong and I’ve blogged about on the Outblaze blog.

Towards the end of our discussion, I send a shout out to lawyers specializing in intellectual property to review the draft of the localized Creative Commons license for Hong Kong so if you are my reader who fits that profile I hope that you will do the right thing

It’s a bit wierd though watching yourself on YouTube though. How do you think I fair ?

In a digital world, what does it take to scrap CD’s ?

January 14th, 2008

25 million pounds or
50 million US dollars

That’s what it takes EMI according to this article in the Financial Times

Read it and be flabbergasted

NetNewsWire 3.1 is now free

January 9th, 2008

I’m a big fan of NetNewsWire and love its synchronization ability with NewsGator Online. Imagine my suprise when I open up NNW today and come across NewsGator’s CTO Greg Reinacker’s post that all of NewsGator desktop clients are now free and will include synchronization

Thanks to the team at NewsGator for making this decision.

Off to check out FeedDemon on a Windows box

network logging via djb’s multilog

November 8th, 2007

Had this recipe stuck in an old email somewhere, hope this helps someone else

The attached run files are required for the server who captures logs and the client which will send the logging data request.

Server

#!/bin/sh export PATH=”/usr/local/bin:$PATH” setuidgid remoteloguser tcpserver ip-addr-of-server listen-port-on-server multilog ./log

Client

#!/bin/sh export PATH=”/usr/local/bin:$PATH” 4>&1 | tcpclient ipaddr-of-server listen-port-on-server 6<&0

Technorati Tags :

How to get PHP5 with GD enabled with JPEG/PNG on x86-64

November 7th, 2007

I was trying to figure out why on CentOS 5.0 box on x86-64, I was unable to get GD support in PHP 5.2 for libjpeg and libpng. Lots of googling and looking through the PHP bug list and I finally worked out the magic invocation so for posterity (ie search engine’s sake) here it is

On an x86-64 environment ensure that you have the following configure options

-with-jpeg-dir=/usr \
–with-png-dir=/usr \
–with-libdir=lib64

Technorati Tags :

Amazing song by Kailash Kher - Teri Deewani

November 6th, 2007

I recently heard Kailash Kher’s phenomenal track Teri Deewani rendered by Toshi Sabri on Star Voice of India. A very moving experience. I searched for the original track at the usual places. I recommend to all my readers that they listen to this track at least once

Lyrics of Teri Deewani

Preet ki lath mohe aaisi laagi
Ho gayi main matwaali
Bal bal jaaun apane piya ko
Ke main jaaun vaari vaari
Mohe sudh budh naa rahee tan mann ki
Yeh toh jaane duniya saari
Bebas aur laachar phiru main
Haari main dil haari
Haari main dil haari

Tere naam se jee loon
Tere naam se marr jaaun
Tere naam se jee loon
Tere naam se marr jaaun
Teri jaan ke sadke mein kuchh aaisa kar jaaun
Tune kya kar dala marr gayi main mitt gayi main
Ho ji ha ji ho gayi main
Teri deewani deewani
Teri deewani deewani
Tune kya kar dala marr gayi main mitt gayi main
Ho ji ha ji ho gayi main
Teri deewani deewani
Teri deewani deewani

Ishq junoon jab hadh se badh jaaye
Ishq junoon jab hadh se badh jaaye
Hanste hanste aashiq suli chadh jaaye
Ishq ka jaadu sar chadhkar bole
Ishq ka jaadu sar chadhkar bole
Khoob laga lo pehre raste rab khole
Yahi ishq di marzi hain
Yahi rab di marzi hain
Yahi ishq di marzi hain
Yahi rab di marzi hain
Tere bin jeena kaisa
Aagush kar di hai
Tune kya kar dala marr gayi main mitt gayi main
Ho ji ha ji ho gayi main
Teri deewani deewani
Teri deewani deewani
Teri deewani deewani
Teri deewani deewani

E main rang rangili deewani
E main rang rangili deewani
E main albeli main mastani
Gaaun bajaaun sabko rijhaaun
E main diru taraph se begaani
Ee main deewani main deewani
Tere naam se jee loon tere naam se marr jaaun
Tere jaan ke sadle mein kuchh aaisa kar jaaun
Tune kya kar dala marr gayi main mitt gayi main
Ho ji ha ji ho gayi main
Teri deewani deewani
Teri deewani deewani
Teri deewani deewani
Teri deewani deewani…

Technorati Tags :

Joi Ito, Are you responsible for the HK World of Warcraft theme ?

October 31st, 2007

Uber blogger and serial entrepreneur Joi Ito recently announced that he has joined the board of Sanrio Digital. Joi had visited our offices a few months ago and at my request talked about his World of Warcraft guild where he spent a lot of time along with many other CEO’s

The question for Joi is, Are you responsible for this Hello Kitty World of Warcraft theme :)

Technorati Tags :

Jeremiah Owyang interviews me

October 26th, 2007

Jeremiah Owyang of Forrestor Research very kindly posted an interview with me on his blog a few days ago.

Jeremiah was very kind to mention on his twitter feed that he enjoyed meeting me and considers me as a ‘web strategist’.
Jeremiah, Thank you for the encouragement. I hope I can live up to it. I’d like to thank my colleagues at Outblaze for their support and the interesting discussions we have

I made a comment in that video that I considered ‘Facebook as a fad’ and there were some rejoinders to it with commentators disagreeing with me.

I’d like to respond by making a few points

What I was trying to mention to Jeremiah that based on my observations, I felt that Facebook was a fad at present “within the Hong Kong Internet userbase”. Maybe it can sustain itself but its still early days.

Hong Kong like any other place people has its fads including collective obsessive behavior!. Ask anybody if the recollect the ‘Snoppy mania of 1998′.

As the above article states

Fads are nothing new in Hong Kong, where the crowded living conditions and a gregarious population make it a hothouse for all sorts of trends.

About the 150% mobile phone penetration rate, I apologize. The latest published numbers (July 2007) from OFTA who is Hong Kong’s regulator says its 139.8%. Maybe its 145+% today but 150% gets your attention better than 145% :)

Technorati Tags :

Some interesting Leopard links

October 18th, 2007
  • Apple has made major changes to iCal in Mac OS X 10.5 Leopard, introducing integration with its own new WebDAV-based iCal Server included in Leopard Server. Here’s a comprehensive history of software-based calendar applications and a look at what’s new in iCal 3.0.
  • Apple OS X Leopard: A beautiful upgrade
    Finally, a PC Unix that everyone can love. OS X Leopard is a triumph of customer-focused engineering