Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Presenting today
OSGi
Open Services Gateway initiative, since 1999 Initially targeted embedded devices OSGi containers: Felix, Equinox, Knoperfish, Concierge Most known use is Eclipse IDE
Apache Karaf
Apache OSGi runtime runs on any OSGi container Born inside Service Mix, now is Top level project Standard runtime for Geronimo, Service Mix, Sling Ecosystem for deploying OSGi/EE applications
Part I
Introduction to OSGi
Introduction to OSGi
Problem Solution Architecture Tools
The problem
aspects
Dependency management
Version Hell Conflicting dependencies Class loading issues
Dynamic behavior
Difficulties to control component lifecycle
The problems
Dependency management
Large number of transitive dependencies Conflicts among among dependencies Class loading issues
Boot class loader
JTA
war
war
JTA
The problems
Dynamic Behavior
Components & Services need come and go Components need to get updated / replaced Components need to started / stopped Real life examples Eclipse IDE Adding/Removing plugins Ebay Multiple version of the same component
The problems
Modularity
The JVM does not address need for modularity
The class path paradox The jar is a black box
No dependencies & No version
Has the quest for modularity failed ? Project Jigsaw will be shipped with JDK 8 OSGi is already here
A service platform
Defines a Service Registry Bundles provide or request services The service can come and go
Architecture
JRE-1.5
JRE-1.3 J OSGi/Minimum-1.0
Export Package Bundle Name: JMS API javax.transaction 1.1 Import Package: javax.transaction Export Package: javax.jms Bundle-RequiredExecutionEnvironment: J2SE-1.5
refresh Started
uninstall
Service Provider
Service Consumer
Felix i-Pojo
Part II
Getting started with Apache Karaf
Security
Logging Service
Extensible
File Scanner
Configuration
Bundles
War Transformer Spring Transformer Blueprint Transformer Maven Handler HTTP Handler OBR Handler
Configuration Admin
URL Handler
Hot deployment
Large number of supported artifacts Large number of installation mediums
Maven integration
OBR integration
org.osgi.service.http.port=8181
</config> <feature version="[7.0,8.0)">jetty</feature> <bundle dependency=true>mvn:javax.servlet/servlet-api</bundle> <bundle>mvn:org.ops4j.pax.web/pax-web-api</bundle> </feature>
OSGi integration
per bundle appender, osgi specific attributes
Thank you