SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
Help Me OBR, You’re My Only Hope
    David Savage
    david.savage@paremus.com
Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Help Me OBR,You’re
                    My Only Hope
             A Brief Introduction To The OSGi Bundle Repository




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
A Long Time Ago...

             • OSGi Bundle Repository
              • Motivation, History
              • Main Aspects
              • Benefits, Impact on Ecosystem

Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Common OSGi Pain
                        Points




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
• Dependency Management:
              • Development
              • Deployment
              • Runtime
             • Which bundles to install when, why, how
Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
The Story So Far...




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
• Informally specified & implemented by
                      Richard Hall ~2004, add-on to Felix




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
• Various problems:
              • Provisioning external runtimes
              • Distinction between development/
                             runtime




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
• Others:
              • P2
              • Nimble
              • Sigil
              • Maven
              • Ivy
Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
• Official OBR revived in 2009 by Hal
                      Hildebrand

             • Spec'd by David Savage in EEG


Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
The Problem




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
OBR Is...

             • Primarily a standardised Model to describe:
              • Which Bundles are available?
              • What do they do?

Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
OBR Is Not...

             • A management agent/deployer:
              • “calculator only”
             • A “server” or “database”:
              • no defined protocol

Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Main Aspects

             • Repository
             • Resolver
             • Interchange Format

Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
A New Model


             • Uses 4.3 concept of "wiring"
             • Implements often requested functionality
                      for introspection




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Environment



                                                                                <<contains>>


                                                        <<expressed by>>                               <<provides>>
                                                                                 Resource




                                                                             BundleRevision


                                                                  <<connected by>>          <<connected to>>
                                               Requirement                                                        Capability




                                           BundleRequirement                         Wire                      BundleCapability




                                                                               BundleWire




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
• Resources can be
                    physical or virtual

            • Resources have
                                                                                         Capability                                              Requirement


                    Requirements and
                    Capabilities




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                           November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
• Capabilities have a
                   namespace and a
                   map of attributes
                                                                                         Capability                                              Requirement

          • Requirements have
                   a namespace and a
                   set of directives



Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                           November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
• A Requirement
                      matches a Capability
                      if the namespaces
                      are equal and the
                      directives match the
                      attributes




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Common Namespaces
             • Capabilities:
              • osgi.identity → Unique per resource
              • osgi.content → Checksums, SCM, etc
             • Requirements:
              • osgi.wiring.package → Import-Package
              • osgi.wiring.bundle → Require-Bundle
Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Repository

             • Repository: simple
                      service(s) that
                      provide resources
                      with capabilities



Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Resolution

             • Resources + Wiring                                                                           A
                                                                                                                                  B

                                                                                                                                                 C
                                                                                                                                                     D




                      = Environment
             • Environment +
                      Requirements =                                                                                          D              B




                      Resolution                                                                                              C              A




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                             November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
An Example
                                                  osgi.service=servlet.container
                                                  effective=active
                                                                                         Active
                                    Servlet
                                                                                         Servlet
                                    Bundle
                                                                                        Container




                                                                                         Servlet
                                                                                        Container
                                                                                        Provider




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Subsystems




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Interchange Format

             • Based on XML Schema
             • Human-readable Name & URI for
                      repository identity
             • Version increment (long)
             • Resource URLs, Size, Checksums..
Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
<?xml version=”1.0”?>
     <repository name=”example” increment=”1”
     targetNamespace=”http://www.osgi.org/xmlns/obr/v1.0.0”>
     <resource>
         <capability namespace=”osgi.identity”>
           <attribute name=”osgi.identity” value=”org.foo.mumble” />
           <attribute name=”version” type=”version” value=”1.0.0” />
           <attribute name=”type” value=”osgi.bundle” />
         </capability>
         <capability namespace=”osgi.content”>
           <attribute name=”osgi.content” value=”org/foo/
     org.foo.mumble-1.0.0.jar” />
           <attribute name=”size” type=”long” value=”46725” />
           <attribute name=”checksum”
     value=”1bafd2ece2e88db4cdf835a7f8f0de65fab5b1147977a5dcc59b7c1b8
     c6f5080” />
         </capability>
       </resource>
     </repository>




Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Leftovers

             • Limited resolution failure introspection
             • Repository event model
             • License handling
             • Web based service
             • Deployment model → Subsystems
Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Conclusion

             • OBR:
              • Small, robust, reliable
              • Fixes Things Automatically
              • Gets The Job Done!

Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
Questions?
             •        Email: david.savage@paremus.com

             •        Twitter: @davemssavage

             •        Blog: http://chronological-
                      thought.blogspot.com

             •        Book: http://www.manning.com/hall/

             •        Paremus: http://www.paremus.com

             •        OSGi: http://www.osgi.org


Help Me OBR,You’re My Only Hope                                          www.paremus.com                                                         November 2011
                             Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.

Mais conteúdo relacionado

Mais de 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
 
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
 

Mais de mfrancis (20)

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...
 
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)
 
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
 

Último

Último (20)

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: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Help me obr you are my only hope - osgi users forum uk 16-nov2011

  • 1. Help Me OBR, You’re My Only Hope David Savage david.savage@paremus.com Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 2. Help Me OBR,You’re My Only Hope A Brief Introduction To The OSGi Bundle Repository Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 3. A Long Time Ago... • OSGi Bundle Repository • Motivation, History • Main Aspects • Benefits, Impact on Ecosystem Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 4. Common OSGi Pain Points Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 5. Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 6. • Dependency Management: • Development • Deployment • Runtime • Which bundles to install when, why, how Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 7. The Story So Far... Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 8. • Informally specified & implemented by Richard Hall ~2004, add-on to Felix Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 9. • Various problems: • Provisioning external runtimes • Distinction between development/ runtime Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 10. • Others: • P2 • Nimble • Sigil • Maven • Ivy Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 11. • Official OBR revived in 2009 by Hal Hildebrand • Spec'd by David Savage in EEG Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 12. The Problem Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 13. OBR Is... • Primarily a standardised Model to describe: • Which Bundles are available? • What do they do? Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 14. OBR Is Not... • A management agent/deployer: • “calculator only” • A “server” or “database”: • no defined protocol Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 15. Main Aspects • Repository • Resolver • Interchange Format Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 16. A New Model • Uses 4.3 concept of "wiring" • Implements often requested functionality for introspection Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 17. Environment <<contains>> <<expressed by>> <<provides>> Resource BundleRevision <<connected by>> <<connected to>> Requirement Capability BundleRequirement Wire BundleCapability BundleWire Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 18. • Resources can be physical or virtual • Resources have Capability Requirement Requirements and Capabilities Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 19. • Capabilities have a namespace and a map of attributes Capability Requirement • Requirements have a namespace and a set of directives Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 20. • A Requirement matches a Capability if the namespaces are equal and the directives match the attributes Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 21. Common Namespaces • Capabilities: • osgi.identity → Unique per resource • osgi.content → Checksums, SCM, etc • Requirements: • osgi.wiring.package → Import-Package • osgi.wiring.bundle → Require-Bundle Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 22. Repository • Repository: simple service(s) that provide resources with capabilities Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 23. Resolution • Resources + Wiring A B C D = Environment • Environment + Requirements = D B Resolution C A Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 24. An Example osgi.service=servlet.container effective=active Active Servlet Servlet Bundle Container Servlet Container Provider Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 25. Subsystems Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 26. Interchange Format • Based on XML Schema • Human-readable Name & URI for repository identity • Version increment (long) • Resource URLs, Size, Checksums.. Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 27. <?xml version=”1.0”?> <repository name=”example” increment=”1” targetNamespace=”http://www.osgi.org/xmlns/obr/v1.0.0”> <resource> <capability namespace=”osgi.identity”> <attribute name=”osgi.identity” value=”org.foo.mumble” /> <attribute name=”version” type=”version” value=”1.0.0” /> <attribute name=”type” value=”osgi.bundle” /> </capability> <capability namespace=”osgi.content”> <attribute name=”osgi.content” value=”org/foo/ org.foo.mumble-1.0.0.jar” /> <attribute name=”size” type=”long” value=”46725” /> <attribute name=”checksum” value=”1bafd2ece2e88db4cdf835a7f8f0de65fab5b1147977a5dcc59b7c1b8 c6f5080” /> </capability> </resource> </repository> Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 28. Leftovers • Limited resolution failure introspection • Repository event model • License handling • Web based service • Deployment model → Subsystems Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 29. Conclusion • OBR: • Small, robust, reliable • Fixes Things Automatically • Gets The Job Done! Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 30. Questions? • Email: david.savage@paremus.com • Twitter: @davemssavage • Blog: http://chronological- thought.blogspot.com • Book: http://www.manning.com/hall/ • Paremus: http://www.paremus.com • OSGi: http://www.osgi.org Help Me OBR,You’re My Only Hope www.paremus.com November 2011 Copyright © 2011 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.