Hi,<br><br>I'm trying to find out how the distributed application controller works internally. I'm especially interested in the implementation of an application takeover.<br><br>In case an application runs on node A, and is taken over by node B, what should happen is that it is first started on node B, so that there are two instances of the application running simultaneously for a brief period of time, and then stopped on node A.<br>
<br>However, I cannot figure out where this stopping happens in <font class="Apple-style-span" face="'courier new', monospace">dist_ac.erl</font>. If I understand correctly, this should happen in response to a <font class="Apple-style-span" face="'courier new', monospace">ac_application_run</font> message from the application_controller. This message is received by the <font class="Apple-style-span" face="'courier new', monospace">dist_ac</font> on node B, and a <font class="Apple-style-span" face="'courier new', monospace">dist_ac_app_started</font> message is then broadcast to the <font class="Apple-style-span" face="'courier new', monospace">dist_ac</font>s on all connected nodes. The <font class="Apple-style-span" face="'courier new', monospace">dist_ac</font> of node A receives this message, notices that the application is still running locally, and decides to shut down the application on its own node -- at least that is what the comments say (<font class="Apple-style-span" face="'courier new', monospace">dist_ac.erl</font>, line 529):<br>
<br><font class="Apple-style-span" face="'courier new', monospace">%% Another node tookover from me; stop my application<br>%% and update the running list.</font><br><br>But all I can see is that the <font class="Apple-style-span" face="'courier new', monospace">dist_ac</font>'s list of applications is updated to indicate that the application is no longer running locally -- I cannot find where the application_controller is instructed to actually shutdown the application.<br>
<br>Can anyone point me in the right direction?<br><br>Thanks,<br><br>Jeroen