apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: More migration of code from httpd to apr-util
Date Mon, 11 Jun 2001 15:04:53 GMT
On Mon, 11 Jun 2001, Greg Stein wrote:

> On Mon, Jun 11, 2001 at 12:38:23AM +0200, Luke Kenneth Casson Leighton wrote:
> > On Sat, Jun 09, 2001 at 08:30:23AM -0700, rbb@covalent.net wrote:
> >...
> > > BTW, APR already has named pipes.  Just what are we trying to solve here?
>
> We only have them implemented for Unix. OS/2 returns an ENOTIMPL and Windows
> simply doesn't have an implementation for it.

So, the solution is to implement them on other platforms, not to re-invent
them.  For historical completeness however, allow me to explain how we got
where we are with named pipes.  Unix has them becaues they are easy to
implement.  Windows doesn't have them because only certain versions of
Windows supports named pipes.  Namely, NT and 2000 have named pipes, 9x
doesn't.  Originally, APR supported named pipes on Windows, they were
removed in revision 1.11.  From looking at the log, I don't understand
why.

> > i looked at the named pipe code: i believe that you are thinking
> > of 'unix' named pipes, which are a totally diffrerent beast
> > from nt named pipes.
>
> Right. I don't recall all the bits about creating named pipes in Windows,
> but it may be feasible to use the "filename" in the
> apr_file_namedpipe_create function for the host/name of the pipe in NT. In
> other words, it may be a simple matter of writing the function for Windows.
> But then again, the function params may not be rich enough for what is
> needed.

See above, this has worked in the past, all we need to do is copy the code
back into place, and possibly tweak it.

> >...
> > - a means to set up a server and have other programs (not
> > remote programs) connect to and communicate with that server.
> >
> > the semantics must be identical to those of unix-domain-sockets,
> > namely a listen, bind, accept, read, write and close.
>
> I would think you could use named pipes, TCP sockets, or Unix sockets.
>
> If the server spawns the programs, then you can also use regular pipes.

I have been thinking of creating apr/rpc/...   to handle stuff like this.
However, right now, we have named pipes.  They need to be implemented on
more platforms, and that may require changing the API a bit, but please
let's stick with what we have already.

The only thing we can't do with named pipes today is communicate with
different machines.  IMHO, calling any cross-machine communication medium
a named pipe is just going to confuse any unix programmer.  Give it a
different name.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------



Mime
View raw message