apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jean-frederic clere <jfrederic.cl...@fujitsu-siemens.com>
Subject Re: [PATCH] Add support for Unix domain sockets
Date Fri, 11 Jan 2002 13:12:44 GMT
Sander Striker wrote:
> > From: David Reid [mailto:dreid@jetnet.co.uk]
> > Sent: 11 January 2002 13:21
> > To: APR Dev List
> > Subject: Re: [PATCH] Add support for Unix domain sockets
> >
> > > David Reid wrote:
> >>>
> >>> I've been up all night so this may be off base...
> >>>
> >>> AFAICR sockets using AF_UNIX are essentially local inter process
> >>> communication channels?
> >>
> >> They are local sockets. The difference is a little like the difference
> >> between IPV4 and IPV6.
> >> The socket() call need a different parameter and the addresses are
> >> different (bind() and connect()).
> >
> > Yeah, I know all of this :)  From memory they are normally used as IPC and
> > that was what I was getting at.
> Indeed.

Could we add AF_UNIX sockets to win32? That sounds a better option.
If that needs some coding than  we could return ENOTIMPL util someone implements

The idea to use AF_UNIX sockets in mod_jk is to speed up the actual AF_INET
socket commucations between Tomcat and Apache. A fail back to a "normal" socket
connection would be acceptable.

An other point is that AF_UNIX sockets are no used only in mod_jk but also in
mod_cgid and EGB connections (rand.c).

> >>> If this is the case then why are we having this discussion about adding
> >>> more to the network_io and not simply talking about adding an ipc_ set of
> >>> functions to apr that allow each platform to implement it in their own
> >>> way, as we've done with all the other stuff in apr?  After all that's what
> >>> apr is for isn't it? :)
> >>
> >> That is only a small addition to the apr sockets.
> >
> > But that's NOT really the point is it?  The point is that not all the
> > platforms can truly support this functionality and adding it just so we have
> > it on some platforms and everyone else has to return ENOTIMPL seems to be
> > crazy and against the very reason for APR.
> I agree.  We need a portable ipc mechanism.

My ReliantUnix has to return ENOTIMPL for IPV6 sockets that does not disturb me.
Why does it disturb so much when win32 has to return ENOTIMPL when using AF_UNIX

> >> An ipc_ should be in apr-util? That is a higher level layer.
> >
> > OK, so apr-util, I could care less where it goes, it's more the concept that
> > I'm concerned about.
> It belongs in APR, because otherwise you have to do runtime checks in apr-util
> to see if APR_ENOTIMPL is returned for unix domain sockets and then try the
> thing we have as a fallback for a different platform (yuck).

Agreed... This ipc_ could be shared memory pipes or whatever the system
supports. It has not to be unix domain sockets.

> > david
> Sander

View raw message