ChatForte Protocol Overview

Srilekha Ramanujam

srilek@sourceforge.net

An overview of the ChatForte protocol version 1.0

Introduction

ChatForte is a collaborative system which is intended to facilitate collaboration among members of different communities and by any means. In short, it is aimed at building an all-in-one collaborating solution.

ChatForte is implemented in Java making it portable for the highest degree of usefulness.  The ChatForte client needs to be downloaded on client machines in order to make it a part of the collaboration. The messages exchanged between different clients and the ChatForte system can be tailored according to the network connectivity (high speed networks to low speed  modems to wireless connections).  ChatForte provides the concept of using filters for each collaborative session which in turn
provides a layering on message bodies.  By using filters the messages can be compressed, encrypted, checked for maximum size violation and a lot more through which a complete control can be obtained upon the session. Each collaboration has two main roles. The master and the user. The master of the collaboration can set policies for a particular session using filters. The collaborative system plays the topmost authority role which is the collaboration admin. The admin can set policies applicable
for all the sessions which is mandatory. In future we are thinking of providing a flexibility in filters being mandatory at the  willingness of the party who provided them. Each client needs to register to the system in order to take part in any collaboration. Each collaboration will be queried just before the client chooses to join a session in order to set the policies apriori at the client side based on the requirements of the collaboration master. The client and the system will then begin exchanging messages until the client leaves the session or a network interruption occurs or a series of session violations conducted by the client that the  master want the client removed from the session. The message format is designed in a way suitable to all platforms. It follows a simple ASCII format which will be explained in this documentation.

Messages

          ChatForte uses the concept of active messaging where messages received from the client side process themselves at the server side. This messaging protocol defines various types of messages where each message is defined separately for the client and the server side. The types of messages are defined as follows  

Registration Message This message is used for registering clients into the collaborative system. The client is requested to choose a username and password apart from providing other personal information
Login Message This message is used for logging in the clients to the collaborative system
Logout Message This message is used for logging out the clients from their current session
Query Message This message is very useful to exchange general queries to and fro between the clients and the system
Chat Message This message is used to exchange chat conversation among the clients involved in a session
Whiteboard Message This message is used to exchange whiteboard contents among the clients in a session
Command Message This message is the most critical where it allows the admin and the collaboration master to enforce policies on all the clients taking part in a session or enrolled in the whole system. This message type is again classified into the master message and the admin message to differentiate roles and hence assign appropriate priorities.
Status Message This message is used to send out the status of the previous message from the client
Error Message This message is used to send out error message if any that result from processing the previous message sent by the client.

Each message consists of the following information in common  

Message Header The message header consists of MessageInfo, source, destination, date and time
Message Info The message information consists of message type, message data type, session name and the message version. The message version plays a critical role in maintaining the flexibility and extensibility of the messaging protocol with no effect on the existing software. This object also includes an additional field called context. This need not be used unless under special circumstances. This field specifies the current context of the conversation.
Message Body
The message body is a set of attribute and value pairs of different arguments required for processing the message.

Message Types and Data Types

The message types are used to classify the messages according to their types such as Login, Logout, Chat, Whiteboard, Status and Error.  The data types are used to classify the type of data sent in the message body. These are text, text array, point, point array, line, line array and so forth. The message body is identified using its data type and the data is dealt with accordingly.

Message Meta Information

The message meta information consists of the message version and the message type. This meta information is used to communicate the right protocol.

Message Filters

             The message filters are used by the two main roles on the collaborative system (master and the admin) to enforce policies into their sessions. Some of the filters that are currently available are    

Compression Filter This filter compresses the message body before it is sent out
Decompression Filter This filter decompresses the incoming compressed message body
Encryption Filter This filter encrypts the outgoing message body.  The clients that take part in a session agree on the encryption algorithm before the master enforces this filter. The secret key is shared among the clients off-line by other means (e.g. through a secure email) and is not dealt by the collaboration system as of now. 
Decryption Filter This filter decrypts the incoming message body. The other procedure is similar to that of the encryption filter.
SizeFilter The size filter checks for the size of the message body. In addition different sizes can be set for different messages


Message Priorities

      Each message type can be assigned a priority by the master of a session. The sub-message types can be defined by the master and can be assigned priorities also. For example, the chat and the whiteboard message in a session can be assigned different priorities. But if the master would like to differentiate several sub-types of chat messages (bidding, product enquiry etc), that is also very much possible.  The message priorities is not dealt in this version at present.

Role Based Access Control

      The main roles that take part in this collaborative system are the admin, master and the user. The admin is responsible for the entire system while the master is responsible for a session invoked at the system. The user refers to the end user of the collaborative system. The admin plays the critical role and hence carries the highest priority at the system level. The master is the second critical role that carries the next highest priority. The admin sets policies at the system level. The master sets the policies at the session level. The policies are set using the above mentioned message filters. Several filters can be applied on the same message. The filters are executed in the order they are chosen.  Apart from this, the admin and the master are entitled to send command messages that have the highest priority among other message types. This command message include such thing as change of algorithm in the encryption filter, freeze the whiteboard, choose different colors for whiteboard users, disconnecting users, setting the compression mode, setting the transmission mode and a lot of other things that will enable a complete control on the system. The admin's command message has a higher priority over the master's command message.

ChatForte IO Streams

A ChatForte session consists of two parallel streams, one from the client side and another from the server side. The ChatForte client initiates the connection with the ChatForte server and if the client login succeeds, the server allows the client to join the session chosen. The ChatForte IO streams are responsible for formatting the data exchanged between the client and the server.  The formatting is simpler at present and can be changed without affecting the rest of the system. The versioning of messages allow different protocol versions to be used within the ChatForte system simultaneously.
Here is a simple message format:

<metaInfo><message header <message info>><message body>
1 v1.0 1 session context source destination date time <attr1, val1> ... <attrn, valn>

The space is the delimiter and if there is a space within a field, it is escaped by using two backslash as
'\\ '.
The order of different fields are mentioned here:
  1. Message Type
  2. Version for the corresponding message type
  3. Data type for the message body
  4. Name of the Session ('None' if the user has not been enrolled into a session)
  5. Context of the converstaion ('General' if nothing is specified)
  6. Source (The origination of the message, usually the name of the person who sends it)
  7. Destination (The end point of the message, usually the person whom it has to be sent to)
  8. Date 
  9. Time
  10. The attribute value pairs that form the message body

The message format can be defined from the simplest to the most complicated and detailed based on the application requirements.


Home