Created
May 6, 2016 09:38
-
-
Save ten0s/0b5458b50ba6c9655e6af827c8b8af30 to your computer and use it in GitHub Desktop.
Distributed publish using gproc w/o gen_leader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Re: [erlang-questions] gproc and gen_event | |
Of course, for a distributed pub/sub, you don't really need to turn on | |
the distributed parts of gproc. Running a local gproc instance on each | |
node, you can publish like so: | |
publish(Event, Data) -> | |
rpc:eval_everywhere( | |
gproc, send, | |
[{p, l, {?MODULE, Event}}, {?MODULE, Event, Data}]). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment