SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Beyond
OSGi Software
 Architecture

  Jeroen van Grondelle
    Marcel Offermans
     11 november - JFall 2009
About Us


Marcel Offermans   Jeroen van Grondelle
Lean Development
    Service Interfaces
    OSGi based Apps
Service Creation Patterns
Lean Development

       Part 1
Anticipate Change


Yes, there WILL be new
    requirements...
"Non-Functionals“
Great functionality! And can you do that, in a ... way.




                    Based on Luke Hohmann's book Beyond Software Architecture
Anticipate, don’t
over dimension

Do not try to support the things now
   that MIGHT be required next...
No decision is irreversible, but some
  are VERY expensive to reverse...
Service Interfaces that
  help you Change

          Part 2
Behavior Only
 Do NOT disclose parameters and implementation details.
Do NOT shape a Service after your rst/only implementation.
        This is NOT Object Orientation. Or is it... ;-)
Scale Invariance




 Service Interface should NOT re ect the scale 
   your ( rst) implementation will support.
Decoupling



If your implementations require other services, 
 access these services through interfaces only.
Think BIG
      act small!


    Your service interface should be future proof,
  your implementation should t your current needs.

         Keep many possible implementations 
(functionality, scale) in mind when designing interfaces.
Service Oriented Apps
      using OSGi

         Part 3
OSGi Recap
                                                                                                                         Service
                                                  Log                      Store                  Prefs
                                                                                       publish              publish
                                              publish                        use
                                                             use                                  use

                                                Bundle                Bundle            Bundle            Bundle




                                                        install                                                       Life Cycle
                                                                       installed
                          Service              start                                 start       starting
Bundle Bundle Bundle   Life Cycle                                      resolved                                          active
                         Module
                                                end                         uninstall            stopping       stop
                        Security
                                                                      uninstalled
                        OSGi framework
                       Java Virtual Machine

                                                                                                                        Module
                                                   Bundle                Bundle              Bundle          Bundle
                                                            imports                 exports           imports
                                               exports                         exports                             exports

                                              org.apache.util 1.0                  org.apache.db 1.4
                                                                  org.apache.log 2.3                  org.apache.util 1.1
Container Style
 Development


        Application consists of
      interdependent Services

   Public Services are accessed
      through UI/SOAP/JMS/...
Be a Good Host
                       Offer facilities to
                      your components




              OSGi Compendium is a
           Catalog of generic Facilities

Add your own to the container if needed
Deploy Everything



            Not just code!

                  Content
            Configurations
                Testcases
                     Work
Inversion of Control




        Use declarative Lifecycle and
          Dependency Management

                    Develop POJO’s
                   Delegate injection
Add Chemistry



          Deployed services react
                   on each other

             Resulting in behavior
                and new services

 Define these reactions in terms of
      life cycle and dependencies
Patterns for Creating
   Service Graphs
         Part 4
Singleton Services
                    Singleton
       Document
       Repository
 get()                                     Storage
 getVersions()                  requires
 get(version)
 store(Document)




         Bind Logic in a Single Instance
Singleton Services
class Activator {
   public void init(context, manager) {

        manager.add(
        	 createService()
           	 .setInterface(DocumentRepository.class.getName())
                                   (Pseudo)Code
        	 	 .setImplementation(DocumentRepositoryImpl.class)
        	 	 .add(
        	 	 	 createServiceDependency()
              	 	 .setService(Storage.class)));

    }
}
Aspect Services
                       Aspect
    Repository Cache                        Repository
get()                                   get()
getVersions()              intercepts   getVersions()
get(version)                            get(version)
store(Document)                         store(Document)




Transparently inject an interceptor service 
 "in front of" all services matching a lter
Aspect Services
class Activator {
   public void init(context, manager) {
         manager.add(
         	 createAspectService(
         	 	 DocumentRepository.class,
         	 	 DocumentRepositoryCache.class,
         	 	 10));

    }
}
Adapter Services
                       Adapter
    Repository Cache                       Repository Cache
        Manageable                        get()
 getCacheHits()                           getVersions()
                                 adapts
 setSize()                                get(version)
 setTTL()                                 store(Document)
 flush()




Start an instance of the adapter service for any
       "adaptee" service matching a lter
Adapter Services
class Activator {
   public void init(context, manager) {

        manager.add(
        	 createAdapterService(
        	 	 Manageable.class,
        	 	 DocumentRepositoryCache.class,
        	 	 DocumentRepositoryCacheManageable.class));

    }
}
Resource Adapters
                             Resource
                 Audio Track Adapter
            play()                               MP3
                                        adapts
            pause()                              File
            stop()



   Start an instance of a Resource Driven Service for all
                 resources matching a lter

Resources: File(system) abstraction, access by InputStream
Resource Adapters
class Activator {
   public void init(context, manager) {

          manager.add(
          	 createResourceAdapterService(
                "(extension=mp3)",
          	 	 AudioTrack.class,
          	 	 MP3AudioTrack.class));

    }
}
Dependency
Management & OSGi
 Not standard OSGi, a number of extensions available.
Felix Dependency Manager implements these patterns.
Lean Development
    Service Interfaces
    OSGi based Apps
Service Creation Patterns
Questions?


Marcel Offermans              Jeroen van Grondelle
marcel.offermans@luminis.nl    j.vangrondelle@beinformed.nl

Weitere ähnliche Inhalte

Was ist angesagt?

EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiRafik HARABI
 
Liferay Configuration and Customization
Liferay Configuration and CustomizationLiferay Configuration and Customization
Liferay Configuration and CustomizationThành Nguyễn
 
MOE: Cross Platform Mobile Apps in Java
MOE: Cross Platform Mobile Apps in JavaMOE: Cross Platform Mobile Apps in Java
MOE: Cross Platform Mobile Apps in JavaGergely Kis
 
Liferay UI (R)evolution
Liferay UI (R)evolutionLiferay UI (R)evolution
Liferay UI (R)evolutionZeno Rocha
 
Introduction to Portlets Using Liferay Portal
Introduction to Portlets Using Liferay PortalIntroduction to Portlets Using Liferay Portal
Introduction to Portlets Using Liferay Portalrivetlogic
 
Going Native With The OSGi Service Layer - Sascha Zelzer
Going Native With The OSGi Service Layer - Sascha ZelzerGoing Native With The OSGi Service Layer - Sascha Zelzer
Going Native With The OSGi Service Layer - Sascha Zelzermfrancis
 
Building a server platform with os gi
Building a server platform with os giBuilding a server platform with os gi
Building a server platform with os giDileepa Jayakody
 
JasForge : the collaborative agile project
JasForge : the collaborative agile projectJasForge : the collaborative agile project
JasForge : the collaborative agile projectJasmine Conseil
 
MuleSoft CloudHub API Versioning
MuleSoft CloudHub API VersioningMuleSoft CloudHub API Versioning
MuleSoft CloudHub API VersioningPatryk Bandurski
 
An XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoAn XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoFrank van der Linden
 
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...mfrancis
 
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoBP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoSerdar Basegmez
 
Introduction to Module Development with Appcelerator Titanium
Introduction to Module Development with Appcelerator TitaniumIntroduction to Module Development with Appcelerator Titanium
Introduction to Module Development with Appcelerator TitaniumAaron Saunders
 
Using Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onUsing Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onFirelay
 
Android with dagger_2
Android with dagger_2Android with dagger_2
Android with dagger_2Kros Huang
 
Pro Syst Enterprise OSGi
Pro Syst Enterprise OSGiPro Syst Enterprise OSGi
Pro Syst Enterprise OSGiRoman Roelofsen
 

Was ist angesagt? (19)

EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik HarabiEclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
EclipseCon Europe 2015 - liferay modularity patterns using OSGi -Rafik Harabi
 
Liferay Configuration and Customization
Liferay Configuration and CustomizationLiferay Configuration and Customization
Liferay Configuration and Customization
 
MOE: Cross Platform Mobile Apps in Java
MOE: Cross Platform Mobile Apps in JavaMOE: Cross Platform Mobile Apps in Java
MOE: Cross Platform Mobile Apps in Java
 
ProSyst OSGi SDK
ProSyst OSGi SDKProSyst OSGi SDK
ProSyst OSGi SDK
 
Liferay UI (R)evolution
Liferay UI (R)evolutionLiferay UI (R)evolution
Liferay UI (R)evolution
 
Modularization in java 8
Modularization in java 8Modularization in java 8
Modularization in java 8
 
Introduction to Portlets Using Liferay Portal
Introduction to Portlets Using Liferay PortalIntroduction to Portlets Using Liferay Portal
Introduction to Portlets Using Liferay Portal
 
Going Native With The OSGi Service Layer - Sascha Zelzer
Going Native With The OSGi Service Layer - Sascha ZelzerGoing Native With The OSGi Service Layer - Sascha Zelzer
Going Native With The OSGi Service Layer - Sascha Zelzer
 
Building a server platform with os gi
Building a server platform with os giBuilding a server platform with os gi
Building a server platform with os gi
 
JasForge : the collaborative agile project
JasForge : the collaborative agile projectJasForge : the collaborative agile project
JasForge : the collaborative agile project
 
MuleSoft CloudHub API Versioning
MuleSoft CloudHub API VersioningMuleSoft CloudHub API Versioning
MuleSoft CloudHub API Versioning
 
Javantura v4 - Security architecture of the Java platform - Martin Toshev
Javantura v4 - Security architecture of the Java platform - Martin ToshevJavantura v4 - Security architecture of the Java platform - Martin Toshev
Javantura v4 - Security architecture of the Java platform - Martin Toshev
 
An XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoAn XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on Domino
 
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
 
BP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM DominoBP207 - Meet the Java Application Server You Already Own – IBM Domino
BP207 - Meet the Java Application Server You Already Own – IBM Domino
 
Introduction to Module Development with Appcelerator Titanium
Introduction to Module Development with Appcelerator TitaniumIntroduction to Module Development with Appcelerator Titanium
Introduction to Module Development with Appcelerator Titanium
 
Using Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-onUsing Liferay Portal with LDAP and Single sign-on
Using Liferay Portal with LDAP and Single sign-on
 
Android with dagger_2
Android with dagger_2Android with dagger_2
Android with dagger_2
 
Pro Syst Enterprise OSGi
Pro Syst Enterprise OSGiPro Syst Enterprise OSGi
Pro Syst Enterprise OSGi
 

Ähnlich wie Beyond OSGi Software Architecture

Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMmukulobject
 
Weld-OSGi, injecting easiness in OSGi
Weld-OSGi, injecting easiness in OSGiWeld-OSGi, injecting easiness in OSGi
Weld-OSGi, injecting easiness in OSGiMathieu Ancelin
 
Talkbits service architecture and deployment
Talkbits service architecture and deploymentTalkbits service architecture and deployment
Talkbits service architecture and deploymentOpen-IT
 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...IndicThreads
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Dependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesDependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesMarcel Offermans
 
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...mfrancis
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in developmentMartin Toshev
 
Part6 introducing the jas forge collaborative project
Part6   introducing the jas forge collaborative projectPart6   introducing the jas forge collaborative project
Part6 introducing the jas forge collaborative projectJasmine Conseil
 
Introduction to OSGi (Tokyo JUG)
Introduction to OSGi (Tokyo JUG)Introduction to OSGi (Tokyo JUG)
Introduction to OSGi (Tokyo JUG)njbartlett
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2Pascal Rapicault
 
Os gi introduction made by Ly MInh Phuong-SOC team
Os gi introduction made by Ly MInh Phuong-SOC teamOs gi introduction made by Ly MInh Phuong-SOC team
Os gi introduction made by Ly MInh Phuong-SOC teamThuy_Dang
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC MetropjhInovex
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1pjhInovex
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi WebinarWSO2
 

Ähnlich wie Beyond OSGi Software Architecture (20)

OSGi tech session
OSGi tech sessionOSGi tech session
OSGi tech session
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDM
 
Weld-OSGi, injecting easiness in OSGi
Weld-OSGi, injecting easiness in OSGiWeld-OSGi, injecting easiness in OSGi
Weld-OSGi, injecting easiness in OSGi
 
Talkbits service architecture and deployment
Talkbits service architecture and deploymentTalkbits service architecture and deployment
Talkbits service architecture and deployment
 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
 
Introduction to OSGi
Introduction to OSGiIntroduction to OSGi
Introduction to OSGi
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Dependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesDependencies, dependencies, dependencies
Dependencies, dependencies, dependencies
 
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
Automatically Managing Service Dependencies in an OSGi Environment - Marcel O...
 
Osgi
OsgiOsgi
Osgi
 
Eclipse plug in development
Eclipse plug in developmentEclipse plug in development
Eclipse plug in development
 
Part6 introducing the jas forge collaborative project
Part6   introducing the jas forge collaborative projectPart6   introducing the jas forge collaborative project
Part6 introducing the jas forge collaborative project
 
Introduction to OSGi (Tokyo JUG)
Introduction to OSGi (Tokyo JUG)Introduction to OSGi (Tokyo JUG)
Introduction to OSGi (Tokyo JUG)
 
Managing Your Runtime With P2
Managing Your Runtime With P2Managing Your Runtime With P2
Managing Your Runtime With P2
 
struts
strutsstruts
struts
 
Os gi introduction made by Ly MInh Phuong-SOC team
Os gi introduction made by Ly MInh Phuong-SOC teamOs gi introduction made by Ly MInh Phuong-SOC team
Os gi introduction made by Ly MInh Phuong-SOC team
 
Introduction to-osgi
Introduction to-osgiIntroduction to-osgi
Introduction to-osgi
 
OSGi User Forum US DC Metro
OSGi User Forum US DC MetroOSGi User Forum US DC Metro
OSGi User Forum US DC Metro
 
OSGi user forum dc metro v1
OSGi user forum dc metro v1OSGi user forum dc metro v1
OSGi user forum dc metro v1
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi Webinar
 

Kürzlich hochgeladen

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Kürzlich hochgeladen (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

Beyond OSGi Software Architecture

  • 1. Beyond OSGi Software Architecture Jeroen van Grondelle Marcel Offermans 11 november - JFall 2009
  • 2. About Us Marcel Offermans Jeroen van Grondelle
  • 3. Lean Development Service Interfaces OSGi based Apps Service Creation Patterns
  • 5. Anticipate Change Yes, there WILL be new requirements...
  • 6. "Non-Functionals“ Great functionality! And can you do that, in a ... way. Based on Luke Hohmann's book Beyond Software Architecture
  • 7. Anticipate, don’t over dimension Do not try to support the things now that MIGHT be required next...
  • 8. No decision is irreversible, but some are VERY expensive to reverse...
  • 9. Service Interfaces that help you Change Part 2
  • 10. Behavior Only Do NOT disclose parameters and implementation details. Do NOT shape a Service after your rst/only implementation. This is NOT Object Orientation. Or is it... ;-)
  • 11. Scale Invariance Service Interface should NOT re ect the scale  your ( rst) implementation will support.
  • 12. Decoupling If your implementations require other services,  access these services through interfaces only.
  • 13. Think BIG act small! Your service interface should be future proof, your implementation should t your current needs. Keep many possible implementations  (functionality, scale) in mind when designing interfaces.
  • 14. Service Oriented Apps using OSGi Part 3
  • 15. OSGi Recap Service Log Store Prefs publish publish publish use use use Bundle Bundle Bundle Bundle install Life Cycle installed Service start start starting Bundle Bundle Bundle Life Cycle resolved active Module end uninstall stopping stop Security uninstalled OSGi framework Java Virtual Machine Module Bundle Bundle Bundle Bundle imports exports imports exports exports exports org.apache.util 1.0 org.apache.db 1.4 org.apache.log 2.3 org.apache.util 1.1
  • 16. Container Style Development Application consists of interdependent Services Public Services are accessed through UI/SOAP/JMS/...
  • 17. Be a Good Host Offer facilities to your components OSGi Compendium is a Catalog of generic Facilities Add your own to the container if needed
  • 18. Deploy Everything Not just code! Content Configurations Testcases Work
  • 19. Inversion of Control Use declarative Lifecycle and Dependency Management Develop POJO’s Delegate injection
  • 20. Add Chemistry Deployed services react on each other Resulting in behavior and new services Define these reactions in terms of life cycle and dependencies
  • 21. Patterns for Creating Service Graphs Part 4
  • 22. Singleton Services Singleton Document Repository get() Storage getVersions() requires get(version) store(Document) Bind Logic in a Single Instance
  • 23. Singleton Services class Activator { public void init(context, manager) { manager.add( createService() .setInterface(DocumentRepository.class.getName()) (Pseudo)Code .setImplementation(DocumentRepositoryImpl.class) .add( createServiceDependency() .setService(Storage.class))); } }
  • 24. Aspect Services Aspect Repository Cache Repository get() get() getVersions() intercepts getVersions() get(version) get(version) store(Document) store(Document) Transparently inject an interceptor service  "in front of" all services matching a lter
  • 25. Aspect Services class Activator { public void init(context, manager) { manager.add( createAspectService( DocumentRepository.class, DocumentRepositoryCache.class, 10)); } }
  • 26. Adapter Services Adapter Repository Cache Repository Cache Manageable get() getCacheHits() getVersions() adapts setSize() get(version) setTTL() store(Document) flush() Start an instance of the adapter service for any "adaptee" service matching a lter
  • 27. Adapter Services class Activator { public void init(context, manager) { manager.add( createAdapterService( Manageable.class, DocumentRepositoryCache.class, DocumentRepositoryCacheManageable.class)); } }
  • 28. Resource Adapters Resource Audio Track Adapter play() MP3 adapts pause() File stop() Start an instance of a Resource Driven Service for all resources matching a lter Resources: File(system) abstraction, access by InputStream
  • 29. Resource Adapters class Activator { public void init(context, manager) { manager.add( createResourceAdapterService( "(extension=mp3)", AudioTrack.class, MP3AudioTrack.class)); } }
  • 30. Dependency Management & OSGi Not standard OSGi, a number of extensions available. Felix Dependency Manager implements these patterns.
  • 31. Lean Development Service Interfaces OSGi based Apps Service Creation Patterns
  • 32. Questions? Marcel Offermans Jeroen van Grondelle marcel.offermans@luminis.nl j.vangrondelle@beinformed.nl