Path: utzoo!attcan!uunet!wuarchive!gem.mps.ohio-state.edu!apple!zorba!dtynan From: nick@toro.UUCP (Nicholas Jacobs) Newsgroups: comp.unix Subject: Re: Message queues Message-ID: <3492@zorba.Tynan.COM> Date: 14 Oct 89 22:32:29 GMT Sender: dtynan@zorba.Tynan.COM Organization: Merrill Lynch Municipal Securities Systems Development, NY Lines: 36 Approved: dtynan@zorba.Tynan.COM In-Reply-To: <3483@zorba.Tynan.COM> Cc: >Two questions about message queues in UNIX: > >our SUNS). Then, with a key of 2505 the call msgget blow out with the >message "Permission Denied". That should not happen as I set the msgflag to >reflect that (0000600). Has anyone else seen this problem or aware of this > Question for you: does the message queue already exist? If it does with 0600 permission and you are not the owner, you will not be allowed to connect to it. >2. I am exploring the use of message queues instead of the traditional >socket IPC operations. The application involves a daemon-like program to >rendezvous two other processes and I want to use the message queue facility >to make synchronization possible. I am interesting in evaluating on how >much faster it would be to go this way. Gut feeling indicates that message >queues could be faster than passing UDP packets around and this might be >because the UNIX kernel supports this facility better (and probably uses it). > >Any ideas or comments !! > >Raghu The only advantage you really get with SysV message queues is speed and even that is questionable in most applications (i.e., the speed of memory based message queues does not really affect your application much). The disadvantages are considerable. The first is that they are limited to only the machine you are running on, thus removing any possibility of transparent network extensions. Also, since they do not map into the file system domain they are not selectable, thus you have no asynchronous notification available. We use message queues heavily since this is a SysV based project, but given a choice I would use sockets rather than message queues. Nicholas Jacobs UUCP: ...!uunet!toro!nick Internet: toro!nick@uunet.uu.net AT&T: (212) 236-3230