From owner-freebsd-hackers Sat Feb 22 10:59:56 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id KAA02428 for hackers-outgoing; Sat, 22 Feb 1997 10:59:56 -0800 (PST) Received: from seabass.progroup.com (catfish.progroup.com [206.24.122.2]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id KAA02421 for ; Sat, 22 Feb 1997 10:59:42 -0800 (PST) Received: from seabass.progroup.com (seabass.progroup.com [206.24.122.1]) by seabass.progroup.com (8.7.5/8.7.3) with SMTP id KAA03083; Sat, 22 Feb 1997 10:58:47 -0800 (PST) Message-ID: <330F41E7.794BDF32@ProGroup.com> Date: Sat, 22 Feb 1997 10:58:47 -0800 From: Craig Shaver Organization: Productivity Group, Inc. X-Mailer: Mozilla 3.01 (X11; I; FreeBSD 2.1.5-RELEASE i386) MIME-Version: 1.0 To: hackers@freebsd.org Subject: Re: Alternatives to SYSV IPC? References: <199702210119.RAA00608@lightside.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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