Version 8 of Improving Tcl Chat

Updated 2002-09-06 16:22:47

This page was created to discuss how to improve the Tcl'ers Chat - JCW


So what's wrong? Well...

  • it's a CGI doing periodic refresh, that eats bandwidth and CPU resources and both are starting to become an issue
  • it is used by Bruce Hartweg's TkChat, which then has to go through the trouble of decoding stuff which was not really designed to be easy to parse and process further

There are lots of ways to take this further. Recent experiments with Cgi-irc (a web-based gateway to IRC) and with some experimental code I wrote at http://mini.net/t/ show that there are a number of issues before we have a satisfactory replacement:

  • first of all, the big advantage of the current system seems to be that it works through everyone's firewall
  • second, Ralph's Chat, as the perl script is called, does have quite a bit of features: login management, user lists, private msgs, and sending messages to someone who is not currently around

My goal for now is to quickly find a few simple and robust solutions to stay out of trouble with CPU load and bandwidth. The CPU load seems to already be making the Tcl'ers Wiki itself sluggish, especially with updates. And the bandwidth... well, I'm starting to reach the limit for this server, and more than 50% of it is the chat. If it grows much further, it'll cost (a small amount of) real bucks.

Here are some ideas for improving this:

  1. adjust the perl script to save a copy of the current history on file, in a format which can be easily read by TkChat, then adjust TkChat to read that page directly off the server, instead of via CGI
  2. save perhaps a second copy of the history as HTML with the header containing a "Refresh" item so it will self-refresh every 15s. Then adjust the perl script to point browsers to it. The idea is that with frames, the history frame can simply point to this page and self-refresh without any CGI in between. The impact is that the refresh period becomes fixed as 15s for everyone.

A bit further down the line, I'd like to also revisit the idea of having a CGI script which "pushes" a signal that the history has changed. It could be used by TkChat to listen to, instead of doing a periodic page poll/pull. This will need to be optional, since push will not work through all firewalls (proxying ones will probably not allow the push connection to be kept open).

Comments are welcome... what this all is meant to say is that we need to do something about the chat before it becomes a real problem on mini.net.

April 2002 - FWIW, the bandwidth and cpu load issues are no longer a concern (heftier machine, and much higher limit) -jcw


BBH - I have some ideas that might be helpful here (I've been meaning to send them to the maillist but things have been hectic lately) I'll get then translated from my head into something readable & post later


LV The mailing list to which Bruce refers is the TclersWiki list at yahoo.com - the URL for that group http://groups.yahoo.com/group/TclersWiki/ .


rmax I've created a little script to Tunnel IRC through HTTP proxies .


Category Tcler's Wiki

Category Internet