[erlang-patches] [PATCH] - extending behaviours to support alternative process registries

Ulf Wiger ulf.wiger@REDACTED
Fri Oct 28 04:13:11 CEST 2011


git fetch http://github.com/uwiger/otp.git uw_extending_gen

Author: Ulf Wiger <ulf.wiger@REDACTED>
Date:   Thu Oct 27 18:56:54 2011 -0700

    Make behaviours support alternative process registries
    
    Originally, OTP behaviours support local and global name registration.
    As there are alternative ways of registering, or identifying, processes
    (e.g. gproc, nproc), it is interesting to offer an alternative way to
    register and locate instances of OTP behaviours.
    
    We define an instance reference, {via, Module, Name}, where Module exports
    the functions register_name/2, unregister_name/1, and send/2. These function
    should have the same types as the corresponding functions in global.erl.


This patch has been lying around for a while, and there was some (positive) discussion about it on the erlang-questions list.

I have merged the current 'dev' branch, updated docs and verified it together with gproc, which is also prepared to support this functionality.

BR,
Ulf

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com






More information about the erlang-patches mailing list