I’ve been contracted to create a streaming text server/client. The main goal is to have instant updates to a web based application. It will also include a simple chat system for users to communicate to operators.
Javascript can’t do sockets by it’s self. It will take some type of application running on the user’s browser to communicate with the socket server. There is only a few choices out there to do this.
First I tried the Java way. I created a simple Java app to connect to my socket server and pass messages to the browser. It worked great on the Mac, but fell down on Windows. The main reason why it fails on Windows is because MS doesn’t integrate Java with their OS. They can’t because they lost their license to do so. So the users will have to download a very large application and install it. The users for this system just can’t figure that out.
Next I tried AJAX polling. This would work for all platforms, but it was slow. If you adjust the polling for less delay, the server load goes up. This would not be a problem except that I’m sending a lot of data through the line with many clients attached.
Last option I’ve tried is Macromedia Flash Player 8. It provides a way to connect to a socket and feed the info to Javascript. This works basically just like the Java applet but is a much smaller download for the user. It works perfectly and this is what I’m using now. The draw back is that it’s Flash 8 and nobody has it installed on their systems yet. So the users need to download and install it for my application to work. You wouldn’t think this would be a problem, but it is. The users have many problems installing software. Also there is a situation where the latest MS update would remove Flash 8 and install Flash 7 making the users have to re-install version 8 again.
One of my main goals is to make the application available on all platforms and browsers. Using AJAX and Flash, it is possible to cover most of the browsers and platforms. Currently Mac OS, Linux, FreeBSD, and MS Windows are supported. Safari, FireFox, and MSIE are also supported.