[erlang-questions] [ANN] Syn 1.1.0 - Now with PubSub

Roberto Ostinelli roberto@REDACTED
Wed Mar 16 11:18:16 CET 2016


Dear All,
Syn 1.1.0 has been released. On top of being a global Process Registry, Syn
is now also able to handle Process Groups and has classical mechanisms that
allow Publish / Subscribe patterns.

To add a process to a group:

syn:join(Name, Pid) -> ok | {error, Error}.

Types:
    Name = any()
    Pid = pid()
    Error = pid_already_in_group

To remove a process from a group:

syn:leave(Name, Pid) -> ok | {error, Error}.

Types:
    Name = any()
    Pid = pid()
    Error = undefined | pid_not_in_group

To publish a message to all group members:

syn:publish(Name, Message) -> {ok, RecipientCount}.

Types:
    Name = any()
    Message = any()
    RecipientCount = non_neg_integer()

Processes are monitored and removed from groups if they die. Also, the
automated resolution of net splits has also been extended to Process Groups.

You can find Syn here:
https://github.com/ostinelli/syn

Thank you,
r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160316/2c23dcbc/attachment.htm>


More information about the erlang-questions mailing list