Real-time Chat Window
February 19, 2011
There is now an operational Chat Window available from the desktop context menu.
To use the chat window, you must first “Open” the named channel (name is in textfield at bottom). You will then automatically receive any messages sent over that channel. To send a message, write the text in the bottom panel and press “Send”.
This is a very simple chat application that uses some new features in the Channel class.
1) when a channel is opened, it is assigned a unique ID number (from Math.random()). So, each browser will have a unique number for messages sent on the channel.
2) when messages are sent, they are packaged into an dictionary that contains the message id (above) and the message value. When messages are received, each Chat Window application checks the message id number against its own ID number. It uses this information to process only messages that were sent by other applications.
So, this chat application is sending and receiving objects. At the moment, the only data in the object is a string of text.
It is very easy to start including other info in the messages such as time, priority, classification, etc.
And the data doesn’t have to be a string – it could be a dictionary or an array for updating graphs or lists.
Chat Window provides a functional basis for a series of real-time work collaboration tools.