Contenu connexe Similaire à Crx 2.2 Deep-Dive (20) Crx 2.2 Deep-Dive1. CRX 2.2 – Developer Deep-Dive
Cedric Huesler, Gabriel Walt – March 2011
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
2. What you will learn in the next 50mins
What is a Content Repository and how does it work
Comparison to relational database
Why stable APIs are important and what to do if they are not
Benefits of the open and transparent development
Oh boy.. can I see it already!
Why Sling is called Sling
Various ways to deploy and develop code
Deployment options and clustering
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 2
3. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 3
4. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4
5. CRX in a Nutshell – What’s in the Package?
Web-based IDE
Eclipse-based IDE Web Application Framework
Configuration Mgmt
Hot-code deployment
Application Runtime
Package Manager
Package Share
Hot-backup
Shared Nothing Cluster
Content Repository
JavaEngine
Servlet
VM
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
6. Now what’s wrong with databases?
Database Aging?
A. All fields become optional
B. All relationships become many-to-many
C. Data type change
Boolean → multiple choice
Character fields → text
Date → optional month, day
Hard to do: Transparent Versioning, on-the-fly schema changes, full text queries, ….
6
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
7. Content Repository Structure (simplified)
parent
node
type nt:folder nt:file nt:unstructured rep:User rep:ACL nt:nodeType …
mixins mix:versionable mix:lockable sling:VanityPath cq:Taggable ….
key = value string long date path binary ….
key = values[] string long date path binary …
nodes
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7
8. First – Content Repository – then JCR
It’s a database that looks like a file system and
features good stuff like unstructured, versioning, observation…
Defined by Expert Group
Java API
Stable API
JCR
Java Content Repository
Open Standard
JSR-170 (2002-2005) JSR-283 (2005-2009) JSR-333 (2010-....)
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8
9. CRX – Built-in Protocols/APIs
Add, consume, managed content with these interfaces:
Java Content Repository API – complete JCR 2.0 implementation
Content Management Interoperability Services - CMIS 1.0
WebDAV – with versioning, access control and search
Windows Network File Share – CIFS/SMB
RESTful Web API for JavaScript and Flash/Flex
Java Remoting with RMI and HTTP
LDAP and any JAAS plug-in
Native repository interface via Virtual Repository – e.g. Microsoft SharePoint
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 9
10. Managed Java in OSGi Container
Security
Bundle B
V2.1.0
Services Bundle A Bundle B
V1.1.0 V2.0.0
Bundle A Bundle B Bundle C
Service Registry V1.0.0 V1.0.0 V1.0.0
Life Cycle Class Loading
OSGi Container
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 10
11. We call it “Open Core”
Application Runtime
Web Framework: Apache Sling Web/Eclipse IDE
OSGi Runtime: Apache Felix Vault & SVN Tools
Repository
JCR: Apache Jackrabbit Search Extensions CIFS/SMB Access
Search: Apache Lucene Graphic Rendering Virtual Repository
Content Extraction: TAR-based Shared-nothing
POI, Tika, PDFBox Node-store Cluster
CRX Platform
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
13. Sling Cheat Sheet
Download here – or on: http://dev.day.com/content/ddc/blog/2008/07/cheatsheet.html
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13
14. Typical Developer Setup
QA PROD
Sub-
App Packages App
version CRX CRX
Load
Package Balancer
Share &
App HTTP
App CRX
Accelerator
CRX CRXDE
LDAP, CRM, Billing, ECM Repositories
Vault
Any IDE
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 14
15. CRX Clustering (Share Nothing vs. Share DataStore)
Node 1 Node 2
CRX Repository Open connection for 2-way
CRX Repository
[Master] communication to fetch
changes from master & get
notifications.
Index Data Data Index
TarPM Forward writes TarPM
Store Store
Read/write Binaries Read Binaries
DataStore
Shared FS / S3
Install CRX on Amazon EC2 – check out: http://dev.day.com/installcrxonec2
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 15
16. Try it yourself! – Your Questions.
Download CRX: http://www.day.com/downloadcrx
Create account and get Developer License and access to PackageShare
Version 2.2 is the latest
Documentation: http://docs.day.com/
Contact
Cedric Huesler: chuesler@adobe.com
Gabriel Walt gwalt@adobe.com
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 16
17. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.