SlideShare une entreprise Scribd logo
1  sur  31

Server-side OSGi with
Apache Sling
Felix Meschberger
Day Management AG
124
2

About Felix Meschberger
> Senior Developer, Day Management AG
> fmeschbe@day.com
> http://blog.meschberger.ch
> VP Apache Sling
> Apache Felix
> Apache Jackrabbit
3

Agenda
> Apache Sling
> Why OSGi ?
> What parts of OSGi ?
> Advantages and Problems
> Demo
4

Apache Sling
> REST based web framework
> Content-driven (JCR, JSR-170/283)
> Powered by OSGi
> Scripting inside (Java Scripting, JSR-223)
> Apache Open Source Projekt (http://sling.apache.org)
5

Sling Architecture
OSGi Framework
Felix
Web Console
WebDAV
Server
browserfilesystemdebuggerHTTP
JSR-170/283 API
JCR
repository
resource
resolution
servlet
resolution
standard
servlets
custom
servlets
JSR223
Scripting
JSP
javascript
etc.
6

Sling URL Decomposition
/content/cars/audi/s4.details.html
7

Sling is RESTful
> URLs map to Resources
– Items in the JCR Repository
– Files in the Filesystem
– Content of Bundles
> HTTP Methods map to Script Names
– e.g. cars/POST.jsp
– GET for reading only
– Dilution: POST allowed for any changes (Create, Update, Delete)
> Content Negotiation
– Request URL extension
– Accept request header currently ignored
8

Sling is Object Oriented Web
> Resources are the Object
> Resources maintained in Resource Tree
> Resources accessed by path in the Resource Tree
> Request Method, Extension and Selectors define „Method“ to call
> Resources are typed:
– Resource Type
– Resource Super Type
– „Root Type“: sling/servlet/default
9

Functionality Out-Of-the-Box
> Default Implementations for GET
– Plain Text
– JSON
– XML
> Default Implementation for POST
– Create, Update, Modify content
– Extensible
10

Sling in Action
> Day Communiqué 5 (http://www.day.com/cq5)
> Sakai 3 (http://www.sakaiproject.org)
> Tuberculosis Project
> Idium Web (http://www.idium.no/no/idium_web)
http://cwiki.apache.org/SLING/who-is-using-sling-.html
11

Agenda
> Apache Sling
> Why OSGi ?
> What parts of OSGi ?
> Advantages and Problems
> Demo
12

Requirements for Sling
> Modular and Extensible System
> Declared Dependencies
> Intermodule Communication
> Lightweight Framework
13

Variants
> Do It Yourself
– Well, don't we have other problems to solve ? ;-)
> Spring (before Spring DM)
– First Favourite due to declarative nature
– Systems not really dynamic
– Static application descriptor
> OSGi
– Perfect match to all requirements
14

Agenda
> Apache Sling
> Why OSGi ?
> What parts of OSGi ?
> Advantages and Problems
> Demo
15

OSGi Elements Used
> Framework
> Configuration Admin Service
> Meta Type Service
> Declarative Services
> Event Admin Service
> Log Service
> HTTP Service
16

Launching Sling
> Standalone or Web Application
> Small Footprint Launcher (~30K)
> Framework in its own ClassLoader
> Restart of Framework
> Update of Framework
> Application is Container Agnostic
– Interaction only within the OSGi Framework
– Http Service implementation is the key
17

Configuration Admin Service
> Provides an API to manage Configurations
> Provides functionality to pass configuration to consumers
> Hides persistance problems
> Uses in Sling
– Web Console configuraition editor
– JCR Install updates through repository
18

Metatype Service
> Descriptor to generate GUI for Configuration Management
> Use in Sling
– Descriptor generated by Maven SCR Plugin
– Configuration Admin GUI in Web Console supports Metatype Service
descriptors
19

Declarative Services
> Replace boiler-plate code by descriptors
– Service Registration
– Configuration support
– Service Access
> Dependency Injection
> One of many OSGi Core Extensions:
– Apache Felix Dependency Manager (Predecessor)
– Apache Felix iPOJO (Successor)
– Blueprint (OSGi Compendium Specification R 4.2)
– Peaberry
20

Event Admin Service
> Whiteboard Pattern oriented eventing
> Support for synchronous and asynchronous events
> Uses in Sling
– Base Mechnism to implement Job Scheduling
– Extended to allow for event distribution in Cluster
21

Log Service
> Sling's own implementation
> Based on SLF4J API
> Provides
– OSGi LogService
– SLF4J Logging
– Commons Logging
– Log4F Logging
> Dynamically Configurable (by Configuration Admin Service)
> Log Levels and Log Format per Logger
> Multiple Log Files with size and time rotation
22

Http Service
> Registering Servlets (and Resources) dynamically
> Real Implementation
– Includes Servlet Container
> Bridged Implementation
– Used for Web Application Launcher
– Bridges Servlet Container to OSGi
> Implementation transparent to registered Servlets
23

Extensions
> Apache Felix Web Console
– Extensible Web Based Management
– Jquery UI Based (as of Version 3.0)
> Maven SCR Plugin
– Generates
 Declarative Services Descriptors
 Metatype Service Descriptors
– Supports
 JavaDoc Tags (@scr.component, etc.)
 Java 5 Annotations (@Component, etc.)
> JCR Install
– Deploy Bundles via JCR Repository
– Deploy Configuration Admin configurations via JCR Repository
24

Agenda
> Apache Sling
> Why OSGi ?
> What parts of OSGi ?
> Advantages and Problems
> Demo
25

Advantages
> Declared Dependencies
> Better Isolution through explicit exports and private classes
> Classloader Isolation
> Extensibility built-in, not built-atop
> Dynamism
26

Problems
> Steep Learning Curve
– OSGi Specifications Themselves
– Modularization vs. Monolithic
> Uptime vs. Startup Time
> Legacy Specs und ClassLoader
– JDBC, XML, etc.
> Scripting und ClassLoader
– BundleClassLoaderProxy approach
> Application Packaging
– CRX Content Packages (Day proprietary)
– Karaf features (Sling provides feature.xml)
27

Agenda
> Apache Sling
> Why OSGi ?
> What parts of OSGi ?
> Advantages and Problems
> Demo
29

Links
> Apache Sling – The JCR (Web) Application Framework
http://sling.apache.org
> Apache Felix – OSGi Framework and Compendium Service implementations
http://felix.apache.org
> Apache Jackrabbit – The JCR (JSR-170/283) Reference Implementation
http://jackrabbit.apache.org
> Day Developer's Home
http://dev.day.com
30

Questions
31

Thank you very much !

Felix Meschberger http://www.day.com
Day Management AG fmeschbe@day.com

Contenu connexe

Tendances

플랫폼 통합을 위한 Client Module 개발 & 배포
플랫폼 통합을 위한 Client Module 개발 & 배포플랫폼 통합을 위한 Client Module 개발 & 배포
플랫폼 통합을 위한 Client Module 개발 & 배포흥래 김
 
Introduction to Wildfly 8 - Marchioni
Introduction to Wildfly 8 -  MarchioniIntroduction to Wildfly 8 -  Marchioni
Introduction to Wildfly 8 - MarchioniCodemotion
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정Arawn Park
 
ColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionSaravanaMuthu Jayaraj
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Coremohamed elshafey
 
.NET,ASP .NET, Angular Js,LinQ
.NET,ASP .NET, Angular Js,LinQ.NET,ASP .NET, Angular Js,LinQ
.NET,ASP .NET, Angular Js,LinQAvijit Shaw
 
OWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISOWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISBilal Haidar
 
Introduction in the play framework
Introduction in the play frameworkIntroduction in the play framework
Introduction in the play frameworkAlexander Reelsen
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesEastBanc Tachnologies
 
Owin from spec to application
Owin from spec to applicationOwin from spec to application
Owin from spec to applicationdamian-h
 
Instruction on creating a cluster on jboss eap environment
Instruction on creating a cluster on jboss eap environmentInstruction on creating a cluster on jboss eap environment
Instruction on creating a cluster on jboss eap environmentMadhusudan Pisipati
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)Folio3 Software
 

Tendances (20)

플랫폼 통합을 위한 Client Module 개발 & 배포
플랫폼 통합을 위한 Client Module 개발 & 배포플랫폼 통합을 위한 Client Module 개발 & 배포
플랫폼 통합을 위한 Client Module 개발 & 배포
 
This is how we REST
This is how we RESTThis is how we REST
This is how we REST
 
Introduction to Wildfly 8 - Marchioni
Introduction to Wildfly 8 -  MarchioniIntroduction to Wildfly 8 -  Marchioni
Introduction to Wildfly 8 - Marchioni
 
점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정점진적인 레거시 웹 애플리케이션 개선 과정
점진적인 레거시 웹 애플리케이션 개선 과정
 
ESIGate dev meeting #4 21-11-2013
ESIGate dev meeting #4 21-11-2013ESIGate dev meeting #4 21-11-2013
ESIGate dev meeting #4 21-11-2013
 
ColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introductionColdFusion Fw1 (FrameWork1) introduction
ColdFusion Fw1 (FrameWork1) introduction
 
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
 
Introduction to OWIN
Introduction to OWINIntroduction to OWIN
Introduction to OWIN
 
.NET,ASP .NET, Angular Js,LinQ
.NET,ASP .NET, Angular Js,LinQ.NET,ASP .NET, Angular Js,LinQ
.NET,ASP .NET, Angular Js,LinQ
 
Spring Boot Update
Spring Boot UpdateSpring Boot Update
Spring Boot Update
 
OWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIISOWIN and Katana Project - Not Only IIS - NoIIS
OWIN and Katana Project - Not Only IIS - NoIIS
 
Introduction in the play framework
Introduction in the play frameworkIntroduction in the play framework
Introduction in the play framework
 
Unpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc TechnologiesUnpacking .NET Core | EastBanc Technologies
Unpacking .NET Core | EastBanc Technologies
 
Owin from spec to application
Owin from spec to applicationOwin from spec to application
Owin from spec to application
 
ASP.NET: Present and future
ASP.NET: Present and futureASP.NET: Present and future
ASP.NET: Present and future
 
Os Mcmahan
Os McmahanOs Mcmahan
Os Mcmahan
 
Instruction on creating a cluster on jboss eap environment
Instruction on creating a cluster on jboss eap environmentInstruction on creating a cluster on jboss eap environment
Instruction on creating a cluster on jboss eap environment
 
OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)OWIN (Open Web Interface for .NET)
OWIN (Open Web Interface for .NET)
 
Fuse technology-2015
Fuse technology-2015Fuse technology-2015
Fuse technology-2015
 

Similaire à Server-side OSGi with Apache Sling (Jazoon 2010)

Server-side OSGi with Apache Sling (OSGiDevCon 2011)
Server-side OSGi with Apache Sling (OSGiDevCon 2011)Server-side OSGi with Apache Sling (OSGiDevCon 2011)
Server-side OSGi with Apache Sling (OSGiDevCon 2011)Felix Meschberger
 
Spring_Boot_Microservices-5_Day_Session.pptx
Spring_Boot_Microservices-5_Day_Session.pptxSpring_Boot_Microservices-5_Day_Session.pptx
Spring_Boot_Microservices-5_Day_Session.pptxPrabhakaran Ravichandran
 
Microservices Technology Stack
Microservices Technology StackMicroservices Technology Stack
Microservices Technology StackEberhard Wolff
 
Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure FunctionsAnalben Mehta
 
Using Apache as an Application Server
Using Apache as an Application ServerUsing Apache as an Application Server
Using Apache as an Application ServerPhil Windley
 
Apache Stratos Hangout VI
Apache Stratos Hangout VIApache Stratos Hangout VI
Apache Stratos Hangout VIpradeepfn
 
The Emergence of Choice in the .NET Ecosystem
The Emergence of Choice in the .NET EcosystemThe Emergence of Choice in the .NET Ecosystem
The Emergence of Choice in the .NET EcosystemJames Avery
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Nanoservices and Microservices with Java
Nanoservices and Microservices with JavaNanoservices and Microservices with Java
Nanoservices and Microservices with JavaEberhard Wolff
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
JSS build and deployment
JSS build and deploymentJSS build and deployment
JSS build and deploymentDavid Szöke
 
A Tour of Google Cloud Platform
A Tour of Google Cloud PlatformA Tour of Google Cloud Platform
A Tour of Google Cloud PlatformColin Su
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web DevelopmentHong Jiang
 
SoftLayer-Extending Plesk Functionality
SoftLayer-Extending Plesk FunctionalitySoftLayer-Extending Plesk Functionality
SoftLayer-Extending Plesk Functionalitywebhostingguy
 
SpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondSpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondVMware Tanzu
 
Java on Windows Azure (Cloud Computing Expo 2010)
Java on Windows Azure (Cloud Computing Expo 2010)Java on Windows Azure (Cloud Computing Expo 2010)
Java on Windows Azure (Cloud Computing Expo 2010)David Chou
 

Similaire à Server-side OSGi with Apache Sling (Jazoon 2010) (20)

Server-side OSGi with Apache Sling (OSGiDevCon 2011)
Server-side OSGi with Apache Sling (OSGiDevCon 2011)Server-side OSGi with Apache Sling (OSGiDevCon 2011)
Server-side OSGi with Apache Sling (OSGiDevCon 2011)
 
Oracle API Gateway
Oracle API GatewayOracle API Gateway
Oracle API Gateway
 
Spring_Boot_Microservices-5_Day_Session.pptx
Spring_Boot_Microservices-5_Day_Session.pptxSpring_Boot_Microservices-5_Day_Session.pptx
Spring_Boot_Microservices-5_Day_Session.pptx
 
Microservices Technology Stack
Microservices Technology StackMicroservices Technology Stack
Microservices Technology Stack
 
Serverless API with Azure Functions
Serverless API with Azure FunctionsServerless API with Azure Functions
Serverless API with Azure Functions
 
Using Apache as an Application Server
Using Apache as an Application ServerUsing Apache as an Application Server
Using Apache as an Application Server
 
Apache Stratos Hangout VI
Apache Stratos Hangout VIApache Stratos Hangout VI
Apache Stratos Hangout VI
 
Cloud APIs Overview Tucker
Cloud APIs Overview   TuckerCloud APIs Overview   Tucker
Cloud APIs Overview Tucker
 
The Emergence of Choice in the .NET Ecosystem
The Emergence of Choice in the .NET EcosystemThe Emergence of Choice in the .NET Ecosystem
The Emergence of Choice in the .NET Ecosystem
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
Nanoservices and Microservices with Java
Nanoservices and Microservices with JavaNanoservices and Microservices with Java
Nanoservices and Microservices with Java
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
JSS build and deployment
JSS build and deploymentJSS build and deployment
JSS build and deployment
 
A Tour of Google Cloud Platform
A Tour of Google Cloud PlatformA Tour of Google Cloud Platform
A Tour of Google Cloud Platform
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web Development
 
SoftLayer-Extending Plesk Functionality
SoftLayer-Extending Plesk FunctionalitySoftLayer-Extending Plesk Functionality
SoftLayer-Extending Plesk Functionality
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
SpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondSpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and Beyond
 
Java on Windows Azure (Cloud Computing Expo 2010)
Java on Windows Azure (Cloud Computing Expo 2010)Java on Windows Azure (Cloud Computing Expo 2010)
Java on Windows Azure (Cloud Computing Expo 2010)
 

Dernier

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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...DianaGray10
 
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 educationjfdjdjcjdnsjd
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Dernier (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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...
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Server-side OSGi with Apache Sling (Jazoon 2010)

  • 1.  Server-side OSGi with Apache Sling Felix Meschberger Day Management AG 124
  • 2. 2  About Felix Meschberger > Senior Developer, Day Management AG > fmeschbe@day.com > http://blog.meschberger.ch > VP Apache Sling > Apache Felix > Apache Jackrabbit
  • 3. 3  Agenda > Apache Sling > Why OSGi ? > What parts of OSGi ? > Advantages and Problems > Demo
  • 4. 4  Apache Sling > REST based web framework > Content-driven (JCR, JSR-170/283) > Powered by OSGi > Scripting inside (Java Scripting, JSR-223) > Apache Open Source Projekt (http://sling.apache.org)
  • 5. 5  Sling Architecture OSGi Framework Felix Web Console WebDAV Server browserfilesystemdebuggerHTTP JSR-170/283 API JCR repository resource resolution servlet resolution standard servlets custom servlets JSR223 Scripting JSP javascript etc.
  • 7. 7  Sling is RESTful > URLs map to Resources – Items in the JCR Repository – Files in the Filesystem – Content of Bundles > HTTP Methods map to Script Names – e.g. cars/POST.jsp – GET for reading only – Dilution: POST allowed for any changes (Create, Update, Delete) > Content Negotiation – Request URL extension – Accept request header currently ignored
  • 8. 8  Sling is Object Oriented Web > Resources are the Object > Resources maintained in Resource Tree > Resources accessed by path in the Resource Tree > Request Method, Extension and Selectors define „Method“ to call > Resources are typed: – Resource Type – Resource Super Type – „Root Type“: sling/servlet/default
  • 9. 9  Functionality Out-Of-the-Box > Default Implementations for GET – Plain Text – JSON – XML > Default Implementation for POST – Create, Update, Modify content – Extensible
  • 10. 10  Sling in Action > Day Communiqué 5 (http://www.day.com/cq5) > Sakai 3 (http://www.sakaiproject.org) > Tuberculosis Project > Idium Web (http://www.idium.no/no/idium_web) http://cwiki.apache.org/SLING/who-is-using-sling-.html
  • 11. 11  Agenda > Apache Sling > Why OSGi ? > What parts of OSGi ? > Advantages and Problems > Demo
  • 12. 12  Requirements for Sling > Modular and Extensible System > Declared Dependencies > Intermodule Communication > Lightweight Framework
  • 13. 13  Variants > Do It Yourself – Well, don't we have other problems to solve ? ;-) > Spring (before Spring DM) – First Favourite due to declarative nature – Systems not really dynamic – Static application descriptor > OSGi – Perfect match to all requirements
  • 14. 14  Agenda > Apache Sling > Why OSGi ? > What parts of OSGi ? > Advantages and Problems > Demo
  • 15. 15  OSGi Elements Used > Framework > Configuration Admin Service > Meta Type Service > Declarative Services > Event Admin Service > Log Service > HTTP Service
  • 16. 16  Launching Sling > Standalone or Web Application > Small Footprint Launcher (~30K) > Framework in its own ClassLoader > Restart of Framework > Update of Framework > Application is Container Agnostic – Interaction only within the OSGi Framework – Http Service implementation is the key
  • 17. 17  Configuration Admin Service > Provides an API to manage Configurations > Provides functionality to pass configuration to consumers > Hides persistance problems > Uses in Sling – Web Console configuraition editor – JCR Install updates through repository
  • 18. 18  Metatype Service > Descriptor to generate GUI for Configuration Management > Use in Sling – Descriptor generated by Maven SCR Plugin – Configuration Admin GUI in Web Console supports Metatype Service descriptors
  • 19. 19  Declarative Services > Replace boiler-plate code by descriptors – Service Registration – Configuration support – Service Access > Dependency Injection > One of many OSGi Core Extensions: – Apache Felix Dependency Manager (Predecessor) – Apache Felix iPOJO (Successor) – Blueprint (OSGi Compendium Specification R 4.2) – Peaberry
  • 20. 20  Event Admin Service > Whiteboard Pattern oriented eventing > Support for synchronous and asynchronous events > Uses in Sling – Base Mechnism to implement Job Scheduling – Extended to allow for event distribution in Cluster
  • 21. 21  Log Service > Sling's own implementation > Based on SLF4J API > Provides – OSGi LogService – SLF4J Logging – Commons Logging – Log4F Logging > Dynamically Configurable (by Configuration Admin Service) > Log Levels and Log Format per Logger > Multiple Log Files with size and time rotation
  • 22. 22  Http Service > Registering Servlets (and Resources) dynamically > Real Implementation – Includes Servlet Container > Bridged Implementation – Used for Web Application Launcher – Bridges Servlet Container to OSGi > Implementation transparent to registered Servlets
  • 23. 23  Extensions > Apache Felix Web Console – Extensible Web Based Management – Jquery UI Based (as of Version 3.0) > Maven SCR Plugin – Generates  Declarative Services Descriptors  Metatype Service Descriptors – Supports  JavaDoc Tags (@scr.component, etc.)  Java 5 Annotations (@Component, etc.) > JCR Install – Deploy Bundles via JCR Repository – Deploy Configuration Admin configurations via JCR Repository
  • 24. 24  Agenda > Apache Sling > Why OSGi ? > What parts of OSGi ? > Advantages and Problems > Demo
  • 25. 25  Advantages > Declared Dependencies > Better Isolution through explicit exports and private classes > Classloader Isolation > Extensibility built-in, not built-atop > Dynamism
  • 26. 26  Problems > Steep Learning Curve – OSGi Specifications Themselves – Modularization vs. Monolithic > Uptime vs. Startup Time > Legacy Specs und ClassLoader – JDBC, XML, etc. > Scripting und ClassLoader – BundleClassLoaderProxy approach > Application Packaging – CRX Content Packages (Day proprietary) – Karaf features (Sling provides feature.xml)
  • 27. 27  Agenda > Apache Sling > Why OSGi ? > What parts of OSGi ? > Advantages and Problems > Demo
  • 28. 29  Links > Apache Sling – The JCR (Web) Application Framework http://sling.apache.org > Apache Felix – OSGi Framework and Compendium Service implementations http://felix.apache.org > Apache Jackrabbit – The JCR (JSR-170/283) Reference Implementation http://jackrabbit.apache.org > Day Developer's Home http://dev.day.com
  • 31.  Felix Meschberger http://www.day.com Day Management AG fmeschbe@day.com