Erlang-based opensource publish-subscribe servers

Zvi <>
Wed Oct 27 15:10:23 CEST 2010


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
>


More information about the erlang-questions mailing list