Re: Local Process Registered Name as Term
Max Lapshin <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CAMxVRxALs6QPiAd0iSjaej-g+639T0fLJUexjs4ub-=v0wiRjA@mail.gmail.com> |
I've created our gen_tracker that is used for this during many years. https://github.com/erlyvideo/gen_tracker On Mon, Aug 30, 2021 at 5:31 PM Frank Muller <[email protected]> wrote: > > Hi Vance > > Checkout gproc or syn. > > /F. > >> What advice can I get on a process registry solution for local (only) lookup using term() rather than atom()? >> >> The obvious candidates are erlang:register/2 for atoms and global:register_name/2 for other terms: >> >> erlang:register(Name :: atom()), PidOrPort) -> >> global:register_name(Name :: term(), Pid) -> >> >> Which is fine however when it will only be used locally global is a heavyweight solution. >> >> Should I roll my own using ets? A process? Other? >> >> -- >> -Vance