From: Lyndon Nerenberg <lyndon@orthanc.ca>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] ideas for helpful system io functions
Date: Fri, 4 Dec 2009 22:09:46 -0700 [thread overview]
Message-ID: <alpine.BSF.2.00.0912042159400.81688@legolas.yyc.orthanc.ca> (raw)
In-Reply-To: <45bb8a0916edcb2ee86883ebeea8945e@brasstown.quanstro.net>
> the standard way of passing file descriptors is by fork/exec.
> this allows security is handled by the normal means.
Where FD passing is useful is to avoid that fork/exec overhead. The apps I
was working on had a relatively simple front-end process that would field
requests that required data to be crunched in various ways. Some of this
crunching had *very* high overhead relative to the volume of requests
coming in. Fork/exec simply would not scale. Instead we wrote long-lived
backend processors, and let the front-end act as a connection multiplexor,
handing the FDs from the incoming requests around as required to crunch
the data. This significantly reduced the system-related overhead, and also
made it very easy to chain filters together with the front-end managing
the whole thing from a single configuration file.
> this case would be handled by fork/exec. the general case is
> handled by srv(3).
Well, srv(3) in reverse ... sort of. I've been thinking about doing
something like this for a while now, specifically for httpd. What I've
been scratching my head over is if the handoff between httpd and the
backends should be a raw file descriptor, or a 9P interface. I need to
scratch together a prototype to experiment with but there's too much on my
plate right now.
--lyndon
next prev parent reply other threads:[~2009-12-05 5:09 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<alpine.BSF.2.00.0912042029370.66255@legolas.yyc.orthanc.ca>
2009-12-05 4:47 ` erik quanstrom
2009-12-05 5:09 ` Lyndon Nerenberg [this message]
2009-12-05 5:11 ` Lyndon Nerenberg
2009-12-05 8:10 ` Sam Watkins
2009-12-05 11:44 ` Francisco J Ballesteros
2009-12-05 16:32 ` ron minnich
2009-12-05 17:01 ` Francisco J Ballesteros
2009-12-05 17:09 ` ron minnich
[not found] <<8ccc8ba40912070814o2f2c7eb9s5887a31810eab12e@mail.gmail.com>
2009-12-07 16:24 ` erik quanstrom
2009-12-07 16:48 ` Francisco J Ballesteros
2009-12-07 14:41 Francisco J Ballesteros
2009-12-07 15:11 ` roger peppe
[not found] <<20091207120652.GB16320@knaagkever.ueber.net>
2009-12-07 12:19 ` erik quanstrom
[not found] <<20091205202420.855AD5B77@mail.bitblocks.com>
2009-12-05 20:27 ` erik quanstrom
2009-12-05 20:59 ` Bakul Shah
2009-12-06 7:45 ` Sam Watkins
2009-12-05 20:30 ` erik quanstrom
[not found] <<20091205194741.0697D5B76@mail.bitblocks.com>
2009-12-05 20:03 ` erik quanstrom
2009-12-05 20:24 ` Bakul Shah
[not found] <<20091205081032.GJ8759@nipl.net>
2009-12-05 13:51 ` erik quanstrom
[not found] <<alpine.BSF.2.00.0912042210290.81688@legolas.yyc.orthanc.ca>
2009-12-05 13:26 ` erik quanstrom
2009-12-05 14:22 ` Sam Watkins
2009-12-05 17:47 ` Skip Tavakkolian
2009-12-05 17:56 ` Skip Tavakkolian
-- strict thread matches above, loose matches on Subject: below --
2009-12-05 3:17 Sam Watkins
2009-12-05 3:36 ` Lyndon Nerenberg
2009-12-05 3:56 ` Sam Watkins
2009-12-05 4:03 ` Lyndon Nerenberg
2009-12-05 18:16 ` Tim Newsham
2009-12-05 18:24 ` Tim Newsham
2009-12-05 19:47 ` Bakul Shah
2009-12-07 12:24 ` roger peppe
2009-12-07 12:32 ` Charles Forsyth
2009-12-07 12:35 ` Francisco J Ballesteros
2009-12-07 13:42 ` Charles Forsyth
2009-12-07 16:10 ` erik quanstrom
2009-12-07 16:14 ` Francisco J Ballesteros
2009-12-07 14:13 ` Sam Watkins
2009-12-07 14:36 ` roger peppe
2009-12-07 19:11 ` Nathaniel W Filardo
2009-12-07 21:03 ` roger peppe
2009-12-08 12:51 ` matt
2009-12-07 12:06 ` Mechiel Lukkien
2009-12-07 12:31 ` roger peppe
2010-01-05 13:48 ` Enrico Weigelt
2010-01-05 15:53 ` Steve Simon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.BSF.2.00.0912042159400.81688@legolas.yyc.orthanc.ca \
--to=lyndon@orthanc.ca \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).