Creating bulletin boards, chat rooms...

Richard K. Herz herz at ucsd.edu
Sun May 9 13:40:31 EDT 2004


My second version of a Rev chat/message board uses multiple socket
connections to a single Rev engine/server stack instance.  It was developed
starting with Tuviah's SimpleChat, the very first (at the very bottom)
contribution on Rev's web site "user contributions" page.  The first client
connecting, when it finds it can't establish a socket, sends a cgi post to
the server which starts the Rev engine/server stack which then starts
accepting sockets.  The server stack shuts down when there is no activity.
On a dedicated server, you could leave it running.

When a client first connects, the Rev server stack sends it a portion of the
log file.  When a client sends a message, the server stack appends it the
the log file, broadcasts it to all connected clients, and also broadcasts a
separate status message with the number of current connections for display
at the client stacks.

My first version worked well but my web host shut it down.  It relied solely
on individual cgi posts for all communications (hey, I'm an amateur at this)
and my web host said all the Rev engine instances starting up was too big a
load on the shared web server.

Rich Herz




More information about the Use-livecode mailing list