ASP.NET, CMS

Sitecore Publishing Service

The Sitecore Publishing Service is a module which is an optional replacement for the existing Sitecore publishing. This module increases publishing throughput, reduces the amount of time spent on publishing large volumes of items, and offers greater data consistency and reliability. It also improves the user experience and provides better visual transactions to the user on the state of the publishing system. The Publishing Service does not use any of the features, pipelines, and settings in the current publishing system, it is an entirely new way of publishing Sitecore items and media.

Sitecore has launched Publishing Service Module 1.1 along with Sitecore 8.2. Latest version of publishing service available on Sitecore website is Sitecore Publishing Service 3.0 Update-1. Publishing Service Module 1.1 is compatible with Sitecore 9 and it is based on Windows Server Hosting (.NET Core).

 

Sitecore Publishing Service Module Package

This Sitecore package contains the UI and the different items that are required for the publishing dashboard to work and to override the default publishing mechanism with the new one.

Configuring the Publishing Service

Basically, the above diagram describes:

  • Content Authors work on the Content Management Servers.
  • The items are retrieved and saved to the Source database so that those items will be available for editing.
  • The processing server is where different jobs are executed so that it removes the processing from the Content Management Servers. It also updates the Target databases.
  • All visitors hit the Content Delivery(CD) servers which will fetch the contents from the Target databases to serve the visitors.

A more detailed flowchart is given below.

Features of Sitecore Publishing Service

  • Single item publish
  • Publish related items
  • Support for multiple targets
  • Support for publishing in parallel
  • Support for publishing across data centres
  • Publish restrictions awareness
  • Ability to publish media
  • Cache clearing mechanism (data/html cashes)
  • REST API for the controlling service

Differences from standard publishing:

  • New Publishing Service Module processes items in bulk and will therefore not emit the same publishing events as current mechanism
  • New Publishing Service Module does not use the current publishing pipelines
  • At the end of a publish operation the publishing service will raise a bulk publish end event. There is also an option to get a list of published items.

 

Manual Installation

The latest update can be downloaded from here : https://dev.sitecore.net/Downloads/Sitecore_Publishing_Service/31/Sitecore_Publishing_Service_31_Update1.aspx

Extract the Sitecore Publishing Service inside the wwwroot directory. Example:

C:\inetpub\wwwroot\PublishingService

Once extracted, we need to open the IIS to setup the site. Follow the below procedure to create and configure the host service:

  1. To add a new website, right click on the Sites.
  2. Fill in the different fields from the opened popup.

Now, go to the Application Pools. Right click on our newly created website app pool and select the Basic Settings to update the .NET CLR version to No Managed Code.

Add the domain in our host file along with the respective IP address as follows:

127.0.0.1    local.publishingservice.com

We need to update the connection strings of the Sitecore Instance we want to use. We need to add the attribute ‘MultipleActiveResultSets=True’ to the Core, Master and Web databases in ConnectionStrings.config present at Website/App_Config folder.

Core

connectionString=”user id={userId};password={Password};Data Source={Datasource};Database=SitecorePublishing_Core;MultipleActiveResultSets=True;“

Master

connectionString=”user id={userId};password={Password};Data Source={Datasource};Database=SitecorePublishing_Master;MultipleActiveResultSets=True;“

Web

connectionString=”user id={userId};password={Password};Data Source={Datasource};Database=SitecorePublishing_Web;MultipleActiveResultSets=True;“

Once this is completed, we need to make the Host Service to access the database of the Sitecore Instance. Go to path C:\inetpub\wwwroot\PublishingService\config\global and create a file name sc.connectionstring.xml and paste the following connections in it.

The above connection string will allow the Host service to get access to the databases of the Sitecore Instance. When the schematool.exe has run, it will upgrade and install the databases. Please see following steps to creation and upgradation of the databases:

  1. Open the Command Prompt with Admin rights.
  2. Navigate to the directory of the publishing host service. Example: cd C:\inetpub\wwwroot\PublishingService
  3. Run the command schematool upgradeto upgrade the databases schema.

 

To see if the Host Service has been installed and configured correctly, go to the following url http://{site url}/api/publishing/operations/status and we need to have a response of {“status”:0}

The configuration of the Host Service has completed. Install the Sitecore Publishing Service module on our Sitecore Instance. Once this is installed, from the Launchpad we will see the Publishing Icon. But before clicking on the Publishing Icon, we need to specify the link between the Host Service and the Publishing Module. In order to achieve this, create a new configuration file and name it z.PublishingService.config. Paste the setting for link  in the config file as shown below:

 

Place the configuration file to the path ‘Website/App_Config/Include/‘. Reload our Sitecore Instance and click on the publishing icon to navigate to the Publishing Dashboard.

If no errors are shown, then the module has been installed properly. This module will now override the default publishing manager.

Advantages of Sitecore Publishing Service

Better User Experience – A user doesn’t need to wait for the publishing to end. The dialog doesn’t hold the user. On completion, it displays, go to Publishing Dashboard to check the status.

Enhanced User Feedback – We get details of all the Publishing Jobs at a centralized location – the Publishing Dashboard. We also get required details when we click on a Job and fetch Job Details.

Increament in Publishing Speed – Reduction of the amount of time that Sitecore takes in the publishing of the items, leading to increased throughput.

About The Author

Leave a Reply

*