<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2030/1/7/_/styles/combined.css?spaceKey=TOP&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/TOP/API+changes+to+support+adjunct+routing+components">API changes to support adjunct routing components</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~khunt">Ken Hunt</a>
</h4>
<br/>
<h4>Changes (10)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >h4. Overview <br> <br></td></tr>
<tr><td class="diff-changed-lines" >An adjunct routing service is another routing service (i.e. separate and distinct from the routing service identified to the system via the Service Locator as the primary routing service) that registers itself with the main routing component and takes over routing responsibilities from the main routing component under rules of it's own deciding. <span class="diff-added-words"style="background-color: #dfd;">This design provides Asterisk SCF with a means to introduce Adjunct Routing Services into the system with modest changes to the existing APIs.</span> <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">The goals of this design: <br># Minimize the complexity of additional logic for components that use the routing service. <br># Provide a flexible mechanism applicable to a wide variety of Use Cases. <br># Meet the previously defined goals in a remote-call efficient manner. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">!RoutingClassStructureDiagram-AdjunctRouting.png|border=1! <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">h4. API Changes <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">The API changes required by this design are highlighted in the class structure diagrams of Figures 1 and 2. Figure 1 introduces a GetEndpointLocators() operation to the LocatorRegistry interface. This, along with the new EndpointLocatorRegistryEntry class used to hand back EndpointLocators along with the ids used to register them, will allow an Adjunct Router to create a mirror copy of the system's available endpoint locators if it so chooses. Of course, an Adjunct Router could also choose to simply invoke the primary routing service's lookup() operation whenever it needs to look up an endpoint. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">To fully support mirroring the cache of EndpointLocators, the LocatorRegistry also provides support for the new listener interface (via the add/remove listener operations.) <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">!Session-AdjunctRouting.png|border=1!</span> <span class="diff-added-words"style="background-color: #dfd;">|!RoutingClassStructureDiagram-AdjunctRouting.png|border=1!|</span> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">|{center}*Figure 1. Changes to AsteriskSCF::Core::Routing*{center}| <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Figure 2 shows the changes to the SessionCommunications APIs. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">|!Session-AdjunctRouting.png|border=1!| <br>|{center}*Figure 2. Changes to AsteriskSCF::SessionCommunications*{center}| <br></td></tr>
<tr><td class="diff-unchanged" > <br> <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This page describes a proposed design change to the Asterisk SCF API's related to routing to support one or more adjunct routers.</td></tr></table></div>
<h4><a name="APIchangestosupportadjunctroutingcomponents-Overview"></a>Overview</h4>
<p>An adjunct routing service is another routing service (i.e. separate and distinct from the routing service identified to the system via the Service Locator as the primary routing service) that registers itself with the main routing component and takes over routing responsibilities from the main routing component under rules of it's own deciding. This design provides Asterisk SCF with a means to introduce Adjunct Routing Services into the system with modest changes to the existing APIs. </p>
<p>The goals of this design:</p>
<ol>
        <li>Minimize the complexity of additional logic for components that use the routing service.</li>
        <li>Provide a flexible mechanism applicable to a wide variety of Use Cases.</li>
        <li>Meet the previously defined goals in a remote-call efficient manner.</li>
</ol>
<h4><a name="APIchangestosupportadjunctroutingcomponents-APIChanges"></a>API Changes</h4>
<p>The API changes required by this design are highlighted in the class structure diagrams of Figures 1 and 2. Figure 1 introduces a GetEndpointLocators() operation to the LocatorRegistry interface. This, along with the new EndpointLocatorRegistryEntry class used to hand back EndpointLocators along with the ids used to register them, will allow an Adjunct Router to create a mirror copy of the system's available endpoint locators if it so chooses. Of course, an Adjunct Router could also choose to simply invoke the primary routing service's lookup() operation whenever it needs to look up an endpoint. </p>
<p>To fully support mirroring the cache of EndpointLocators, the LocatorRegistry also provides support for the new listener interface (via the add/remove listener operations.) </p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><span class="image-wrap" style=""><img src="/wiki/download/attachments/9568443/RoutingClassStructureDiagram-AdjunctRouting.png?version=1&modificationDate=1290467357885" style="border: 1px solid black" /></span></td>
</tr>
<tr>
<td class='confluenceTd'><div class="" align="center"><b>Figure 1. Changes to AsteriskSCF::Core::Routing</b></div>
</td>
</tr>
</tbody></table>
</div>
<p>Figure 2 shows the changes to the SessionCommunications APIs. </p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'><span class="image-wrap" style=""><img src="/wiki/download/attachments/9568443/Session-AdjunctRouting.png?version=1&modificationDate=1290467366092" style="border: 1px solid black" /></span></td>
</tr>
<tr>
<td class='confluenceTd'><div class="" align="center"><b>Figure 2. Changes to AsteriskSCF::SessionCommunications</b></div>
</td>
</tr>
</tbody></table>
</div>
<p><span class="image-wrap" style=""><img src="/wiki/download/attachments/9568443/Adjunct+Router+Registration+Sequence.png?version=1&modificationDate=1290467391553" style="border: 1px solid black" /></span></p>
<p><span class="image-wrap" style=""><img src="/wiki/download/attachments/9568443/RoutingSequenceDiagram-AdjunctRouting.png?version=1&modificationDate=1290467404813" style="border: 1px solid black" /></span></p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;">
<a href="https://wiki.asterisk.org/wiki/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/TOP/API+changes+to+support+adjunct+routing+components">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=9568443&revisedVersion=6&originalVersion=5">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/API+changes+to+support+adjunct+routing+components?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>