Archive for the ‘Software Engineering’ Category

IM/Chat over HTTP without browser plug-ins

Friday, August 12th, 2005

The past couple of months I’ve been pondering an idea. It isn’t a new one, or anywhere close to groundbreaking, but I don’t think anyone has accomplished anything quite like it before. I want to write an IM/chat system that is as responsive and real-time as native IM/chat programs, and that operates solely over HTTP, with vanilla browsers – no Java applets, no ActiveX plug-ins, just Javascript that all modern browsers support. The advantage of such a system is that it could traverse firewalls and proxies traditionally used to block users from using IM/chat, and that users would never be prompted to install applets or plug-ins that many users distrust (for good reason too).

So, why hasn’t it been done before? When I first had the idea I thought surely there would be at least 10 similar projects already. I found several attempts, but none seemed to fit the bill – some communicated entirely over HTTP but required Java applets, some didn’t use any applets or plug-ins on the client but weren’t responsive or real-time (updates were polled for ever 2 secs or so). Looking at the current field of attempts there seemed to be a couple of challenges that I would have to find a way around.

  • HTTP/1.1 supports keep-alive connections, but they don’t work well for 2-way communication. The client still must initiate every exchange, so the server can’t send messages to the client on demand.
  • A client repeatedly polling a server for messages (even when there are none for it) puts a lot of unnecessary load on the server, and generally results in a poor user experience. The programs I looked at that used this model often felt very laggy and sluggish – they certainly didn’t feel like native applications.

(more…)

What keeps PHP out of the enterprise space?

Sunday, October 24th, 2004

php_med_trans.pngI love PHP. I guess that’s probably because my programming roots are in C/C++. However, you’d think that I would love Java equally then. The fact is, I don’t. Java just seems so restrictive to me (I know, some of you are going to say that’s a good thing, which I won’t totally disagree with). I love PHP because it is wonderfully flexible. It also has a wonderful toolset to go along with it. Things like the Smarty template engine and the PEAR extension repository. This flexibility and toolset makes rapid development in PHP extremely easy. Why is it then that PHP hasn’t penetrated the enterprise web application space? Here are a couple of reasons (and maybe a couple of enhancements to consider, PHP devs): (more…)