Pg2 not updating Free teachersex chat
A highly-documented translation of the original Erlang pg2 implementation to Elixir for educational purposes. Instead, use the pg2 module from the Erlang stdlib. However, the true specification of a code's behavior is the code itself.By reading the code of our favorite software, we can gain a deeper understanding.Each message may be sent to one, some, or all members of the group.
When a message is sent, pg2 is asked for the members of the Phoenix group, and a message is sent to all of them. Re PG2 is implemented using the same modules as pg2, via Elixir APIs whenever possible.
That being said, if you are an Elixir developer, you don't necessarily know how to read Erlang.
Additionally, despite the high quality of the implementation, pg2's Erlang code is not necessarily easy to read, even if you know Erlang.
Despite the apparent complexity of such a task, it is (perhaps surprisingly) implemented in a single 400-line Erlang module using the same OTP modules available to our own code.
The pg2 code is a great way to learn about distributed Erlang, and by extension, distributed Elixir.