home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!paladin.american.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!olivea!hal.com!darkstar.UCSC.EDU!cats.ucsc.edu!banshee
- From: banshee@cats.ucsc.edu (Wailer at the Gates of Dawn)
- Newsgroups: comp.programming
- Subject: Network Chat Messaging Algorithm
- Message-ID: <1h8752INNn3i@darkstar.UCSC.EDU>
- Date: 22 Dec 92 23:08:18 GMT
- Organization: University of California, Santa Cruz
- Lines: 70
- NNTP-Posting-Host: am.ucsc.edu
-
-
- I am in the process of writing a network "chat" program called CONV
- which will offer the same tpye of interface but improved performance over
- a currently existing program ICB (which replaced FNET). (A client for ICB
- is available from ftp.UCSC.EDU:/public/fn_icb0.9.tar.Z)
-
-
- Here is an outline of my proposed algorithm, comments would be
- appreciated on the basic alg, as well as network protocol suggestions. We
- currently think UDP sockets for local connections and TCP sockets for
- lserver/mserver connections.
-
-
- Fnet (aka ICB) is a communication system originally developed by Sean Casey
- of uky.edu. ICB is the rewrite of the communication server after the original
- fnet was taken off the internet. The ICB server was written by John deVries.
- Fnet will be used as a generic name to refer to the system of communication
- used by both Fnet and ICB.
-
- Fnet is a client/server system based on TCP/IP sockets. The outline of
- communication between the client and server is as follows:
-
- User invokes client; client connects to server; client sends login
- packet; server accepts client connection; server periodically reads
- data sent by the client; server sends relevant data to the client.
-
- Specifically, the client connections are multiplexed by the server, using
- the select() call. Messages to clients are processed by the server and passed
- to the appropriate clients. Security is handled by server processing.
-
- This method of data communication is inefficient for the following reasons:
-
- Data local to a machine must be passed through an arbitrarily distant
- server and sent over multiple sockets to N clients. This requires
- N transfers from the server. This cost is Ns, where s is the cost of
- a transfer to the server.
-
- A broken server renders all clients useless without a backup server.
-
- Net lag causes unacceptable waits to all clients.
-
- Thus a hybrid client/server model is suggested in which clients connect to
- a local server (local to a subnet or similar) and local servers communicate
- with a super server. The Sserver communicates only with Lservers and Lservers
- passes messages from client to client and from client to Sserver.
-
- This method has the following advantages over the Fnet model:
-
- Data local to a machine is propogated only on the local machine. With
- N clients, only S server transfers are required, where S is the number
- of relevant Lservers. Typically, N ~= 2S. In the worst case, where
- N = S, the cost is N(s + l), where l is the cost of a local transfer.
- If l << s, this is equivalent to the Fnet model. In the best case,
- S = 1 and the cost scales as Nl, a great improvement over Ns when
- l << s. Therefore, the average case of the hybrid model is always
- better than Fnet provided l << s.
-
- A broken Sserver prevents communication between Lservers, but clients on
- the Lserver are still able to communicate. A broken Lserver will have
- the same effect as a broken Fnet server to clients services by that Lserver.
-
- Net lag is present only in Lserver/Sserver transfers. Clients will notice
- no backup from local messages.
-
-
- --
- The Wailer at the Gates of Dawn | banshee@cats.UCSC.EDU |
- Just who ARE you calling a FROOFROO Head? | |
- DoD#0667 "Just a friend of the beast." | banshee@ucscb.UCSC.EDU |
- 2,3,5,7,13,17,19,31,61,89,107,127,521,607....| banshee@ucscb.BITNET |
-