Hi,<br><br>I have implemented a protocol stack and the current implementation has a coordinator process that keeps track of the processes that are spawned to handle the individual calls (very telcom protocol). <br><br>The reason for this is that I have two types of call identifies: one at the top of the stack that represents my connection to our legacy system and one at the bottom of the stack that represents the protocol's call.<br>
<br>When I get a message from our legacy system my coordinator process looks up in its list of spawned processes and finds the process for that message based on the legacy call identifier.<br><br>Likewise when I get a message from the protocol: the call identifier is used by the coordinator to find the process to send the message to.<br>
<br>In my ideal world I would like to register the call process with two names: one for the legacy call identificator and on for the protocol's call identificator. <br>Then my coordinator could look up if a process has been spawned for a call identificator (legacy or protocol) and then forward the message. <br>
If there hasn't been spawned a process for the call the coordinator spawns a new one and registers it. <br><br>The problem is that erlang:register/2 barfs if you try to register a process more than once.<br><br>Surely I am not the first to run into this type of problem so I am hoping that the someone has some ideas for me!<br>
<br>Thanks in advance,<br>Torben<br><br>