Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 6531 invoked by uid 6000); 17 May 1999 16:30:40 -0000 Received: (qmail 6516 invoked from network); 17 May 1999 16:30:38 -0000 Received: from twinlark.arctic.org (204.107.140.52) by taz.hyperreal.org with SMTP; 17 May 1999 16:30:38 -0000 Received: (qmail 9873 invoked by uid 500); 17 May 1999 16:30:37 -0000 Date: Mon, 17 May 1999 09:30:37 -0700 (PDT) From: Dean Gaudet To: new-httpd@apache.org Subject: [PATCH] select-thread-hybrid-01.patch Message-ID: X-Comment: Visit http://www.arctic.org/~dgaudet/legal for information regarding copyright and disclaimer. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org http://www.arctic.org/~dgaudet/apache/2.0/select-thread-hybrid-01.patch OK I've managed to serve a few requests with this, so it's time to post ;) Building: Get and build bind-8.x (I'm using bind-8.2). You want the wonderful eventlib which the ISC folks have written for us, and released under a BSD-style license. This is a convenient select/poll wrapper which provides timer and fd events. Paul's comments say he had inputs from lots of folks -- including the X folks... so I'm guessing Jim Gettys' comments were taken into account... and so I'm just trusting the code rather than looking at it. (Redhat users: I tried using the installed bind-devel kit, but it doesn't work, something is bogus about their library.) Get apache-apr... apply the patch. Use some variant of the config.status below to configure the server. Notes: - I tore up http_main.c. Just completely gutted it. I got tired of stubbing out things. We can add things back incrementally. - no signals, no restart, no multiple processes... - no scoreboard -- major rework needed here. We need to divorce ourselves from the concept of a one-to-one mapping between threads/processes and requests. We'll have connections which are being handled by the event loop. I think the more appropriate thing is to split the scoreboard into a "worker" section, and a "connection" section. But even still -- we can potentially have thousands of connections in progress... that's a lot of shared memory to chew up (shared mem is not pageable on many systems). A better solution is required -- such as building the scoreboard only when serving /server-status. - It's similar to one of manoj/ryan's older servers with the fdqueue at the moment, but using eventlib instead... and it should show how I think we should pass events back and forth between workers and event thread. Dean #!/bin/sh ## ## config.status -- APACI auto-generated configuration restore script ## ## Use this shell script to re-run the APACI configure script for ## restoring your configuration. Additional parameters can be supplied. ## CFLAGS="-g -O2 -Wall" \ LIBS="/home/dgaudet/ap/bind/src/lib/libbind_r.a" \ INCLUDES="-I/home/dgaudet/ap/bind/src/include" \ ./configure \ "--with-layout=Apache" \ "--prefix=/home/dgaudet/ev" \ "--disable-module=status" \ "$@"