[H-GEN] FTP login by wtmp?
Martin Pool
martinp at mincom.com
Tue Aug 17 22:27:04 EDT 1999
[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]
At 11:48 18/08/99 +1000, you wrote:
>> boa's very slick, but be aware that it doesn't quite implement the CGI
>> interface[0] the same way Apache does, and so some scripts will break. I
>> forget the details, but some environment variables are not set --
>> SCRIPT_NAME may be one. It needs a little patch sometime.
>
>Hrm. $datapoint{boa}++;
>
>I don't think anyone would really run boa as a web server for
>something *important* (read: CGI and lots of connections).
It's much easier to audit boa's source. I'd think about running it as a
suplementary web server on a big site: for example, to serve the static
files and let Apache handle the images.
>> Non-forking servers are a really interesting idea, and there's a lot of
>> research on how to make them perform really well. Consider for example
>> that poll and select scan linear arrays of file descriptors, and so are not
>> very scalable for large numbers of descriptors, so people are thinking
>> about a new interface.
>
>*blink* It's hard to think of what else you can *do*.
Well, the kernel knows when a file descriptor is ready to read or write
(e.g. it got an interrupt from the NIC that it's buffers are empty), and it
knows what process is waiting on that fd. The hard thing is to have a way
for the kernel to tell the process about it.
All of this is IIRC:
0. Implement each thing in a process or thread. This is basically the
approach used by Apache and also by Java. The problem is that often you
have to create a fairly heaviweight entity when all you want is
asynchronous IO. For example, the kernel in general has to timeslice
threads, but here all you really want is cooperative slicing when they do
IO. Also, implementing this on top of threads is hard: getting IO and
threading to interact properly is by far the most difficult part of a Java
VM on Unix.
1. There is a posix draft called aio_* which says the kernel does it by
magic and the C library makes it look like asynchronous IO. However, this
is not as flexible as it might be, because the app can't tell when the IO
happens. It's not so widely implemented, but I understand recent libc
emulates it in threads and may move to a kernel hook on particular OSs when
they're available.
2. Your process can be signalled when a descriptor is ready. Signals are
extended to carry information about which descriptor it is (which is
nonstandard). However, it's pretty hard to structure a program to do it's
IO from a sighandler.
3. The poll/select interface is extended to something that doesn't use an
array of FDs. One option would be "poll all FDs I have open", but that's
not very flexible.
(+others)
--
/\\\ Mincom | Martin Pool | martinp at mincom.com
// \\\ | Software Engineer | Phone: +61 7 3303-3333
\\ /// | Mincom Ltd. |
\/// | Teneriffe, Brisbane | Speaking for myself only
--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.
More information about the General
mailing list