Mod callback on Pid
Jorge Garrido gomez
zgbjgg at gmail.com
Mon Nov 9 19:27:35 EST 2015
Hello, this is our last commit:
Ignore the previous
> On Nov 9, 2015, at 5:56 PM, Jorge Garrido gomez <jorge.garrido at hovanetworks.com> wrote:
> Recently we upgrade our core application written in erlang that uses riak erlang client with protobuffs, before this upgrade we use a simple load balancer between nodes, so in a simple gen_server a pid is created and keep into the state, but some times the pid will be disconnected and we must connect again.
> So for that reason we decide use other strategy, we fork the project riak-erlang-client and decide to make a small change, we add in the options of the start_link function (where pid is created) a new option called: mod_callback, with this we send back the response of the pid, so the callback module knows that a pid was created and then added to the load balancer, all pids are managed by a supervisor, so when a problem occurs the supervisor restart a child and then the option mod_callback notifies to our load balancer so we can keep it into the state.
> This change is here: https://github.com/zgbjgg/riak-erlang-client/commit/a531cd98cbaf119becc6c85091b2242cb08cbc0a <https://github.com/zgbjgg/riak-erlang-client/commit/a531cd98cbaf119becc6c85091b2242cb08cbc0a>
> If you consider that this commit will be into your main repo, we can open a pull request,
> Than you very much!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users