SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
Structuring Software Systems with
OSGi
Ulf Fildebrandt

SAP AG

22.09.2011




                                                           OSGi Alliance Marketing © 2008-2010 . 1
                                                                                           Page
COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved
                                                           All Rights Reserved
Agenda

•   OSGi: basic structure and declaration
•   Interface Usage
•   Layers
•   Services and Layers
•   Versioning
•   Testing
•   Assemblies



    Page 2   OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
Agenda

•   OSGi: basic structure and declaration
•   Interface Usage
•   Layers
•   Services and Layers
•   Versioning
•   Testing
•   Assemblies



    Page 3   OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
Principles of Modularity

• Decoupling
   •    Logic has to be decoupled, otherwise the structure evolves into a monolithic
        block („architecture erosion“)

• Simplicity
   •    Design the concepts as simple as possible, otherwise the system solves non-
        existing requirements

• Extensibility
   •    Decoupling implies that frameworks are open for logic
   •    Extensibility for logic is not the exception, but rather the common principle for
        all frameworks




   Page 4    OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
OSGi basics

• Bundles are the atomic entities for structuring
  (containing binaries)
• Services are the communication means between
  bundles
• Exported packages are the public interface of bundles
• Imported packages define the usages of bundles




   Page 5   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Example




• Web application to analyze data
• OSGi bundles, services, and exported
  packages are used to structure the application


   Page 6   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Structure of Application

• Fulfills the business requirements, but no modularity
  (decoupling, extensibility)


                                                          Servlet



                 Data                                                     Data
               Source 1                                                 Source 2

   Page 7   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Structure Of Application
                                                                    Servlet



                                                           Data Aggregate


                                                                                 Data               Data
                                                                              Aggregator 1       Aggregator 2
Data Source 1                   Data Source 2



                                                                                      Data Aggregator
                                                                                         Interface


      Page 8                                                  Data Source
                OSGi Alliance Marketing © 2008-2011 . All Rights Reserved

                                                               Interface
Agenda

•   OSGi: basic structure and declaration
•   Interface Usage
•   Layers
•   Services and Layers
•   Versioning
•   Testing
•   Assemblies



    Page 9   OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
Interface Usage

• Implementation should only use interfaces  Services
  in OSGi
• Services are difficult to implement in OSGi fulfilling all
  lifecycle requirements (Service Tracker, Service
  Listener)  „boilerplate coding“
• Frameworks: Declarative Services (DS) is part of the
  OSGi specification, Blueprint, etc.
   •    DS are meant to declare the dependencies of services and service usage
   •    DS is a mechanism to bring dependency injection into OSGi




   Page 10   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Structure Of Application
                                                                    Servlet


                         IDataAggregate
                                                           Data Aggregate


                                                                                 Data               Data
                                                                              Aggregator 1       Aggregator 2
Data Source 1                   Data Source 2


                                                                                                 IDataAggregator
                                                                                      Data Aggregator
                                                                                         Interface
                IDataSourceService
                      IDataSource
      Page 11                                                 Data Source
                OSGi Alliance Marketing © 2008-2011 . All Rights Reserved

                         IDataItem                             Interface
Agenda

•   OSGi: basic structure and declaration
•   Interface Usage
•   Layers
•   Services and Layers
•   Versioning
•   Testing
•   Assemblies



    Page 12   OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
Layers

• In architecture, layers are used to structure the software
• Entities within a layer can only have dependencies to
  lower layers
• Bundles in OSGi belong to one layer only
• In reality more coarse grained frameworks are used
   •    Feature (P2, Eclipse)
   •    Application (Aries)
   •    OSGi sub system specification

• For simplicity in these examples only bundles are used


   Page 13   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Servlet                                               UI



                                                          Data Aggregate                                        Aggregate




Aggregator                                                                           Data                 Data
                                                                                  Aggregator 1         Aggregator 2



   Data Source 1                       Data Source 2                                                         Data Provider



                                                                                           Data Aggregator
Data Aggregator Interface
                                                                                              Interface



Data Source InterfaceAlliance Marketing © 2008-2011 . All Rights ReservedSource
          Page 14 OSGi                                        Data
                                                                  Interface
Class
Structure
• Classes fit
  to bundle
  structure




   Page 15   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Agenda

•   OSGi: basic structure and declaration
•   Interface Usage
•   Layers
•   Services and Layers
•   Versioning
•   Testing
•   Assemblies



    Page 16   OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
Interface of a Layer

• Layers should have a clear interface
• API (Application Programming Interface)
   •    is defining the publicly available functionality
   •    is an interface
   •    is implemented as service in OSGi
   •    Example: IDataAggregate, IDataSourceService

• SPI (Service Provider Interface)
   •    is defining the extension point
   •    is implemented as service in OSGi in a separate bundle
   •    Example: IDataSource, IDataAggregator




   Page 17   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Agenda

•   OSGi: basic structure and declaration
•   Interface Usage
•   Layers
•   Services and Layers
•   Versioning
•   Testing
•   Assemblies



    Page 18   OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
Versioning in OSGi

• Bundles and exported packages are versioned
• Usage of versioning is different for implementation, API,
  SPI
   •    Implementation: can be replaced easily, because interface is not changed
   •    API: can be evolved in a compatible way, but implementation has to be
        adapted, too
   •    SPI: evolution is difficult, because if interfaces are extended, then the old
        implementations are not valid any more
          • Java evolution: Ix  Ix2, e.g. IDataAggregator  IDataAggregator2 in the
            same package




   Page 19   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Agenda

•   OSGi: basic structure and declaration
•   Interface Usage
•   Layers
•   Services and Layers
•   Versioning
•   Testing
•   Assemblies



    Page 20   OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
Testing

• Layers have to be separately testable
   •    Mock objects (Easy Mock)

• Example: DataAggregate layer




   Page 21   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Agenda

•   OSGi: basic structure and declaration
•   Interface Usage
•   Layers
•   Services and Layers
•   Versioning
•   Testing
•   Assemblies



    Page 22   OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
Multiple assemblies

• Bundles assembled into multiple assemblies (e.g.
  products)
• An assembly contains bundles from different layers
   •    A layer does not have to be used completely

• Examples:
   •    Other access layer (REST)
   •    Configuration data aggregator
   •    DSL data aggregator




   Page 23   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
Summary

• Module and service concepts should be used to
  structure software
• Bundles expose clear interfaces
• Communications works by using services (minimum
  requirement between layers)
• Layers are testable separately
• Different assemblies should be possible




  Page 29   OSGi Alliance Marketing © 2008-2011 . All Rights Reserved

Weitere ähnliche Inhalte

Ähnlich wie Structuring software systems with OSGi - Ulf Fildebrandt

Virgo 3.0, OSGi middleware server from EclipseRT – Christopher Frost
Virgo 3.0, OSGi middleware server from EclipseRT – Christopher FrostVirgo 3.0, OSGi middleware server from EclipseRT – Christopher Frost
Virgo 3.0, OSGi middleware server from EclipseRT – Christopher Frostmfrancis
 
Demystifying the Cloud - BI Cloud Webinar
Demystifying the Cloud - BI Cloud WebinarDemystifying the Cloud - BI Cloud Webinar
Demystifying the Cloud - BI Cloud WebinarKim Pike
 
Demystifying the Cloud - BI Cloud Webinar
Demystifying the Cloud - BI Cloud WebinarDemystifying the Cloud - BI Cloud Webinar
Demystifying the Cloud - BI Cloud WebinarEmtec Inc.
 
otbioverviewow13-141008094532-conversion-gate01-converted.pptx
otbioverviewow13-141008094532-conversion-gate01-converted.pptxotbioverviewow13-141008094532-conversion-gate01-converted.pptx
otbioverviewow13-141008094532-conversion-gate01-converted.pptxSreekumarSasikumar
 
Modernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIsModernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIsApigee | Google Cloud
 
A Fault Tolerance Concept for Distributed OSGi Applications - Fabian Meyer
A Fault Tolerance Concept for Distributed OSGi Applications - Fabian MeyerA Fault Tolerance Concept for Distributed OSGi Applications - Fabian Meyer
A Fault Tolerance Concept for Distributed OSGi Applications - Fabian Meyermfrancis
 
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...mfrancis
 
OSGi Architecture for Mobile Device Software - Peter Kriens, aQute
OSGi Architecture for Mobile Device Software - Peter Kriens, aQuteOSGi Architecture for Mobile Device Software - Peter Kriens, aQute
OSGi Architecture for Mobile Device Software - Peter Kriens, aQutemfrancis
 
µServices for the rest of us - karl pauls
µServices for the rest of us - karl paulsµServices for the rest of us - karl pauls
µServices for the rest of us - karl paulsmfrancis
 
Migrating from Oracle to Postgres
Migrating from Oracle to PostgresMigrating from Oracle to Postgres
Migrating from Oracle to PostgresEDB
 
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentOSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentSanjeeb Sahoo
 
OData External Data Integration Strategies for SaaS
OData External Data Integration Strategies for SaaSOData External Data Integration Strategies for SaaS
OData External Data Integration Strategies for SaaSSumit Sarkar
 
API Management: Unlock the Value of Your Unique Assets with a Robust API
API Management: Unlock the Value of Your Unique Assets with a Robust APIAPI Management: Unlock the Value of Your Unique Assets with a Robust API
API Management: Unlock the Value of Your Unique Assets with a Robust APISoftware AG
 
2005 OSGi Alliance Status - John Barr, Ph.D., Past President, OSGi Alliance; ...
2005 OSGi Alliance Status - John Barr, Ph.D., Past President, OSGi Alliance; ...2005 OSGi Alliance Status - John Barr, Ph.D., Past President, OSGi Alliance; ...
2005 OSGi Alliance Status - John Barr, Ph.D., Past President, OSGi Alliance; ...mfrancis
 
OSGi in the Residential Market
OSGi in the Residential Market OSGi in the Residential Market
OSGi in the Residential Market OSGiUsers
 
EDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB
 
OpenTravel XML Object Suite - Component Model
OpenTravel XML Object Suite - Component ModelOpenTravel XML Object Suite - Component Model
OpenTravel XML Object Suite - Component ModelOpenTravel Alliance
 

Ähnlich wie Structuring software systems with OSGi - Ulf Fildebrandt (20)

Virgo 3.0, OSGi middleware server from EclipseRT – Christopher Frost
Virgo 3.0, OSGi middleware server from EclipseRT – Christopher FrostVirgo 3.0, OSGi middleware server from EclipseRT – Christopher Frost
Virgo 3.0, OSGi middleware server from EclipseRT – Christopher Frost
 
Demystifying the Cloud - BI Cloud Webinar
Demystifying the Cloud - BI Cloud WebinarDemystifying the Cloud - BI Cloud Webinar
Demystifying the Cloud - BI Cloud Webinar
 
Demystifying the Cloud - BI Cloud Webinar
Demystifying the Cloud - BI Cloud WebinarDemystifying the Cloud - BI Cloud Webinar
Demystifying the Cloud - BI Cloud Webinar
 
otbioverviewow13-141008094532-conversion-gate01-converted.pptx
otbioverviewow13-141008094532-conversion-gate01-converted.pptxotbioverviewow13-141008094532-conversion-gate01-converted.pptx
otbioverviewow13-141008094532-conversion-gate01-converted.pptx
 
Modernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIsModernizing an Existing SOA-based Architecture with APIs
Modernizing an Existing SOA-based Architecture with APIs
 
A Fault Tolerance Concept for Distributed OSGi Applications - Fabian Meyer
A Fault Tolerance Concept for Distributed OSGi Applications - Fabian MeyerA Fault Tolerance Concept for Distributed OSGi Applications - Fabian Meyer
A Fault Tolerance Concept for Distributed OSGi Applications - Fabian Meyer
 
Otbi overview ow13
Otbi overview ow13Otbi overview ow13
Otbi overview ow13
 
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
Technical Specification Overview - OSGi World Congress 2002 Workshop Intro - ...
 
OSGi Architecture for Mobile Device Software - Peter Kriens, aQute
OSGi Architecture for Mobile Device Software - Peter Kriens, aQuteOSGi Architecture for Mobile Device Software - Peter Kriens, aQute
OSGi Architecture for Mobile Device Software - Peter Kriens, aQute
 
Geode Meetup Apachecon
Geode Meetup ApacheconGeode Meetup Apachecon
Geode Meetup Apachecon
 
IBM Z for the Digital Enterprise - Zowe overview
IBM Z for the Digital Enterprise - Zowe overviewIBM Z for the Digital Enterprise - Zowe overview
IBM Z for the Digital Enterprise - Zowe overview
 
µServices for the rest of us - karl pauls
µServices for the rest of us - karl paulsµServices for the rest of us - karl pauls
µServices for the rest of us - karl pauls
 
Migrating from Oracle to Postgres
Migrating from Oracle to PostgresMigrating from Oracle to Postgres
Migrating from Oracle to Postgres
 
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application DevelopmentOSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
OSGi and Java EE: A Hybrid Approach to Enterprise Java Application Development
 
OData External Data Integration Strategies for SaaS
OData External Data Integration Strategies for SaaSOData External Data Integration Strategies for SaaS
OData External Data Integration Strategies for SaaS
 
API Management: Unlock the Value of Your Unique Assets with a Robust API
API Management: Unlock the Value of Your Unique Assets with a Robust APIAPI Management: Unlock the Value of Your Unique Assets with a Robust API
API Management: Unlock the Value of Your Unique Assets with a Robust API
 
2005 OSGi Alliance Status - John Barr, Ph.D., Past President, OSGi Alliance; ...
2005 OSGi Alliance Status - John Barr, Ph.D., Past President, OSGi Alliance; ...2005 OSGi Alliance Status - John Barr, Ph.D., Past President, OSGi Alliance; ...
2005 OSGi Alliance Status - John Barr, Ph.D., Past President, OSGi Alliance; ...
 
OSGi in the Residential Market
OSGi in the Residential Market OSGi in the Residential Market
OSGi in the Residential Market
 
EDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to PostgresEDB's Migration Portal - Migrate from Oracle to Postgres
EDB's Migration Portal - Migrate from Oracle to Postgres
 
OpenTravel XML Object Suite - Component Model
OpenTravel XML Object Suite - Component ModelOpenTravel XML Object Suite - Component Model
OpenTravel XML Object Suite - Component Model
 

Mehr von mfrancis

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

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

Kürzlich hochgeladen

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Kürzlich hochgeladen (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Structuring software systems with OSGi - Ulf Fildebrandt

  • 1. Structuring Software Systems with OSGi Ulf Fildebrandt SAP AG 22.09.2011 OSGi Alliance Marketing © 2008-2010 . 1 Page COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved All Rights Reserved
  • 2. Agenda • OSGi: basic structure and declaration • Interface Usage • Layers • Services and Layers • Versioning • Testing • Assemblies Page 2 OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
  • 3. Agenda • OSGi: basic structure and declaration • Interface Usage • Layers • Services and Layers • Versioning • Testing • Assemblies Page 3 OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
  • 4. Principles of Modularity • Decoupling • Logic has to be decoupled, otherwise the structure evolves into a monolithic block („architecture erosion“) • Simplicity • Design the concepts as simple as possible, otherwise the system solves non- existing requirements • Extensibility • Decoupling implies that frameworks are open for logic • Extensibility for logic is not the exception, but rather the common principle for all frameworks Page 4 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 5. OSGi basics • Bundles are the atomic entities for structuring (containing binaries) • Services are the communication means between bundles • Exported packages are the public interface of bundles • Imported packages define the usages of bundles Page 5 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 6. Example • Web application to analyze data • OSGi bundles, services, and exported packages are used to structure the application Page 6 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 7. Structure of Application • Fulfills the business requirements, but no modularity (decoupling, extensibility) Servlet Data Data Source 1 Source 2 Page 7 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 8. Structure Of Application Servlet Data Aggregate Data Data Aggregator 1 Aggregator 2 Data Source 1 Data Source 2 Data Aggregator Interface Page 8 Data Source OSGi Alliance Marketing © 2008-2011 . All Rights Reserved Interface
  • 9. Agenda • OSGi: basic structure and declaration • Interface Usage • Layers • Services and Layers • Versioning • Testing • Assemblies Page 9 OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
  • 10. Interface Usage • Implementation should only use interfaces  Services in OSGi • Services are difficult to implement in OSGi fulfilling all lifecycle requirements (Service Tracker, Service Listener)  „boilerplate coding“ • Frameworks: Declarative Services (DS) is part of the OSGi specification, Blueprint, etc. • DS are meant to declare the dependencies of services and service usage • DS is a mechanism to bring dependency injection into OSGi Page 10 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 11. Structure Of Application Servlet IDataAggregate Data Aggregate Data Data Aggregator 1 Aggregator 2 Data Source 1 Data Source 2 IDataAggregator Data Aggregator Interface IDataSourceService IDataSource Page 11 Data Source OSGi Alliance Marketing © 2008-2011 . All Rights Reserved IDataItem Interface
  • 12. Agenda • OSGi: basic structure and declaration • Interface Usage • Layers • Services and Layers • Versioning • Testing • Assemblies Page 12 OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
  • 13. Layers • In architecture, layers are used to structure the software • Entities within a layer can only have dependencies to lower layers • Bundles in OSGi belong to one layer only • In reality more coarse grained frameworks are used • Feature (P2, Eclipse) • Application (Aries) • OSGi sub system specification • For simplicity in these examples only bundles are used Page 13 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 14. Servlet UI Data Aggregate Aggregate Aggregator Data Data Aggregator 1 Aggregator 2 Data Source 1 Data Source 2 Data Provider Data Aggregator Data Aggregator Interface Interface Data Source InterfaceAlliance Marketing © 2008-2011 . All Rights ReservedSource Page 14 OSGi Data Interface
  • 15. Class Structure • Classes fit to bundle structure Page 15 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 16. Agenda • OSGi: basic structure and declaration • Interface Usage • Layers • Services and Layers • Versioning • Testing • Assemblies Page 16 OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
  • 17. Interface of a Layer • Layers should have a clear interface • API (Application Programming Interface) • is defining the publicly available functionality • is an interface • is implemented as service in OSGi • Example: IDataAggregate, IDataSourceService • SPI (Service Provider Interface) • is defining the extension point • is implemented as service in OSGi in a separate bundle • Example: IDataSource, IDataAggregator Page 17 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 18. Agenda • OSGi: basic structure and declaration • Interface Usage • Layers • Services and Layers • Versioning • Testing • Assemblies Page 18 OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
  • 19. Versioning in OSGi • Bundles and exported packages are versioned • Usage of versioning is different for implementation, API, SPI • Implementation: can be replaced easily, because interface is not changed • API: can be evolved in a compatible way, but implementation has to be adapted, too • SPI: evolution is difficult, because if interfaces are extended, then the old implementations are not valid any more • Java evolution: Ix  Ix2, e.g. IDataAggregator  IDataAggregator2 in the same package Page 19 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 20. Agenda • OSGi: basic structure and declaration • Interface Usage • Layers • Services and Layers • Versioning • Testing • Assemblies Page 20 OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
  • 21. Testing • Layers have to be separately testable • Mock objects (Easy Mock) • Example: DataAggregate layer Page 21 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 22. Agenda • OSGi: basic structure and declaration • Interface Usage • Layers • Services and Layers • Versioning • Testing • Assemblies Page 22 OSGi Alliance Community Event 2011© 2008-2011. All Rights Reserved
  • 23. Multiple assemblies • Bundles assembled into multiple assemblies (e.g. products) • An assembly contains bundles from different layers • A layer does not have to be used completely • Examples: • Other access layer (REST) • Configuration data aggregator • DSL data aggregator Page 23 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. Summary • Module and service concepts should be used to structure software • Bundles expose clear interfaces • Communications works by using services (minimum requirement between layers) • Layers are testable separately • Different assemblies should be possible Page 29 OSGi Alliance Marketing © 2008-2011 . All Rights Reserved