[erlang-questions] is there anything wrong with global?

Michael Truog <>
Sun Dec 28 22:05:19 CET 2014


On 12/28/2014 11:39 AM, Sean Cribbs wrote:
> Global registration is inherently a consensus problem, and thus will have problems with liveness, as you've discovered. I can't speak to the implementation of the 'global' module, but I would suspect it is not partition-tolerant. Is there a way you can reconfigure your application to have locally-registered processes (one-per-node), or not require a single distribution point?
>
> There is also some work done by my colleague Chris Meiklejohn for eventually-consistent (and partition-tolerant) process groups, if you don't require a single authoritative process: https://github.com/cmeiklejohn/riak_pg
If you need something that has already been in production, you need not look further than Erlang/OTP with http://www.erlang.org/doc/man/pg2.html .  There also is https://github.com/okeuday/cpg/ which has more features without ets usage to avoid contention (and it supports the via syntax, if you need that (i.e., {via,Module,ViaName})).

>
> On Sat, Dec 27, 2014 at 5:36 AM, 289602744 < <mailto:>> wrote:
>
>     These days,I found global did not work well.
>     I have hundreds of nodes,and these nodes are connected with each other.
>     But on some nodes, I can't get a process's global registered name with global:whereis_name, althrough I can get the node info by net_kernel:node_info/1
>     I didnot find a way to resolve this problem. Unless I unregister that process's name and then register the name again, and then, I can get the global name by global:whereis_name/1.
>     Is there anything wrong with global? with so many nodes, I can't unregister and then register a process name every time I find global return me an undefined.
>
>
>
>     _______________________________________________
>     erlang-questions mailing list
>      <mailto:>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
> -- 
> Sean Cribbs < <mailto:>>
> Sr. Software Engineer
> Basho Technologies, Inc.
> http://basho.com/
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141228/7b11cc90/attachment.html>


More information about the erlang-questions mailing list