SlideShare a Scribd company logo
1 of 48
Download to read offline
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Leveraging the lastest OSGi R7 Specifications
David Bosschaert & Carsten Ziegeler | Adobe
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Carsten Ziegeler
§ Principal Scientist @ Adobe Research Switzerland
§ Member of the Apache Software Foundation
§ VP of Apache Felix and Sling
§ OSGi Expert Groups and Board member
2
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
David Bosschaert
§ R&D Adobe Ireland
§ Co-chair OSGi Enterprise Expert Group
§ Apache Felix, Aries PMC member and committer
§ … other opensource projects
§ Cloud and embedded computing enthusiast
3
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Basics
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Versioning Annotations
§ Old Friends:
§ @Version, @ProviderType, @ConsumerType
§ New Friend:
§ @Export
5
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Bundle Annotations
§ More New Friends:
§ @Capability, @Requirement, @Header
@Requirement(namespace="osgi.implementation",
name="osgi.http", version="1.1.0")
@Header(name=Constants.BUNDLE_CATEGORY, value="eclipsecon")
6
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Converter
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Object Conversion
§ Wouldn’t you like to convert anything to everything?
§ Peter Kriens’ work in Bnd started it
§ Convert
§ Scalars, Collections, Arrays
§ Interfaces, maps, DTOs, JavaBeans, Annotations
§ Need predictable behaviour – as little implementation freedom as possible
§ Can be customized
RFC 215 – Implementation in Apache Felix (/converter)
8
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Sample conversions
§ Examples:
Converter c = Converters.standardConverter();
// Convert scalars
int i = c.convert("123").to(int.class);
UUID id = c.convert("067e6162-3b6f-4ae2-a171-2470b63dff00").to(UUID.class);
List<String> ls = Arrays.asList("978", "142", "-99");
short[] la = c.convert(ls).to(short[].class);
9
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Convert configuration data into typed information with defaults
Map<String, String> myMap = new HashMap<>();
myMap.put("refresh", "750");
myMap.put("other", "hello");
// Convert map structures
@interface MyAnnotation {
int refresh() default 500;
String temp() default "/tmp";
}
MyAnnotation myAnn = converter.convert(someMap).to(MyAnnotation.class)
int refresh = myAnn.refresh(); // 750
Strine temp = myAnn.temp(); // "/tmp"
10
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Customize your converter
The converter service itself always behaves the same
§ Need customizations? Create a new converter: ConverterBuilder
§ Change default behaviour of array to scalar conversion
§ Convert String[] to String via adapter
// Default behaviour
String s = converter.convert(new String[] {“hi”, “there”}).to(String.class); // s = “hi”
Converter c = converter.newConverterBuilder()
.rule(String[].class, String.class, MyCnv::saToString)
.build();
String s2 = c.convert(new String[] {“hi”, “there”}).to(String.class); // ss=“hi there”
11
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Basics in R7
§ Bundle Annotations
§ Converter
§ Promises
§ PushStreams
12
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Service Development
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Simply Simple
§ POJOs
§ Annotations based
§ org.osgi.service.component.annotations.*
§ org.osgi.service.metatype.annotations.*
§ Declarative Services does the hard work
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Declarative Services
15
Bundle
XML
Service Component Runtime (DS Implementation)
reads
Service Registry
manages
Components Services
registers
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Components
16
@Component(service = {})
public class MyComponentImpl {
...
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lifecycle
17
@Component(service = {})
public class MyComponentImpl {
@Activate
protected void activate() {
...
}
@Deactivate
private void deactivate() {
...
}
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Services and Properties
18
@Component(service = {MyComponent.class},
property = {
Constants.SERVICE_DESCRIPTION + "=The best service in the world",
"service.ranking:Integer=5",
"tag=foo", "tag=bar"
}
)
@ServiceDescription("The best service in the world")
@ServiceRanking(5)
@Tag({"foo", "bar"})
public class MyComponentImpl implements MyComponent {
...
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Mandatory Unary References
19
@Component(service = {MyComponent.class})
public class MyComponentImpl implements MyComponent {
@Reference(policyOption=ReferencePolicyOption.GREEDY)
private ResourceResovlerFactory factory;
... {
factory.getResourcResolver();
}
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Multiple Cardinality Reference
20
@Reference(cardinality=ReferenceCardinality.MULTIPLE)
private volatile List<Filter> filters;
... {
final List<Filter> localFilters = filters;
for(final Filter f : localFilters) {
...
}
}
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Configuration Admin
21
Configuration Admin
Persistent Store
Configuration
- PID
- Properties
create, update, delete
Configuration(s)
- Factory PID
- Name
- Properties
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Define Configuration Property Type….
§ Example configuration
§ Boolean for enabled
§ String array with topics
§ String user name
22
@interface MyConfig {
boolean enabled() default true;
String[] topic() default {"topicA", "topicB"};
String userName();
}
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 23
@Component(service = {})
public class MyComponentImpl {
@Activate
private MyConfig configuration;
@Activate
protected void activate(final MyConfig config) {
// note: annotation MyConfig used as interface
this.configuration = config;
}
}
..and use in activation
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Constructor Injection
24
@Component
public class MyComponent {
@Activate
public MyComponent(
BundleContext bundleContext,
@Reference EventAdmin eventAdmin,
Config config,
@Reference List<Receivers> receivers) {
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Metatype
§ Define type information of data
§ ObjectClassDefinition with Attributes
§ Common use case: Configuration properties for a component
§ But not limited to this!
25
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Configuration Metatype
26
@ObjectClassDefinition(label="My Component",
description="Coolest component in the world.")
@interface MyConfig {
@AttributeDefinition(label="Enabled",
description="Topic and user name are used if enabled")
boolean enabled() default true;
@AttributeDefinition(...)
String[] topic() default {"topicA", "topicB"};
@AttributeDefinition(...)
String userName();
}
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Connect Component Configuration with Metatype
27
@Component ( service = {})
@Designate( ocd = MyConfig.class )
public class MyComponentImpl {
@Component ( service = {Logger.class})
@Designate( ocd = MyConfig.class , factory = true)
public class LoggerImpl implements Logger {
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Properties, Properties, Properties
28
@Component(property = {})
Component Property Types
(defaults)
Configuration properties
(runtime)
Component Properties
(runtime)
Service Registry
activate()
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Declarative Services
§ Developing OSGi Services made easy
§ Configuration support
§ Reference management
§ Dealing with dynamics
29
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Service Development in R7
§ Configuration Admin
§ Metatype
§ Declarative Services
30
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Development
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JAX-RS Services
§ JAX-RS in OSGi
§ Service / Whiteboard Model
32
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Simple Resource
33
@Component(service = TestService.class,
scope = ServiceScope.PROTOTYPE)
@JaxrsResource
@Path("service")
public class TestService {
@GET
@Produces("text/plain")
public String getHelloWorld() {
return "Hello World";
}
}
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
DS-Enabled
34
@Component(service = TestService.class,
scope = ServiceScope.PROTOTYPE)
@JaxrsResource
@Path("service")
public class TestService {
@Reference
private GameController game;
@Activate
protected void activate(final Config config) {}
@GET
public String getHelloWorld() {
return "Hello World";
}
}
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Application and Parameters
35
@Component(service = TestService.class,
scope = ServiceScope.PROTOTYPE)
@JaxrsApplicationSelect("(osgi.jaxrs.name=myapp)")
@JaxrsResource
@Path("service/{name}")
public class TestService {
@GET
public String getHelloWorld(@PathParam("name") String name) {
return "Hello " + name;
}
}
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
JAX-RS Support
§ Get, Post, Delete with Parameters
§ Application support
§ JAX-RS extension support (Filters, Interceptors, etc)
§ Annotations for Declarative Services
36
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Development in R7
§ JAXRS integration
§ Http Whiteboard Update
37
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Provisioning
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Reusable Configuration Format
{
"my.special.component" : {
"some_prop": 42,
"and_another": "some string"
},
"and.a.factory.cmp~foo" : {
...
},
"and.a.factory.cmp~bar" : {
...
}}
39
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
OSGi Configurator
§ Configurations as bundle resources
§ Binaries
§ State handling and ranking
40
C
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Clusters, Containers, Cloud!
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Cluster Information
OSGi frameworks running in a distributed environment
§ Cloud
§ IoT
§ <buzzword xyz in the future>
Many frameworks
§ New ones appearing
§ … and disappearing
§ Other entities too, like databases
42
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Cluster Information
Discovery of OSGi frameworks in a distributed environment
§ Find out what is available
§ get notifications of changes
§ Provision your application within the given resources
§ Also: non-OSGi frameworks (e.g. Database)
§ Monitor your application
§ Provision changes if needed
RFC 183 – Implementation in Eclipse Concierge
43
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Cluster Information
FrameworkNodeStatus service provides metadata
§ Java version
§ OSGi version
§ OS version
§ IP address
§ Physical location (country, ISO 3166)
§ Metrics
§ tags / other / custom
§ Provisioning API (install/start/stop/uninstall bundles etc…)
44
D
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
OSGi R7 Release
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
R7 Early Spec Draft Available
§ More Updates
§ Transaction Control
§ JPA Updates
§ Remote Service Intents
§ https://www.osgi.org/developer/specifications/drafts/
46
C
Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert
Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert

More Related Content

What's hot

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
mfrancis
 
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
mfrancis
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
glynnormington
 
Spring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
Spring Dynamic Modules for OSGi by Example - Martin Lippert, ConsultantSpring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
Spring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
mfrancis
 

What's hot (20)

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
 
Microservices and OSGi: Better together?
Microservices and OSGi: Better together?Microservices and OSGi: Better together?
Microservices and OSGi: Better together?
 
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Magic of web components
Magic of web componentsMagic of web components
Magic of web components
 
20190205 AWS Black Belt Online Seminar 公共機関によるAWSの利活用
20190205 AWS Black Belt Online Seminar 公共機関によるAWSの利活用20190205 AWS Black Belt Online Seminar 公共機関によるAWSの利活用
20190205 AWS Black Belt Online Seminar 公共機関によるAWSの利活用
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim WardBest Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim Ward
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
 
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
 
London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18London Oracle Developer Meetup April 18
London Oracle Developer Meetup April 18
 
Spring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
Spring Dynamic Modules for OSGi by Example - Martin Lippert, ConsultantSpring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
Spring Dynamic Modules for OSGi by Example - Martin Lippert, Consultant
 
Modularity, Microservices and Containerisation - Neil Bartlett, Derek Baum
Modularity, Microservices and Containerisation - Neil Bartlett, Derek BaumModularity, Microservices and Containerisation - Neil Bartlett, Derek Baum
Modularity, Microservices and Containerisation - Neil Bartlett, Derek Baum
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM Maximize the power of OSGi in AEM
Maximize the power of OSGi in AEM
 
Embrace Change - Embrace OSGi
Embrace Change - Embrace OSGiEmbrace Change - Embrace OSGi
Embrace Change - Embrace OSGi
 
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
OSGi with the Spring Framework
OSGi with the Spring FrameworkOSGi with the Spring Framework
OSGi with the Spring Framework
 
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
 

Similar to Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert

Language enhancements in cold fusion 11
Language enhancements in cold fusion 11Language enhancements in cold fusion 11
Language enhancements in cold fusion 11
ColdFusionConference
 
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
Amazon Web Services
 
Jmorrow rtv den_auto_config_rapidclone
Jmorrow rtv den_auto_config_rapidcloneJmorrow rtv den_auto_config_rapidclone
Jmorrow rtv den_auto_config_rapidclone
Mlx Le
 

Similar to Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert (20)

BeJUG Meetup - What's coming in the OSGi R7 Specification
BeJUG Meetup - What's coming in the OSGi R7 SpecificationBeJUG Meetup - What's coming in the OSGi R7 Specification
BeJUG Meetup - What's coming in the OSGi R7 Specification
 
REST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherREST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion Aether
 
Maximize the power of OSGi
Maximize the power of OSGiMaximize the power of OSGi
Maximize the power of OSGi
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
 
Sightly_techInsight
Sightly_techInsightSightly_techInsight
Sightly_techInsight
 
Mastering the Sling Rewriter by Justin Edelson
Mastering the Sling Rewriter by Justin EdelsonMastering the Sling Rewriter by Justin Edelson
Mastering the Sling Rewriter by Justin Edelson
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling Rewriter
 
Language enhancements in cold fusion 11
Language enhancements in cold fusion 11Language enhancements in cold fusion 11
Language enhancements in cold fusion 11
 
Spring Cloud Servicesの紹介 #pcf_tokyo
Spring Cloud Servicesの紹介 #pcf_tokyoSpring Cloud Servicesの紹介 #pcf_tokyo
Spring Cloud Servicesの紹介 #pcf_tokyo
 
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_SingaporeCI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
CI-CD with AWS Developer Tools and Fargate_AWSPSSummit_Singapore
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
Breaking the Monolith Using AWS Container Services
Breaking the Monolith Using AWS Container ServicesBreaking the Monolith Using AWS Container Services
Breaking the Monolith Using AWS Container Services
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and Fargate
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
 
Building CI-CD Pipelines for Serverless Applications
Building CI-CD Pipelines for Serverless ApplicationsBuilding CI-CD Pipelines for Serverless Applications
Building CI-CD Pipelines for Serverless Applications
 
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
 
Jmorrow rtv den_auto_config_rapidclone
Jmorrow rtv den_auto_config_rapidcloneJmorrow rtv den_auto_config_rapidclone
Jmorrow rtv den_auto_config_rapidclone
 

More from mfrancis

Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
 
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
mfrancis
 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
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
Enterprise Knowledge
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech 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
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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...
 

Leveraging the Latest OSGi R7 Specifications - C Ziegeler & D Bosschaert

  • 1. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Leveraging the lastest OSGi R7 Specifications David Bosschaert & Carsten Ziegeler | Adobe
  • 2. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Carsten Ziegeler § Principal Scientist @ Adobe Research Switzerland § Member of the Apache Software Foundation § VP of Apache Felix and Sling § OSGi Expert Groups and Board member 2
  • 3. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. David Bosschaert § R&D Adobe Ireland § Co-chair OSGi Enterprise Expert Group § Apache Felix, Aries PMC member and committer § … other opensource projects § Cloud and embedded computing enthusiast 3
  • 4. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Basics
  • 5. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Versioning Annotations § Old Friends: § @Version, @ProviderType, @ConsumerType § New Friend: § @Export 5 D
  • 6. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Bundle Annotations § More New Friends: § @Capability, @Requirement, @Header @Requirement(namespace="osgi.implementation", name="osgi.http", version="1.1.0") @Header(name=Constants.BUNDLE_CATEGORY, value="eclipsecon") 6 D
  • 7. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Converter
  • 8. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Object Conversion § Wouldn’t you like to convert anything to everything? § Peter Kriens’ work in Bnd started it § Convert § Scalars, Collections, Arrays § Interfaces, maps, DTOs, JavaBeans, Annotations § Need predictable behaviour – as little implementation freedom as possible § Can be customized RFC 215 – Implementation in Apache Felix (/converter) 8 D
  • 9. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sample conversions § Examples: Converter c = Converters.standardConverter(); // Convert scalars int i = c.convert("123").to(int.class); UUID id = c.convert("067e6162-3b6f-4ae2-a171-2470b63dff00").to(UUID.class); List<String> ls = Arrays.asList("978", "142", "-99"); short[] la = c.convert(ls).to(short[].class); 9 D
  • 10. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Convert configuration data into typed information with defaults Map<String, String> myMap = new HashMap<>(); myMap.put("refresh", "750"); myMap.put("other", "hello"); // Convert map structures @interface MyAnnotation { int refresh() default 500; String temp() default "/tmp"; } MyAnnotation myAnn = converter.convert(someMap).to(MyAnnotation.class) int refresh = myAnn.refresh(); // 750 Strine temp = myAnn.temp(); // "/tmp" 10 D
  • 11. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Customize your converter The converter service itself always behaves the same § Need customizations? Create a new converter: ConverterBuilder § Change default behaviour of array to scalar conversion § Convert String[] to String via adapter // Default behaviour String s = converter.convert(new String[] {“hi”, “there”}).to(String.class); // s = “hi” Converter c = converter.newConverterBuilder() .rule(String[].class, String.class, MyCnv::saToString) .build(); String s2 = c.convert(new String[] {“hi”, “there”}).to(String.class); // ss=“hi there” 11 D
  • 12. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Basics in R7 § Bundle Annotations § Converter § Promises § PushStreams 12 D
  • 13. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Service Development
  • 14. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Simply Simple § POJOs § Annotations based § org.osgi.service.component.annotations.* § org.osgi.service.metatype.annotations.* § Declarative Services does the hard work C
  • 15. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Declarative Services 15 Bundle XML Service Component Runtime (DS Implementation) reads Service Registry manages Components Services registers C
  • 16. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Components 16 @Component(service = {}) public class MyComponentImpl { ... C
  • 17. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Lifecycle 17 @Component(service = {}) public class MyComponentImpl { @Activate protected void activate() { ... } @Deactivate private void deactivate() { ... } C
  • 18. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Services and Properties 18 @Component(service = {MyComponent.class}, property = { Constants.SERVICE_DESCRIPTION + "=The best service in the world", "service.ranking:Integer=5", "tag=foo", "tag=bar" } ) @ServiceDescription("The best service in the world") @ServiceRanking(5) @Tag({"foo", "bar"}) public class MyComponentImpl implements MyComponent { ... C
  • 19. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Mandatory Unary References 19 @Component(service = {MyComponent.class}) public class MyComponentImpl implements MyComponent { @Reference(policyOption=ReferencePolicyOption.GREEDY) private ResourceResovlerFactory factory; ... { factory.getResourcResolver(); } C
  • 20. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Multiple Cardinality Reference 20 @Reference(cardinality=ReferenceCardinality.MULTIPLE) private volatile List<Filter> filters; ... { final List<Filter> localFilters = filters; for(final Filter f : localFilters) { ... } } C
  • 21. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Configuration Admin 21 Configuration Admin Persistent Store Configuration - PID - Properties create, update, delete Configuration(s) - Factory PID - Name - Properties C
  • 22. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Define Configuration Property Type…. § Example configuration § Boolean for enabled § String array with topics § String user name 22 @interface MyConfig { boolean enabled() default true; String[] topic() default {"topicA", "topicB"}; String userName(); } C
  • 23. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 23 @Component(service = {}) public class MyComponentImpl { @Activate private MyConfig configuration; @Activate protected void activate(final MyConfig config) { // note: annotation MyConfig used as interface this.configuration = config; } } ..and use in activation C
  • 24. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Constructor Injection 24 @Component public class MyComponent { @Activate public MyComponent( BundleContext bundleContext, @Reference EventAdmin eventAdmin, Config config, @Reference List<Receivers> receivers) { C
  • 25. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Metatype § Define type information of data § ObjectClassDefinition with Attributes § Common use case: Configuration properties for a component § But not limited to this! 25 C
  • 26. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Configuration Metatype 26 @ObjectClassDefinition(label="My Component", description="Coolest component in the world.") @interface MyConfig { @AttributeDefinition(label="Enabled", description="Topic and user name are used if enabled") boolean enabled() default true; @AttributeDefinition(...) String[] topic() default {"topicA", "topicB"}; @AttributeDefinition(...) String userName(); } C
  • 27. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Connect Component Configuration with Metatype 27 @Component ( service = {}) @Designate( ocd = MyConfig.class ) public class MyComponentImpl { @Component ( service = {Logger.class}) @Designate( ocd = MyConfig.class , factory = true) public class LoggerImpl implements Logger { C
  • 28. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Properties, Properties, Properties 28 @Component(property = {}) Component Property Types (defaults) Configuration properties (runtime) Component Properties (runtime) Service Registry activate() C
  • 29. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Declarative Services § Developing OSGi Services made easy § Configuration support § Reference management § Dealing with dynamics 29 C
  • 30. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Service Development in R7 § Configuration Admin § Metatype § Declarative Services 30 C
  • 31. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Web Development
  • 32. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JAX-RS Services § JAX-RS in OSGi § Service / Whiteboard Model 32 D
  • 33. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Simple Resource 33 @Component(service = TestService.class, scope = ServiceScope.PROTOTYPE) @JaxrsResource @Path("service") public class TestService { @GET @Produces("text/plain") public String getHelloWorld() { return "Hello World"; } } D
  • 34. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. DS-Enabled 34 @Component(service = TestService.class, scope = ServiceScope.PROTOTYPE) @JaxrsResource @Path("service") public class TestService { @Reference private GameController game; @Activate protected void activate(final Config config) {} @GET public String getHelloWorld() { return "Hello World"; } } D
  • 35. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Application and Parameters 35 @Component(service = TestService.class, scope = ServiceScope.PROTOTYPE) @JaxrsApplicationSelect("(osgi.jaxrs.name=myapp)") @JaxrsResource @Path("service/{name}") public class TestService { @GET public String getHelloWorld(@PathParam("name") String name) { return "Hello " + name; } } D
  • 36. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. JAX-RS Support § Get, Post, Delete with Parameters § Application support § JAX-RS extension support (Filters, Interceptors, etc) § Annotations for Declarative Services 36 D
  • 37. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Web Development in R7 § JAXRS integration § Http Whiteboard Update 37 D
  • 38. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Provisioning
  • 39. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Reusable Configuration Format { "my.special.component" : { "some_prop": 42, "and_another": "some string" }, "and.a.factory.cmp~foo" : { ... }, "and.a.factory.cmp~bar" : { ... }} 39 C
  • 40. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. OSGi Configurator § Configurations as bundle resources § Binaries § State handling and ranking 40 C
  • 41. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Clusters, Containers, Cloud!
  • 42. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Cluster Information OSGi frameworks running in a distributed environment § Cloud § IoT § <buzzword xyz in the future> Many frameworks § New ones appearing § … and disappearing § Other entities too, like databases 42 D
  • 43. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Cluster Information Discovery of OSGi frameworks in a distributed environment § Find out what is available § get notifications of changes § Provision your application within the given resources § Also: non-OSGi frameworks (e.g. Database) § Monitor your application § Provision changes if needed RFC 183 – Implementation in Eclipse Concierge 43 D
  • 44. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Cluster Information FrameworkNodeStatus service provides metadata § Java version § OSGi version § OS version § IP address § Physical location (country, ISO 3166) § Metrics § tags / other / custom § Provisioning API (install/start/stop/uninstall bundles etc…) 44 D
  • 45. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. OSGi R7 Release
  • 46. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. R7 Early Spec Draft Available § More Updates § Transaction Control § JPA Updates § Remote Service Intents § https://www.osgi.org/developer/specifications/drafts/ 46 C