Understanding publishing in xmCloud and Experience Edge

Understanding publishing in xmCloud and Experience Edge

This article is aimed at people who are new to the xmCloud. Understanding how publishing works and informing your customers about the possible challenges is essential.

Disclaimer: The article describes the current behavior of publishing, xmCloud is fast fast-growing product and the described behaviour may change in the near future.


XmCloud vs. Experience Platform

In Experience Platform, publishing basically copies the items from the master database to the Web Database. When the requests come to the content delivery server, the content of the page will be generated based on the presentation details, and the data sources that are in the web database.

Basically, the page item and all of its data sources need to be present in the web database and the page composition and rendering will happen on the content delivery server.

This process will change when you are using xmCloud and Experience Edge. During the publishing, the rendered layout of the page will be published to the experience edge.

Basically, the experience edge contains static content, when it receives a layout query, it will return the whole page content, without doing any pre- or post-processing.  To understand better, for example, you can publish the home item without its referenced data sources,  and you will have the whole page with its content on the Experience Edge.

There is no Web database in xmCloud (not in use) and Publishing in xmCloud is much more involved.

During the publishing process, the layout of the page will be rendered and the rendered result will be pushed to the experience edge. When the frontend application needs to access a page, it will send a layout query to Experience Edge and will get the whole contents of the page.

What does that mean in practice?

As discussed before, the new platform has its benefits, because during the publishing, the rendered layout is published to the Edge, and there is no need for any kind of pre- or post-processing. This brings a big performance gain.

But it also has some challenges:

  • The publishing process needs to establish a RPC connection between xmCloud and Experience Edge, which may take between 5-15 Seconds. That means no matter, if you publish a single item or 100, you will have this waiting time.
  • The rendering of the page is happening during publishing and as a result, the Edge will contain the static contents. It means, for example, when a commonly used element is updated, for example, Header/Footer, then you need to republish the whole site. (KB1003078)

Hints to Speed Up Publishing

In the way the publishing works, you need to disable related item publishing, to do that you can use this config:

    <settings role:require="XMCloud">
      <setting name="ExperienceEdge.ProcessRelatedItems" set:value="false" />
    </settings>

Try to do less and bigger publish instead of multiple smaller publishes.
In some cases full site publish could be much faster than multiple smaller pulishes.

Manage your dependencies on the rendering object, using Content Dependency field (KB1003056).

Looking forward

As mentioned the xmCloud is improving, and certainly, we will see some improvement.

My wishes are:

  • Page Composition / Rendering will be moved to Experience Edge/JSS, which will solve the content update issue with publishing.
  • Create publishing services for xmCloud, By offloading the publishing jobs to another service, we will get performance gain on CM and Sitecore pages.