<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2042/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/Replication+of+Configuration+Changes">Replication of Configuration Changes</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~kpfleming">Kevin P. Fleming</a>
</h4>
<div id="versionComment">
<b>Comment:</b>
copy editing and clarifications<br />
</div>
<br/>
<h4>Changes (11)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-unchanged" >h3. Overview <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">[State Replication|State Replication] and [Configuration|Configuration Pattern] are described on other pages in this section. This page describes how configuration is pushed to all components in a replica group (i.e. the active component, and it's related standby component.) <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">The [State Replication|State Replication] page describes the general replication process used in Asterisk SCF component replica groups, and the [Configuration|Configuration Pattern] page describes the pattern used to provide configuration elements to Asterisk SCF components. This page describes how configuration elements can be pushed to all instances of a component in a replica group (i.e. the active instance, and any standby instance(s)). <br></td></tr>
<tr><td class="diff-unchanged" > <br>h3. Description <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">As seen in Figure 1 below, the StateReplicator will create an IceStorm topic during initialization to enable forwarding ConfigurationService operations to all components within a replica group. The StateReplicator registers a proxy to the topic with the ServiceLocator using the same parameters that the component would have used to register its ConfigurationService interface if it had been brought up outside of a replica group. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">As seen in the sequence diagram below, the StateReplicator will create an IceStorm Topic during initialization that it can use to forward ConfigurationService operations to all component instances within a replica group. The StateReplicator registers a proxy for the Topic with the ServiceLocator, using the same parameters that the component would have used to register a proxy for its own ConfigurationService interface if it was configured to operate in standalone mode. <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;">When an Asterisk SCF component is brought up as part of a replica group, it will register its ConfigurationService interface with its StateReplicator rather than directly with the ServiceLocator during initialization. The StateReplicator will subscribe the ConfigurationService proxy to the configuration-related Topic created during initialization. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">When an Asterisk SCF component instance is brought up as part of a replica group, it will register a proxy for its ConfigurationService interface with its StateReplicator, rather than directly with the ServiceLocator. The StateReplicator will subscribe the supplied proxy to the ConfigurationService forwarding Topic. <br></td></tr>
<tr><td class="diff-unchanged" > <br></td></tr>
<tr><td class="diff-changed-lines" >After each of the initialization sequence vignettes has completed, <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Figure 1 shows</span> the <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">Component's</span> <span class="diff-added-words"style="background-color: #dfd;">sequence diagram shows a</span> Configurator accessing the ConfigurationService interface <span class="diff-added-words"style="background-color: #dfd;">via a proxy retrieved</span> from the ServiceLocator. Since the StateReplicator registered <span class="diff-added-words"style="background-color: #dfd;">a proxy for</span> the Topic as the ConfigurationService, the configuration data is pushed to all of the components in the replica group, transparently to the Configurator. <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;">While it isn't shown on the diagram, the StateReplicator can add its own listener to the topic, which it would use to maintain a cache of the current configuration state. This cache would be pushed to each component's ConfigurationService interface as part of the registration process in the StateReplicator, before it is subscribed to the topic. This will allow late-joining components to be placed into the same configuration as the components that were initialized prior to any Configurator operation. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">While it isn't shown on the diagram, the StateReplicator can add its own listener to the Topic, which it would use to maintain a cache of the current configuration state. If a component instance joins the replica group after a Configurator has provided some configuration elements to the group, this instance would need to be supplied those elements to bring it into synchronization with the other instances in the group. The State Replicator would use the cached configuration state to provide the 'current' configuration to the newly-started instance, before joining it to the IceStorm Topic. This will ensure that the instance is properly configured before it receives any additional configuration elements forwarded through the Topic. <br></td></tr>
<tr><td class="diff-unchanged" > <br>| !ConfigReplication.png|border=1! | <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">| {center}{*}Figure 1. Configuration Replication{*}{center} | <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">| {center}{*}Sequence Diagram of Configuration Replication{*}{center} | <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h3><a name="ReplicationofConfigurationChanges-Overview"></a>Overview</h3>
<p>The <a href="/wiki/display/TOP/State+Replication" title="State Replication">State Replication</a> page describes the general replication process used in Asterisk SCF component replica groups, and the <a href="/wiki/display/TOP/Configuration+Pattern" title="Configuration Pattern">Configuration</a> page describes the pattern used to provide configuration elements to Asterisk SCF components. This page describes how configuration elements can be pushed to all instances of a component in a replica group (i.e. the active instance, and any standby instance(s)).</p>
<h3><a name="ReplicationofConfigurationChanges-Description"></a>Description</h3>
<p>As seen in the sequence diagram below, the StateReplicator will create an IceStorm Topic during initialization that it can use to forward ConfigurationService operations to all component instances within a replica group. The StateReplicator registers a proxy for the Topic with the ServiceLocator, using the same parameters that the component would have used to register a proxy for its own ConfigurationService interface if it was configured to operate in standalone mode.</p>
<p>When an Asterisk SCF component instance is brought up as part of a replica group, it will register a proxy for its ConfigurationService interface with its StateReplicator, rather than directly with the ServiceLocator. The StateReplicator will subscribe the supplied proxy to the ConfigurationService forwarding Topic.</p>
<p>After each of the initialization sequence vignettes has completed, the sequence diagram shows a Configurator accessing the ConfigurationService interface via a proxy retrieved from the ServiceLocator. Since the StateReplicator registered a proxy for the Topic as the ConfigurationService, the configuration data is pushed to all of the components in the replica group, transparently to the Configurator. </p>
<p>While it isn't shown on the diagram, the StateReplicator can add its own listener to the Topic, which it would use to maintain a cache of the current configuration state. If a component instance joins the replica group after a Configurator has provided some configuration elements to the group, this instance would need to be supplied those elements to bring it into synchronization with the other instances in the group. The State Replicator would use the cached configuration state to provide the 'current' configuration to the newly-started instance, before joining it to the IceStorm Topic. This will ensure that the instance is properly configured before it receives any additional configuration elements forwarded through the Topic.</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> <span class="image-wrap" style=""><img src="/wiki/download/attachments/13076604/ConfigReplication.png?version=3&modificationDate=1306250985034" style="border: 1px solid black" /></span> </td>
</tr>
<tr>
<td class='confluenceTd'> <div class="" align="center"><b>Sequence Diagram of Configuration Replication</b></div>
</td>
</tr>
</tbody></table>
</div>
</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/Replication+of+Configuration+Changes">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=13076604&revisedVersion=7&originalVersion=6">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/Replication+of+Configuration+Changes?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>