Re: <inc> in ncsa server
Tony Sanders <sanders@bsdi.com>
X-Delivered: at request of secret on dxcern.cern.ch
Errors-To: sanders@bsdi.com
Message-id: <9310081520.AA14203@austin.BSDI.COM>
To: www-talk@nxoc01.cern.ch
Subject: Re: <inc> in ncsa server
In-Reply-To: Rob McCool's message of Fri, 08 Oct 93 01:16:04 CDT.
Errors-To: sanders@bsdi.com
Reply-To: sanders@bsdi.com
Organization: Berkeley Software Design, Inc.
Date: Fri, 08 Oct 1993 10:20:06 -0500
From: Tony Sanders <sanders@bsdi.com>
> I don't see how. As I said, the filter does not have to be a separate
> program to the server.
Right, you could special case certain conversions and just change a
pointer to the "send" function instead of using an external conversion.
For example:
send_fp = default_send;
if ("converting from macro-html to html") # use internal conversion
send_fp = send_macro_html;
if ("converting from xyz to html") # uses external conversion
open(stdout, "|xyz2html"); # this is perl, but you get the idea
...
(*send_fp)(stdin, stdout);
Of course, it'll need to be more robust (e.g., you wouldn't use two internal
conversions unless you wrote a streams object to move the data around).
However, if you just setup pipe()'s and fork() you can easily use muliple
internal conversions (that just read stdin and write stdout) and the system
will handle the streams for you. This is efficient enough for most systems,
esp on systems with copy-on-write. This is how Plexus handles it.
+--+
| |____ --------------------------------------------------------------
__| | Tony Sanders Development and US Customer Support
\ | sanders@BSDI.COM Berkeley Software Design, Inc.
\/\ * _/ Voice + 1 512 251 1937 1801 Wells Branch Parkway, #2111
\_ / Support + 1 800 ITS BSD8 Austin, TX 78728
\| Orders + 1 800 800 4BSD