Looks great! A very welcome addition :-)

Looking at docs and code, it seems that Registry suffers from a mild case 
of the :supervisor syndrome :-) Namely, there's some conditional logic and 
documentation depending on the registry type (unique vs duplicate). I 
wonder if these should be split in two, say Registry.Unique and 
Registry.Duplicate, or maybe just Registry and PubSub, since the latter is 
not a :via compatible registry anyway?

I also agree with Chris that it should reside under the Process namespace.


On Tuesday, October 25, 2016 at 11:06:47 PM UTC+2, José Valim wrote:
>
> Hello everyone,
>
> I would like to propose the addition of the Registry project to Elixir:
>
> https://github.com/elixir-lang/registry
>
> The Registry project is a local and scalable key-value process storage in 
> Elixir. It encapsulates 3 known use cases:
>
> * Process registry: to register process with dynamic names. Often Elixir 
> developers need to rely on gproc or other tools.
> * Code dispatching: dispatch a module/function associated to a given key
> * PubSub implementation: send messages to local processes registered under 
> a given topic
>
> There are probably other use cases waiting to be discovered. :)
> You can learn more in the documentation:
>
> http://elixir-lang.org/docs/registry/
>
> The project clocks only 700LOC with documentation and performs well. We 
> have extracted, improved and generalized the patterns from Phoenix.PubSub, 
> the exact implementation used to manage and publish messages to 2 million 
> subscribers 
> <http://www.phoenixframework.org/blog/the-road-to-2-million-websocket-connections>
> .
>
> When benchmarking thousands of processes registering serially, it is twice 
> slower than local atoms, albeit 33% faster than gproc. On concurrent cases, 
> it distributes well across all cores, becoming only 15% slower than local 
> atoms, and 3x faster than gproc (gproc seems to be serial on its default 
> configurations).
>
> Please give it a try and let us know what you think.
>
>
> *José Valim*
> www.plataformatec.com.br
> Skype: jv.ptec
> Founder and Director of R&D
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/2e569658-3126-4561-a0a9-f285d5a3eb00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to