[Spread-users] Spread implementation and C API

Shashank Yaduvanshi hyaduvanshi at gmail.com
Fri Oct 16 13:55:47 EDT 2009

Thanks for the quick and helpful reply. So does that mean that a
receive/multicast busy waits when it blocks? Also, is there any way to
use SPREAD when one does not know which machines are connected in the
SPREAD network, nor their ip addresses?
Shashank Yaduvanshi
B.Tech, Computer Science Department,
I.I.T. Delhi, India
Sent from Delhi, India

On Fri, Oct 16, 2009 at 11:13 PM, John Schultz
<jschultz at spreadconcepts.com> wrote:
> 1. A Spread client's mailbox is actually a TCP or unix domain socket
> connected to a Spread daemon.  As such, it will block just like those kinds
> of sockets block.  You can use select/poll on them to watch for activity.
>  Unfortunately, they don't support 100% non-blocking behavior.  That is,
> once you start a SP_receive or a SP_multicast, if it needs to block, then it
> will and there is currently no way to tell it not to do so (e.g. - EAGAIN,
> 2. Spread uses UDP for all of its inter-daemon communication.  For machines
> configured within the same Spread segment, Spread will use either UDP
> multicast or broadcast, depending on the address type you specify for the
> Spread segment.  Between segments, a sending daemon will send a
> point-to-point UDP message to the (dynamically chosen) leader of each of the
> other segments,  who will then multicast it within their segments.
> A message sent through SP_multicast is sent to all the daemons.  So,
> typically, the client's daemon will multicast it within its local segment,
> send it point-to-point to the leaders of each of the other segments, who
> will then multicast it within their segments.  The daemons will then forward
> the message to those clients that are in the targeted groups current
> membership, either through TCP/IP or a unix domain socket.
> Cheers!
> -----
> John Lane Schultz
> Spread Concepts LLC
> Phn: 301 830 8100
> Cell: 443 838 2200
> On Oct 16, 2009, at 12:46 PM, Shashank Yaduvanshi wrote:
> Hi,
> I had some queries about the spread in general and spread C API in general.
> 1. How does the receive API call block? Does it busy wait or does it
> go to sleep and wakes up when there is a message in the message box?
> 2. When SPREAD is used in different machines connected to the
> internet, how does the message passing happen over the internet? (How
> does the networking happen and does it happen between the local
> daemons running on the different machines connected to spread?)
> Thanks
> Shashank Yaduvanshi
> B.Tech, Computer Science Department,
> I.I.T. Delhi, India
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users

More information about the Spread-users mailing list