Index: openacs-4/packages/chat/www/doc/design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/doc/design.html,v diff -u -r1.3.2.2 -r1.3.2.3 --- openacs-4/packages/chat/www/doc/design.html 24 Nov 2019 11:06:22 -0000 1.3.2.2 +++ openacs-4/packages/chat/www/doc/design.html 3 Nov 2023 15:37:44 -0000 1.3.2.3 @@ -46,9 +46,9 @@ security system.
+ Note: this section was produced at the time when the chat package + was first implemented and refers to products that are no longer in + service. +
+The solution we came up with was to provide an option that allows the creator of a room to decide whether or not to archive the messages. -
By using a Java applet-based client, users can see messages updated -in real time. This is important in, e.g., a customer service setting. -Since SUN JDK 1.1 doesn't provides a text rendering API, applet-based clients -are limited in the format of the text that they can display. There are -also limitations on the server as to how many TCP sockets can be open at -the same time. Since each user using an applet-based chat client -will use one TCP socket, there could be a limit on how many user can use -the applet. This problem could be solved by employing customized hardware -more suitable for the task. -
Our system provides both a HTML and a Java applet-based chat client. -By providing each of these, we open up our Chat application to a broader -pool of users by offering users the chat method which will work best for -them. -
Using the AOL server socket API, there could be a performance -improvement and will not require installation of Jakarta-tomcat. -Unfortunately, AOL does not provide much by way of documentation -regarding AOL socket. As of the current time, there are still major -features missing from the AOL socket API which would be required to -completely replace the Java/servlet method. - -
Initially, I chose using a Java servlet as my development platform -due to time constraints. As development progressed, I analyzed the use -of the servlet in the current chat application. Since the servlets -sole purpose is to provide communication between the HTML and the Java -applet clients, I concluded that this would be adequate for the present -purposes, and that the extra efforts required to set up Jakarta-tomcat -with AOL server would be unjustified. After some experimentation, I -was able to rebuild the bridge between the HTML and the Java applet -clients using only AOL Server and the Java chat server. As a result the Chat -application may now be downloaded and installed just as any other ACS 4 -applications may be. - -
In the earlier chat version, chat messages were broadcast to the -applet client Java serialize objects. The advantage of serialize -objects is that they make it easy to retrieve information. The -disadvantage of this method is the messages are limited to Java only. - -
To support clients from different programming language and not -limit our application to Java, I choose an XML text base for the chat -message protocol. -
-<login>
-
- <user_id></user_id>
-
- <user_name></user_name>
-
- <pw></pw>
-
- <room_id></room_id>
-
-</login>
-
-
After connection to the chat server, each client must
-identify itself via a login message. The chat server will disconnect
-the client if the first message is not a proper login message or if the user
-doesn't have proper permissions for the chat room.
-
-
-<message>
-
- <message_id></message_id>
-
- <from_user_id></from_user_id>
-
- <from></from>
-
- <to_user_id></to_user_id>
-
- <to></to>
-
- <room_id></room_id>
-
- <status>approved | pending</status>
-
- <body></body>
-
-</message>
-
-
-
-To construct a public message that will broadcast to everyone in the
-chat room, the to_user_id and to fields
-need to be excluded from the message. When these two fields are present in
-the message then the message will only send to a specific
-user. Sending private messages to HTML users is not yet supported.
-
-
-<system>
-
- <user_enter>
-
- <user_id></user_id>
-
- <user_name></user_name>
-
- </user_enter>
-
-</system>
-
-
-<system>
-
- <user_leave>
-
- <user_id></user_id>
-
- <user_name></user_name>
-
- </user_leave>
-
-</system>
-
-
-
-Each time a client enters or exits the room, an appropriate message
-will be broadcast to all clients in the chat room notifying them of a
-change in the chat user list.
-
-
-<system>
-
- <userlist>
-
- <user>
-
- <user_id></user_id>
-
- <user_name></user_name>
-
- </user>
-
- <user>
-
- <user_id></user_id>
-
- <user_name></user_name>
-
- </user>
-
- ...
- ...
- </userlist>
-
-</system>
-
-
After the Java applet client has successfully logged
-into the chat room, a list of users currently in the room will be sent
-our from the server.
-
-All chat functionalities accessible from the browser are available -as an API. Providing these API allows different applications to modify -chat without an application-specific user interface. These -API will throw errors if their corresponding PL/SQL statement fail, so -all applications employing them need to 'catch error' to display a -nice error message to the user.
chat_message_post -- This API inserts chat message to the database depend whether a chat -room archive mode. It is also broadcast the message to all Java -clients in the room. - -
chat_message_retrieve -- This API is only used by the HTML client, and is used each time the HTML -client refreshes. The API does not require database call, messages will be retrieve -from AOL Server cache.
01/11/2001 | David Dao | ||
1.0 | +Cleanup of outdated information, in particular about the discontinued Java implementation | +03/11/2023 | +Antonio Pisano | +
-