Skip to content

Instantly share code, notes, and snippets.

@cpilsworth
Last active September 16, 2015 18:04
Show Gist options
  • Save cpilsworth/08573c881788f8dbd5c2 to your computer and use it in GitHub Desktop.
Save cpilsworth/08573c881788f8dbd5c2 to your computer and use it in GitHub Desktop.
Comparison of the Two Stack CMS pattern with Adobe Experience Manager

Adobe AEM - Two Stack CMS comparison

TL;DR

The architecture outlined by Martin Fowler in his Two Stack CMS article is very similar to that used by Adobe AEM. One key difference is that AEM does not split out a separate "preview layer", so that content can be previewed as it is being prepared.

Overview

The main theme is the separation of the authoring and publishing environments, something that is native to the AEM deployment model. This arises from the vastly different usage patterns for each of these services.

On the author instance provides controlled access for a small group of users to author/review/approve content according to their permissions as part of a flexible workflow process.

Publish instance are designed to scale independently of the authoring environment as potentially large numbers of users will require read-only access to the information published.

In the Two Stack CMS there are separate RESTful APIs for publishing and delivery. AEM provides a common RESTful API in the form of the Apache Sling and through lower-level standards like the JCR API.

One key difference is the separation of the "preview" environment from authoring in the Two Stack CMS architecture. AEM does not have this separation, instead allowing content authors/reviewers/approvers to preview the content within the authoring environment.

An advantage of this approach is that content pages can be previewed as they are being created/edited giving authors fast feedback on the content as it is being prepared. As Martin mentions in his learnings, it can be frustrating for editors who don't get that feedback early.


Point-by-point comparison

Below are some tof

Traditional CMS designs conflate two diverse needs

  • Editing
  • Publishing

AEM recognizes the distinct needs of content authors and content consumers. This is reflected in it's deployment model where author and publish instances are deployed independently.


Availability & Scalability very different

This matches the AEM one-to-many author -> publish deployment model. Typically there is only one author instance, whereas the publish instances can scale horizontally to cater the needs of the site.


  • We need a secure preview for the content we are going to publish
  • We split the CDS into separate slices for preview and live

This is similar to the AEM approach, although AEM allows content preview on the author servers. Authors are able to see exactly how the page will look on the published site and reviewers may annotate as part of a review/approval workflow. This is accomplished by using the same custom rendition logic on both the author and publish instances.

  • CDS Preview = AEM author preview mode (view content in "published like" state)
  • CDS Live = Publish instance

The preview slice is secured

Access to reviewers/approvers in is controlled AEM such that only users with sufficient permissions may access the site. They can be granted access (if required) to annotate or approve the content for publication through role based access control.


Content metadata controls flow to preview and live

This is analogous to approval workflow & publish start end dates in AEM


We need to coordinate workflow for content creation and delivery

Independent tools for translation (e.g. Clay Tablet), transcoding (e.g. BrightCove) can be integrated into AEM flexible translation/workflow model


Adapter layer

AEM has a replication layer that transfers content between the authoring & publish stages once publication workflows have completed.


The Content Delivery Stack consists of independently evolvable components

  • AEM provides a common RESTful api for storing/retrieving information rather than creating separate Content Publishing API (author) and Content Delivery API (publish).
  • David's model allows publishing to evolve indepently from delivery through data driven, schema-less approach.
  • AEM can also use MongoDB as it's NoSQL document database.
  • Roy Fielding, the inventor of the REST architectural style contributed to AEM's Apache Sling's RESTful style
  • AEM keeps the clear separation of publishing/delivery even into persistence

We use replication and caching on the live infrastructure to maximize availability and performance

  • Replication approach in analogous to the scaling out AEM publish horizontally with AEM
  • AEM utilizes caching at AEM, Dispatcher, CDN & browser to maximize performance/availability
  • Blue/Green deployment approach is supported within AEM
  • Scene7 is used in Two Stack CMS, this is integrated into AEM

Conclusion

Users of Adobe AEM will have recognised many of the patterns found within Martin Fowler's Two Stack CMS presentation. These are patterns that have been proven on many successful implementations of the product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment