home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / programm / 3355 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  3.8 KB

  1. 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
  2. From: banshee@cats.ucsc.edu (Wailer at the Gates of Dawn)
  3. Newsgroups: comp.programming
  4. Subject: Network Chat Messaging Algorithm
  5. Message-ID: <1h8752INNn3i@darkstar.UCSC.EDU>
  6. Date: 22 Dec 92 23:08:18 GMT
  7. Organization: University of California, Santa Cruz
  8. Lines: 70
  9. NNTP-Posting-Host: am.ucsc.edu
  10.  
  11.  
  12.     I am in the process of writing a network "chat" program called CONV
  13. which will offer the same tpye of interface but improved performance over
  14. a currently existing program ICB (which replaced FNET).  (A client for ICB
  15. is available from ftp.UCSC.EDU:/public/fn_icb0.9.tar.Z)
  16.  
  17.  
  18.     Here is an outline of my proposed algorithm, comments would be 
  19. appreciated on the basic alg, as well as network protocol suggestions.  We
  20. currently think UDP sockets for local connections and TCP sockets for 
  21. lserver/mserver connections.
  22.  
  23.  
  24. Fnet (aka ICB) is a communication system originally developed by Sean Casey
  25. of uky.edu.  ICB is the rewrite of the communication server after the original
  26. fnet was taken off the internet.  The ICB server was written by John deVries.
  27. Fnet will be used as a generic name to refer to the system of communication
  28. used by both Fnet and ICB.
  29.  
  30. Fnet is a client/server system based on TCP/IP sockets.  The outline of
  31. communication between the client and server is as follows:
  32.  
  33.     User invokes client; client connects to server; client sends login
  34.     packet; server accepts client connection; server periodically reads
  35.     data sent by the client; server sends relevant data to the client.
  36.  
  37.     Specifically, the client connections are multiplexed by the server, using
  38. the select() call.  Messages to clients are processed by the server and passed
  39. to the appropriate clients.  Security is handled by server processing.
  40.  
  41. This method of data communication is inefficient for the following reasons:
  42.  
  43.     Data local to a machine must be passed through an arbitrarily distant
  44.     server and sent over multiple sockets to N clients.  This requires
  45.     N transfers from the server.  This cost is Ns, where s is the cost of
  46.     a transfer to the server.
  47.  
  48.     A broken server renders all clients useless without a backup server.
  49.  
  50.     Net lag causes unacceptable waits to all clients.
  51.  
  52. Thus a hybrid client/server model is suggested in which clients connect to
  53. a local server (local to a subnet or similar) and local servers communicate
  54. with a super server.  The Sserver communicates only with Lservers and Lservers
  55. passes messages from client to client and from client to Sserver.
  56.  
  57. This method has the following advantages over the Fnet model:
  58.  
  59.     Data local to a machine is propogated only on the local machine.  With
  60.     N clients, only S server transfers are required, where S is the number
  61.     of relevant Lservers.  Typically, N ~= 2S.  In the worst case, where
  62.     N = S, the cost is N(s + l), where l is the cost of a local transfer.
  63.     If l << s, this is equivalent to the Fnet model.  In the best case,
  64.     S = 1 and the cost scales as Nl, a great improvement over Ns when
  65.     l << s.  Therefore, the average case of the hybrid model is always
  66.     better than Fnet provided l << s.
  67.  
  68.     A broken Sserver prevents communication between Lservers, but clients on
  69.     the Lserver are still able to communicate.  A broken Lserver will have
  70.     the same effect as a broken Fnet server to clients services by that Lserver.
  71.  
  72.     Net lag is present only in Lserver/Sserver transfers.  Clients will notice
  73.     no backup from local messages.
  74.  
  75.  
  76. -- 
  77. The Wailer at the Gates of Dawn              | banshee@cats.UCSC.EDU       |
  78. Just who ARE you calling a FROOFROO Head?    |                             |
  79. DoD#0667  "Just a friend of the beast."      | banshee@ucscb.UCSC.EDU      |
  80. 2,3,5,7,13,17,19,31,61,89,107,127,521,607....| banshee@ucscb.BITNET        |
  81.