Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion What's the most efficient method to broadcast a message to multiple (100Ks) of processes?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Eric Newhuis (personal)  
View profile  
 More options May 13 2011, 12:48 am
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:

> Hi,

> what's the most efficient method to broadcast a message to multiple
> (100Ks) of processes?

> The most naive way is:

>   [ Pid ! Msg || Pid<-Pids ].

> less naive method:

>   [ spawn(fun() -> [Pid ! Msg || Pid<-PidsSublist] end) ||
> PidsSublist <- partition(Pids, N) ].

> where partition(L,N) splits list L into N sublists.

> Any ideas for better method?

> thanks,
> Zvi

> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscr...@erlang.org

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
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.