[erlang-questions] Re: Erlang-based opensource publish-subscribe servers
bile@REDACTED
bile@REDACTED
Wed Oct 27 16:05:05 CEST 2010
Speaking of pg. pg:members/1 claims to accept a term() as pg:create/1
but in fact doesn't. It only handles pids and atoms. Other functions
have the same issue. Meaning you can create a process group which can't
be joined or queried.
On Wed, 27 Oct 2010 06:10:23 -0700 (PDT)
Zvi <zvi.avraham@REDACTED> 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 ." <zvi.avra...@REDACTED> 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:erlang-questions-unsubscribe@REDACTED
>
More information about the erlang-questions
mailing list