AEM Technology Stack
In this article we will discuss about AEM Technology stack. After reading this article you should be able to understand
- Application stack, Architectural layers and Supporting platforms in Adobe Experience Manager
- Learn basic principles of Java Content Repository (JCR), Apache Sling, OSGi Framework
- Articulate which role plays every framework and technology involved in Adobe Experience Manager application
AEM Application Stack
AEM is implemented as a Java web application. It translates any server which supports Java servlet API 3.1 or higher.
AEM comes pre-configured with its own built-in servlet engine but can also be installed in any compatible third party application server, because system can be accessed from any computer with modern web browser, no installation of client software is required.
AEM is platform with Out-of-the-box functionality, component library, and set of application services, however majority of project requires custom development which will resolve into custom project code which extends out-of-the-box functionality and adopts it to the projects need.
AEM Architecture
AEM Architecture consist of three major layers
- Apache Sling RESTful Application Framework
RESTful application framework responsible for HTTP request processing based on Apache Sling. - OSGi Application Runtime
Fully OSGi Java based modern modular application stack is dynamic library management implementation of Apache Felix. - Java Content Repository (JCR)
Java Content Repository (JCR) persistence layer with Access Control, Versioning, Search Observation etc. Implementation of Apache Jackrabbit Oak, is various persistence options supported such as TAR files, MongoDB, Relational Database and S3.
All these running in Servlet Container or Java EE Application Server.
Key Principles
- 100% Java
AEM is 100% Java based, supports only “Long Term Support” (LTS) releases. Java 9 and 10 are non-LTS releases by Oracle. Adobe will only provide support for LTS releases of Java to run AEM in production. Therefore Java 11 is the recommended version to use with AEM 6.5.
AEM can be deployed in standalone mode it includes an integrated Jetty web server or as a web application WAR file within third party application server such as JBoss, WebLogic, WebSphere etc.
It is platform independent can be installed on both Windows and Linux. - Base on Standards
It is based on standards
JSR-283 –Java Content Repository (JCR) –for content storage
OSGI –Dynamic Module System for Java
Servlet API 3. - Open Source
AEM is commercial product based open source technology, all frameworks that laid in fundamental are open source such as Apache Jackrabbit Oak, Apache Felix, Apache Sling and Apache Tika.
Adobe Granite / CRX
- Adobe Granite / CRX is enterprise version of Content Repository.
- It is based on Apache Sling/Felix/JCR.
- It Provides following additional features:
- Package Manager
- Additional persistence Plug in (Tar, Oracle, MySQL, DB2)
- UI for all JCR operations including version management,
- node type management, user management
- CRXDE light code management tool, Maven plug-ins
- Repository Backup / Restore and Clustering Support
- Replication
- Security, LDAP Support
- Operation support (Tar optimization), Monitoring (JMX)
Java Content Repository
JCR or Content Repository API for Java, is a specification for Java platform application programming interface to access content repository in uniform manner.
According to the specification, JCR API defines an abstract model and a Java API for data storage and related services commonly used by content-oriented applications.
JCR is a type of object database, they are used to storing session and retrieving hierarchical data, and in this scenario hierarchical structural storage common service of the content repository are versioning, access control, full-text search and event monitoring.
JCR provides generic application data store for structured and unstructured content combining the best of those.
- File systems provide excellent storage for unstructured, hierarchical content.
- Databases provide excellent storage for structured data due to transactional services and referential integrity functionality.
The JCR provides the best of both data storage architectures, plus observation, versioning, and full text search.
In the context of AEM it uses Apache Jackrabbit Oak JCR implementation and supports various persistence options such as TAR file, MongoDB, relational database, S3 structure.
JAVA CONTENT REPOSITORY – JSR-283 STANDARD
Inside JCR repository content is organised into one or more workspaces, each of which holds a hierarchical structure of node and properties. Beginning with a root node at the top here it makes directory structure of file system.
- Each node can have zero or more child nodes and zero or more properties.
- Properties do not have children but do have values.
The main features of JCR repository model are
- Repository consist of one or more workspaces.
- Each workspace consist of hierarchy nodes and properties.
- Node has properties can addressed by path.
- Node can also be directly addressed by unique identifiers.
- Properties stores the actual content of the repository.
- Nodes provide the structural organisation of the content.
- Properties have types and nodes also have types.
- Node type governs which properties in sub nodes it may or must have.
- Node types can be used to enforce constraint on content structure but JCR supports pre-formed unstructured content.
APACHE JACKRABBIT OAK – JCR IMPLEMENTATION
Starting from AEM 6.x version it’s using new JCR implementation- Apache Jackrabbit Oak. Implement standards like JCR, WebDAV, JSOP and CMIS. It states sessionless support multi-version concurency control model where each session is a snapshot of repository and easily accessible from various platform. Main goals of Jackrabbit Oak implementation are
Scalability: to support big repository and distributed repository with many cluster nodes.
Improved right throughput: including parallel writes.
Support for many child nodes.
Support for many Access Control Lists (ACLs)
It can store data in file system (TAR files), MongoDB, RDBMS.
Oak architecture concept is called Hamburger architecture.
The burger’s bottom line is Micro kernel it simply implments tree model nodes and properties and exposes micro kernel API, HTTP friendly independent of technology.
The burger’s middle part is Oak core where is most of heavy lifting takes place, it adds to micro kernel tremendous features like access control, search indexing and observation.
The burger’s top part Oak JCR which implements JCR API and also contains commit hooks that implements JCR constraint for rg. Node types .
There are 2 major micro kernel implementation
SegmentMK is TAR storage
MongoMK with MongoDB
Because Oak is designed to be backward compatible with previous version of JCR implementaion.
There are no changes needed from user perspective, however some noise-sable differences that you need to take into account when setting up an Oak based AEM installation. First of all Oak indexes are user created not automatically created, unlike Jackrabbit 2 were sessions always reflects the latest data of the repository, Oak session reflects table view of the repository from the time the session was quite this is due to the multi version concurrency control model on which Oak is based. Same name siblings are not supported in Oak.
Apache Sling
Apache Sling is a web framework that uses JCR such as Apache Jackrabbit to store and manage content.
Sling applications use scripts or Java servlets selected based on simple naming conventions to process HTTP request in RESTful way.
Sling applications is built as a series of OSGi bundles and makes heavy use of a number of OSGi core and compendium services.
The embedded Apache Felix OSGi framework and console provides the naming runtime environment where code and content bundle are can be loaded, unloaded and reconfigured at runtime.
Being REST framework Sling oriented around resource which usually map to a JCR node. Traditional web application select the processing script based on URL and then attepmt to load the data to render the result.
A request URL is first resolved to a resource, and then based on the resource (and only the resource), it selects the actual Servlet or script to handle the request.
In Sling everything is resource, this resource is one of the central part extending from JCR, everything in content Sling is assuming that everything is resource. Resource is Sling abstraction of the object addressed by URL.
Sling Provides API for Servlet Support, Scheduler, Event Handling (Both Synchronous and non synchronous), Resource CRUD operations (READ, DELETE, CREATE, UPDATE), Sling Models, Thread pools, JMX, Sling Mock, Sling Adapt, XSS.
OSGI – DYNAMIC MODULE SYSTEM FOR JAVA
Another fundametal layer of AEM is represented by OSGi framework.
OSGI — Open Service Gateway Initiative — a framework for component-based service-oriented applications in Java
OSGI apps are organized into bundles —modules that:
- Are managed by the OSGi container
- Can be deployed, started, stopped, and uninstalled independently, without the container restart
- More than one version of a bundle can be run at the same time
- Only packages explicitly exported are visible to other modules
- Dependencies are explicitly declared and managed by OSGI container
- Libraries can be embedded into the bundle
- A bundle is assembled as a JAR file with additional metadata
MANAGED JAVA IN OSGI CONTAINER
- Apache Felix is uses implementaion of OSGi framework in AEM.
- Provides web based console for managing Dependency and
- configuration.
- Provide services like (All based on OSGI Specification)
- Dependency Manager
- HTTP service (for servlet, filter, resource registration, this run within Jetty for AEM6)
- Maven Bundle and SCR Plugin
- Event Admin (Bundle based Event)
- Config Admin
- OSGI Bundle repository
- Logger
- File Install
Summary
Let’s do quick recap and summarize AEM Technology stack with very simple picture. In this article you belongs that AEM is JAVA based application major framework that used by AEM Apache Sling for request processing. Apache Jackrabbit Oak implementation of Java Content Repository and all these residing on OSGi container using Apache Felix implementation of OSGi framework.
1.1 AEM Technology Stack