From owner-freebsd-hackers Mon Dec 1 20:56:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA27714 for hackers-outgoing; Mon, 1 Dec 1997 20:56:19 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from rah.star-gate.com (rah.star-gate.com [204.188.121.18]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id UAA27707 for ; Mon, 1 Dec 1997 20:56:10 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.8/8.8.8) with ESMTP id UAA01727; Mon, 1 Dec 1997 20:50:48 -0800 (PST) (envelope-from hasty@rah.star-gate.com) Message-Id: <199712020450.UAA01727@rah.star-gate.com> X-Mailer: exmh version 2.0gamma 1/27/96 To: Charles Mott cc: Amancio Hasty Jr , hackers@FreeBSD.ORG Subject: Re: ftp server on ftp.cdrom.com In-reply-to: Your message of "Mon, 01 Dec 1997 15:31:16 MST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 01 Dec 1997 20:50:47 -0800 From: Amancio Hasty Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > On Mon, 1 Dec 1997, Amancio Hasty Jr wrote: > > > > Actually, I was thinking more along the lines of state machine with > > the functionality to share data transfers you know to avoid the > > case of hundreds of users opening a single file N times. > > > > Most network engineers are familiar with an event or a state machine > > driven network server . > > > > Cheers, > > Amancio > > > > Initially, I was thinking that port 20 data transfers (as opposed to port > 21 control traffic) had to be either separate processes or threads, but > now I think you are right -- everything could be done by a synchronous > state machine in a single user process, but this might be inefficient. You can do it as you have suggested also the thing to keep in mind is the cost of per connection and memory. For instance a process context switch plus the over head of a process is not a very efficient mechanism for large scale ftp servers. Have Fun Guys, Amancio > As a compromise to the asynchronous nature of communications, one could > imagine a four process implementation; > > (1) port 21 state machine that wakes up whenever there is > control input. > > (2) state machine which handles all port 21 response messages. > > (3) data process that handles all incoming data. > > (4) data process that handles all outgoing data. > > Although a state machine scales quite well, there are OS problems related > to the number of open socket descriptors per process. Also, I am not sure I am not sure if that is an approach implementation issue or an OS issue no matter what the kernel has to keep the state information for connection oriented states for all processes. > how select() will work in multiplexing a large number of sockets. When > packets start queueing up in the kernel, will they be given to a process > in order of receipt? > > Charles Mott > (who really likes state machines) > >