No plans.


*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Wed, Oct 26, 2016 at 10:53 PM, Piotr Szeremeta <piotr.szerem...@gmail.com
> wrote:

> Hi
>
> Are there plans to support queries in dispatch/3 ? Something like:
>
> iex> {:ok, _} = Registry.start_link(:duplicate, Registry.DispatcherTest)
> iex> {:ok, _} = Registry.register(Registry.DispatcherTest, {Greetings,
> "hello"}, {IO, :inspect}) iex> Registry.dispatch(Registry.DispatcherTest, 
> {Greetings,
> :_ }, fn entries -> ...> for {pid, {module, function}} <- entries, do:
> apply(module, function, [pid]) ...> end)
>
> On the other hand this could be somewhat emulated with:
>
> iex> {:ok, _} = Registry.start_link(:duplicate, Registry.DispatcherTest)
> iex> {:ok, _} = Registry.register(Registry.DispatcherTest, "hello", :world)
> iex> Registry.dispatch(Registry.DispatcherTest, "hello", fn
>  ...> {pid, :world} -> do_stuff
> ...> _ -> dont_do_stuff
> ...> end)
>
> Le mardi 25 octobre 2016 23:06:47 UTC+2, José Valim a écrit :
>>
>> 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/05769888-7656-4eca-955f-
> 0e3c5618a701%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/05769888-7656-4eca-955f-0e3c5618a701%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAGnRm4K3%2BR1%3DG9nse6DitjCKCS6zsBOB-Zd4g3_mkb-%2B4rA3yw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to