Hi,
I am building a business rule setup running in the back-end. The business rule logic will be a network of around 100 gen_server nodes supervised by a single supervisor. When input from user arrives it will change one of the nodes in the network which in turn will trigger other nodes to change etc.
Every session will create an own network setup of nodes based on a common template where every node has a number starting from 1 and also knows what nodes to relate to using the same numbering.
Is there a common or easy way to create named process where the name is only valid and unique within the scope of the one supervisor and the supervised processes?
The ambition is that each network will communicate within the network using the number as name, allowing for simultaneous networks to exist (multiple users, each with it’s own session and network running the same time). When node 7 signals to node 45 it is always within the same network.
I was hoping to be able to use the number as named processes but now realize that local scope is local to the erlang-node, not the supervisor and I need to find another way.
An alternative is to used {SessionId, Number} as name that can be unique within the node (there is as no need to cross nodes in the network at the moment).