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

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - 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
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - 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 🐘
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

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