SlideShare a Scribd company logo
Premek Brada | University of West Bohemia, CZ
Automated Semantic
Versioning for OSGi Bundles
Wednesday, 29th September 2010
Supported by the Grant Agency of the Czech Republic, project 201/08/0266
Agenda
• Versioning in OSGi
• How tools can help
• Tooling available
• Technical background
• Status
“Humans are already incapable of handling version
management on the scale required today. Tools need
rules and guidelines … [and] it is paramount that
versions have semantics.”
Semantic Versioning,
Technical Whitepaper, rev 1.0
Versioning in OSGi
• Enables version co-existence at runtime
• Used by the resolver
– exported package: version
– imported package: range
– matched as part of constraint solving
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Apache Felix Configuration Admin Service
Bundle-SymbolicName: org.apache.felix.configadmin
Bundle-Version: 1.0.10
Export-Package: org.apache.felix.cm;version="1.0",org.apache.felix.cm.
file;uses:="org.apache.felix.cm,org.osgi.framework";version="1.0“ (…)
Import-Package: org.apache.felix.cm;version="1.0",org.apache.felix.cm.
file;version="1.0",org.osgi.framework;version="1.3“ (…)
References
•R4 Core spec,
mainly 3.6.2
Version Matching
•Semantic
versioning
whitepaper
Versions yes, but semantic…?
• Bundle-Version: 0.9.0
x
Bundle-Version: 1.0.0
“Marketing” vs
“Semantic”
version IDs
Original Semantic Changes
… … …
1.0.4 1.0.2 (none)
1.2.0 2.0.0 modification
… … …
1.2.2 2.0.2 (none)
1.4.0 2.1.0 extension
Original Semantic Changes
0.9.0 1.0.0 n/a
0.9.2 1.1.0 extension
1.0.0 2.0.0 removal
Example – revision streams of
two bundles
Versions yes, but semantic…?
• Export-Package:
x.y.z;version=0.9.0
x
Export-Package:
x.y.z;version=1.0.0
Resolver believes
package version IDs
OSGi Semantic versions
• 1.0.0 -> 1.1.0 -> 2.0.0 signal
changes
– Semantics = versioning policy
• OSGi world has one
– R4 Core suggests M.m.µ.q as common
– Semantic versioning whitepaper requires this
• Note: different contexts => different
consequences
– API x implementation package
– consumer x provider x implementer (API)
How tools can support OSGi
semantic versions
 IDE: bundle development,
manifest editing
o inferring / generating version IDs
 Bnd/maven/.../repository: assembly,
deployment, distribution
 Resolver: dependency resolution, wiring
o version matching
„Open world“ scenario:
– development / release tool extensions
„Closed world“ (controlled bundle set):
– repository extensions
“Humans are already incapable …”
OBVS: The versioning service
Bundle-Name: Apache Felix Bundle Repository
Bundle-SymbolicName: org.apache.felix.bundlerepository
Bundle-Version: 1.0.1
DynamicImport-Package: org.apache.felix.shell
Export-Package: org.osgi.service.obr;version="1.0.0";uses:="org.osgi.framework"
Import-Package: org.osgi.framework;version="1.3",org.osgi.service.log;
resolution:=optional;version="1.3.0",org.osgi.service.obr;version="1.0"
Bnd-LastModified: 1238533562871
OBVS-Reference: 201009071638414
OBVS-Bundle-Version-Orig: 1.4.0
OBVS-Export-Package-Orig: org.osgi.service.obr;version="1.0";uses:="org.osgi.framework"
Tool support for the
„Open world“ case
Apache ACE integration (WiP)
• Enhanced repository enforces versions
• API
– extended BundleStore interface
– String put(InputStream bundle)
• Implementation
– generates filename (returned)
– stores versioned copy of bundle
The „Closed world“ case
> vers-ace-demo d:tmporg.apache.felix.fileinstall-0.9.0.jar
File successfully stored with name 'org.apache.felix.fileinstall-0.9.0.jar‘
> vers-ace-demo d:tmporg.apache.felix.fileinstall-0.9.2.jar
File successfully stored with name 'org.apache.felix.fileinstall-0.10.0.jar‘
> vers-ace-demo d:tmpfileinstall-1.0.0.jar
File successfully stored with name 'org.apache.felix.fileinstall-0.10.1.jar'
Under the hood
• Scope: detects and versions
syntactical changes on the public
interface of packages => bundles
• Works on bundle .jar (bytecode)
• Checks for subtype relation
• Stubs => ignores user-defines
packages
• Modifies bundle meta-data
Under the hood
loader
comparator
version
generator
structure
representation
(BundleTypes)
class repre
(JavaTypes)
structure
representation
(BundleTypes)
difference
base
.jar
MANIFEST
sequel
.jar
MANIFEST
What (not) to expect, aka Status
• Service: currently in „beta“
– open use, free access
– beta testing: failing bundles can be stored
• Apache ACE integration: a prototype
• Some limitations
– changes in imported packages
(reconstruction non-trivial)
– Declarative Services, "include" and "exclude"
directives
– Java 5 features (generics, annotations)
Summary
• Tooling for OSGi semantic versioning
– package and bundle versions
– API and implementation packages
– standalone bundles, repositories
• OBVS at http://osgi.kiv.zcu.cz/obvs/
• Plans for the future
– improve (integrate what’s done)
– REST API, tool integration?
THANK YOU
This work was
brought to you by:
Lukáš Valenta,
Tomáš Ptáčník,
Jaroslav Plzák,
Jarda Bauml,
Jiří Kučera,
Grant Agency of the Czech
Republic, project 201/08/0266
http://osgi.kiv.zcu.cz/obvs/

More Related Content

PDF
Brada -semantic-versioning-tool
PPTX
G rpc lection1
PPTX
Hogy jussunk ki lezárt hálózatokból?
PDF
Common technique in Bypassing Stuff in Python.
PPTX
Defcon - Veil-Pillage
PDF
Lukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with Uciprov
PPTX
BH Arsenal '14 TurboTalk: The Veil-framework
PPTX
Containers: Anti Pattern
Brada -semantic-versioning-tool
G rpc lection1
Hogy jussunk ki lezárt hálózatokból?
Common technique in Bypassing Stuff in Python.
Defcon - Veil-Pillage
Lukas Macura - Employing Zabbix to monitor OpenWrt (Beesip) devices with Uciprov
BH Arsenal '14 TurboTalk: The Veil-framework
Containers: Anti Pattern

What's hot (19)

PDF
Fluentd v0.14 Overview
PDF
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
PDF
SSRF workshop
PDF
What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...
PDF
Nginx Internals
PDF
Fluentd at HKOScon
PDF
CMake Tutorial
PDF
Effective CMake
PDF
Getting Started With Xdebug
PPTX
PowerShell for Penetration Testers
PPTX
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
PDF
OpenCSW - What is the project about?
ODP
Linuxday.at - Lightning Talk
PPTX
C++ for the Web
PPTX
Virtual Bolt Workshop - April 28, 2020
PPTX
Mercurial training
PDF
Keynote - Fluentd meetup v14
Fluentd v0.14 Overview
Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
SSRF workshop
What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...
Nginx Internals
Fluentd at HKOScon
CMake Tutorial
Effective CMake
Getting Started With Xdebug
PowerShell for Penetration Testers
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
OpenCSW - What is the project about?
Linuxday.at - Lightning Talk
C++ for the Web
Virtual Bolt Workshop - April 28, 2020
Mercurial training
Keynote - Fluentd meetup v14
Ad

Similar to OSGi Community Event 2010 - Automated Semantic Versioning for OSGi Bundles (20)

KEY
OSGi in 5 minutes
PPTX
PHP Dependency Management with Composer
KEY
Composer
PPT
Osgi Webinar
PPT
Managing Change
PDF
Futureproof angular 1.x applications - yannick houbrix
PDF
Plugins 2.0 & OSGi Gotchas - Atlassian Summit 2010
PDF
OpenSCAP Overview(security scanning for docker image and container)
PDF
Magento infrastructure by OpsWay
ODP
Improvements in the OOo Release
PDF
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
PPT
Linux containers and docker
PDF
Mastering composer
PPTX
Docker practical solutions
PDF
Composer
PDF
OpenShift 4 installation
PDF
Fluentd 101
PDF
Tuscany : Applying OSGi After The Fact
PDF
Approaching package manager
PDF
Dependency management with Composer
OSGi in 5 minutes
PHP Dependency Management with Composer
Composer
Osgi Webinar
Managing Change
Futureproof angular 1.x applications - yannick houbrix
Plugins 2.0 & OSGi Gotchas - Atlassian Summit 2010
OpenSCAP Overview(security scanning for docker image and container)
Magento infrastructure by OpsWay
Improvements in the OOo Release
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Linux containers and docker
Mastering composer
Docker practical solutions
Composer
OpenShift 4 installation
Fluentd 101
Tuscany : Applying OSGi After The Fact
Approaching package manager
Dependency management with Composer
Ad

More from mfrancis (20)

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

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
Teaching material agriculture food technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Cloud computing and distributed systems.
Approach and Philosophy of On baking technology
Chapter 3 Spatial Domain Image Processing.pdf
Understanding_Digital_Forensics_Presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Big Data Technologies - Introduction.pptx
Spectroscopy.pptx food analysis technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Building Integrated photovoltaic BIPV_UPV.pdf
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx
Encapsulation_ Review paper, used for researhc scholars
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
Cloud computing and distributed systems.

OSGi Community Event 2010 - Automated Semantic Versioning for OSGi Bundles

  • 1. Premek Brada | University of West Bohemia, CZ Automated Semantic Versioning for OSGi Bundles Wednesday, 29th September 2010 Supported by the Grant Agency of the Czech Republic, project 201/08/0266
  • 2. Agenda • Versioning in OSGi • How tools can help • Tooling available • Technical background • Status “Humans are already incapable of handling version management on the scale required today. Tools need rules and guidelines … [and] it is paramount that versions have semantics.” Semantic Versioning, Technical Whitepaper, rev 1.0
  • 3. Versioning in OSGi • Enables version co-existence at runtime • Used by the resolver – exported package: version – imported package: range – matched as part of constraint solving Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Apache Felix Configuration Admin Service Bundle-SymbolicName: org.apache.felix.configadmin Bundle-Version: 1.0.10 Export-Package: org.apache.felix.cm;version="1.0",org.apache.felix.cm. file;uses:="org.apache.felix.cm,org.osgi.framework";version="1.0“ (…) Import-Package: org.apache.felix.cm;version="1.0",org.apache.felix.cm. file;version="1.0",org.osgi.framework;version="1.3“ (…) References •R4 Core spec, mainly 3.6.2 Version Matching •Semantic versioning whitepaper
  • 4. Versions yes, but semantic…? • Bundle-Version: 0.9.0 x Bundle-Version: 1.0.0 “Marketing” vs “Semantic” version IDs Original Semantic Changes … … … 1.0.4 1.0.2 (none) 1.2.0 2.0.0 modification … … … 1.2.2 2.0.2 (none) 1.4.0 2.1.0 extension Original Semantic Changes 0.9.0 1.0.0 n/a 0.9.2 1.1.0 extension 1.0.0 2.0.0 removal Example – revision streams of two bundles
  • 5. Versions yes, but semantic…? • Export-Package: x.y.z;version=0.9.0 x Export-Package: x.y.z;version=1.0.0 Resolver believes package version IDs
  • 6. OSGi Semantic versions • 1.0.0 -> 1.1.0 -> 2.0.0 signal changes – Semantics = versioning policy • OSGi world has one – R4 Core suggests M.m.µ.q as common – Semantic versioning whitepaper requires this • Note: different contexts => different consequences – API x implementation package – consumer x provider x implementer (API)
  • 7. How tools can support OSGi semantic versions  IDE: bundle development, manifest editing o inferring / generating version IDs  Bnd/maven/.../repository: assembly, deployment, distribution  Resolver: dependency resolution, wiring o version matching „Open world“ scenario: – development / release tool extensions „Closed world“ (controlled bundle set): – repository extensions “Humans are already incapable …”
  • 8. OBVS: The versioning service Bundle-Name: Apache Felix Bundle Repository Bundle-SymbolicName: org.apache.felix.bundlerepository Bundle-Version: 1.0.1 DynamicImport-Package: org.apache.felix.shell Export-Package: org.osgi.service.obr;version="1.0.0";uses:="org.osgi.framework" Import-Package: org.osgi.framework;version="1.3",org.osgi.service.log; resolution:=optional;version="1.3.0",org.osgi.service.obr;version="1.0" Bnd-LastModified: 1238533562871 OBVS-Reference: 201009071638414 OBVS-Bundle-Version-Orig: 1.4.0 OBVS-Export-Package-Orig: org.osgi.service.obr;version="1.0";uses:="org.osgi.framework" Tool support for the „Open world“ case
  • 9. Apache ACE integration (WiP) • Enhanced repository enforces versions • API – extended BundleStore interface – String put(InputStream bundle) • Implementation – generates filename (returned) – stores versioned copy of bundle The „Closed world“ case > vers-ace-demo d:tmporg.apache.felix.fileinstall-0.9.0.jar File successfully stored with name 'org.apache.felix.fileinstall-0.9.0.jar‘ > vers-ace-demo d:tmporg.apache.felix.fileinstall-0.9.2.jar File successfully stored with name 'org.apache.felix.fileinstall-0.10.0.jar‘ > vers-ace-demo d:tmpfileinstall-1.0.0.jar File successfully stored with name 'org.apache.felix.fileinstall-0.10.1.jar'
  • 10. Under the hood • Scope: detects and versions syntactical changes on the public interface of packages => bundles • Works on bundle .jar (bytecode) • Checks for subtype relation • Stubs => ignores user-defines packages • Modifies bundle meta-data
  • 11. Under the hood loader comparator version generator structure representation (BundleTypes) class repre (JavaTypes) structure representation (BundleTypes) difference base .jar MANIFEST sequel .jar MANIFEST
  • 12. What (not) to expect, aka Status • Service: currently in „beta“ – open use, free access – beta testing: failing bundles can be stored • Apache ACE integration: a prototype • Some limitations – changes in imported packages (reconstruction non-trivial) – Declarative Services, "include" and "exclude" directives – Java 5 features (generics, annotations)
  • 13. Summary • Tooling for OSGi semantic versioning – package and bundle versions – API and implementation packages – standalone bundles, repositories • OBVS at http://osgi.kiv.zcu.cz/obvs/ • Plans for the future – improve (integrate what’s done) – REST API, tool integration?
  • 14. THANK YOU This work was brought to you by: Lukáš Valenta, Tomáš Ptáčník, Jaroslav Plzák, Jarda Bauml, Jiří Kučera, Grant Agency of the Czech Republic, project 201/08/0266 http://osgi.kiv.zcu.cz/obvs/