What is publishing?
Content (items) in Sitecore must be published before it is available on the website. Publishing can happen automatically (e.g. at the end of a workflow) or manually in the content or experience editor.
When working in the Sitecore content management environment, the data (items, fields …) is saved in the “Master” database. The publish process will copy this data from the Master database to another database, defined by the publishing target and used by the website. The default publishing target (internet) in Sitecore will copy the data to a database called “Web”.
Publishing as we know it
Sitecore editors will know that at the moment there are several options for publishing. You could publish the whole site (please don’t ), or just one item – together with its children and/or related items. Furthermore, you had to choose between a “smart” publish, an incremental or republish. The mechanism is explained in detail on the Sitecore documentation site.
Editors that had to publish large(r) parts of content at once will recognize these screens:
Waiting for the final screen while the number of processed items goes up… and up. And then finally it’s done!
While working with multiple editors simultaneously and publishing, you might have gotten the message that you were in the “queue” – waiting for publishes from other people to finish. Like buying concert tickets, but fortunately without the sold-out option. Your publish job would happen eventually and what lots of people didn’t know is that you could actually just close the window. The publishing then would run in the background but without feedback, so you wouldn’t get any notification when it’s finished.
New: the Sitecore Publishing Service
Brand new and only available on the latest Sitecore versions is the Sitecore Publishing Service. There are already a few blogs written on how to set it up, how it works (with manifests) and even with very detailed performance comparisons. I’m not going into those technical details here, but instead I will focus more on what we encountered while testing and what it might mean for Sitecore users.
The Publishing Service is not installed by default. It is a separate module that can be downloaded –free of charge- and installed. Version 2 has a requirement on Sitecore v8.2-update2 (v1.1 can run from 8.2 initial). The module will replace the entire publish mechanism. The actual publish work is now done by a separate application (.net core) that runs next to your website.
We had some issues installing a 1.1 version, but version 2.0 was installed quick and smooth. And then we had our new ‘Publishing’ shortcut on the Launchpad. The Sitecore ribbon shows the familiar publish buttons, and has one added: a button for the “Publishing Dashboard” .
Let's take a look at this new Dashboard.
The dashboard will show information on “jobs”. A job is a publish action, triggered by someone at a certain time. We can see the active job, the jobs in the queue –waiting to be processed- and the recent jobs. It is not a complete archive, but it does give a good overview on the status of the latest publishing actions on the site.
The active job will give you details about the publish request, but it will not show you a process indication. Luckily jobs usually finish so fast that it isn’t necessary.
The publish dialog looks a bit different as well. There are no publish-types anymore. The options you have still enable you to publish sub-items and/or related items, languages and targets. The logic behind these options did not change.
The change comes after you clicked on the “Publish”. When we used to get a dialog telling us to wait… (time for a coffee?) we now get this:
The beauty is: it’s there instantly. No more waiting. Does this mean the actual publish is already done? No.
We can see the status in the publish dashboard if we want to and/or just close the dialog and continue working. We can go back to the dashboard at any time to verify the publish job status.
Another feature disappeared: a regular editor cannot publish everything at once. It did happen that someone (by accident or not) started to publish the whole site, sometimes over a million items. Especially in bigger sites with maybe lots of languages, this could take a while – and in the meantime everyone else was “queued”. Not knowing for how long…
Administrators can still publish everything, and trough configuration those rights can also be given to a regular user role if needed.
The “publish all items” dialog will give a nice warning (that it might take some time and resources).
We tested the performance of the Publishing Service with a full publish of a rather small site, but with quite some languages. As mentioned before, it was not our intention to create a full and extensive performance test but we do want to give you an idea. Publishing the test site without the service took us approximately 12 minutes. The exact same site was published with the Publishing Service in less than one minute.
What’s the catch?
Your site will not explode when trying to publish, but we did encounter some issues in the current version:
- We use an advanced custom cache mechanism in our projects, based on the publish events. The Publishing Service has its own event, but now also supports the previously existing events. We tested our cache module without making changes and it only works partly. A small bug was found in the new implementation of the event we use, causing the code not to receive all languages that were published. So when publishing just one language, all is fine – otherwise the cache is only cleared for the first language. It has been reported and is on the bug list now, so once fixed our cache module will work flawlessly, regardless of the publish method used.
- The “Publishing Agent” – a mechanism in Sitecore to publish at certain intervals, mostly used to get scheduled publishing – does not seem to work with the default settings of incremental publishes. This will only be an issue on environments where this setting is enabled (default is off). This one is now also on the backlog of the Publish Service team.
The Publishing Service looks very promising. There are a few (minor) issues still, but the performance gain is huge. If you want to use it, we would strongly advise to upgrade to the latest Sitecore version and use the latest version of the service. In doing so, you can kill two birds with one stone, get the latest out of Sitecore while lifting your publishing process to the next level.