[erlang-questions] Re: Erlang-based opensource publish-subscribe servers

Banibrata Dutta <>
Wed Oct 27 15:42:32 CEST 2010


But then, why not pg2 ? It says:

"In pg, each message is sent to all members in the group. In this module,
each message may be sent to one, some, *or all members*. "

With the option of sending to all-members, it looks like something that is
quite similar to pg, and isn't tagged "experimental" and also more proven
thanks to it being used in the disk_log module !!

On Wed, Oct 27, 2010 at 6:40 PM, Zvi <> wrote:

> Hi,
>
> Just found about pg module (not pg2).
> http://erldocs.com/R14B/stdlib/pg.html?i=18&search=pg
>
> Looks like it can be used to implement pubsub.
> For each topic create process group (pg:create/1), then each
> subsriber's process joins topic's process group (pg:join/2).
> Publish maps cleanly to pg:send/2.
>
> Any ideas, why not to use this module?
> I guess process groups use registered names, so that's a
> disadvantage.
> Another problem is, that docs call this module "experimental".
>
> thanks,
> Zvi
>
> On Oct 24, 9:22 pm, "Zvi ." <> wrote:
> > no,
> > I need something lightweight, but able to work in a large cluster (10s of
> > nodes).
> >
> > The ideas I have:
> > 1. Use ets to store mappings of Subscriber Pids to TopicIDs - this ets
> will
> > obviously be a bottleneck.
> > 2. Have a process per TopicID, which hold list of all it's Subscriber
> Pids
> > in it's state. Now the bottleneck is mapping TopicID to it's Pid
> > 3. Use Ulf's gproc (looks it uses gen_leader abd requires patching
> Erlang?)
> >
> > I currently working on 1.
> >
> > Zvi
> >
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
>
>


-- 
regards,
Banibrata
http://www.linkedin.com/in/bdutta
http://twitter.com/edgeliving


More information about the erlang-questions mailing list