I frequently see examples using process registration to simplify the example code (saving them self an extra value in function arguments). This has the effect that newbies tend to use process registration a whole lot (monkey see, monkey do).
And they (newbies) tend to change the registration as part of normal operations. They tend to construct atoms to register as, and have other processes construct atoms to look up processes. When you do this, then you are having shared state concurrency (limited such, but still bad).
The registry should be used for (okay, these are my own rules for when to use them):
- long-running services. Then it is as much global state as when you refer to a constant such as the speed of light.
- registering processes to aid debugging a running system, but those names should never be referenced by code, only by humans at the shell
The registered names should have a prefix (typically the application name), and the long-running applications should be in the OTP .app
file.