StateSyncService

Release 1.0 - ...

The StateSyncService serves in fact just one purpose, which is to enable the publication engine to receive state-change notifications from the cms server instance. Since adding and changing content items is (mostly) performed on the cms server instance using the manager, the publication engine is unaware of these changes.

However, using a customized version of Outscaling, a more-or-less standard Outscaling configuration is used to notify the publication engine of any state-changes of interest. The StateSyncService provides the endpoint for the publication engine to which the cms server instance will send the notification messages.

So, whenever an item is added or changed (and saved in an active state), the Outscaling background component on the cms server instance will detect this change and send a contentchange.activation event notification message to the StateSyncService of the publication engine.

At this time, it must be clear that a proper Outscaling configuration is imperative in order to both the cms and publication server instances working together.

Interop Client

As is the case for the InteropService, whenever Outscaling needs to call the StateSyncService it does not call it directly, but uses an Interop client provided by the Smartsite.InteropServicesClient.dll assembly. This way, WCF to WCF communication can be used, which i.e. enables the usage of named pipes.

Configuration

As for all WCF services hosted in the publication engine, the StateSyncService configuration itself is limited to the web.config configuration file. The example below shows the system.serviceModel section with just the necessary configuration elements for this particular service.

XML CopyCode image Copy Code
<system.serviceModel>
 <services>
  <service name="Smartsite.Core.Services.StateSyncService">
   <endpoint address="net.pipe://localhost/sitename/StateSyncService" binding="netNamedPipeBinding"
    bindingNamespace="http://Smartsite.Webservices.StateSyncService"
    contract="Smartsite.Core.Services.IStateSyncService" />
  </service>
 </services>
</system.serviceModel>

The name of the service element reflects the namespace-scoped class-name which provides the StateSyncService, whereas the contract attribute of the endpoint element reflects the interface implemented by this service (it is generally considered good practice to use an interface definition for the contract of a particular service).

Note that sitename in the address attribute of the endpoint element should be substituted with your site's name.