9fans archive / 2001 / 11 / 742 /    prev next

From: Matt <matt@pro...>
Subject: Re: [9fans] Python filesystem
Date: Thu, 29 Nov 2001 12:24:05 +0000

On Wednesday 28 November 2001 21:46, you wrote:
> I am really unconvinced why you would want to do this.
>
> However, you could access python data structures through a
> f/s, but I'm not sure it would give you anything useful.

ok then here goes my rambling idea

I've been working with Apache
Apache has a thing called "the request loop" which is (mostly)

Request Received
URI Translation
Access Control
Authentication
Authorisation
Response

with mod_perl & mod_snake one can add 0 or more custom handlers at each stage 
of the loop to alter the default behavior

I was day dreaming about what a plan9 approach to httpd would be and thought 
that the Apache model would suit as a good starting point.
As I've been studying file servers for my other project I came up with an 
httpd fileserver for which one could attach a list of commands to execute at 
each stage of the loop. These commands could alter the values of the 
request/response objects as exposed by the httpdfs. 

but I was concerned by two things 
1. lots of process forks to spawn the commands
2. persistence

both of which seem to be cured by having the commands daemonised

putting a channel in /srv is one way I guess but there would still need to be 
some glue for the /srver to write back to the request/response object esp. if 
one was to go for multiple httpd processes and therefore possibly multiple 
/servers doing the same job for different httpds. With httpd using multiple 
threads I can feel the projects hair growing and mine getting pulled out.

M