SlideShare une entreprise Scribd logo
1  sur  78
Télécharger pour lire hors ligne
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Building Modular Enterprise Applications
Carsten Ziegeler | Adobe Research Switzerland
1
© 2014 Adobe Systems Incorporated. All Rights Reserved.
About
carsten.ziegeler@adobe.com @cziegeler
§  RnD Team at Adobe Research Switzerland
§  Member of the Apache Software Foundation
§  Apache Felix and Apache Sling (PMC and committer)
§  And other Apache projects
§  OSGi Core Platform and Enterprise Expert Groups
§  Member of the OSGi Board
§  Book / article author, technical reviewer, conference speaker
2
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Motivation
§  Enjoy the power of modularity
§  OSGi is everywhere
§  From embedded systems to enterprise applications and THE CLOUD
§  Adapting a technology is always a challenge
§  Common pitfalls
§  Potential solutions
3
© 2014 Adobe Systems Incorporated. All Rights Reserved.
But wait a second…
§  Adobe & OSGi ?
4
© 2014 Adobe Systems Incorporated. All Rights Reserved.
But wait a second…
§  Adobe & OSGi ?
5
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Adobe & OSGi & Open Source & Open Development
§  Using OSGi in various products
§  Strategic member of the OSGi Alliance
§  Board of directors
§  Participating in CPEG and EEG
§  Highly contributing to open source
§  Especially Apache Software Foundation
§  Participating in open standards
§  Embracing open development
6
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Case Study: The Development of Adobe Experience Manager
7
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Back to the Future: Web Content Management Code History
8
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Back in the Days…CQ 4
9
© 2014 Adobe Systems Incorporated. All Rights Reserved.
OSGi based Enterprise Web Content Management – Adobe CQ5
10
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Adobe Experience Manager
11
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Motivations for Going Modular (2006)
§  Aged code base
§  Monolithic
§  Highly entangled
§  Growing complexity and functionality
§  No clear separation between API and implementation
§  Increasing customer base
§  Team growth
12
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Modularity is Key
§  Manage growing complexity
§  Support dynamic extensibility
§  Define contracts between modules
13
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Potential Solutions (2006)
§  Spring?
§  OSGi?
§  Other open source component frameworks?
§  DIY?
14
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Benefits of OSGi
§  OSGi modules = bundles
§  jars with strict enforcements
§  Exported packages with version
§  Imported packages with version range
§  Private packages
§  Service Registry
§  Separation of Concerns
§  Loose coupling
15
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Modularity - How do we get there? (2006)
§  Start with a single big bundle?
§  Embedding OSGi framework?
§  Complete rewrite?
16
© 2014 Adobe Systems Incorporated. All Rights Reserved.
The Fun Way : Complete Rewrite
§  New architecture
§  New backend (Apache Jackrabbit)
§  New web application framework (Apache Sling)
§  New UI
§  Build modules from the start
§  Control evolution
§  (Provide tools for migration from old solution)
17
© 2014 Adobe Systems Incorporated. All Rights Reserved.
OSGi and Open Source (2006)
§  Apache Felix
§  Equinox
18
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Framework runs and now?
§  We need bundles!
§  Build tools
§  Ant? (BND)
§  Maven? (Apache Felix Maven Bundle Plugin)
19
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Maven Bundle Plugin (2007)
§  Specifying all OSGi metadata in the POM
§  Exported packages
§  Private packages
§  Imported packages and versions get calculated
§  Parent POM to define rules for bundle symbolic name
20
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Maven Bundle Plugin – First problems
§  Specifying all OSGi metadata in the POM
§  Exported packages
§  Private packages
§  Imported packages and versions get calculated
§  Parent POM to define rules for bundle symbolic name
§  Exported package version = POM version
§  New private package needs updating the pom
§  Slight difference in version handling between OSGi and Maven (The SNAPSHOT problem)
§  2.0.1 < (OSGi) 2.0.1-SNAPSHOT < (Maven) 2.0.1
§  Semantic versioning?
21
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Excursion on Versioning
§  Marketing Versions vs. Engineering Versions
§  Versioning Package Exports
§  Engineering Versions
§  Apply versions !
§  Semantic Versioning crucial
§  Bundle Versions
§  Grey area
§  Semantic Versioning helpful
§  Application Versions
§  Marketing Versions
22
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Versioning Best Practice
§  Package Exports
§  Always apply a version to package exports
§  Start with 1.0
§  Only increment when changing the API
§  Think hard before increasing the major version !
§  Package Imports
§  Ensure proper version range import
23
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Semantic Versioning
§  Nice whitepaper on the OSGi homepage
§  Versioning policy for exported packages
§  OSGi versions: <major>.<minor>.<micro>.<qualifier>
§  Updating package versions:
§  Fix/patch (no API change) : update micro
§  Extend API (affects implementers, not clients) : update minor
§  API breakage: update major
24
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Versioning Annotations
§  BND or new with OSGi R6
§  Annotations for documenting semantic versioning information
§  @Version
§  @ProviderType
§  @ConsumerType
25
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Versioning Best Practice (cont.)
§  Bundle Versions
§  Always use and manage bundle version
§  Align bundle version with Maven version
§  Use odd micro versions for SNAPSHOTs
§  e.g. 0.0.1-SNAPSHOT, 1.3.5-SNAPSHOT
§  Use even micro versions for release
§  e.g. 1.0.0, 1.3.6
§  Dependencies
§  Always use least required version for dependencies
26
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Maven Bundle Plugin – Today
§  Specifying all OSGi metadata in the POM
§  Exported packages
§  Private packages
§  Imported packages and versions get calculated
§  Parent POM to define rules for bundle symbolic name
§  Parent POM to define rules for bundle symbolic name and private packages
§  No package versioning information in POM (annotations)
§  Follow semantic versioning
§  Odd/even versioning policy
§  Usually no OSGI metadata in the POM
27
© 2014 Adobe Systems Incorporated. All Rights Reserved.
What about Components and Services (2007)?
§  Framework API is usually too low level
§  Make development as easy as possible
§  Try to hide dynamics
§  And there are OSGi compendium specs
§  Declarative Services
§  Configuration Admin
§  Metatype
28
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Component Development with Declarative Services
§  Declarative Services (OSGi Compendium Spec)
§  Defines Service Component Runtime (SCR)
§  Declarative component model
§  XML descriptor for components including
§  Provided services
§  References to other services
§  Configuration properties
29
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Configuration Admin
•  OSGi Configuration Admin
•  “The” solution to handle configurations
•  Configuration Manager
•  Persistence storage
•  Service API to retrieve/update/remove configuration
•  OSGi Metatype Service
•  Description of bundle metadata
•  Description of service configurations
•  Property type, name, and description
30
© 2014 Adobe Systems Incorporated. All Rights Reserved.
What about Components and Services (2007)?
§  Framework API is usually too low level
§  And there are OSGi compendium specs
§  Declarative Services
§  Configuration Admin
§  Metatype
§  No (Apache) open source implementations available
§  Nearly no tooling
§  Declarative Services uses XML descriptors
§  Metatype uses XML descriptors and property files
31
© 2014 Adobe Systems Incorporated. All Rights Reserved.
DIY – Donations to Apache Felix
§  Apache Felix SCR (Declarative Service Implementation)
§  Apache Felix Config Admin
§  Apache Felix Metatype
§  Apache Felix Preferences
§  Apache Felix SCR Tooling
§  Java annotations for generating DS and Metatype descriptors
§  Maven, ANT, BND
32
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Component Development with Declarative Services
§  Declarative Services (OSGi Compendium Spec)
§  Defines Service Component Runtime (SCR)
§  Apache Felix SCR Annotations (DS annotations)
§  Some advantages (in combination with the tooling)
§  POJO style
§  Declarative
§  Single source: just the Java code, no XML etc.
§  "Integration" with Configuration Admin and Metatype Service
33
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Components and Services with OSGi
§  Service interface
§  Public (if exported for other bundles)
§  Versioned through package version (Semantic versioning)
§  Private for internal services (sometimes useful)
§  Component / service implementation
§  Always private
34
© 2014 Adobe Systems Incorporated. All Rights Reserved.
My First Component
35
package com.adobe.osgitraining.impl;	
	
import org.apache.felix.scr.annotations.Component;	
	
@Component	
public class MyComponent {	
	
}
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Component Lifecycle
36
package com.adobe.osgitraining.impl;	
	
import org.apache.felix.scr.annotations.Activate;	
import org.apache.felix.scr.annotations.Component;	
import org.apache.felix.scr.annotations.Deactivate;	
	
@Component	
public class MyComponent {	
	
@Activate	
protected void activate() {	
// do something	
}	
	
@Deactivate	
protected void deactivate() {	
// do something	
}	
}
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Providing a Service
37
package com.adobe.osgitraining.impl;	
	
import org.apache.felix.scr.annotations.Component;	
import org.apache.felix.scr.annotations.Service;	
import org.osgi.service.event.EventHandler;	
	
@Component	
@Service(value=EventHandler.class)	
public class MyComponent implements EventHandler {	
	
…
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Using a Service
38
package com.adobe.osgitraining.impl;	
	
import org.apache.felix.scr.annotations.Component;	
import org.apache.felix.scr.annotations.Service;	
import org.osgi.service.event.EventHandler;	
	
@Component	
@Service(value=EventHandler.class)	
public class MyComponent implements EventHandler {	
	
@Reference	
privateTThreadPool threadPool;	
	
…
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Using an Optional Service
39
package com.adobe.osgitraining.impl;	
	
import org.apache.felix.scr.annotations.Component;	
import org.apache.felix.scr.annotations.Service;	
import org.osgi.service.event.EventHandler;	
	
@Component	
@Service(value=EventHandler.class)	
public class MyComponent implements EventHandler {	
	
@Reference(cardinality=ReferenceCardinality.OPTIONAL_UNARY,	
policy=ReferencePolicy.DYNAMIC)	
private volatileTThreadPool threadPool;	
	
@Reference(cardinality=ReferenceCardinality.MANDATORY_UNARY)	
privateTDistributor distributor;
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Component Properties -> Service Properties
40
import org.apache.sling.commons.osgi.PropertiesUtil;	
	
@Component	
@Service(value=EventHandler.class)	
@Properties({	
@Property(name="service.vendor", value="Who?”),	
@Property(name="service.ranking", intValue=500)	
})	
public class DistributingEventHandler	
implements EventHandler {
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Configuration Admin
•  OSGi Configuration Admin
•  “The” solution to handle configurations
•  Configuration Manager
•  Persistence storage
•  Service API to retrieve/update/remove configuration
•  Integration with Declarative Services
•  Configuration changes are propagated to the components
•  Configurations are stored using the PID
41
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Configuration – Supports Configuration Admin
§  Provided map contains
§  Configuration properties from Configuration Admin
§  Defined component properties
42
	
@Activate	
protected void activate(final Map<String, Object> props) {	
…	
}
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Configuration – Supports Configuration Admin
43
import org.apache.sling.commons.osgi.PropertiesUtil;	
	
@Component	
@Service(value=EventHandler.class)	
@Properties({	
@Property(name="event.topics", value="*", propertyPrivate=true),	
@Property(name="event.filter", value="(event.distribute=*)",	
propertyPrivate=true)	
})	
public class DistributingEventHandler	
implements EventHandler {	
	
private static final int DEFAULT_CLEANUP_PERIOD = 15;	
	
@Property(intValue=DEFAULT_CLEANUP_PERIOD)	
private static final String PROP_CLEANUP_PERIOD ="cleanup.period";	
	
private int cleanupPeriod;	
	
@Activate	
protected void activate(final Map<String, Object> props) {	
this.cleanupPeriod = 	
PropertiesUtil.toInteger(props.get(PROP_CLEANUP_PERIOD));	
}
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Configuration Update
44
import org.apache.sling.commons.osgi.OsgiUtil;	
	
public class DistributingEventHandler	
implements EventHandler {	
	
…	
	
@Modified	
protected void update(final Map<String, Object> props) {	
this.cleanupPeriod = 	
PropertiesUtil.toInteger(props.get(PROP_CLEANUP_PERIOD));	
}	
Without @Modified:
Component is restarted on config change!
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Metatype
§  OSGi Metatype Service
§  Description of bundle metadata
§  Description of service configurations
§  Property type, name, and description
45
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Configuration – Supports Metatype
46
import org.apache.sling.commons.osgi.PropertiesUtil;	
	
@Component(metatype=true, label="Distributing Event Handler", 	
description="This handler is awesome.")	
	
@Properties({	
@Property(name="event.topics", value="*", propertyPrivate=true)	
})	
public class DistributingEventHandler	
implements EventHandler {	
	
private static final int DEFAULT_CLEANUP_PERIOD = 15;	
	
@Property(intValue=DEFAULT_CLEANUP_PERIOD,	
label="Cleanup Period", 	
description="This is the cleanup period in seconds.")	
private static final String PROP_CLEANUP_PERIOD ="cleanup.period";
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Component Development with Declarative Services
§  Straight forward component development
§  Single source of truth
§  (Will even be easier with new Declarative Service spec from R6)
§  Typical problems
§  OSGi dynamics is hidden
§  Handling references of cardinality multiple
§  Copying of bad practices
47
© 2014 Adobe Systems Incorporated. All Rights Reserved.
And what about THE WEB? (2007)
§  OSGi Http Service Specification
§  Based on servlet API 2.1
§  Programmatic API to register servlets and resources
§  Apache Felix HTTP implementation
§  Later whiteboard support in Apache Felix implementation for
§  Servlets
§  Filters
§  Some listeners
48
© 2014 Adobe Systems Incorporated. All Rights Reserved.
And what about THE WEB?
§  OSGi Http Service Specification
§  Based on servlet API 2.1
§  Programmatic API to register servlets and resources
§  Apache Felix HTTP implementation
§  Invented Apache Sling Web Framework
§  Resource based approach
§  Scripting
§  Written as OSGi bundles
§  Later whiteboard support in Apache Felix implementation for
§  Servlets
§  Filters
§  Some listeners
§  New OSGi Http Whiteboard Service Spec in R6
49
© 2014 Adobe Systems Incorporated. All Rights Reserved.
But what about Provisioning and Deliverables? (2007)
§  Wishes
§  Single definition of deliverable (bundles, configurations, proprietary packages)
§  Different flavors: web application, standalone
§  Easy and flexible updates
50
© 2014 Adobe Systems Incorporated. All Rights Reserved.
But what about Provisioning and Deliverables? (2007)
§  Wishes
§  Single definition of deliverable (bundles, configurations, proprietary packages)
§  Different flavors: web application, standalone
§  Easy and flexible updates
§  No open source solution available
51
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Contributing Apache Sling Launchpad Ecosystem
§  Creating a distribution is easy
§  Standalone jar file and/or web application
§  Maven Launchpad Plugin
§  Define bundle list
§  Add other artifacts
§  Configurations
§  Leverages Apache Sling’s OSGi installer
52
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Bundle List Example
53
<?xml version="1.0"?>	
<bundles>	
<startLevel level="boot">	
<bundle>	
<groupId>org.apache.sling</groupId>	
<artifactId>org.apache.sling.commons.log</artifactId>	
<version>2.1.2</version>	
</bundle>	
	
…	
	
<startLevel level="9">	
<bundle>	
<groupId>org.apache.felix</groupId>	
<artifactId>org.apache.felix.eventadmin</artifactId>	
<version>1.3.2</version>	
</bundle>	
	
…	
	
<startLevel level="0">	
<bundle>	
<groupId>org.some.company</groupId>	
<artifactId>a.strange.artifact</artifactId>	
<version>1.2.0</version>	
<type>zip</zip> 	
</bundle>
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Apache Sling Launchpad
§  Bootstrap code
§  Includes Apache Felix
§  Handles framework updates
§  Launch an OSGi framework
§  Standalone jar with http service
§  As a web application with http bridge
§  Deploy packaged artifacts
§  Configurable
§  sling.properties
§  (system properties / servlet parameters)
54
© 2014 Adobe Systems Incorporated. All Rights Reserved.
OSGi Standalone App or OSGi Webapp with Launchpad
55
JAR File
Launchpad Main
Bootstrap Code
OSGi Framewok
OSGi HTTP Service
sling.properties
Deployable Artifacts
WE
I
R
N
IR
JO
S-
H
BA
B
G
S
EL
@AD
OBE
WAR File
Launchpad Servlet
Bootstrap Code
OSGi Framewok
HTTP Bridge / OSGi HTTP Service
sling.properties
Deployable Artifacts
WE
I
R
N
IR
JO
S-
H
BA
B
G
S
EL
@AD
OBE
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Apache Sling OSGi Installer
§  General service covering
§  Install
§  Update
§  Uninstall
§  Of
§  Bundles
§  Configurations
§  Custom artifacts
56
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Apache Sling OSGi Installer
57
OSGi Installer
File Provider
JCR Provider
Launchpad Provider
Providers Transformers and Task Factories
Config Admin
Bundles
Add/Remove
Update
Artifact
Artifact
Transformed
Artifact
State &
Artifact DB
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Advantages of the OSGi Installer Family
§  Pluggable and highly customizable
§  New artifact types: transformer + task factory
§  New artifact sources: provider
§  Batch handling
§  Retry mechanism in the installer core
§  Bundle installation order doesn’t matter
§  State management in the installer core
§  Defined workflow
§  Copes with 3rd party changes
58
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Running Deliverables and what about administration? (2007)
§  Nothing really available in the open source world
§  Especially not web based
59
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Donating Apache Felix Web Console + Plugins
§  Rich set of core functionality
§  Bundles
§  Services
§  Configuration Admin
§  System Information
§  (JQuery based UI)
§  Extensible
§  Pluggable authentication
§  Still light-weight
§  REST interface
60
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Web Console Demo I
61
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Web Console Demo II
62
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Web Console Demo III
63
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Web Console - Offline Usage
§  Status zip contains
§  Output from all inventory printers
§  Output from special web console plugins
§  Attachments
§  JSON files
§  Automated analysis
§  Bundle list and status
§  Configurations
§  Log files
64
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Problems solved…
§  Modularity
§  OSGi bundles
§  Semantic versioning
§  Services and components
§  Development
§  Frameworks and tooling
§  Deliverables and provisioning
§  Administration
65
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Hitting the Real World – 3rd Party Libraries
§  Use them as bundles
§  Project delivers already a bundle
§  Apache Commons, Apache Sling etc.
§  Use special bundle repositories
§  Apache Felix Commons, Spring etc.
§  But check included metadata!
§  Create your own wrapper
§  Easy with the Felix maven bundle plugin
§  Include classes in your bundle
§  Again: easy with the Felix maven bundle plugin
§  Convince the projects to provide useful OSGi metadata!
66
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Hitting the Real World – "Enterprise" Requirements
§  Testing under high load / high concurrency
§  Reimplementing some (open source) modules
§  Not every developer is aware that code can be called concurrently
§  And how to solve this in an acceptable way
§  Dynamic nature of OSGi
§  Relatively painless with DS and annotations
§  Gets trickier with plain framework API and/or cardinality multiple
§  Again: concurrency
67
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Hitting the Real World – All Time Favorites
§  When is my system ready?
§  Different strategies
§  All bundles started and specific start level reached
§  Special startup handler service for notification (Apache Sling)
§  Fighting against FUD
§  OSGi is slow, consumes too much memory, complicated,
§  has no dependency injection, is not used in the enterprise…
68
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Additional Challenges
§  Clustering
§  Discovery
§  Distributed Eventing
69
© 2014 Adobe Systems Incorporated. All Rights Reserved.
On the Roadmap
§  OSGi subsystems
§  Grouping of bundles
§  Export / import boundaries on subsystem level
§  OSGi Remote Services
§  OSGi Asynchronous Services
§  OSGi Distributed Eventing
70
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Think Modular…
•  This is not a new concept or latest hype!
•  Think about modularity!
•  Create a clean package space
•  What is your API?
•  public vs private
•  Make things only public if necessary/used
•  Starting with private stuff going public is easy
•  Use proper versioning contracts
•  Semantic Versioning
71
© 2014 Adobe Systems Incorporated. All Rights Reserved.
…Be Modular!
•  Provide bundles
•  Add manifest information
•  Think about dependencies
•  Additional bundle vs include
•  Optional
•  Version ranges
•  Manage releases and versions properly
•  Benefits even without OSGi
72
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Component Development
§  Contract defined by service interface
§  Declarative Services is a powerful component model
§  Minimal OSGi knowledge required with available solutions
§  Apache Felix SCR Tooling
§  Alternatives available J
§  Inter-operability through OSGi service registry
73
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Conclusion
§  Today a lot of the hard work is already done
§  Open Source & Open Development are your friends
§  OSGi made the Adobe Experience Manager success story possible
§  Team growth from 40+ to several hundreds
§  Immense growth in functionality
§  Still (dynamically) extensible and manageable
§  OSGi Core and Compendium provide nearly everything you need
§  Framework, Declarative Services, Configuration Admin, Metatype, Event Admin
§  Open Source Implementations and Extensions
§  Apache Felix and friends
74
© 2014 Adobe Systems Incorporated. All Rights Reserved.
Check It Out!
•  Read the OSGi specs
•  Framework
•  Declarative Services, Config Admin, Metatype, Event Admin
•  Checkout the various Apache projects!
•  Explore available tooling
•  Embrace modularity!
•  Join the OSGi Alliance and help shaping the future!
75
© 2014 Adobe Systems Incorporated. All Rights Reserved.
And…New OSGi Specifications!
§  Last week (week of June 2nd) the OSGi Core Release 6 Specification received its final
approval and will be available this week to the public for downloading.
§  http://www.osgi.org/Specifications/HomePage
§  Also happening last week, the OSGi Board of Directors approved the publication of an
Early Draft Specification of OSGi Enterprise Release 6 for downloading.
§  http://www.osgi.org/Specifications/Drafts
76
© 2014 Adobe Systems Incorporated. All Rights Reserved.
References
§  OSGi Semantic Versioning Whitepaper: http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf
§  OSGi Specifications: http://www.osgi.org
§  Apache Felix: http://felix.apache.org
§  Apache Sling: http://sling.apache.org
§  Apache Aries: http://aries.apache.org
§  BND: http://www.aqute.biz/Bnd/Bnd
§  Bndtools: http://njbartlett.name/bndtools.html
§  Planet OSGi: http://www.osgi.org/Planet/Feed
77
© 2014 Adobe Systems Incorporated. All Rights Reserved.

Contenu connexe

Tendances

Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafIoan Eugen Stan
 
Managing an OSGi Framework with Apache Felix Web Console
Managing an OSGi Framework with  Apache Felix Web ConsoleManaging an OSGi Framework with  Apache Felix Web Console
Managing an OSGi Framework with Apache Felix Web ConsoleFelix Meschberger
 
OSGi Enterprise R6 specs are out! - David Bosschaert & Carsten Ziegeler
OSGi Enterprise R6 specs are out! - David Bosschaert & Carsten ZiegelerOSGi Enterprise R6 specs are out! - David Bosschaert & Carsten Ziegeler
OSGi Enterprise R6 specs are out! - David Bosschaert & Carsten Ziegelermfrancis
 
Service Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C ZiegelerService Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C Ziegelermfrancis
 
Apache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume NodetApache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume NodetNormandy JUG
 
Introduction to OSGGi
Introduction to OSGGiIntroduction to OSGGi
Introduction to OSGGiMarek Koniew
 
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten ZiegelerMonitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten Ziegelermfrancis
 
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Julian Robichaux
 
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...mfrancis
 
Asynchronous OSGi – Promises for the Masses - T Ward
Asynchronous OSGi – Promises for the Masses - T WardAsynchronous OSGi – Promises for the Masses - T Ward
Asynchronous OSGi – Promises for the Masses - T Wardmfrancis
 
What is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xWhat is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xUlrich Krause
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi WebinarWSO2
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with GradleWei Chen
 

Tendances (19)

Intro To OSGi
Intro To OSGiIntro To OSGi
Intro To OSGi
 
Modular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache KarafModular Java applications with OSGi on Apache Karaf
Modular Java applications with OSGi on Apache Karaf
 
Managing an OSGi Framework with Apache Felix Web Console
Managing an OSGi Framework with  Apache Felix Web ConsoleManaging an OSGi Framework with  Apache Felix Web Console
Managing an OSGi Framework with Apache Felix Web Console
 
Tales from the OSGi trenches
Tales from the OSGi trenchesTales from the OSGi trenches
Tales from the OSGi trenches
 
OSGi Enterprise R6 specs are out! - David Bosschaert & Carsten Ziegeler
OSGi Enterprise R6 specs are out! - David Bosschaert & Carsten ZiegelerOSGi Enterprise R6 specs are out! - David Bosschaert & Carsten Ziegeler
OSGi Enterprise R6 specs are out! - David Bosschaert & Carsten Ziegeler
 
OSGi Blueprint Services
OSGi Blueprint ServicesOSGi Blueprint Services
OSGi Blueprint Services
 
Service Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C ZiegelerService Oriented Web Development with OSGi - C Ziegeler
Service Oriented Web Development with OSGi - C Ziegeler
 
Apache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume NodetApache, osgi and karaf par Guillaume Nodet
Apache, osgi and karaf par Guillaume Nodet
 
Introduction to OSGGi
Introduction to OSGGiIntroduction to OSGGi
Introduction to OSGGi
 
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten ZiegelerMonitoring OSGi Applications with the Web Console - Carsten Ziegeler
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
 
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
Connect2017 DEV-1550 Why Java 8? Or, What's a Lambda?
 
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
Leveraging the strength of OSGi to deliver a convergent IoT Ecosystem - O Log...
 
Asynchronous OSGi – Promises for the Masses - T Ward
Asynchronous OSGi – Promises for the Masses - T WardAsynchronous OSGi – Promises for the Masses - T Ward
Asynchronous OSGi – Promises for the Masses - T Ward
 
Cfml features modern_coding
Cfml features modern_codingCfml features modern_coding
Cfml features modern_coding
 
Apache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolboxApache DeltaSpike the CDI toolbox
Apache DeltaSpike the CDI toolbox
 
Java 9 and Beyond
Java 9 and BeyondJava 9 and Beyond
Java 9 and Beyond
 
What is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xWhat is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.x
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi Webinar
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
 

En vedette

OSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ HargraveOSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ Hargravemfrancis
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010sullis
 
Lean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian SchneiderLean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian Schneidermfrancis
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchevmfrancis
 
Distributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten ZiegelerDistributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten Ziegelermfrancis
 
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...mfrancis
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankovmfrancis
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingBertrand Delacretaz
 
OSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingOSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingCarsten Ziegeler
 
Monitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web ConsoleMonitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web ConsoleCarsten Ziegeler
 
OSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo RulliOSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo Rullimfrancis
 
Distributed Eventing in OSGi
Distributed Eventing in OSGiDistributed Eventing in OSGi
Distributed Eventing in OSGiCarsten Ziegeler
 
OSGi Best Practices - Tim Ward
OSGi Best Practices - Tim WardOSGi Best Practices - Tim Ward
OSGi Best Practices - Tim Wardmfrancis
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
 

En vedette (16)

OSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ HargraveOSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ Hargrave
 
Reactive applications
Reactive applicationsReactive applications
Reactive applications
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
 
Lean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian SchneiderLean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian Schneider
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
 
Distributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten ZiegelerDistributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten Ziegeler
 
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankov
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
OSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingOSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache Sling
 
Monitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web ConsoleMonitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web Console
 
OSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo RulliOSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo Rulli
 
Distributed Eventing in OSGi
Distributed Eventing in OSGiDistributed Eventing in OSGi
Distributed Eventing in OSGi
 
OSGi Best Practices - Tim Ward
OSGi Best Practices - Tim WardOSGi Best Practices - Tim Ward
OSGi Best Practices - Tim Ward
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
The AI Rush
The AI RushThe AI Rush
The AI Rush
 

Similaire à Use Case: Building OSGi Enterprise Applications (QCon 14)

SAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationSAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationPeter Muessig
 
Moving the Guidewire platform to OSGi - Paul D'Albora
Moving the Guidewire platform to OSGi - Paul D'AlboraMoving the Guidewire platform to OSGi - Paul D'Albora
Moving the Guidewire platform to OSGi - Paul D'Alboramfrancis
 
Integration Testing in AEM
Integration Testing in AEMIntegration Testing in AEM
Integration Testing in AEMconnectwebex
 
Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Paolo Mottadelli
 
OSGi made simple - Fuse Application Bundles
OSGi made simple - Fuse Application BundlesOSGi made simple - Fuse Application Bundles
OSGi made simple - Fuse Application BundlesRob Davies
 
Progress core product group strategy and roadmap - PUG Baltic Annual Conferen...
Progress core product group strategy and roadmap - PUG Baltic Annual Conferen...Progress core product group strategy and roadmap - PUG Baltic Annual Conferen...
Progress core product group strategy and roadmap - PUG Baltic Annual Conferen...Alen Leit
 
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSEIBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSEFraser Chadburn
 
IBM Rational Rhapsody 8.4 install guide (including Cygwin and obtaining an ev...
IBM Rational Rhapsody 8.4 install guide (including Cygwin and obtaining an ev...IBM Rational Rhapsody 8.4 install guide (including Cygwin and obtaining an ev...
IBM Rational Rhapsody 8.4 install guide (including Cygwin and obtaining an ev...Fraser Chadburn
 
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)Fraser Chadburn
 
Oracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlOracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlChris Muir
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
Installing Rational Rhapsody Designer 8.2 or 8.2.1 for Executable MBSE
Installing Rational Rhapsody Designer 8.2 or 8.2.1 for Executable MBSEInstalling Rational Rhapsody Designer 8.2 or 8.2.1 for Executable MBSE
Installing Rational Rhapsody Designer 8.2 or 8.2.1 for Executable MBSEFraser Chadburn
 
Ceph_in_a_Windows_world
Ceph_in_a_Windows_worldCeph_in_a_Windows_world
Ceph_in_a_Windows_worldsuncbing1
 
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...XebiaLabs
 
DevOps as a Pathway to AWS | AWS Public Sector Summit 2016
DevOps as a Pathway to AWS | AWS Public Sector Summit 2016DevOps as a Pathway to AWS | AWS Public Sector Summit 2016
DevOps as a Pathway to AWS | AWS Public Sector Summit 2016Amazon Web Services
 
Monitoring with Icinga2 at Adobe
Monitoring with Icinga2 at AdobeMonitoring with Icinga2 at Adobe
Monitoring with Icinga2 at AdobeIcinga
 
XebiaLabs - Optimizing App Deployment to IBM WebSphere
XebiaLabs - Optimizing App Deployment to IBM WebSphereXebiaLabs - Optimizing App Deployment to IBM WebSphere
XebiaLabs - Optimizing App Deployment to IBM WebSphereXebiaLabs
 
Code Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsCode Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsDana Luther
 
Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008rajivmordani
 

Similaire à Use Case: Building OSGi Enterprise Applications (QCon 14) (20)

SAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationSAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous Integration
 
Moving the Guidewire platform to OSGi - Paul D'Albora
Moving the Guidewire platform to OSGi - Paul D'AlboraMoving the Guidewire platform to OSGi - Paul D'Albora
Moving the Guidewire platform to OSGi - Paul D'Albora
 
Integration Testing in AEM
Integration Testing in AEMIntegration Testing in AEM
Integration Testing in AEM
 
Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014Open Architecture in the Adobe Marketing Cloud - Summit 2014
Open Architecture in the Adobe Marketing Cloud - Summit 2014
 
OSGi made simple - Fuse Application Bundles
OSGi made simple - Fuse Application BundlesOSGi made simple - Fuse Application Bundles
OSGi made simple - Fuse Application Bundles
 
Progress core product group strategy and roadmap - PUG Baltic Annual Conferen...
Progress core product group strategy and roadmap - PUG Baltic Annual Conferen...Progress core product group strategy and roadmap - PUG Baltic Annual Conferen...
Progress core product group strategy and roadmap - PUG Baltic Annual Conferen...
 
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSEIBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
IBM Rational Rhapsody 8.3.1 install guide with Cygwin for Executable MBSE
 
IBM Rational Rhapsody 8.4 install guide (including Cygwin and obtaining an ev...
IBM Rational Rhapsody 8.4 install guide (including Cygwin and obtaining an ev...IBM Rational Rhapsody 8.4 install guide (including Cygwin and obtaining an ev...
IBM Rational Rhapsody 8.4 install guide (including Cygwin and obtaining an ev...
 
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
Rational Rhapsody 8.3 with Cygwin and iFixes (www.executablembse.com)
 
Oracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version ControlOracle ADF Architecture TV - Development - Version Control
Oracle ADF Architecture TV - Development - Version Control
 
GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Installing Rational Rhapsody Designer 8.2 or 8.2.1 for Executable MBSE
Installing Rational Rhapsody Designer 8.2 or 8.2.1 for Executable MBSEInstalling Rational Rhapsody Designer 8.2 or 8.2.1 for Executable MBSE
Installing Rational Rhapsody Designer 8.2 or 8.2.1 for Executable MBSE
 
Ceph_in_a_Windows_world
Ceph_in_a_Windows_worldCeph_in_a_Windows_world
Ceph_in_a_Windows_world
 
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
 
DevOps as a Pathway to AWS | AWS Public Sector Summit 2016
DevOps as a Pathway to AWS | AWS Public Sector Summit 2016DevOps as a Pathway to AWS | AWS Public Sector Summit 2016
DevOps as a Pathway to AWS | AWS Public Sector Summit 2016
 
Monitoring with Icinga2 at Adobe
Monitoring with Icinga2 at AdobeMonitoring with Icinga2 at Adobe
Monitoring with Icinga2 at Adobe
 
XebiaLabs - Optimizing App Deployment to IBM WebSphere
XebiaLabs - Optimizing App Deployment to IBM WebSphereXebiaLabs - Optimizing App Deployment to IBM WebSphere
XebiaLabs - Optimizing App Deployment to IBM WebSphere
 
Code Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application MigrationsCode Coverage for Total Security in Application Migrations
Code Coverage for Total Security in Application Migrations
 
Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008
 

Plus de Carsten Ziegeler

What's cool in the new and updated OSGi Specs
What's cool in the new and updated OSGi SpecsWhat's cool in the new and updated OSGi Specs
What's cool in the new and updated OSGi SpecsCarsten Ziegeler
 
What's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specsWhat's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specsCarsten Ziegeler
 
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)Carsten Ziegeler
 
Adobe AEM - From Eventing to Job Processing
Adobe AEM - From Eventing to Job ProcessingAdobe AEM - From Eventing to Job Processing
Adobe AEM - From Eventing to Job ProcessingCarsten Ziegeler
 
JCR - Java Content Repositories
JCR - Java Content RepositoriesJCR - Java Content Repositories
JCR - Java Content RepositoriesCarsten Ziegeler
 
JCR In Action (ApacheCon US 2009)
JCR In Action (ApacheCon US 2009)JCR In Action (ApacheCon US 2009)
JCR In Action (ApacheCon US 2009)Carsten Ziegeler
 
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 RESTCarsten Ziegeler
 
Apache Sanselan (ApacheCon US 2007 FFT)
Apache Sanselan (ApacheCon US 2007 FFT)Apache Sanselan (ApacheCon US 2007 FFT)
Apache Sanselan (ApacheCon US 2007 FFT)Carsten Ziegeler
 
Apache iBatis (ApacheCon US 2007)
Apache iBatis (ApacheCon US 2007)Apache iBatis (ApacheCon US 2007)
Apache iBatis (ApacheCon US 2007)Carsten Ziegeler
 
JCR In Action (ApacheCon US 2007)
JCR In Action (ApacheCon US 2007)JCR In Action (ApacheCon US 2007)
JCR In Action (ApacheCon US 2007)Carsten Ziegeler
 
Apache Portals Panel (ApacheCon US 2007)
Apache Portals Panel (ApacheCon US 2007)Apache Portals Panel (ApacheCon US 2007)
Apache Portals Panel (ApacheCon US 2007)Carsten Ziegeler
 
JCR In Action (ApacheCon EU 2008)
JCR In Action (ApacheCon EU 2008)JCR In Action (ApacheCon EU 2008)
JCR In Action (ApacheCon EU 2008)Carsten Ziegeler
 
Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Maven SCR Plugin (ApacheCon EU 2008 - FFT)Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Maven SCR Plugin (ApacheCon EU 2008 - FFT)Carsten Ziegeler
 

Plus de Carsten Ziegeler (14)

What's cool in the new and updated OSGi Specs
What's cool in the new and updated OSGi SpecsWhat's cool in the new and updated OSGi Specs
What's cool in the new and updated OSGi Specs
 
What's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specsWhat's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specs
 
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)
 
Adobe AEM - From Eventing to Job Processing
Adobe AEM - From Eventing to Job ProcessingAdobe AEM - From Eventing to Job Processing
Adobe AEM - From Eventing to Job Processing
 
JCR - Java Content Repositories
JCR - Java Content RepositoriesJCR - Java Content Repositories
JCR - Java Content Repositories
 
JCR In Action (ApacheCon US 2009)
JCR In Action (ApacheCon US 2009)JCR In Action (ApacheCon US 2009)
JCR In Action (ApacheCon US 2009)
 
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
 
Embrace OSGi
Embrace OSGiEmbrace OSGi
Embrace OSGi
 
Apache Sanselan (ApacheCon US 2007 FFT)
Apache Sanselan (ApacheCon US 2007 FFT)Apache Sanselan (ApacheCon US 2007 FFT)
Apache Sanselan (ApacheCon US 2007 FFT)
 
Apache iBatis (ApacheCon US 2007)
Apache iBatis (ApacheCon US 2007)Apache iBatis (ApacheCon US 2007)
Apache iBatis (ApacheCon US 2007)
 
JCR In Action (ApacheCon US 2007)
JCR In Action (ApacheCon US 2007)JCR In Action (ApacheCon US 2007)
JCR In Action (ApacheCon US 2007)
 
Apache Portals Panel (ApacheCon US 2007)
Apache Portals Panel (ApacheCon US 2007)Apache Portals Panel (ApacheCon US 2007)
Apache Portals Panel (ApacheCon US 2007)
 
JCR In Action (ApacheCon EU 2008)
JCR In Action (ApacheCon EU 2008)JCR In Action (ApacheCon EU 2008)
JCR In Action (ApacheCon EU 2008)
 
Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Maven SCR Plugin (ApacheCon EU 2008 - FFT)Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Maven SCR Plugin (ApacheCon EU 2008 - FFT)
 

Dernier

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
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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
 
🐬 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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Dernier (20)

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...
 
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
 
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...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Use Case: Building OSGi Enterprise Applications (QCon 14)

  • 1. © 2014 Adobe Systems Incorporated. All Rights Reserved. Building Modular Enterprise Applications Carsten Ziegeler | Adobe Research Switzerland 1
  • 2. © 2014 Adobe Systems Incorporated. All Rights Reserved. About carsten.ziegeler@adobe.com @cziegeler §  RnD Team at Adobe Research Switzerland §  Member of the Apache Software Foundation §  Apache Felix and Apache Sling (PMC and committer) §  And other Apache projects §  OSGi Core Platform and Enterprise Expert Groups §  Member of the OSGi Board §  Book / article author, technical reviewer, conference speaker 2
  • 3. © 2014 Adobe Systems Incorporated. All Rights Reserved. Motivation §  Enjoy the power of modularity §  OSGi is everywhere §  From embedded systems to enterprise applications and THE CLOUD §  Adapting a technology is always a challenge §  Common pitfalls §  Potential solutions 3
  • 4. © 2014 Adobe Systems Incorporated. All Rights Reserved. But wait a second… §  Adobe & OSGi ? 4
  • 5. © 2014 Adobe Systems Incorporated. All Rights Reserved. But wait a second… §  Adobe & OSGi ? 5
  • 6. © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe & OSGi & Open Source & Open Development §  Using OSGi in various products §  Strategic member of the OSGi Alliance §  Board of directors §  Participating in CPEG and EEG §  Highly contributing to open source §  Especially Apache Software Foundation §  Participating in open standards §  Embracing open development 6
  • 7. © 2014 Adobe Systems Incorporated. All Rights Reserved. Case Study: The Development of Adobe Experience Manager 7
  • 8. © 2014 Adobe Systems Incorporated. All Rights Reserved. Back to the Future: Web Content Management Code History 8
  • 9. © 2014 Adobe Systems Incorporated. All Rights Reserved. Back in the Days…CQ 4 9
  • 10. © 2014 Adobe Systems Incorporated. All Rights Reserved. OSGi based Enterprise Web Content Management – Adobe CQ5 10
  • 11. © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Experience Manager 11
  • 12. © 2014 Adobe Systems Incorporated. All Rights Reserved. Motivations for Going Modular (2006) §  Aged code base §  Monolithic §  Highly entangled §  Growing complexity and functionality §  No clear separation between API and implementation §  Increasing customer base §  Team growth 12
  • 13. © 2014 Adobe Systems Incorporated. All Rights Reserved. Modularity is Key §  Manage growing complexity §  Support dynamic extensibility §  Define contracts between modules 13
  • 14. © 2014 Adobe Systems Incorporated. All Rights Reserved. Potential Solutions (2006) §  Spring? §  OSGi? §  Other open source component frameworks? §  DIY? 14
  • 15. © 2014 Adobe Systems Incorporated. All Rights Reserved. Benefits of OSGi §  OSGi modules = bundles §  jars with strict enforcements §  Exported packages with version §  Imported packages with version range §  Private packages §  Service Registry §  Separation of Concerns §  Loose coupling 15
  • 16. © 2014 Adobe Systems Incorporated. All Rights Reserved. Modularity - How do we get there? (2006) §  Start with a single big bundle? §  Embedding OSGi framework? §  Complete rewrite? 16
  • 17. © 2014 Adobe Systems Incorporated. All Rights Reserved. The Fun Way : Complete Rewrite §  New architecture §  New backend (Apache Jackrabbit) §  New web application framework (Apache Sling) §  New UI §  Build modules from the start §  Control evolution §  (Provide tools for migration from old solution) 17
  • 18. © 2014 Adobe Systems Incorporated. All Rights Reserved. OSGi and Open Source (2006) §  Apache Felix §  Equinox 18
  • 19. © 2014 Adobe Systems Incorporated. All Rights Reserved. Framework runs and now? §  We need bundles! §  Build tools §  Ant? (BND) §  Maven? (Apache Felix Maven Bundle Plugin) 19
  • 20. © 2014 Adobe Systems Incorporated. All Rights Reserved. Maven Bundle Plugin (2007) §  Specifying all OSGi metadata in the POM §  Exported packages §  Private packages §  Imported packages and versions get calculated §  Parent POM to define rules for bundle symbolic name 20
  • 21. © 2014 Adobe Systems Incorporated. All Rights Reserved. Maven Bundle Plugin – First problems §  Specifying all OSGi metadata in the POM §  Exported packages §  Private packages §  Imported packages and versions get calculated §  Parent POM to define rules for bundle symbolic name §  Exported package version = POM version §  New private package needs updating the pom §  Slight difference in version handling between OSGi and Maven (The SNAPSHOT problem) §  2.0.1 < (OSGi) 2.0.1-SNAPSHOT < (Maven) 2.0.1 §  Semantic versioning? 21
  • 22. © 2014 Adobe Systems Incorporated. All Rights Reserved. Excursion on Versioning §  Marketing Versions vs. Engineering Versions §  Versioning Package Exports §  Engineering Versions §  Apply versions ! §  Semantic Versioning crucial §  Bundle Versions §  Grey area §  Semantic Versioning helpful §  Application Versions §  Marketing Versions 22
  • 23. © 2014 Adobe Systems Incorporated. All Rights Reserved. Versioning Best Practice §  Package Exports §  Always apply a version to package exports §  Start with 1.0 §  Only increment when changing the API §  Think hard before increasing the major version ! §  Package Imports §  Ensure proper version range import 23
  • 24. © 2014 Adobe Systems Incorporated. All Rights Reserved. Semantic Versioning §  Nice whitepaper on the OSGi homepage §  Versioning policy for exported packages §  OSGi versions: <major>.<minor>.<micro>.<qualifier> §  Updating package versions: §  Fix/patch (no API change) : update micro §  Extend API (affects implementers, not clients) : update minor §  API breakage: update major 24
  • 25. © 2014 Adobe Systems Incorporated. All Rights Reserved. Versioning Annotations §  BND or new with OSGi R6 §  Annotations for documenting semantic versioning information §  @Version §  @ProviderType §  @ConsumerType 25
  • 26. © 2014 Adobe Systems Incorporated. All Rights Reserved. Versioning Best Practice (cont.) §  Bundle Versions §  Always use and manage bundle version §  Align bundle version with Maven version §  Use odd micro versions for SNAPSHOTs §  e.g. 0.0.1-SNAPSHOT, 1.3.5-SNAPSHOT §  Use even micro versions for release §  e.g. 1.0.0, 1.3.6 §  Dependencies §  Always use least required version for dependencies 26
  • 27. © 2014 Adobe Systems Incorporated. All Rights Reserved. Maven Bundle Plugin – Today §  Specifying all OSGi metadata in the POM §  Exported packages §  Private packages §  Imported packages and versions get calculated §  Parent POM to define rules for bundle symbolic name §  Parent POM to define rules for bundle symbolic name and private packages §  No package versioning information in POM (annotations) §  Follow semantic versioning §  Odd/even versioning policy §  Usually no OSGI metadata in the POM 27
  • 28. © 2014 Adobe Systems Incorporated. All Rights Reserved. What about Components and Services (2007)? §  Framework API is usually too low level §  Make development as easy as possible §  Try to hide dynamics §  And there are OSGi compendium specs §  Declarative Services §  Configuration Admin §  Metatype 28
  • 29. © 2014 Adobe Systems Incorporated. All Rights Reserved. Component Development with Declarative Services §  Declarative Services (OSGi Compendium Spec) §  Defines Service Component Runtime (SCR) §  Declarative component model §  XML descriptor for components including §  Provided services §  References to other services §  Configuration properties 29
  • 30. © 2014 Adobe Systems Incorporated. All Rights Reserved. Configuration Admin •  OSGi Configuration Admin •  “The” solution to handle configurations •  Configuration Manager •  Persistence storage •  Service API to retrieve/update/remove configuration •  OSGi Metatype Service •  Description of bundle metadata •  Description of service configurations •  Property type, name, and description 30
  • 31. © 2014 Adobe Systems Incorporated. All Rights Reserved. What about Components and Services (2007)? §  Framework API is usually too low level §  And there are OSGi compendium specs §  Declarative Services §  Configuration Admin §  Metatype §  No (Apache) open source implementations available §  Nearly no tooling §  Declarative Services uses XML descriptors §  Metatype uses XML descriptors and property files 31
  • 32. © 2014 Adobe Systems Incorporated. All Rights Reserved. DIY – Donations to Apache Felix §  Apache Felix SCR (Declarative Service Implementation) §  Apache Felix Config Admin §  Apache Felix Metatype §  Apache Felix Preferences §  Apache Felix SCR Tooling §  Java annotations for generating DS and Metatype descriptors §  Maven, ANT, BND 32
  • 33. © 2014 Adobe Systems Incorporated. All Rights Reserved. Component Development with Declarative Services §  Declarative Services (OSGi Compendium Spec) §  Defines Service Component Runtime (SCR) §  Apache Felix SCR Annotations (DS annotations) §  Some advantages (in combination with the tooling) §  POJO style §  Declarative §  Single source: just the Java code, no XML etc. §  "Integration" with Configuration Admin and Metatype Service 33
  • 34. © 2014 Adobe Systems Incorporated. All Rights Reserved. Components and Services with OSGi §  Service interface §  Public (if exported for other bundles) §  Versioned through package version (Semantic versioning) §  Private for internal services (sometimes useful) §  Component / service implementation §  Always private 34
  • 35. © 2014 Adobe Systems Incorporated. All Rights Reserved. My First Component 35 package com.adobe.osgitraining.impl; import org.apache.felix.scr.annotations.Component; @Component public class MyComponent { }
  • 36. © 2014 Adobe Systems Incorporated. All Rights Reserved. Component Lifecycle 36 package com.adobe.osgitraining.impl; import org.apache.felix.scr.annotations.Activate; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Deactivate; @Component public class MyComponent { @Activate protected void activate() { // do something } @Deactivate protected void deactivate() { // do something } }
  • 37. © 2014 Adobe Systems Incorporated. All Rights Reserved. Providing a Service 37 package com.adobe.osgitraining.impl; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Service; import org.osgi.service.event.EventHandler; @Component @Service(value=EventHandler.class) public class MyComponent implements EventHandler { …
  • 38. © 2014 Adobe Systems Incorporated. All Rights Reserved. Using a Service 38 package com.adobe.osgitraining.impl; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Service; import org.osgi.service.event.EventHandler; @Component @Service(value=EventHandler.class) public class MyComponent implements EventHandler { @Reference privateTThreadPool threadPool; …
  • 39. © 2014 Adobe Systems Incorporated. All Rights Reserved. Using an Optional Service 39 package com.adobe.osgitraining.impl; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Service; import org.osgi.service.event.EventHandler; @Component @Service(value=EventHandler.class) public class MyComponent implements EventHandler { @Reference(cardinality=ReferenceCardinality.OPTIONAL_UNARY, policy=ReferencePolicy.DYNAMIC) private volatileTThreadPool threadPool; @Reference(cardinality=ReferenceCardinality.MANDATORY_UNARY) privateTDistributor distributor;
  • 40. © 2014 Adobe Systems Incorporated. All Rights Reserved. Component Properties -> Service Properties 40 import org.apache.sling.commons.osgi.PropertiesUtil; @Component @Service(value=EventHandler.class) @Properties({ @Property(name="service.vendor", value="Who?”), @Property(name="service.ranking", intValue=500) }) public class DistributingEventHandler implements EventHandler {
  • 41. © 2014 Adobe Systems Incorporated. All Rights Reserved. Configuration Admin •  OSGi Configuration Admin •  “The” solution to handle configurations •  Configuration Manager •  Persistence storage •  Service API to retrieve/update/remove configuration •  Integration with Declarative Services •  Configuration changes are propagated to the components •  Configurations are stored using the PID 41
  • 42. © 2014 Adobe Systems Incorporated. All Rights Reserved. Configuration – Supports Configuration Admin §  Provided map contains §  Configuration properties from Configuration Admin §  Defined component properties 42 @Activate protected void activate(final Map<String, Object> props) { … }
  • 43. © 2014 Adobe Systems Incorporated. All Rights Reserved. Configuration – Supports Configuration Admin 43 import org.apache.sling.commons.osgi.PropertiesUtil; @Component @Service(value=EventHandler.class) @Properties({ @Property(name="event.topics", value="*", propertyPrivate=true), @Property(name="event.filter", value="(event.distribute=*)", propertyPrivate=true) }) public class DistributingEventHandler implements EventHandler { private static final int DEFAULT_CLEANUP_PERIOD = 15; @Property(intValue=DEFAULT_CLEANUP_PERIOD) private static final String PROP_CLEANUP_PERIOD ="cleanup.period"; private int cleanupPeriod; @Activate protected void activate(final Map<String, Object> props) { this.cleanupPeriod = PropertiesUtil.toInteger(props.get(PROP_CLEANUP_PERIOD)); }
  • 44. © 2014 Adobe Systems Incorporated. All Rights Reserved. Configuration Update 44 import org.apache.sling.commons.osgi.OsgiUtil; public class DistributingEventHandler implements EventHandler { … @Modified protected void update(final Map<String, Object> props) { this.cleanupPeriod = PropertiesUtil.toInteger(props.get(PROP_CLEANUP_PERIOD)); } Without @Modified: Component is restarted on config change!
  • 45. © 2014 Adobe Systems Incorporated. All Rights Reserved. Metatype §  OSGi Metatype Service §  Description of bundle metadata §  Description of service configurations §  Property type, name, and description 45
  • 46. © 2014 Adobe Systems Incorporated. All Rights Reserved. Configuration – Supports Metatype 46 import org.apache.sling.commons.osgi.PropertiesUtil; @Component(metatype=true, label="Distributing Event Handler", description="This handler is awesome.") @Properties({ @Property(name="event.topics", value="*", propertyPrivate=true) }) public class DistributingEventHandler implements EventHandler { private static final int DEFAULT_CLEANUP_PERIOD = 15; @Property(intValue=DEFAULT_CLEANUP_PERIOD, label="Cleanup Period", description="This is the cleanup period in seconds.") private static final String PROP_CLEANUP_PERIOD ="cleanup.period";
  • 47. © 2014 Adobe Systems Incorporated. All Rights Reserved. Component Development with Declarative Services §  Straight forward component development §  Single source of truth §  (Will even be easier with new Declarative Service spec from R6) §  Typical problems §  OSGi dynamics is hidden §  Handling references of cardinality multiple §  Copying of bad practices 47
  • 48. © 2014 Adobe Systems Incorporated. All Rights Reserved. And what about THE WEB? (2007) §  OSGi Http Service Specification §  Based on servlet API 2.1 §  Programmatic API to register servlets and resources §  Apache Felix HTTP implementation §  Later whiteboard support in Apache Felix implementation for §  Servlets §  Filters §  Some listeners 48
  • 49. © 2014 Adobe Systems Incorporated. All Rights Reserved. And what about THE WEB? §  OSGi Http Service Specification §  Based on servlet API 2.1 §  Programmatic API to register servlets and resources §  Apache Felix HTTP implementation §  Invented Apache Sling Web Framework §  Resource based approach §  Scripting §  Written as OSGi bundles §  Later whiteboard support in Apache Felix implementation for §  Servlets §  Filters §  Some listeners §  New OSGi Http Whiteboard Service Spec in R6 49
  • 50. © 2014 Adobe Systems Incorporated. All Rights Reserved. But what about Provisioning and Deliverables? (2007) §  Wishes §  Single definition of deliverable (bundles, configurations, proprietary packages) §  Different flavors: web application, standalone §  Easy and flexible updates 50
  • 51. © 2014 Adobe Systems Incorporated. All Rights Reserved. But what about Provisioning and Deliverables? (2007) §  Wishes §  Single definition of deliverable (bundles, configurations, proprietary packages) §  Different flavors: web application, standalone §  Easy and flexible updates §  No open source solution available 51
  • 52. © 2014 Adobe Systems Incorporated. All Rights Reserved. Contributing Apache Sling Launchpad Ecosystem §  Creating a distribution is easy §  Standalone jar file and/or web application §  Maven Launchpad Plugin §  Define bundle list §  Add other artifacts §  Configurations §  Leverages Apache Sling’s OSGi installer 52
  • 53. © 2014 Adobe Systems Incorporated. All Rights Reserved. Bundle List Example 53 <?xml version="1.0"?> <bundles> <startLevel level="boot"> <bundle> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.commons.log</artifactId> <version>2.1.2</version> </bundle> … <startLevel level="9"> <bundle> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.eventadmin</artifactId> <version>1.3.2</version> </bundle> … <startLevel level="0"> <bundle> <groupId>org.some.company</groupId> <artifactId>a.strange.artifact</artifactId> <version>1.2.0</version> <type>zip</zip> </bundle>
  • 54. © 2014 Adobe Systems Incorporated. All Rights Reserved. Apache Sling Launchpad §  Bootstrap code §  Includes Apache Felix §  Handles framework updates §  Launch an OSGi framework §  Standalone jar with http service §  As a web application with http bridge §  Deploy packaged artifacts §  Configurable §  sling.properties §  (system properties / servlet parameters) 54
  • 55. © 2014 Adobe Systems Incorporated. All Rights Reserved. OSGi Standalone App or OSGi Webapp with Launchpad 55 JAR File Launchpad Main Bootstrap Code OSGi Framewok OSGi HTTP Service sling.properties Deployable Artifacts WE I R N IR JO S- H BA B G S EL @AD OBE WAR File Launchpad Servlet Bootstrap Code OSGi Framewok HTTP Bridge / OSGi HTTP Service sling.properties Deployable Artifacts WE I R N IR JO S- H BA B G S EL @AD OBE
  • 56. © 2014 Adobe Systems Incorporated. All Rights Reserved. Apache Sling OSGi Installer §  General service covering §  Install §  Update §  Uninstall §  Of §  Bundles §  Configurations §  Custom artifacts 56
  • 57. © 2014 Adobe Systems Incorporated. All Rights Reserved. Apache Sling OSGi Installer 57 OSGi Installer File Provider JCR Provider Launchpad Provider Providers Transformers and Task Factories Config Admin Bundles Add/Remove Update Artifact Artifact Transformed Artifact State & Artifact DB
  • 58. © 2014 Adobe Systems Incorporated. All Rights Reserved. Advantages of the OSGi Installer Family §  Pluggable and highly customizable §  New artifact types: transformer + task factory §  New artifact sources: provider §  Batch handling §  Retry mechanism in the installer core §  Bundle installation order doesn’t matter §  State management in the installer core §  Defined workflow §  Copes with 3rd party changes 58
  • 59. © 2014 Adobe Systems Incorporated. All Rights Reserved. Running Deliverables and what about administration? (2007) §  Nothing really available in the open source world §  Especially not web based 59
  • 60. © 2014 Adobe Systems Incorporated. All Rights Reserved. Donating Apache Felix Web Console + Plugins §  Rich set of core functionality §  Bundles §  Services §  Configuration Admin §  System Information §  (JQuery based UI) §  Extensible §  Pluggable authentication §  Still light-weight §  REST interface 60
  • 61. © 2014 Adobe Systems Incorporated. All Rights Reserved. Web Console Demo I 61
  • 62. © 2014 Adobe Systems Incorporated. All Rights Reserved. Web Console Demo II 62
  • 63. © 2014 Adobe Systems Incorporated. All Rights Reserved. Web Console Demo III 63
  • 64. © 2014 Adobe Systems Incorporated. All Rights Reserved. Web Console - Offline Usage §  Status zip contains §  Output from all inventory printers §  Output from special web console plugins §  Attachments §  JSON files §  Automated analysis §  Bundle list and status §  Configurations §  Log files 64
  • 65. © 2014 Adobe Systems Incorporated. All Rights Reserved. Problems solved… §  Modularity §  OSGi bundles §  Semantic versioning §  Services and components §  Development §  Frameworks and tooling §  Deliverables and provisioning §  Administration 65
  • 66. © 2014 Adobe Systems Incorporated. All Rights Reserved. Hitting the Real World – 3rd Party Libraries §  Use them as bundles §  Project delivers already a bundle §  Apache Commons, Apache Sling etc. §  Use special bundle repositories §  Apache Felix Commons, Spring etc. §  But check included metadata! §  Create your own wrapper §  Easy with the Felix maven bundle plugin §  Include classes in your bundle §  Again: easy with the Felix maven bundle plugin §  Convince the projects to provide useful OSGi metadata! 66
  • 67. © 2014 Adobe Systems Incorporated. All Rights Reserved. Hitting the Real World – "Enterprise" Requirements §  Testing under high load / high concurrency §  Reimplementing some (open source) modules §  Not every developer is aware that code can be called concurrently §  And how to solve this in an acceptable way §  Dynamic nature of OSGi §  Relatively painless with DS and annotations §  Gets trickier with plain framework API and/or cardinality multiple §  Again: concurrency 67
  • 68. © 2014 Adobe Systems Incorporated. All Rights Reserved. Hitting the Real World – All Time Favorites §  When is my system ready? §  Different strategies §  All bundles started and specific start level reached §  Special startup handler service for notification (Apache Sling) §  Fighting against FUD §  OSGi is slow, consumes too much memory, complicated, §  has no dependency injection, is not used in the enterprise… 68
  • 69. © 2014 Adobe Systems Incorporated. All Rights Reserved. Additional Challenges §  Clustering §  Discovery §  Distributed Eventing 69
  • 70. © 2014 Adobe Systems Incorporated. All Rights Reserved. On the Roadmap §  OSGi subsystems §  Grouping of bundles §  Export / import boundaries on subsystem level §  OSGi Remote Services §  OSGi Asynchronous Services §  OSGi Distributed Eventing 70
  • 71. © 2014 Adobe Systems Incorporated. All Rights Reserved. Think Modular… •  This is not a new concept or latest hype! •  Think about modularity! •  Create a clean package space •  What is your API? •  public vs private •  Make things only public if necessary/used •  Starting with private stuff going public is easy •  Use proper versioning contracts •  Semantic Versioning 71
  • 72. © 2014 Adobe Systems Incorporated. All Rights Reserved. …Be Modular! •  Provide bundles •  Add manifest information •  Think about dependencies •  Additional bundle vs include •  Optional •  Version ranges •  Manage releases and versions properly •  Benefits even without OSGi 72
  • 73. © 2014 Adobe Systems Incorporated. All Rights Reserved. Component Development §  Contract defined by service interface §  Declarative Services is a powerful component model §  Minimal OSGi knowledge required with available solutions §  Apache Felix SCR Tooling §  Alternatives available J §  Inter-operability through OSGi service registry 73
  • 74. © 2014 Adobe Systems Incorporated. All Rights Reserved. Conclusion §  Today a lot of the hard work is already done §  Open Source & Open Development are your friends §  OSGi made the Adobe Experience Manager success story possible §  Team growth from 40+ to several hundreds §  Immense growth in functionality §  Still (dynamically) extensible and manageable §  OSGi Core and Compendium provide nearly everything you need §  Framework, Declarative Services, Configuration Admin, Metatype, Event Admin §  Open Source Implementations and Extensions §  Apache Felix and friends 74
  • 75. © 2014 Adobe Systems Incorporated. All Rights Reserved. Check It Out! •  Read the OSGi specs •  Framework •  Declarative Services, Config Admin, Metatype, Event Admin •  Checkout the various Apache projects! •  Explore available tooling •  Embrace modularity! •  Join the OSGi Alliance and help shaping the future! 75
  • 76. © 2014 Adobe Systems Incorporated. All Rights Reserved. And…New OSGi Specifications! §  Last week (week of June 2nd) the OSGi Core Release 6 Specification received its final approval and will be available this week to the public for downloading. §  http://www.osgi.org/Specifications/HomePage §  Also happening last week, the OSGi Board of Directors approved the publication of an Early Draft Specification of OSGi Enterprise Release 6 for downloading. §  http://www.osgi.org/Specifications/Drafts 76
  • 77. © 2014 Adobe Systems Incorporated. All Rights Reserved. References §  OSGi Semantic Versioning Whitepaper: http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf §  OSGi Specifications: http://www.osgi.org §  Apache Felix: http://felix.apache.org §  Apache Sling: http://sling.apache.org §  Apache Aries: http://aries.apache.org §  BND: http://www.aqute.biz/Bnd/Bnd §  Bndtools: http://njbartlett.name/bndtools.html §  Planet OSGi: http://www.osgi.org/Planet/Feed 77
  • 78. © 2014 Adobe Systems Incorporated. All Rights Reserved.