Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Oct 2002 10:20:47 -0300 (ART)
From:      Fernando Gleiser <fgleiser@cactus.fi.uba.ar>
To:        Jonathan Belson <jon@witchspace.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: [Q] Sockets verses message queues?
Message-ID:  <20021025101456.C11230-100000@cactus.fi.uba.ar>
In-Reply-To: <3DB922C2.30009@witchspace.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 25 Oct 2002, Jonathan Belson wrote:

> Hiya
>
>
> I'm writing an application which will fork into two processes
> (master/slave), and I require that the two be able to
> communicate asynchronously.  The master will send commands to
> the slave then get on with other things, and the slave will
> send a message back when it's finished.
>
> Is there any advantage to using AF_UNIX sockets rather than
> message queues, or vice versa (I was thinking about speed,
> but sockets seem to be more complicated code-wise)?

I seem to recall that on BSD systems sockets are faster than message queues
(SysV msg queues) but it depends on the undelying kernel implementation.
Maybe sockets are faster on BSD but slower on solaris.

Personally, I prefer sockets or pipes (both named and anonymous) to message
queues but YMMV.


			Fer




>
> Cheers,
>
>
> --Jon
>
> http://www.witchspace.com
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021025101456.C11230-100000>