SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Building Content Applications with JCR and OSGi
      Cédric Hüsler | Enterprise Platform Evangelist




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
Yours truly

  §    from Basel, Switzerland


  §    Enterprise Platform Evangelist
        at Adobe


  §    Open web technologies and scaling
        architecture / infrastructure.


  §    Twi er: @keepthebyte




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   2
A few questions…



  §    Played around with JCR API in the past?

  §    Using the JCR API today?

  §    Develops OSGi-based apps?

  §    Develop RESTful web applications?




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   3
Agenda


  §    Ge ing to know JSR-283 - the Content Repository API
  §    Usage of JCR in the wild
  §    3 in 1: Jackrabbit + Felix + Sling [Hands-on]
  §    Supported protocols and APIs
  §    Server-side OSGi with Apache Felix [Hands-on]
  §    Develop RESTful web application on JCR [Hands-on]
  §    Having fun with the Apache Sling Script Engine [Hands-on]
  §    Future outlook: JCR 333 and Jackrabbit 3


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   4
Everything is Content
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   5
Roy Fielding / Principal Scientist - Chief Scientist




                                                                              Roy T. Fielding




            Apache
                                                                             Apache
 Apache    Software
WebServer Foundation                                                         License                REST HTTP URL
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.                      6
Content Repository Structure (simpli ed)


            parent
                            node
                                                 type                  nt:folder nt: le 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 Con dential.                  7
On the Java Content Repository API


 “It’s a database that looks like a                                              javax.jcr
   le system and features all the                                                - Node
 good stuff like unstructured,                                                    - Property
 versioning, observation, access                                                 - Repository
 control…”                                                                       - Workspace
                                                                                 javax.jcr.lock
                                                                                 javax.jcr.nodetype
                                                                                 javax.jcr.observation
                                                                                 javax.jcr.query
                                                                                 javax.jcr.query.qom
                                                                                 javax.jcr.retention
JSR-170 (2002-2005)                                                              javax.jcr.security
JSR-283 (2005-2009)                                                              javax.jcr.util
JSR-333 (2010-....)                                                              javax.jcr.version
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   8
Open Source Implementations in the Wild




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   9
3 in 1: Content Application Platform


                                                                             •    Application layer for JCR repositories
                                                                             •    OSGi-based
                                                                             •    script=servlet
                                                                             •    Powerful default servlets
        h p://sling.apache.org                                               •    “any” scripting language thanks to JSR-223


                                                                             •  Implements OSGi Service Platform - Version 4.2



        h p://felix.apache.org


                                                                             •  Reference Implementation of JSR 170 and JSR 283
                                                                             •  WebDAV built-in
                                                                             •  Remoting via RIM and HTTP
        h p://jackrabbit.apache.org


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.          10
Content Repository – 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. Microso SharePoint


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   11
Play with it now?


   •  Download Sling Standalone Application
          (the 100% Open Source distribution)


                                  h p://bit.ly/apachesling


   •  Download CRX from Adobe
          (commercial package with web-based IDE and DB-less persistence)


                                  h p://bit.ly/crxdownload

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   12
RESTful Content Rendering Example (with Apache Sling)



    GET /products/english/18846.html

                                        Repository Path                                      Render Code




                                                                             Resource Type
                                                                              Resolution



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.           13
RESTful Content Editing Example (with Apache Sling)


       POST /products/english/18846/comments/*

                                                                                             Repository Path




                                                                             Title as node
                                                                                     name




© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.    14
Managed Java services 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 in Content Repository



© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.                15
Sling and Scripting Language Support (JSR 233)

  Add language support via OSGi bundle


  §    JavaScript & JSP included by default


  §    Scala: h ps://cwiki.apache.org/SLING/using-scala-with-sling.html
  §    Groovy: h p://sling.apache.org/site/groovy-support.html &
        h p://groovy.codehaus.org/Download


  §    Python
  §    Ruby
  §    more see Sling SVN


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   16
Typical Developer Setup with Content Repository

                                                           QA                                                 PROD

                                    Sub-                                 App           Packages                  App
                                   version                                    CR                                   CR
                                                                                                                                            Load
                                                                                                                                          Balancer
Package                                                                                                                                      &
 Share                                                                                                                                     HTTP
                                                                                                                                         Accelerator
                                                                                                                 App
                                                   App                                                             CR
                                                      CR                       CRXDE


                                                                                                  LDAP, CRM, Billing, ECM Repositories


                                    Any IDE                               Vault


                                                       DEV
 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.               17
Content Repository Clustering (Share Nothing vs. Share DataStore)

                               Node 1                                                                               Node 2
                           Your Application                                                                      Your Application

                    Content Repository                                       Open connection for 2-way
                                                                                                            Content Repository
                                     [Master]                                communication to fetch
                                                                             changes from master & get
                                                                             noti cations.

         Index                       Data                                                                                  Data     Index
                                                               TarPM         Forward writes              TarPM
                                     Store                                                                                 Store



                                              Read/write Binaries                                          Read Binaries
                                                                                DataStore


                                                                             Shared FS / S3


 Install Content Repository on Amazon EC2 – check out: h p://dev.day.com/installcrxonec2

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.            18
What up next?

  §    Jackrabbit 3
        §     h p://wiki.apache.org/jackrabbit/RoadMap
        §     Join the discussion on the mailing list


  §    JSR 333
        §     h p://www.jcp.org/en/jsr/detail?id=333
              1.       Ease of API use: Make simple, things simple.
              2.       Lower entry barriers for implementers and application developers.
              3.       Scripting support of the API.
              4.       Client-server awareness.
              5.       Protocol and SPI bindings. Binding and liaison to OASIS / CMIS.
              6.       Maintenance and feedback container for implementers, users and non-users. Gauge real-world
                       interoperability.
              7.       Node type library.
              8.       Internationalization.


© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.   19
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.

Weitere ähnliche Inhalte

Was ist angesagt?

Thu 1100 duncan_john_color
Thu 1100 duncan_john_colorThu 1100 duncan_john_color
Thu 1100 duncan_john_color
DATAVERSITY
 
CRX Best practices
CRX Best practicesCRX Best practices
CRX Best practices
lisui0807
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
Arun Gupta
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
njbartlett
 
OSGi Service Platform 4.2
OSGi Service Platform 4.2OSGi Service Platform 4.2
OSGi Service Platform 4.2
Ilya Katsov
 

Was ist angesagt? (20)

Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, JohannesburgJava EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
Java EE 7: Developing for the Cloud at Geecon, JEEConf, Johannesburg
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011
 
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
Java EE 7: Developing for the Cloud at Java Day, Istanbul, May 2012
 
Thu 1100 duncan_john_color
Thu 1100 duncan_john_colorThu 1100 duncan_john_color
Thu 1100 duncan_john_color
 
Websphere Application Server: Much more than Open Source
Websphere Application Server: Much more than Open SourceWebsphere Application Server: Much more than Open Source
Websphere Application Server: Much more than Open Source
 
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
OSGi-enabled Java EE Applications using GlassFish at JCertif 2011
 
Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7Java Summit Chennai: Java EE 7
Java Summit Chennai: Java EE 7
 
CRX Best practices
CRX Best practicesCRX Best practices
CRX Best practices
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
 
Extending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.jsExtending Build to the Client: A Maven User's Guide to Grunt.js
Extending Build to the Client: A Maven User's Guide to Grunt.js
 
Running your Java EE applications in the Cloud
Running your Java EE applications in the CloudRunning your Java EE applications in the Cloud
Running your Java EE applications in the Cloud
 
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim WardJava EE | Modular EJBs for Enterprise OSGi | Tim Ward
Java EE | Modular EJBs for Enterprise OSGi | Tim Ward
 
TDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE ApplicationTDC 2011: OSGi-enabled Java EE Application
TDC 2011: OSGi-enabled Java EE Application
 
03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book Supplement03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book Supplement
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop
 
OSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFishOSGi-enabled Java EE Applications using GlassFish
OSGi-enabled Java EE Applications using GlassFish
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
 
OSGi Service Platform 4.2
OSGi Service Platform 4.2OSGi Service Platform 4.2
OSGi Service Platform 4.2
 

Andere mochten auch

Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
connectwebex
 
Apache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and RESTApache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and REST
Carsten Ziegeler
 
Microservices Architecture for AEM
Microservices Architecture for AEMMicroservices Architecture for AEM
Microservices Architecture for AEM
Maciej Majchrzak
 
New Repository in AEM 6 by Michael Marth
New Repository in AEM 6 by Michael MarthNew Repository in AEM 6 by Michael Marth
New Repository in AEM 6 by Michael Marth
AEM HUB
 
Open source masterclass - Life in the Apache Incubator
Open source masterclass - Life in the Apache IncubatorOpen source masterclass - Life in the Apache Incubator
Open source masterclass - Life in the Apache Incubator
Jukka Zitting
 
Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
Jukka Zitting
 

Andere mochten auch (20)

Devoxx08 - Nuxeo Core, JCR 2, CMIS
Devoxx08 - Nuxeo Core, JCR 2, CMIS Devoxx08 - Nuxeo Core, JCR 2, CMIS
Devoxx08 - Nuxeo Core, JCR 2, CMIS
 
An Overview of ModeShape
An Overview of ModeShapeAn Overview of ModeShape
An Overview of ModeShape
 
The architecture of oak
The architecture of oakThe architecture of oak
The architecture of oak
 
Into the TarPit: A TarMK Deep Dive
Into the TarPit: A TarMK Deep DiveInto the TarPit: A TarMK Deep Dive
Into the TarPit: A TarMK Deep Dive
 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
 
JCR, Sling or AEM? Which API should I use and when?
JCR, Sling or AEM? Which API should I use and when?JCR, Sling or AEM? Which API should I use and when?
JCR, Sling or AEM? Which API should I use and when?
 
Introduction to Sightly and Sling Models
Introduction to Sightly and Sling ModelsIntroduction to Sightly and Sling Models
Introduction to Sightly and Sling Models
 
Oak, the Architecture of the new Repository
Oak, the Architecture of the new RepositoryOak, the Architecture of the new Repository
Oak, the Architecture of the new Repository
 
Multi site manager
Multi site managerMulti site manager
Multi site manager
 
Adobe Meetup AEM Architecture Sydney 2015
Adobe Meetup AEM Architecture Sydney 2015Adobe Meetup AEM Architecture Sydney 2015
Adobe Meetup AEM Architecture Sydney 2015
 
Apache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and RESTApache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and REST
 
Introduction to JCR
Introduction to JCR Introduction to JCR
Introduction to JCR
 
Microservices Architecture for AEM
Microservices Architecture for AEMMicroservices Architecture for AEM
Microservices Architecture for AEM
 
New Repository in AEM 6 by Michael Marth
New Repository in AEM 6 by Michael MarthNew Repository in AEM 6 by Michael Marth
New Repository in AEM 6 by Michael Marth
 
Mime Magic With Apache Tika
Mime Magic With Apache TikaMime Magic With Apache Tika
Mime Magic With Apache Tika
 
Open source masterclass - Life in the Apache Incubator
Open source masterclass - Life in the Apache IncubatorOpen source masterclass - Life in the Apache Incubator
Open source masterclass - Life in the Apache Incubator
 
/path/to/content - the Apache Jackrabbit content repository
/path/to/content - the Apache Jackrabbit content repository/path/to/content - the Apache Jackrabbit content repository
/path/to/content - the Apache Jackrabbit content repository
 
Content Storage With Apache Jackrabbit
Content Storage With Apache JackrabbitContent Storage With Apache Jackrabbit
Content Storage With Apache Jackrabbit
 
Apache development with GitHub and Travis CI
Apache development with GitHub and Travis CIApache development with GitHub and Travis CI
Apache development with GitHub and Travis CI
 
Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3
 

Ähnlich wie Building Content Applications with JCR and OSGi

The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
nobby
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBay
Tony Ng
 
Shake Hooves With BeEF - OWASP AppSec APAC 2012
Shake Hooves With BeEF - OWASP AppSec APAC 2012Shake Hooves With BeEF - OWASP AppSec APAC 2012
Shake Hooves With BeEF - OWASP AppSec APAC 2012
Christian Frichot
 

Ähnlich wie Building Content Applications with JCR and OSGi (20)

Crx 2.2 Deep-Dive
Crx 2.2 Deep-DiveCrx 2.2 Deep-Dive
Crx 2.2 Deep-Dive
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
 
WebBee rapid web app development teck stack
WebBee rapid web app development teck stackWebBee rapid web app development teck stack
WebBee rapid web app development teck stack
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014
 
JVMs in Containers
JVMs in ContainersJVMs in Containers
JVMs in Containers
 
The Java Content Repository
The Java Content RepositoryThe Java Content Repository
The Java Content Repository
 
Oracle History #5
Oracle History #5Oracle History #5
Oracle History #5
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBay
 
Shake Hooves With BeEF - OWASP AppSec APAC 2012
Shake Hooves With BeEF - OWASP AppSec APAC 2012Shake Hooves With BeEF - OWASP AppSec APAC 2012
Shake Hooves With BeEF - OWASP AppSec APAC 2012
 
Java in a world of containers
Java in a world of containersJava in a world of containers
Java in a world of containers
 
Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018Java in a World of Containers - DockerCon 2018
Java in a World of Containers - DockerCon 2018
 
Java EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The CloudJava EE Arquillian Testing with Docker & The Cloud
Java EE Arquillian Testing with Docker & The Cloud
 
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
 
Why we (Day) open source most of our code
Why we (Day) open source most of our codeWhy we (Day) open source most of our code
Why we (Day) open source most of our code
 
JCR and Sling Quick Dive
JCR and Sling Quick DiveJCR and Sling Quick Dive
JCR and Sling Quick Dive
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 

Mehr von Cédric Hüsler

Mehr von Cédric Hüsler (16)

Experience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - HighlightsExperience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - Highlights
 
CRX 2 Content Application Platform
CRX 2 Content Application PlatformCRX 2 Content Application Platform
CRX 2 Content Application Platform
 
Day CQ 5.3 WCM - Was ist neu
Day CQ 5.3 WCM - Was ist neuDay CQ 5.3 WCM - Was ist neu
Day CQ 5.3 WCM - Was ist neu
 
Blogs, Wikis and Enterprise Social Networking Software
Blogs, Wikis and Enterprise Social Networking SoftwareBlogs, Wikis and Enterprise Social Networking Software
Blogs, Wikis and Enterprise Social Networking Software
 
New recipes for the ever growing content cloud
New recipes for the ever growing content cloudNew recipes for the ever growing content cloud
New recipes for the ever growing content cloud
 
The 8 Don'ts of WCM
The 8 Don'ts of WCMThe 8 Don'ts of WCM
The 8 Don'ts of WCM
 
Cloud Based Content Services
Cloud Based Content ServicesCloud Based Content Services
Cloud Based Content Services
 
Data First in Cloud Persistence
Data First in Cloud PersistenceData First in Cloud Persistence
Data First in Cloud Persistence
 
CMIS PlugFest (April 2009) Screenshots
CMIS PlugFest (April 2009) ScreenshotsCMIS PlugFest (April 2009) Screenshots
CMIS PlugFest (April 2009) Screenshots
 
Day CRX Introduction
Day CRX IntroductionDay CRX Introduction
Day CRX Introduction
 
Imagine you blog & everybody is reading!
Imagine you blog & everybody is reading!Imagine you blog & everybody is reading!
Imagine you blog & everybody is reading!
 
OpenID and SocialGraph/Apps
OpenID and SocialGraph/AppsOpenID and SocialGraph/Apps
OpenID and SocialGraph/Apps
 
Dataportability & Digital Identity
Dataportability & Digital IdentityDataportability & Digital Identity
Dataportability & Digital Identity
 
Autos in Zeitung publizieren
Autos in Zeitung publizierenAutos in Zeitung publizieren
Autos in Zeitung publizieren
 
Geoweb - because location matters
Geoweb - because location mattersGeoweb - because location matters
Geoweb - because location matters
 
OpenID Authentication
OpenID AuthenticationOpenID Authentication
OpenID Authentication
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Building Content Applications with JCR and OSGi

  • 1. Building Content Applications with JCR and OSGi Cédric Hüsler | Enterprise Platform Evangelist © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.
  • 2. Yours truly §  from Basel, Switzerland §  Enterprise Platform Evangelist at Adobe §  Open web technologies and scaling architecture / infrastructure. §  Twi er: @keepthebyte © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 2
  • 3. A few questions… §  Played around with JCR API in the past? §  Using the JCR API today? §  Develops OSGi-based apps? §  Develop RESTful web applications? © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 3
  • 4. Agenda §  Ge ing to know JSR-283 - the Content Repository API §  Usage of JCR in the wild §  3 in 1: Jackrabbit + Felix + Sling [Hands-on] §  Supported protocols and APIs §  Server-side OSGi with Apache Felix [Hands-on] §  Develop RESTful web application on JCR [Hands-on] §  Having fun with the Apache Sling Script Engine [Hands-on] §  Future outlook: JCR 333 and Jackrabbit 3 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 4
  • 5. Everything is Content © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 5
  • 6. Roy Fielding / Principal Scientist - Chief Scientist Roy T. Fielding Apache Apache Apache Software WebServer Foundation License REST HTTP URL © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 6
  • 7. Content Repository Structure (simpli ed) parent node type nt:folder nt: le 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 Con dential. 7
  • 8. On the Java Content Repository API “It’s a database that looks like a javax.jcr le system and features all the - Node good stuff like unstructured, - Property versioning, observation, access - Repository control…” - Workspace javax.jcr.lock javax.jcr.nodetype javax.jcr.observation javax.jcr.query javax.jcr.query.qom javax.jcr.retention JSR-170 (2002-2005) javax.jcr.security JSR-283 (2005-2009) javax.jcr.util JSR-333 (2010-....) javax.jcr.version © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 8
  • 9. Open Source Implementations in the Wild © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 9
  • 10. 3 in 1: Content Application Platform •  Application layer for JCR repositories •  OSGi-based •  script=servlet •  Powerful default servlets h p://sling.apache.org •  “any” scripting language thanks to JSR-223 •  Implements OSGi Service Platform - Version 4.2 h p://felix.apache.org •  Reference Implementation of JSR 170 and JSR 283 •  WebDAV built-in •  Remoting via RIM and HTTP h p://jackrabbit.apache.org © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 10
  • 11. Content Repository – 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. Microso SharePoint © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 11
  • 12. Play with it now? •  Download Sling Standalone Application (the 100% Open Source distribution) h p://bit.ly/apachesling •  Download CRX from Adobe (commercial package with web-based IDE and DB-less persistence) h p://bit.ly/crxdownload © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 12
  • 13. RESTful Content Rendering Example (with Apache Sling) GET /products/english/18846.html Repository Path Render Code Resource Type Resolution © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 13
  • 14. RESTful Content Editing Example (with Apache Sling) POST /products/english/18846/comments/* Repository Path Title as node name © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 14
  • 15. Managed Java services 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 in Content Repository © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 15
  • 16. Sling and Scripting Language Support (JSR 233) Add language support via OSGi bundle §  JavaScript & JSP included by default §  Scala: h ps://cwiki.apache.org/SLING/using-scala-with-sling.html §  Groovy: h p://sling.apache.org/site/groovy-support.html & h p://groovy.codehaus.org/Download §  Python §  Ruby §  more see Sling SVN © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 16
  • 17. Typical Developer Setup with Content Repository QA PROD Sub- App Packages App version CR CR Load Balancer Package & Share HTTP Accelerator App App CR CR CRXDE LDAP, CRM, Billing, ECM Repositories Any IDE Vault DEV © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 17
  • 18. Content Repository Clustering (Share Nothing vs. Share DataStore) Node 1 Node 2 Your Application Your Application Content Repository Open connection for 2-way Content Repository [Master] communication to fetch changes from master & get noti cations. Index Data Data Index TarPM Forward writes TarPM Store Store Read/write Binaries Read Binaries DataStore Shared FS / S3 Install Content Repository on Amazon EC2 – check out: h p://dev.day.com/installcrxonec2 © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 18
  • 19. What up next? §  Jackrabbit 3 §  h p://wiki.apache.org/jackrabbit/RoadMap §  Join the discussion on the mailing list §  JSR 333 §  h p://www.jcp.org/en/jsr/detail?id=333 1.  Ease of API use: Make simple, things simple. 2.  Lower entry barriers for implementers and application developers. 3.  Scripting support of the API. 4.  Client-server awareness. 5.  Protocol and SPI bindings. Binding and liaison to OASIS / CMIS. 6.  Maintenance and feedback container for implementers, users and non-users. Gauge real-world interoperability. 7.  Node type library. 8.  Internationalization. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential. 19
  • 20. © 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Con dential.