Operations Documentation Non-Programmer's Guide General Information WCMS Operation Chat Specialized Interfaces Software Development & Scripting

Visit the

  • Developer Center,
  • WebX Harbor, and the
  • Web Crossing Conference
    to find a wealth of WebX info and a community of WebX experts on the Web!
  • Web Crossing Chat

    Table of Contents

    Features
    Overview
    Architecture
    Server Setup
    Chat rooms
    Chat status
    E-mail validation for new users
    Performance testing and tuning
    Chat protocol

    » Features

    Real-time Java-enabled chat is an available option for Web Crossing 2.0 and later versions. It has the following features.

    Chat rooms work with any Java-enabled browser. A chat room is part of a normal browser page, so you can use standard HTML to place advertisements or other material around the chat area.

    You can provide multiple "tables" per room or cafe, so users can table hop to find interesting places.

    WebX can create overflow tables automatically, so a single table doesn't get too large (e.g. you might choose to start a new table every 50 users).

    You can see a list of users at your current table, and a count of read-only lurkers.

    You can send private messages to other users at your table.

    You can invite other users to enter a private 1-on-1 table.

    Hosts can eject obnoxious users.

    Hosts can broadcast to all users in a room regardless of their table.

    Access lists are part of each chat table, so you can restrict access as desired. Access rights can be host (read/write/eject/broadcast), participant (read/write), read-only, or none. Web Crossing registration/login is used to authenticate registered users. Unregistered guests can have separate access rights, and can be totally excluded if desired.

    Automatic e-mail validation is available for new users. In conjunction with access lists, this allows you to control your community and to eject people if required.

    User's can select their own message color to be used for displaying their messages to all users in the chat room.

    Essentially unlimited number of users, depending on your license, by setting up multiple cooperating fanout servers. The design goal for chat is to run with 100,000 simultaneous users.

    For a hosted auditorium-style event, each end-user can be in two chat rooms simultaneously: one (read/only) in which the guest is speaking, and one (read/write) in which they can converse and ask questions of the guest. Chat monitors in the various read/write end-user rooms forward questions to the speaker in a separate (private) chat area, from which the speaker can choose the questions to which to respond.

    Java source-code for the client is available for license.

    » Overview

    Web Crossing uses the metaphor of chat rooms or cafes. In each room, you can have one or more tables around which users gather to chat.

    » Rooms with one table

    A room with one table

    In a room with one table, users don't see the table per se. They come into the room and talk, and the table and the room merge into one place.

    Sample interface with one table

    The default chat room layout shows the chat messages on the left, a list of users at the table on the right, a place to type a new message below, and a pull-down menu of commands. The room layout is highly configurable to match your needs on a room-by-room basis.

    The pull-down menu allows users to send private messages, ignore a bozo user, or invite someone to join them in a private room. Chat room hosts can also eject users who are not adhering to the community guidelines.

    » Rooms with multiple tables

    A room with multiple tables

    In a room with multiple tables, a user enters the room and joins one of the tables. He or she can then table hop to check out other discussions.

    Sample interface with multiple tables

    In the default interface, a list of tables is shown at the top right. Clicking on a table name will move the user to that table. You can chose to configure the room without the list of tables, and users can still table-hop via the pull-down menu.

    In a multiple-table room, chat hosts can broadcast messages to all of the tables.

    » Architecture

    Web Crossing chat service has three components.

    The Web Crossing server accepts Web (HTTP) requests originating at the user's Web browser, and returns HTML pages for display to the user.

    The Control Room manages and allocates all of the chat resources. The Web Crossing server sends user requests to enter a chat room to the Control Room, and gets back information about how the user is to connect to the room.

    Fanout Servers actually handle chat room messages. A Java APPLET running on the user's machine will make a TCP/IP connection to a Fanout Server to actually enter a chat room.

    » Single server model

    The simplest setup is to run Web Crossing and Chat services in a single server:

    Single server chat configuration

    In this configuration, a single Web Crossing server is providing both discussion and chat services.

    » Distributed server model

    Because Web Crossing chat is designed to handle thousands of simultaneous connections, it must support distributed servers. A single server, no matter how powerful, will eventually reach its limit in terms of the number of users it can support.

    In a distributed environment, there is a single Control Room to manage all chat room assignments, but you can have as many Web Crossing and Fanout Servers as required:

    Distributed server chat configuration

    In a distributed environment, the various servers communicate through TCP/IP connections instead of through an internal communications channel. The Control Room server may still include a Web Crossing and/or a Fanout Server if desired.

    Note that each server may run on a separate machine, or may run as another process on the same machine. Most Unix systems limit the number of TCP/IP connections per process to 256, in which case multiple processes are required to support more than 256 users. You specify the maximum number of TCP/IP connections for each fanout server as part of its configuration setup, so you can tailor this to your hardware and software capabilities.

    The control room always places users in the same room on the same fanout server, until that fanout server reaches its TCP/IP connection limit. Then the control room connects additional fanout servers together in a ring architecture to allow more users to join that chat room.

    The Control Room uses two ports, one for Web Crossing server connections and the other for Fanout Server connections.

    Each Fanout Server uses two ports, one for clients to call and join a chat room, the other to accept connections from other fanout servers. You can have multiple Fanout Servers running on the same machine, as long as they each have their own unique port assignments.

    Due to Java security requirements, applets must be downloaded from the same IP address that they will use to connect to their Fanout Server. So the configuration setup for each Fanout Server includes the URL to be used to download Java applets for that server, allowing you to ensure that this requirement is met.

    » Communications data flow

    Communications data flow

    When a URL linking to a chat room is received, the Web Crossing service requests the Control Room to assign a Fanout Server for the user. The Control Room responds with the information required for the Java APPLET tag, and the Web Crossing service then constructs and returns the HTML page to enter the chat room.

    The control room also tells the assigned Fanout Server about the chat client, so that when the client calls the Fanout Server the call is authorized and the user enters the correct room with the proper access rights.

    On the client side, the returned page includes a Java APPLET tag. The user's Web browser will download the applet from the server and start it running. The applet then calls the Fanout Server to enter the chat room.

    » Server Setup

    » Single server model

    You can use the default Basic Chat Services panel.

  • Fill in the Control room IP address as the IP address of the machine on which this Web Crossing server is running
  • Check the box Provide chat services from this Web Crossing server
  • Check that the TCP/IP port number used by chat clients to call the server does not conflict with anything already installed on your server
  • Click on the Set Chat Services button at the bottom of the form.

    After configuring this Web Crossing server to include chat services, you will see an Add Chat button in the sysop toolbar. Click this button to create a new chat room, then click on the room to enter it and chat.

    » Distributed server model

    Click on the link in the first paragraph of the Basic Chat Services to get to the full Chat Services panel, and fill out the settings as appropriate.

    Note that a chat certificate is only required on the Control Room server. All of the Fanout Servers will automatically share this certificate. (A Web Crossing discussion certificate is required on each Web Crossing server that is also providing discussion services.)

    » Setup considerations

    Our recommendation is that all of the Fanout Servers run by themselves, without any integrated Web Crossing or Control Room services. If a Fanout Server runs in the same process as Web Crossing service, then Web access to the Web Crossing services can occasionally delay the echo of chat messages. This delay is most noticeable when the Web Crossing server is doing a backup of its database.

    » SOCKS firewall setup

    SOCKS is a protocol that allows programs inside a firewall to communicate across the firewall. Web Crossing chat fanout servers can be configured to use SOCKS to connect to chat services outside the firewall. This allows chat users to reside both inside and outside the firewall.

    A typical SOCKS-enabled configuration

    In this diagram, the control room connects to both fanout servers, in order to place users into the correct fanout server. The two fanout servers are connected together so that chat messages flow between them, and thus between the chat users inside and outside the firewall.

    To set up chat across a firewall, you must perform the following steps:

    1. Set up a Web Crossing chat environment outside of the firewall. The control room and at least one fanout server must be outside the firewall.

    2. Set up a Web Crossing fanout server inside the firewall. Configure this fanout server to use SOCKS (see the general Chat Services link at the top of the Basic Chat Services sysop panel).

    3. Establish chat rooms and tables as desired in the Web Crossing sites outside the firewall. These chat rooms can now be accessed from both inside and outside the firewall.

    4. To let Web Crossing know which users are inside the firewall, login as sysop or host on the Web Crossing server with the chat room(s) to be accessed.

      • Create a user group named socks.
      • Add each user who may be inside the firewall to the socks group.

      Now, users in the socks group will normally enter the chat room through the SOCKS firewall. They will also have the ability to enter the chat rooms when they are at a computer outside the firewall, by clicking on the [Enter from outside the firewall] link next to each chat room. Users who are not in the socks group always enter the chat rooms from outside the firewall.

      You can manage access to the chat rooms in other ways by using the Web Crossing Template Language.

    » Supporting chat clients behind port 80 firewalls

    To allow Java clients to connect to Web Crossing Chat from behind a port 80 firewall, you must configure the Web Crossing fanout server to use port 80 for the chat client connection. This type of firewall allows browsers to connect directly to Web servers outside the firewall through port 80, the default Web (HTTP) server port. So we use this port for the Java chat client, and also to download the Java classes from the fanout server.

    You must also configure this same server to provide direct HTTP service on port 80, so that the Java client can be downloaded from the same IP address as the chat service (required by Java security rules on the client).

    Recommended settings for Web (HTTP) service is to set port to 80, and the directory for HTML files to the Images directory. This will prevent any files in the Web Crossing server directory from being served.

    Also set the chat fanout client port to 80, and set the Java applet URL to pick up files directly from WBChat (assuming you've configured the base HTTP directory to be Images, as suggested above).

    » Chat rooms

    This section describes how to create and use chat rooms in Web Crossing.

    » Tables

    » Adding a new room with a single table

    To add a room with a single table, click on the Add Chat button in the sysop toolbar, fill out the form, and then click on the OK button at the bottom of the form.

    After you've added a room, you just click on the room to enter it and chat. You will also see an Edit button next to the link to the room. You can click on this Edit button to change the room/table settings, including its access list. There is also a delete button at the end of the Edit Chat Room form.

    Note that the Edit button only shows for hosts and the sysop. It does not show for regular users.

    » Adding a room with multiple tables

    Step 1. Start by creating the chat room which will hold all the tables. Click on the Add Chat button, fill in the form, and click on the OK button at the bottom of the form.

    Step 2. To add tables to the new room, you first need to get the unique ID of the room. You can get this from the URL used to enter or edit the chat room. For example, if you click on the Edit button, the URL you visit will look something like the following:

    where 193 is the command code to edit the chat room, 0.bQqbT7n7^1 is the current login certificate, and .ee6b35c is the unique ID of some chat room. (The chat room ID is a period followed by a hexadecimal number.)

    Copy the chat room unique ID to the clipboard so it is available later.

    Step 3. Create another room using the Add Chat button, and make its title the name of a table in the room. Click on the OK button.

    Step 4. Click on the Edit button next to the table entry, paste the chat room unique ID into the Common room field, and click on the OK button at the bottom of the form.

    Repeat steps 3 and 4 as often as desired.

    When a user click on the link to a table, they will join the discussion in progress that table, and will be able to hop to other tables if they choose.

    » Overflow tables

    Web Crossing automatically creates overflow tables as users enter. By default, every 32 users are placed at the same table, and the next user starts an overflow table named tablename... #2. This keeps the initial number of users at a table to a manageable number.

    As overflow tables are created, users can table-hop to all of the tables, including overflow tables.

    To set the overflow table count, use the Edit Chat Room form by clicking on the Edit button next to the chat room.

    » Access lists

    You can attach an access list to each chat room or table. The access list determines the rights for specific users or groups of users. Access rights can be

    AccessRights
    hostread/write/eject/broadcast
    participantread/write
    read/onlyread-only lurker
    moderatedautomatic moderation of "bad" words
    noneno access at all. A user with no access rights
    will not even see the chat room or table.

    To attach an Access List to a specific chat room or table, click on the Edit button to the right of the link, then click on the Access List button at the bottom of the form and follow directions in the form.

    You can also attach an access list to a folder containing multiple chat rooms and/or tables. The access list for a folder will apply to all chat rooms and tables in that folder and all nested folders. If a chat room/table has its own access list, then that access list completely overrides any containing folder's access list.

    Many sites limit access to registered users. By excluding guest users, you can control membership in your community and ensure that everyone has a positive experience. Instead of setting access lists on each table or folder, you can completely exclude guest users from your site through the sysop Control Panel, using the Guest User Access form.

    Through the use of the "Moderated Word List" located in the "General Settings" panel of the Web Crossing sysop control panel, moderated rooms will automatically disallow the use of any of these words on the list. Anytime a user types a "moderated" word, the message is returned to the user with a warning prepended to it. For example, if a user types "bad word," the chat server will return the following message only to the originating user: "Possible objectionable message NOT sent: "bad word" ".

    » Hosted events

    A hosted or auditorium-style event is one where a featured guest answers questions and interacts with the audience. You may get the latest example of a Web Crossing template file which sets up a "Special Speaker/Monitored Chat" session from our FTP server, called webxChat.tpl or questionChat.tpl

    To run a hosted event in Web Crossing, you need to create three chat tables:

  • an audience table, with automatic overflow every 32 to 50 users. This table allows the audience to interact with each other and to forward questions to the host.

  • a backstage table, where chat monitors and the host can talk privately. The chat monitors use this to pass audience questions and feedback to the host. For example, a chat monitor might pass a question such as "Tom in SF asks what your feelings are about...."

  • a host table, where the host is read/write and all other users are read/only. The audience can read the messages posted to this table, but cannot clutter it up with their chatter.

    Each member of the audience is in two tables: the host table (as read/only), and an audience table (as read/write).

    Each chat host is in two tables: the audience table, and the backstage table. Actually, as audience tables overflow, each chat monitors may have multiple overflow tables up, scanning them all for messages to pass to the host. Chat monitors can also broadcast messages to the audience tables as desired.

    To set up pages with multiple tables in them or make other changes, see the Customizing your chat room section of the SDK documentation.

    » Recording and Playback

    Chat tables can be set up to record all of the messages sent through them. Use the Record file field in the Edit Chat Room form. Warning: there is no checking for unique filenames across tables. If two tables have the same filename, then only one of the rooms will record.

    You can set up a chat table to playback a recording on either a one-time or continuous loopback basis. Use the Playback fields in the Edit Chat Room form.

    » Special Host Commands

    There are several host commands that programmers may use to dynamically change the content around the chat room as appropriate for special speakers, interviews, advertisements, etc. The host commands are explained in the Special Host Commands section of the SDK documentation.

    » Chat status

    You can get a snapshot of chat usage through the Chat status link in the sysop control panel.

    Note that in a multiple-table room, the status panel just shows initial entry counts, not current usage after any table hopping.

    » E-mail validation for new users

    Web Crossing chat allows you to validate the e-mail addresses of new users as they register.

    With e-mail validation turned on, new users are marked as provisional and an e-mail message is sent to them. A user confirms his/her address by replying to the message. Upon receipt of the reply, Web Crossing upgrades the user to have the full access rights of a registered user.

    You can enable this feature through the sysop Register user access panel. The content and layout of the e-mail validation message can be specified by you.

    If you enable this feature, you must regularly check the logEmail file, in the same directory as the webx.db database, for any problems that need to be handled manually.

    In conjunction with automatic e-mail validation, you can specify a list of e-mail addresses or domains that are not allowed register. This allows you to eject disruptive users and keep them out permanently and automatically (until they get a new e-mail address). To permanently eject someone with a specific e-mail address, use the List of e-mail addresses that cannot auto-register setting at the end of the Registered user access panel.

    » Performance testing and tuning

    Web Crossing includes some tools to help stress-test your site and ensure that you will get reasonable performance under load.

    The methodology is to run additional copies of Web Crossing on other machines in your network or on the Internet. Each of these additional copies can be instructed to emulate actual users, with each of the emulated users periodically sending messages and table hopping. While these emulated users are running, you can enter the same chat room and confirm that it is responsive.

    To start running emulated users, you need to configure a Port for direct database access in the sysop General Settings panel on the control room Web Crossing server. This direct-access service is called by each test user to enter the chat room.

    Then send the following URL to your test Web Crossing servers:

    where

  • .xxxx is any valid chat room or table (this is ignored, but is required for historical reasons)
  • nn is the number of test users to start.
  • webxIp is the domain or IP of the control room Web Crossing server containing the chat table to enter.
  • webxPort is the Port for direct database access on the control room server.
  • .table is the chat room or table ID to enter.
  • startMin is the startup interval in minutes. Each test user will delay for a random time in this interval.
  • runMin is the run time in minutes.
  • shutdownMin is the shutdown time in minutes. Each test user will delay its exit by a random time in this interval.
  • messageSecs is the average interval between messages. Each test user will send one message in each message interval, at a random time in the interval for each message.
  • hopSecs is the average interval between table hops, randomized.

    For example:

    will start one test user, calls the control room at 38.8.21.2:5000 to get the room setup, enters the <.ee6b345> table, starts within a 1 minute interval, runs for 5 minutes, shuts down within one minute of the 5 minute run interval, sends a message every 3 seconds on average, and table hops every 60 seconds on average.

    You can send multiple test user URLs to the same test server, and each set of users will run simultaneously.

    To shut down all test users, send the following URL to each test server:

    There are 2 known limitations under Windows or Macintosh (but not on Unix):

  • The Web Crossing direct-access service running at the control room only keeps 5 listens outstanding. If more than 5 test users are simultaneously trying to call the Webx direct server, the excess test users will get a connection error and terminate. This is part of the reason why spreading out the users over some startup period is required (and also emulates real life).

  • Each chat fanout server only keeps 10 listens outstanding for clients. If more than 10 test users try to enter the chat server itself simultaneously, then the excess test users get an error and terminate.

    As a result of these two limits, you may well see in the status panel that not all the users you were expecting actually arrived. (The log file will indicate what happened to each test user, and will also tell the number of messages sent and table hops taken.)

    You may want to add 50 to 100 users at a time with a very long run time and see how the server load looks. You can add more users on the user test server(s) as often as you like, and the prior ones will continue to run.

    » Chat protocol

    Programmers are welcome to develop other clients for the Web Crossing chat server. Complete Java source-code for the standard Web Crossing client is available for license customers. The chat protocol explained in the Chat Protocol section of the SDK documentation.


    Copyright © 1996-2003 by Web Crossing, Inc., San Francisco, California.