No, the messages would go to the appropriate governor based on the node
that we're sending to.

I'm not quite convinced that this approach would be better or not. I don't
necessarily think its overkill but I'd have to write out the code to really
decide if its worth it.


On Sat, Jan 26, 2013 at 4:26 PM, Bob Dionne <notifications@github.com>wrote:

> In src/rexi_governor.erl:
>
> > +    _ ->
> > +        % treat nosuspend and noconnect the same
> > +        gen_server:cast(?MODULE, {spawn_and_track, Dest, Msg})
> > +    end.
> > +
> > +init([]) ->
> > +    net_kernel:monitor_nodes(true),
> > +    {ok, #state{}}.
> > +
> > +handle_call(_Request, _From, State) ->
> > +    Reply = ok,
> > +    {reply, Reply, State}.
> > +
> > +handle_cast({spawn_and_track, {_, Node} = Dest, Msg},
> > +            #state{node_pids = NodePids, pid_nodes = PidNodes}=State) ->
> > +    case ets:lookup(NodePids, Node) of
>
> I can see storing the actual cnts somehow, but it seems to me having a
> governor gen_server for each node is a little overkill. We already have a
> mem3_sync_manager that handles node up/down messages which could handle
> keep track of the governors. Would the manager also handle dispatching to
> the appropriate governor?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cloudant/rexi/pull/5/files#r2785534>.
>
>