new repository in aem 6 by michael marth
TRANSCRIPT
New Repository in AEM 6and other goodies for developers
Michael Marth, Adobe
About @michaelmarth
Senior Engineering Manager at AdobeResponsible for Granite platform
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Before we start
3
Certifications
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Scalability Oak
4
AEM 6.0 Content Repository
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
AEM 6.0 Content Repository
Goals Scalability
Big repositories Distributed, many cluster nodes
Write throughput Parallel writes Write performance
Many child nodes Many ACLs
5
Project “Oak” aka Jackrabbit 3, all open source Apache Software Foundation
http://jackrabbit.apache.org/oak/ Implementation of the JCR spec, JSR-283
Your apps run unchanged
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Architecture
6
JCR
oak-core
Micro kernel
Oak API
Micro kernel API
1 per language
1 in Java
Many
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Microkernel choose according to your scalability and performance requirements
7
jjjJCR Content Repository
Persistence
AEM
TAR
Performance Optimized and Made for Scale
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Node Store Where nodes get stored
8
Nodes Binaries
• Tar MKTar files, locally
• MongoMKMongoDB
• …(other are WIP)
oak-core
JCR
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Data Stores Where the binary data gets stored
9
• File System (local, NAS, SAN)shareable
• S3for AWS deployments
• In Tar fileseasier backup and ops
• In MongoDBeasier backup and ops
oak-core
JCR
Nodes Binaries
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
TarMK Memory-mapped files
10
92 GBunused
CQ5.x Tar PM 100GB RAM in Server
8GB JVM
AEM6 Tar MK: 100GB RAM in Server
8GB JVM
92 GB off-heapused for running the repo from RAM
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
MongoMK Cluster Deployment Topologies
11
MongoS
AEM with Oak
MongoD PrimaryMongoD
SecondaryMongoD
Secondary
MongoDB replication
r/w r r
MongoS
AEM with Oak
MongoS
AEM with Oak
Share
Noth
ing
Share
Noth
ing
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Micro Kernels Which one shall I use?
12
AEM6 Author
default: TarMKlocal, fast, easy to operate
“I need reliability”: TarMK + Failover instanceHTTP-transported copy of instance, failover switch e.g. Nagios
“I need scalability”: MongoMK ClusterScale CPU (many AEM instances)Scale read throughput (many Mongo replicas)Scale globally (distribute replicas globally)
“I cannot change the repository”: Remain on CRX2 ClusterSupported, but deprecated
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Micro Kernels Which one shall I use?
13
AEM6 Publish
Primary use case is Publishing: TarMK as a “Farm” (independent instances)fast, independent, easy to operate
Primary use case is User Generated Content: MongoMK in a Publish Clusterall Publish instances running on same MongoDB
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Search Pluggable Index Providers
14
• Property Index Providerstored in repo, backup’edsync/asyncre-indexable asynchronouslyordered indexes
• Lucenefull-text extractionstored in data store
• Solrin JVM (OSGi runtime) or remote (for production)native queries language exposed
oak-core
JCR
MK
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Search Configurable Indexes
15
• Index Definition via nodesnot everything indexed by default anymoreallows smaller, specialized, faster indexesno need to index nodes you do not search for
• In AEM: pre-configured indexes for AEM itself
• Define custom indexes for your application’s needswithout an index the repo will be traversed on a query
oak-core
JCR
MK
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Numbers Performance & Scalability
16
TarMK running on my MacBook (i.e. totally unscientific)• add nodes, session.save() for each node: xxx nodes added / sec• add nodes, batch save(): xxx nodes added / sec• add property, catch save(): xxx properties added / sec• import files from Wikipedia, flat hierarchy:
MongoMK running on our Jenkins server• 1 Oak instance on MongoMK: nodes added / sec…• 3 Oak instances on MongoMK: nodes added / sec… (factor yyy)• 5 Oak instances on MongoMK: nodes added / sec…(factor yyy)
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Performance & Scalability Some Hints
17
Observations in a Cluster• Many Oak instances, high write throughput needed• Be mindful of observation listeners
• Only listen to local events• Restrict paths you listen on
Many child nodes• Many child nodes, high write throughput• Be mindful of sorted node types
• nt:unstructured is sorted• oak:unstructured is not
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Efficiency We ♡ Sys Admins
18
Operations Dashboard
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Project Efficiency Granite Operations Dashboard provides control over system health, diagnosis and maintenance automation, efficiently and extensible.
19
Main features:• System health overview at a glance• Reducing time to find, analyze and fix issues• One-Click System Status to help file AEM Support tickets• Maintenance automation to reduce project operations
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 20
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 21
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 22
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 23
DEMO
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Efficiency We ♡ Sys Admins
24
One-Click Setup
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Project Efficiency One-Click Setup instantly fires up AEM instances in the cloud right
25
Main features:• Ready-made AEM configurations• Spins up machines in AWS – you maintain full control of the
machines
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 26
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 27
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 28
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 29
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 30
DEMO
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Efficiency We ♡ Developers
31
Developer Mode
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Project Efficiency Developer Mode
32
Main features:• Inspect component performance right in the page• Run automated tests• Inspect component errors right in the context of the page
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 33
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 34
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 35
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 36
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 37
DEMO
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Efficiency We ♡ Developers
38
Eclipse Tooling
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 39
DEMO
What else is coming up
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 41
SightlyBeautiful Markup
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 42
MobilePhoneGap Enterprise
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 43
one more thing™
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sneak Peak
44
Granite.JSaka AEM Micro Engine
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Granite.JS Granite Javascript Platform
45
Main features:• Lightweight, scripting server stack• REST based content-driven web framework for server-side
JavaScript development• Runs Sightly• Based on Node.js
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Granite.JS Architecture
46
jjj
Coral UI / Sightly
Sling
AEM
Granite/AEM - Java
Oak
REST
Microkernel (Java)
OSGi
jjj
Coral UI / Sightly
Sling.JS
Granite.JS – Node.JS
Repository
REST
Microkernel (C)
NPM
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Granite.JS Use Case (I) – Web Developer in AEM Projects
47
UI Dev
codes
Sightly,CSS, etc
Brackets Grunt Granite.JS
Java Dev
codes
Java,OSGi services
Eclipse Maven Granite/AEM
gitpushMaven AEM Production
Pkg
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 48
DEMO
Thank for your attention