SlideShare a Scribd company logo
1 of 13
Download to read offline
© 2018 Software AG. All rights reserved.
Udo Hafermann
Todor Boev
MELD OSGI BUNDLES WITH
JAVA MODULES
OSGI RFP 190
2 |
MOTIVATION
Example: My bundle requires AWT—what is the minimum Java module set?
© 2018 Software AG. All rights reserved. For internal use only
3 |
OVERVIEW
This talk presents RFP 190: Resource Encoding of Java Modules
1. Application Domain and Problem Statement
2. Use Cases
3. Requirements
4. Proof of Concept
5. Open Ends
© 2018 Software AG. All rights reserved. For internal use only
4 |
PROBLEM STATEMENT
• We want self-contained Java applications with minimal footprint
• For OSGi, we can resolve the set of required bundles
• But JRE can easily dominate the overall size
• With JPMS, we can strip down to the modules required
• How to determine which ones are required?
• R7 provides the flat list of all boot layer packages
• Removing modules from the boot layer is a trial and error process
• We need the modules as such to be visible to tools and runtime
© 2018 Software AG. All rights reserved. For internal use only
5 |
USE CASES
• Build a compact Docker image
• Build a self-contained, no-installation tool
• Analyze JRE footprint, bundle by bundle
• Introspect JRE at runtime
• Create hybrid app of OSGi bundles and JPMS modules
© 2018 Software AG. All rights reserved. For internal use only
6 |
GENERAL REQUIREMENTS
• Resolver can still be used to build consistent set of modules and bundles
– Should not require a new tool or component
• Bundles are not forced to explicitly reference modules
– Just as we don’t want bundles to explicitly reference bundles
• A bundle may function as a module
– OSGi framework as a special case
• Includes third-party modules
• Best-effort JPMS validation
– Rejects duplicate and (optionally) conflicting and cyclic modules
© 2018 Software AG. All rights reserved. For internal use only
7 |
RESOLVING DEPENDENCIES
• Module identity and version
• Bundle package imports to module exports
• Modules to modules
• (Optional) Module services as resources
• (Optional) Requirements to module services
© 2018 Software AG. All rights reserved. For internal use only
8 |
ENHANCING METADATA
• Add version range requirements for modules
• Use bundle annotations for additional JPMS module dependencies
• Replace org.osgi.framework.system.packages with module resource
representations
© 2018 Software AG. All rights reserved. For internal use only
9 |
PROOF OF CONCEPT
• Modeling
– Module as special kind of bundle
– Require module as require-bundle
– Module exports as export-package
– Module provides as service-loader capability
– Module uses as service-loader requirement
• Extracts of actual metadata
• Run resolver on “awt” example
© 2018 Software AG. All rights reserved. For internal use only
10 |
MODULE METADATA
© 2018 Software AG. All rights reserved. For internal use only
java.desktop
osgi.identity
osgi.identity=java.desktop
type=java-module
singleton=true
version=10.0.2
osgi.wiring.bundle
filter:=(&(osgi.wiring.bundle=java.base)(bundle-version=10.0.2)(java-module=true))
resolution:=mandatory
osgi.wiring.bundle
filter:=(&(osgi.wiring.bundle=java.prefs)(bundle-version=10.0.2)(java-module=true))
visibility:=reexport
resolution:=mandatory osgi.serviceloader
filter:=(&(osgi.serviceloader=javax.imageio.spi.ImageOutputStreamSpi)(version>=0.0.0))
resolution:=optional
cardinality:=multiple ...
...
osgi.wiring.package
osgi.wiring.package=java.awt.color
bundle-symbolic-name=java.desktop
bundle-version=10.0.2
version=0.0.0
osgi.wiring.package
osgi.wiring.package=javax.swing
bundle-symbolic-name=java.desktop
bundle-version=10.0.2
version=0.0.0
osgi.serviceloader
osgi.serviceloader=javax.sound.midi.spi.MidiDeviceProvider
version=0.0.0
...
...
Provides
Requires
osgi.wiring.bundle
osgi.wiring.bundle=java.desktop
java-module=true
bundle-version=10.0.2
11 |
DEMO TEST
• org.example.awtclient 1.0.0
• osgi.wiring.package; filter:=(&(osgi.wiring.package=java.awt)(version>=0.0.0))
© 2018 Software AG. All rights reserved.
12 |
THANK YOU
• Feedback welcome on https://github.com/osgi/design/blob/master/rfps/rfp-0190-
Resource%20encoding%20for%20Java%20Modules.odt
© 2018 Software AG. All rights reserved. For internal use only
13 | © 2018 Software AG. All rights reserved.

More Related Content

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
 
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)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
 
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...mfrancis
 
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)mfrancis
 
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)mfrancis
 
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)mfrancis
 
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...mfrancis
 
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)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
 
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)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
 
Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)
Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)
Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)mfrancis
 
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...mfrancis
 
Software AG Application Modularity - OSGi and JPMS (Jigsaw)
Software AG Application Modularity - OSGi and JPMS (Jigsaw)Software AG Application Modularity - OSGi and JPMS (Jigsaw)
Software AG Application Modularity - OSGi and JPMS (Jigsaw)mfrancis
 
Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Journey from Monolith to a Modularized Application - Approach and Key Learnin...Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Journey from Monolith to a Modularized Application - Approach and Key Learnin...mfrancis
 
Eclipse microprofile config and OSGi config admin - E Jiang
Eclipse microprofile config and OSGi config admin - E JiangEclipse microprofile config and OSGi config admin - E Jiang
Eclipse microprofile config and OSGi config admin - E Jiangmfrancis
 
Smart IoTt on OSGi with Apache Openwhisk - C Ziegeler & D Bosschaert
Smart IoTt on OSGi with Apache Openwhisk - C Ziegeler & D BosschaertSmart IoTt on OSGi with Apache Openwhisk - C Ziegeler & D Bosschaert
Smart IoTt on OSGi with Apache Openwhisk - C Ziegeler & D Bosschaertmfrancis
 
When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann...
When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann...When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann...
When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann...mfrancis
 

More from mfrancis (20)

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 ...
 
Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)
Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)
Turtles all the Way Up – From OSGi bundles to Fog Computing - Tim Ward (Paremus)
 
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...
OSGi in Action - How we use OSGi to build Open Liberty - Alasdair Nottingham ...
 
Software AG Application Modularity - OSGi and JPMS (Jigsaw)
Software AG Application Modularity - OSGi and JPMS (Jigsaw)Software AG Application Modularity - OSGi and JPMS (Jigsaw)
Software AG Application Modularity - OSGi and JPMS (Jigsaw)
 
Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Journey from Monolith to a Modularized Application - Approach and Key Learnin...Journey from Monolith to a Modularized Application - Approach and Key Learnin...
Journey from Monolith to a Modularized Application - Approach and Key Learnin...
 
Eclipse microprofile config and OSGi config admin - E Jiang
Eclipse microprofile config and OSGi config admin - E JiangEclipse microprofile config and OSGi config admin - E Jiang
Eclipse microprofile config and OSGi config admin - E Jiang
 
Smart IoTt on OSGi with Apache Openwhisk - C Ziegeler & D Bosschaert
Smart IoTt on OSGi with Apache Openwhisk - C Ziegeler & D BosschaertSmart IoTt on OSGi with Apache Openwhisk - C Ziegeler & D Bosschaert
Smart IoTt on OSGi with Apache Openwhisk - C Ziegeler & D Bosschaert
 
When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann...
When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann...When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann...
When whiteboards play together. JAX-RS and servlets the OSGi way - M Hoffmann...
 

Recently uploaded

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 DevelopmentsTrustArc
 
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?Antenna Manufacturer Coco
 
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
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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...Enterprise Knowledge
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In 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 MenDelhi Call girls
 

Recently uploaded (20)

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
 
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?
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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...
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In 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
 

Meld OSGi Bundles with Java Modules - Udo Hafermann (Software AG)

  • 1. © 2018 Software AG. All rights reserved. Udo Hafermann Todor Boev MELD OSGI BUNDLES WITH JAVA MODULES OSGI RFP 190
  • 2. 2 | MOTIVATION Example: My bundle requires AWT—what is the minimum Java module set? © 2018 Software AG. All rights reserved. For internal use only
  • 3. 3 | OVERVIEW This talk presents RFP 190: Resource Encoding of Java Modules 1. Application Domain and Problem Statement 2. Use Cases 3. Requirements 4. Proof of Concept 5. Open Ends © 2018 Software AG. All rights reserved. For internal use only
  • 4. 4 | PROBLEM STATEMENT • We want self-contained Java applications with minimal footprint • For OSGi, we can resolve the set of required bundles • But JRE can easily dominate the overall size • With JPMS, we can strip down to the modules required • How to determine which ones are required? • R7 provides the flat list of all boot layer packages • Removing modules from the boot layer is a trial and error process • We need the modules as such to be visible to tools and runtime © 2018 Software AG. All rights reserved. For internal use only
  • 5. 5 | USE CASES • Build a compact Docker image • Build a self-contained, no-installation tool • Analyze JRE footprint, bundle by bundle • Introspect JRE at runtime • Create hybrid app of OSGi bundles and JPMS modules © 2018 Software AG. All rights reserved. For internal use only
  • 6. 6 | GENERAL REQUIREMENTS • Resolver can still be used to build consistent set of modules and bundles – Should not require a new tool or component • Bundles are not forced to explicitly reference modules – Just as we don’t want bundles to explicitly reference bundles • A bundle may function as a module – OSGi framework as a special case • Includes third-party modules • Best-effort JPMS validation – Rejects duplicate and (optionally) conflicting and cyclic modules © 2018 Software AG. All rights reserved. For internal use only
  • 7. 7 | RESOLVING DEPENDENCIES • Module identity and version • Bundle package imports to module exports • Modules to modules • (Optional) Module services as resources • (Optional) Requirements to module services © 2018 Software AG. All rights reserved. For internal use only
  • 8. 8 | ENHANCING METADATA • Add version range requirements for modules • Use bundle annotations for additional JPMS module dependencies • Replace org.osgi.framework.system.packages with module resource representations © 2018 Software AG. All rights reserved. For internal use only
  • 9. 9 | PROOF OF CONCEPT • Modeling – Module as special kind of bundle – Require module as require-bundle – Module exports as export-package – Module provides as service-loader capability – Module uses as service-loader requirement • Extracts of actual metadata • Run resolver on “awt” example © 2018 Software AG. All rights reserved. For internal use only
  • 10. 10 | MODULE METADATA © 2018 Software AG. All rights reserved. For internal use only java.desktop osgi.identity osgi.identity=java.desktop type=java-module singleton=true version=10.0.2 osgi.wiring.bundle filter:=(&(osgi.wiring.bundle=java.base)(bundle-version=10.0.2)(java-module=true)) resolution:=mandatory osgi.wiring.bundle filter:=(&(osgi.wiring.bundle=java.prefs)(bundle-version=10.0.2)(java-module=true)) visibility:=reexport resolution:=mandatory osgi.serviceloader filter:=(&(osgi.serviceloader=javax.imageio.spi.ImageOutputStreamSpi)(version>=0.0.0)) resolution:=optional cardinality:=multiple ... ... osgi.wiring.package osgi.wiring.package=java.awt.color bundle-symbolic-name=java.desktop bundle-version=10.0.2 version=0.0.0 osgi.wiring.package osgi.wiring.package=javax.swing bundle-symbolic-name=java.desktop bundle-version=10.0.2 version=0.0.0 osgi.serviceloader osgi.serviceloader=javax.sound.midi.spi.MidiDeviceProvider version=0.0.0 ... ... Provides Requires osgi.wiring.bundle osgi.wiring.bundle=java.desktop java-module=true bundle-version=10.0.2
  • 11. 11 | DEMO TEST • org.example.awtclient 1.0.0 • osgi.wiring.package; filter:=(&(osgi.wiring.package=java.awt)(version>=0.0.0)) © 2018 Software AG. All rights reserved.
  • 12. 12 | THANK YOU • Feedback welcome on https://github.com/osgi/design/blob/master/rfps/rfp-0190- Resource%20encoding%20for%20Java%20Modules.odt © 2018 Software AG. All rights reserved. For internal use only
  • 13. 13 | © 2018 Software AG. All rights reserved.