bitwalker / swarm

Easy clustering, registration, and distribution of worker processes for Erlang/Elixir
MIT License
1.21k stars 103 forks source link

Calling swarm functions on blacklisted nodes has unexpected results #121

Closed arjan closed 5 years ago

arjan commented 5 years ago

See amongst others #92 and #31. Calling register_name, whereis_name etc. on a node that is blacklisted (or not whitelisted) gives inconsistent and wrong results.

A proposed solution is to not start a tracker process on these nodes, but instead, start a process which proxies all calls (using :rpc.call) to one of the tracker processes on a participating node.

@beardedeagle how does this sound?

beardedeagle commented 5 years ago

I'm trying to think if their may be a better way to do this.

arjan commented 5 years ago

Yeah.. well I have thought about this as well and I think that maybe the whole point of blacklisting / whitelisting nodes should be that you should not use any Swarm function on those nodes.

So maybe this actually does not need a solution. We should focus instead on #104 :-)

arjan commented 5 years ago

I already wrote the proxy solution a while back by the way. But it's hard to get the tests passing with this code, for some reason.

beardedeagle commented 5 years ago

Yeah.. well I have thought about this as well and I think that maybe the whole point of blacklisting / whitelisting nodes should be that you should not use any Swarm function on those nodes.

Yeah that was kinda the way I was leaning too

We should focus instead on #104 :-)

That is going to require some significant work. I'd be more interested in us banging out the conversion to ex_unit_clustered_case for testing so as we move into #104 we have a working test suite to hopefully catch things.

arjan commented 5 years ago

Yes, agreed!