From: "Eric Newhuis (personal)" <enewh...@gmail.com>
Date: Thu, 12 May 2011 23:48:53 -0500
Local: Fri, May 13 2011 12:48 am
Subject: Re: [erlang-questions] What's the most efficient method to broadcast a message to multiple (100Ks) of processes?
Um, are your processes in the same Erlang node (OS process) or are they distributed? Are they distributed on the same network segment or over the internet? What kinf of ping times do you get from the worst-case host?
If distributed then the only correct answer is to use hardware multicast and write your own binary packet readers. ;-) Or maybe there is already some library for that. Hm. I recall gen_tcp or something perhaps setup as an IP multicast reader/writer. Memory doesn't serve me well from a life I led over 15 years ago.
Seriously if you really do have 100,000 clients then you may need to say something about message size, frequency, bursting, etc., before this could be better answered. Also I worry about Erlang's networking kernel sending heartbeats over the net. Is this all local or are we talking internets?
On Oct 7, 2010, at 7:01 AM, Zvi wrote:
> what's the most efficient method to broadcast a message to multiple
> The most naive way is:
> [ Pid ! Msg || Pid<-Pids ].
> less naive method:
> [ spawn(fun() -> [Pid ! Msg || Pid<-PidsSublist] end) ||
> where partition(L,N) splits list L into N sublists.
> Any ideas for better method?
erlang-questions mailing list
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.