Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Feb 1997 10:58:47 -0800
From:      Craig Shaver <craig@ProGroup.com>
To:        hackers@freebsd.org
Subject:   Re: Alternatives to SYSV IPC?
Message-ID:  <330F41E7.794BDF32@ProGroup.com>
References:  <199702210119.RAA00608@lightside.com> <Mutt.19970222122927.j@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
J Wunsch wrote:
> 
> As Jake Hamby wrote:
> 
> > ..., but what about messages?  Sockets could be used, but they just
> > provide an arbitrary stream of bytes, not discrete messages.  FIFOs
> > have the same problem, and pollute the filename space (I have the
> > same problem with using mmap() for shared memory).
> 
> What else than `an arbitrary stream of bytes' is a message?  Define
> your message to be a structure, with a length and type field at the
> beginning, and type-dependant data following.
> 
> FIFOs (or local-domain sockets) don't pollute the name space more than
> SysV msgs did.  Remember, all that SYSVIPC created a second (and 3rd
> etc.) namespace, with an inconsitent set of programs to handle them,
> and even inconsistent attributes, IIRC.

I have built some applications that had to keep track of multiple cgi
requests that required some capability of returning a response to the
same cgi that made the request.  I used the SYSV IPC for messages.  Yes,
it is inconsistent with everything else, but it does work.  I believe
the only alternative I could come up with was UDP datagrams.  And then I
would have had to build a layer or 2 on top of that to parcel out the
responses to the correct cgi.  SYSV message queues are convenient, easy
to use, and they work.  What's the big deal here?

-- 
Craig Shaver  (craig@progroup.com) (415)390-0654 
Productivity Group POB 60458 Sunnyvale, CA  94088



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?330F41E7.794BDF32>