JILL24
Problem with registry in local ets table
if i want to use GenRegistry library (GitHub - discord/gen_registry: Simple and efficient local Process Registry · GitHub) in production. all erlang nodes are connected in a ring. all nodes are set connect_all false and manually connected in hash ring.and we have to use Send function to send mesaage to pids in different different nodes. i will send this local node to ets table in distributed systen by using hashing ans :rpc.call.
GenRegistry registered pid with id in local node ets table and many users register their pid with id in different different nodes. now tell me how Send will send message to another node pid because, it is possible to for two pid be same in different different nodes.
now please solve this problem?
Most Liked
hst337
-
pid’s are not the same on different nodes. Local pids look the same, but as soon as they sent, they are transparently converted to remote pids.
For example,
#PID<0.123.0>is a local pid. When you send it to another node, it will start looking like#PID<3.123.0>. First number here indicates internal representation of other node’s ID. So this#PID<3.123.0>must be read like “proccess with ID 123 from external node with ID 3” -
GenRegistryis local. That means that each name you give to the process can be resolved only locally (by someone who has the access toGenRegistry’s local process, to be precise)
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








