{ + }
Agenda 
• Intro to AEM 
• OAK 
• MongoMK
3 
What is AEM? 
A set of content management 
services built on a content-centric 
Web application framework on top of 
a Java Content Repository
4 
What’s inside? 
• Content Management Services - Author 
interfaces, workflow engine, etc. 
• Web Application Framework - Sling/OSGi 
• Content Services - JCR
5 
Key Principles 
• RESTful!! 
• OSGi driven 
– Web service registry 
– Track dependencies 
– Avoid collisions 
• Sling application framework 
– Content-driven 
– Scripting inside
6 
Technology Stack 
AEM Content Services 
Sling 
JCR 
OSGi
7 
Stack (continued) 
• Sling 
– Application Controller driven by URL and supporting RESTful 
communication 
• JCR 
– Java Content Repository 
– OAK 1.0.8 implementation 
• OSGi 
– Universal middleware, dynamic module system. 
– Service centric, component-based environment. 
– Standardized software life-cycle management
8 
AEM Content Services 
• CMS application: 
• creation, revision, publication, translation, archival and deletion 
• task management, portal management, collaboration 
• cooperative and automated business processes to move the 
content through its lifecycle 
• intelligent versioning of content as it moves through its lifecycle 
• Tech: 
• Ajax / JavaScript user interface, APIs, and libraries 
• Direct client-side JavaScript access to JCR content 
• Workflow engine – controls the processing of workflow instances 
– Workflow instances often control the process of generating and publishing 
content
9 
Sling 
• Maps content objects to components 
• Server-side and AJAX scripting support 
• Can be used with a range of scripting languages 
• JSP 
• ESP 
• Ruby 
• Scala
Sling architecture
URL Decomposition 
• Path – resource/servlet 
• Selector – servlet/function 
• Extension – Content format 
• Suffix path – additional info for processing 
• Params – additional info for processing 
protocol host path selector extension 
http:// myhost/ tools/spy .print.a4 .html / 
suffix 
a/b ? 
param(s) 
x=12
Architecture 
12 Matija Grguric 
https://www.flickr.com/photos/matijagrguric/4494622971/in/pool-lego
CQ5 Deployment – Topology 
Publish Delivery * 
13 
AEM 
CRX 
CDN* 
Load 
Balancer 
Dispatcher 
Dispatcher 
Cluster 
Forward & Reverse 
Replication of Content 
and Application Packages 
Visitor Traffic 
Cache Invalidation 
AEM 
CRX 
AEM 
CRX 
Content Delivery 
Network 
Cache Invalidation 
Author
14 
AEM Replication 
Author Publish 
Authors, Developers 
create Templates & Pages 
Activate/Publish 
Visitors request 
Pages
OAK 
a.k.a JCR 3 
15
Design Goals 
• Scalability 
– Support big distributed repositories 
– Improved write throughput 
– Parallel Writes 
• Support for more child nodes 
• Support for more ACLs 
• Built in clustering. Instead of built on top 
• OSGi friendly
OAK Architecture
MK 
• TarMK 
– Similar to TarPM without clustering and better 
performing. 
– Persists to Tar files 
• MongoMK 
– New, MVCC based persistence 
– Persists to MongoDB.
MongoMK 
• Exposes Micro kernel API 
• Implements a DocumentStore 
– DocumentMK and DocumentNodeStore 
• MVCC Approach 
• GIT/SVN-inspired DAG-based versioning model [0] 
• [0] http://wiki.apache.org/jackrabbit/RepositoryMicroKernel?action=AttachFile&do=view&target=MicroKernel+Revision+Model.pdf
MongoMK Data Structure 
• simple JSON data model 
• properties are name/value pairs 
• supported property types: 
– String 
– Number 
– Boolean 
– Array 
– BSON
MongoDB Nodes 
{ 
"_id": "10:/content/dam/geometrixx-media/articles/jp/2012/November/sparrow-post.txt/jcr:content/related", 
"_lastRev": { 
"r0-0-1": "r1497e6ac359-0-1" 
}, 
"_commitRoot": { 
"r1497e6ac359-0-1": "0" 
}, 
"_deleted": { 
"r1497e6ac359-0-1": "false" 
}, 
"_modified": NumberLong(1415165165), 
"jcr:primaryType": { 
"r1497e6ac359-0-1": ""nam:nt:unstructured"" 
}, 
":childOrder": { 
"r1497e6ac359-0-1": ""[0]:Name"" 
}, 
"_modCount": NumberLong(1) 
}
MVCC 
• In JCR 2 sessions always reflects the latest state of the 
repository. 
• In Oak a session reflects a view of the repository from 
the time the session was acquire 
Counter = 1 
Session 1 
Counter = 0 
Session 2 
Counter = 0 
getCounter()? 
returns 0 
Counter+1 = 1 
Time 
Counter = 1 
Counter+1 = 1 
JCR 
Counter = 0
Recommended deployment 
23
http://docs.adobe.com/docs/en/aem/6-0/deploy/recommended-deploys.html

Melbourne User Group OAK and MongoDB

  • 1.
  • 2.
    Agenda • Introto AEM • OAK • MongoMK
  • 3.
    3 What isAEM? A set of content management services built on a content-centric Web application framework on top of a Java Content Repository
  • 4.
    4 What’s inside? • Content Management Services - Author interfaces, workflow engine, etc. • Web Application Framework - Sling/OSGi • Content Services - JCR
  • 5.
    5 Key Principles • RESTful!! • OSGi driven – Web service registry – Track dependencies – Avoid collisions • Sling application framework – Content-driven – Scripting inside
  • 6.
    6 Technology Stack AEM Content Services Sling JCR OSGi
  • 7.
    7 Stack (continued) • Sling – Application Controller driven by URL and supporting RESTful communication • JCR – Java Content Repository – OAK 1.0.8 implementation • OSGi – Universal middleware, dynamic module system. – Service centric, component-based environment. – Standardized software life-cycle management
  • 8.
    8 AEM ContentServices • CMS application: • creation, revision, publication, translation, archival and deletion • task management, portal management, collaboration • cooperative and automated business processes to move the content through its lifecycle • intelligent versioning of content as it moves through its lifecycle • Tech: • Ajax / JavaScript user interface, APIs, and libraries • Direct client-side JavaScript access to JCR content • Workflow engine – controls the processing of workflow instances – Workflow instances often control the process of generating and publishing content
  • 9.
    9 Sling •Maps content objects to components • Server-side and AJAX scripting support • Can be used with a range of scripting languages • JSP • ESP • Ruby • Scala
  • 10.
  • 11.
    URL Decomposition •Path – resource/servlet • Selector – servlet/function • Extension – Content format • Suffix path – additional info for processing • Params – additional info for processing protocol host path selector extension http:// myhost/ tools/spy .print.a4 .html / suffix a/b ? param(s) x=12
  • 12.
    Architecture 12 MatijaGrguric https://www.flickr.com/photos/matijagrguric/4494622971/in/pool-lego
  • 13.
    CQ5 Deployment –Topology Publish Delivery * 13 AEM CRX CDN* Load Balancer Dispatcher Dispatcher Cluster Forward & Reverse Replication of Content and Application Packages Visitor Traffic Cache Invalidation AEM CRX AEM CRX Content Delivery Network Cache Invalidation Author
  • 14.
    14 AEM Replication Author Publish Authors, Developers create Templates & Pages Activate/Publish Visitors request Pages
  • 15.
  • 16.
    Design Goals •Scalability – Support big distributed repositories – Improved write throughput – Parallel Writes • Support for more child nodes • Support for more ACLs • Built in clustering. Instead of built on top • OSGi friendly
  • 17.
  • 18.
    MK • TarMK – Similar to TarPM without clustering and better performing. – Persists to Tar files • MongoMK – New, MVCC based persistence – Persists to MongoDB.
  • 19.
    MongoMK • ExposesMicro kernel API • Implements a DocumentStore – DocumentMK and DocumentNodeStore • MVCC Approach • GIT/SVN-inspired DAG-based versioning model [0] • [0] http://wiki.apache.org/jackrabbit/RepositoryMicroKernel?action=AttachFile&do=view&target=MicroKernel+Revision+Model.pdf
  • 20.
    MongoMK Data Structure • simple JSON data model • properties are name/value pairs • supported property types: – String – Number – Boolean – Array – BSON
  • 21.
    MongoDB Nodes { "_id": "10:/content/dam/geometrixx-media/articles/jp/2012/November/sparrow-post.txt/jcr:content/related", "_lastRev": { "r0-0-1": "r1497e6ac359-0-1" }, "_commitRoot": { "r1497e6ac359-0-1": "0" }, "_deleted": { "r1497e6ac359-0-1": "false" }, "_modified": NumberLong(1415165165), "jcr:primaryType": { "r1497e6ac359-0-1": ""nam:nt:unstructured"" }, ":childOrder": { "r1497e6ac359-0-1": ""[0]:Name"" }, "_modCount": NumberLong(1) }
  • 22.
    MVCC • InJCR 2 sessions always reflects the latest state of the repository. • In Oak a session reflects a view of the repository from the time the session was acquire Counter = 1 Session 1 Counter = 0 Session 2 Counter = 0 getCounter()? returns 0 Counter+1 = 1 Time Counter = 1 Counter+1 = 1 JCR Counter = 0
  • 23.
  • 24.

Editor's Notes

  • #8 OSGI Set of specifications that define a dynamic component system for Java Specifications enable you to: Development model where applications are (dynamically) composed of many different (reusable) components Components hide their implementations from other components while communicating through services, which are objects specifically shared between components Application emerges from assembling multiple reusable modules that have no a priori knowledge of each other Benefit of OSGI Code is easier to write and test Reuse is increased Build systems become significantly simpler Deployment is more manageable Runtime provides an enormous insight into what is running