SlideShare a Scribd company logo
1 of 31
Download to read offline
PRESENTATION TITLE

MOLIERE Jerome


1O Things to know you are doing OSGi in the wrong way



Mentor/J

August 2011




                                                              OSGi Alliance Marketing © 2008-2010 . 1
                                                                                              Page
   COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved
                                                              All Rights Reserved
Speaker's bio

• Reach me at :
   •   jerome@javaxpert.com

• Works as freelance/writer for Mentor/J
• Architect/Trainer around
   •   Java/J2EE/OSGi technologies

• SCJP2 certified
• Jboss architect certified (2003)
• Works with Java since 1996...
Introduction

• This talk looks to different problems
   •   Design
   •   Development
   •   Deboging

• Brings solutions
• Catalog of something like Anti Patterns
   – Real problems raised in real projects

• Using a Pattern like layout
   •   Problem
   •   Solution
Item 1 : start levels

osgi.bundles=org.eclipse.equinox.common@2:start, 
org.eclipse.core.jobs@4:start,
org.eclipse.equinox.registry@4:start,
org.eclipse.core.runtime.compatibility.registry,
org.eclipse.equinox.preferences@4,
org.eclipse.core.contenttype@4,
org.eclipse.core.runtime@4:start,
org.eclipse.update.configurator@3:start,
Item1 : start levels
Introduction
• Your application starts using start level facility of your
  shell :
       • Introducing new bundles is a nightmare
       • Debuging is tedious
       • Once again you must fully master all runtime dependencies of your
         application....

• This solution is weak
       • No robustness
       • Like sitting on a bomb …
Item1 : start levels
Solution
• Using any provisioning mechanism
       • Felix File-Install for simple use cases/ embedded contexts
       • Apache Ace for larger infrastructures

• Delegate dependencies assembly to Declarative
  Services
• Mix start level with File Install is a very efficient solution
       –     Just put this single bundle in your start level configuration
       –     Configure bundles start with File Install
Item 2:bad logging usage
Introduction
• Context :
   •   Embedding Log4J or Slf4J with Logback
   •   Logging 10 to 20 messages per method call

• Effects :
   •   Impact on performance even with isDebugEnabled() calls
   •   Huge log files
         • ==> I/O may be very inefficient on mobile devices
         • Who never encountered filesystem full in production ?
Item2 :bad logging usage
Solution
• Use LogService
       • Implement a LogReader and isolate it into a separate bundle
       • Activate the bundle into your shell when needed

• Use EventService
       • To provide statistics
           • user request handled
           • Data saved
           • File printed
           • ….
       • Consume these events into another bundle

• Advantage
  •   Flexible/performance
Item3:Require-Bundle
Introduction
• Require-Bundle should not be supported
• Very few use-cases suited to such keyword
• Goes against the SOA approach
   •   No dynamism
   •   No way to change the implementation of the required service
   •   Very static way to declare dependencies
   •   You are tied to one specific version of this bundle...

• Seems to be a hack regarding the whole approach
Item3:Require-Bundle
Solution
• Import-Package is your friend...
• Declarative Services enables a very flexible and
  dynamic way to inject dependencies at runtime
• Please think in a services oriented way...
• Don't forget dynamism
      –   Just diamonds are for ever !!
Item 4:Versioning
Introduction
• Import-Package specifying :
   •   no version clauses
   •   Or coupling against trunk versions (Maven side effects)

• Implies :
   •   What works now won't work in the next weeks
   •   Did you test your application with the new behaviour of the foobaz() method ?
   •   How to deal with methods removal while APIs change ?
   •   How to do unitary & integration testing in such context?
   •   Beware of red buttons and cloudy weather in your Hudson reports …
Item 4:Versioning
Solution
• Use strict versioning
   •   Prefer ranges to strict version number : e.g [1.0,1.1) rather than 1.0
   •   Use and understand OSGi RFC proposal
         • Version is a 4 digits string
              • Major.minor.sub.discriminant
              • 1.0.0.1
         • Enables you (an engine!!!) to really compare versions
              • Far from stupid Maven strings
              • What can you do (as an engine) with a 1.2.5.FINAL version number ?
              • No natural (and easy to implement) order relationship
Item 5:Spring-DM usage
Introduction
• Spring-Dm enables to do OSGi like programming with
  POJOs
   •   Relies on ApplicationContext & BeanFactory standard Spring patterns
   •   Code showing OSGi services as Spring beans
   •   May use XML / annotation

• Implies
   •   No easy way to do natural OSGi stuff (how to get a BundleContext instance?)
   •   Application bootstrapping becomes tricky
        • Because of threads launched by Spring D-M
   •   Spring XML has a very strong impact
        • I/O
        • Memory footprint of the beans context
Item 5 : Spring D-M
Solution
• Use standard OSGi facilities & patterns
   •   Declarative Services
   •   Provisioning
   •   Library wrapping

      Implies :
                      Don't just run an OSGi shell but use a design well suited to
                       OSGi SOA approach....
Item 6:Not using bnd ?
Introduction
• Developement made using any mechanism (PDE on
  Eclipse) without control of the MANIFEST.MF file ?
      • Application is out of control
      • Maintenance will be very hard
      • Beware of shortcuts used by some developers (COPY/PASTE our best
        enemy)
Item 6:Not using bnd ?
Solution
• Use it !!!
   •   Integration with Maven/ANT/Eclipse/intelliJ Idea
   •   Directly or through a layer like the excellent BndTools for Eclipse

• Why ?
   •   The only tool reflecting the OSGi norm spirit
   •   Provides quick & standard answer to the most common problems
Item 6 : Not using bnd ?
Bndtools runtime view
Item 6 : Not using bnd ?
BndTools components view
Item 7:Not using Web-Console ?
Introduction
• How to diagnose weird problems at runtime ?
   •   Unmet dependencies
   •   Receivers listening on bad topics (typo in the name spelling)

• Logging ?
   •   Performance impact
   •   What to do with many traces not appearing (because of code not invoked) ?

   •   Debuging may be useful when possible.....
Item 7:Not using Web-Console ?
Solution
• Use it !!!
• How ?
   •   Add a few bundles
   •   Type in an url into your web browser and that's it !!!

• Moreover...
   •   It's an open system (plugins like architecture)
   •   It's free
   •   Very low footprint and weak requirements
   •   You get an easy way to monitor your system
                    •    CPU
                    •    memory

• But
   •   Beware on mobile devices , the NIO stack used by Jetty (default Http server )
       may not be available on your JVM so for such contexts please refer to the Http
       server from makewave.
Item 7 : Web-Console
bundles list & states
Item 7 : Web-Console
displaying components
Item 7 : Web-Console
getting system info
Item 8:Are you really using modules ?
introduction
• Do you separate API bundles from implementation
  ones ?
• Can you pick off any implementation bundle and put
  another one in place without breaking the whole
  system ?
   •   Major benefit from the SOA approach
   •   Enables early testing and suits well with Agile methods
   •   Mocking is so easy in the OSGi world...
Item 8:Are you really using modules ?
Solution
• Isolate API (interfaces) from implementation
• Inject dependency over the API with any
  implementation
• As usual Declarative Services is your friend
      –   Free
      –   Powerful
      –   dynamic
Item 9:Are you really using
modules(2)
• Can you put your bundle into another shell without
  pulling the whole Java constellation of libraries as
  dependencies ?
   •   Too much dependencies implies a very particular context
   •   Beware of the never ending stories
        • A requires B requires C and D , C requires F and D requires.....
        • Headache warranty
   •   May be sign for not reusable components
Item 9 : Are you really using
modules(2) ?
• Unproper control over dependencies is the heart of this
  problem
• Different solutions
   •   Rewrite some routines
   •   Wrap some portions of libraries into dedicated bundles
   •   All theses solutions are related to the design phase
Item 10 : Still don't understand
versioning ?
Problem :
You think that 2.5.6.PRE-FINAL is a nice version number
  for your component or 3.1.2.20120223 is correct....
Item 10 : Still Don't understand
versioning ?
Solution
   Read the excellent doc : semantic versioning
   Use the numbering scheme as purposed by OSGi Alliance :
   Major.minor.subminor.modifier
   All four fields as plain numbers....

Benefits :
Natural ordering is so easy ….
Or use part of this scheme :
Major.minor.subminor is nice in practice ….
Bonus Item :How do you solve your
problems ?
• Alone ?
   •   Can be sufficient for most code related problems...

• With newsgroups/forums ?
   •   Pragmatic way but not well suited for design/philosphical problems

• Best solution :
   •   Have some OSGi lunches please refer to Peter Kriens blog
   •   Share a beer/glass of wine/ best french fries in the world (only in Lansargues –
       Herault - France)
Thanks !!!!

Any question at this point ? It 's up to you now...



Apologize for my poor english spoken...

More Related Content

What's hot

Badge des bonnes pratiques OpenSSF de la CII
Badge des bonnes pratiques OpenSSF de la CIIBadge des bonnes pratiques OpenSSF de la CII
Badge des bonnes pratiques OpenSSF de la CIIOpen Source Experience
 
Symfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating productsSymfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating productsXavier Lacot
 
A walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 featuresA walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 featuresMichal Juhas
 
Comparison Of Open Source App Servers
Comparison Of Open Source App ServersComparison Of Open Source App Servers
Comparison Of Open Source App ServersRogue Wave Software
 
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to EclipseGEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to EclipseYoann Rodiere
 
Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7Roberto Cortez
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaEdureka!
 
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
 
How to execute the performance tests during a build in a continuous delivery ...
How to execute the performance tests during a build in a continuous delivery ...How to execute the performance tests during a build in a continuous delivery ...
How to execute the performance tests during a build in a continuous delivery ...Codemotion
 
How execute perfomance tests in a continuous delivery environment
How execute perfomance tests in a continuous delivery environmentHow execute perfomance tests in a continuous delivery environment
How execute perfomance tests in a continuous delivery environmentAndrea Bozzoni
 
Spring Tools 4 - Eclipse and Beyond
Spring Tools 4 - Eclipse and BeyondSpring Tools 4 - Eclipse and Beyond
Spring Tools 4 - Eclipse and BeyondVMware Tanzu
 
UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!René Winkelmeyer
 
Webinar: Open Mainframe Project's Zowe LTS Release
Webinar: Open Mainframe Project's Zowe LTS ReleaseWebinar: Open Mainframe Project's Zowe LTS Release
Webinar: Open Mainframe Project's Zowe LTS ReleaseOpen Mainframe Project
 
Towards a modularity maturity model - osgi users forum uk 16-nov2011
Towards a modularity maturity model - osgi users forum uk 16-nov2011Towards a modularity maturity model - osgi users forum uk 16-nov2011
Towards a modularity maturity model - osgi users forum uk 16-nov2011mfrancis
 
PFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP AppsPFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP AppsPablo Godel
 
Publishing a Module on the Puppet Forge
Publishing a Module on the Puppet ForgePublishing a Module on the Puppet Forge
Publishing a Module on the Puppet ForgePuppet
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsJohn M. Wargo
 
Components Approach to building Web Apps
Components Approach to building Web AppsComponents Approach to building Web Apps
Components Approach to building Web AppsVinci Rufus
 
Webinar: Open Source on the Modern Mainframe
Webinar: Open Source on the Modern MainframeWebinar: Open Source on the Modern Mainframe
Webinar: Open Source on the Modern MainframeOpen Mainframe Project
 

What's hot (20)

Badge des bonnes pratiques OpenSSF de la CII
Badge des bonnes pratiques OpenSSF de la CIIBadge des bonnes pratiques OpenSSF de la CII
Badge des bonnes pratiques OpenSSF de la CII
 
Symfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating productsSymfony Day 2009 - Symfony vs Integrating products
Symfony Day 2009 - Symfony vs Integrating products
 
A walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 featuresA walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 features
 
Comparison Of Open Source App Servers
Comparison Of Open Source App ServersComparison Of Open Source App Servers
Comparison Of Open Source App Servers
 
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to EclipseGEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
 
Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7Migration tales from java ee 5 to 7
Migration tales from java ee 5 to 7
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
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
 
How to execute the performance tests during a build in a continuous delivery ...
How to execute the performance tests during a build in a continuous delivery ...How to execute the performance tests during a build in a continuous delivery ...
How to execute the performance tests during a build in a continuous delivery ...
 
How execute perfomance tests in a continuous delivery environment
How execute perfomance tests in a continuous delivery environmentHow execute perfomance tests in a continuous delivery environment
How execute perfomance tests in a continuous delivery environment
 
Spring Tools 4 - Eclipse and Beyond
Spring Tools 4 - Eclipse and BeyondSpring Tools 4 - Eclipse and Beyond
Spring Tools 4 - Eclipse and Beyond
 
UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!
 
Webinar: Open Mainframe Project's Zowe LTS Release
Webinar: Open Mainframe Project's Zowe LTS ReleaseWebinar: Open Mainframe Project's Zowe LTS Release
Webinar: Open Mainframe Project's Zowe LTS Release
 
Towards a modularity maturity model - osgi users forum uk 16-nov2011
Towards a modularity maturity model - osgi users forum uk 16-nov2011Towards a modularity maturity model - osgi users forum uk 16-nov2011
Towards a modularity maturity model - osgi users forum uk 16-nov2011
 
History of Java 2/2
History of Java 2/2History of Java 2/2
History of Java 2/2
 
PFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP AppsPFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP Apps
 
Publishing a Module on the Puppet Forge
Publishing a Module on the Puppet ForgePublishing a Module on the Puppet Forge
Publishing a Module on the Puppet Forge
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
Components Approach to building Web Apps
Components Approach to building Web AppsComponents Approach to building Web Apps
Components Approach to building Web Apps
 
Webinar: Open Source on the Modern Mainframe
Webinar: Open Source on the Modern MainframeWebinar: Open Source on the Modern Mainframe
Webinar: Open Source on the Modern Mainframe
 

Similar to 10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere

Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Introduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald BelchamIntroduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald Belcham.NET Conf UY
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applicationsJulien Dubois
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreDan Poltawski
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedAlexander Makarov
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Codersebbe
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best PracticesPavel Mička
 
TDD on OSGi, in practice.
TDD on OSGi, in practice.TDD on OSGi, in practice.
TDD on OSGi, in practice.Elian, I.
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Nuxeo
 
AliExpress’ Way to Microservices - microXchg 2017
AliExpress’ Way to Microservices  - microXchg 2017AliExpress’ Way to Microservices  - microXchg 2017
AliExpress’ Way to Microservices - microXchg 2017juvenxu
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portlanddmethvin
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim WardBest Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim Wardmfrancis
 
Qardio experience with Core Data
Qardio experience with Core DataQardio experience with Core Data
Qardio experience with Core DataDmitrii Ivanov
 
Prototyping like it is 2022
Prototyping like it is 2022 Prototyping like it is 2022
Prototyping like it is 2022 Michael Yagudaev
 

Similar to 10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere (20)

Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Introduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald BelchamIntroduction to Aspect Oriented Programming by Donald Belcham
Introduction to Aspect Oriented Programming by Donald Belcham
 
Introduction To AOP
Introduction To AOPIntroduction To AOP
Introduction To AOP
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
Developing modular Java applications
Developing modular Java applicationsDeveloping modular Java applications
Developing modular Java applications
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
The Architect Way
The Architect WayThe Architect Way
The Architect Way
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
 
TDD on OSGi, in practice.
TDD on OSGi, in practice.TDD on OSGi, in practice.
TDD on OSGi, in practice.
 
Java Spring
Java SpringJava Spring
Java Spring
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
 
AliExpress’ Way to Microservices - microXchg 2017
AliExpress’ Way to Microservices  - microXchg 2017AliExpress’ Way to Microservices  - microXchg 2017
AliExpress’ Way to Microservices - microXchg 2017
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim WardBest Practices for (Enterprise) OSGi applications - Tim Ward
Best Practices for (Enterprise) OSGi applications - Tim Ward
 
Ios - Intorduction to view controller
Ios - Intorduction to view controllerIos - Intorduction to view controller
Ios - Intorduction to view controller
 
Qardio experience with Core Data
Qardio experience with Core DataQardio experience with Core Data
Qardio experience with Core Data
 
Prototyping like it is 2022
Prototyping like it is 2022 Prototyping like it is 2022
Prototyping like it is 2022
 

More from 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
 

More from 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)
 

Recently uploaded

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
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
 
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
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
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
 
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
 

Recently uploaded (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
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...
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
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
 
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
 
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)
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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
 
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
 
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
 

10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere

  • 1. PRESENTATION TITLE MOLIERE Jerome 1O Things to know you are doing OSGi in the wrong way Mentor/J August 2011 OSGi Alliance Marketing © 2008-2010 . 1 Page COPYRIGHT © 2008-2011 OSGi Alliance. All Rights Reserved All Rights Reserved
  • 2. Speaker's bio • Reach me at : • jerome@javaxpert.com • Works as freelance/writer for Mentor/J • Architect/Trainer around • Java/J2EE/OSGi technologies • SCJP2 certified • Jboss architect certified (2003) • Works with Java since 1996...
  • 3. Introduction • This talk looks to different problems • Design • Development • Deboging • Brings solutions • Catalog of something like Anti Patterns – Real problems raised in real projects • Using a Pattern like layout • Problem • Solution
  • 4. Item 1 : start levels osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.core.jobs@4:start, org.eclipse.equinox.registry@4:start, org.eclipse.core.runtime.compatibility.registry, org.eclipse.equinox.preferences@4, org.eclipse.core.contenttype@4, org.eclipse.core.runtime@4:start, org.eclipse.update.configurator@3:start,
  • 5. Item1 : start levels Introduction • Your application starts using start level facility of your shell : • Introducing new bundles is a nightmare • Debuging is tedious • Once again you must fully master all runtime dependencies of your application.... • This solution is weak • No robustness • Like sitting on a bomb …
  • 6. Item1 : start levels Solution • Using any provisioning mechanism • Felix File-Install for simple use cases/ embedded contexts • Apache Ace for larger infrastructures • Delegate dependencies assembly to Declarative Services • Mix start level with File Install is a very efficient solution – Just put this single bundle in your start level configuration – Configure bundles start with File Install
  • 7. Item 2:bad logging usage Introduction • Context : • Embedding Log4J or Slf4J with Logback • Logging 10 to 20 messages per method call • Effects : • Impact on performance even with isDebugEnabled() calls • Huge log files • ==> I/O may be very inefficient on mobile devices • Who never encountered filesystem full in production ?
  • 8. Item2 :bad logging usage Solution • Use LogService • Implement a LogReader and isolate it into a separate bundle • Activate the bundle into your shell when needed • Use EventService • To provide statistics • user request handled • Data saved • File printed • …. • Consume these events into another bundle • Advantage • Flexible/performance
  • 9. Item3:Require-Bundle Introduction • Require-Bundle should not be supported • Very few use-cases suited to such keyword • Goes against the SOA approach • No dynamism • No way to change the implementation of the required service • Very static way to declare dependencies • You are tied to one specific version of this bundle... • Seems to be a hack regarding the whole approach
  • 10. Item3:Require-Bundle Solution • Import-Package is your friend... • Declarative Services enables a very flexible and dynamic way to inject dependencies at runtime • Please think in a services oriented way... • Don't forget dynamism – Just diamonds are for ever !!
  • 11. Item 4:Versioning Introduction • Import-Package specifying : • no version clauses • Or coupling against trunk versions (Maven side effects) • Implies : • What works now won't work in the next weeks • Did you test your application with the new behaviour of the foobaz() method ? • How to deal with methods removal while APIs change ? • How to do unitary & integration testing in such context? • Beware of red buttons and cloudy weather in your Hudson reports …
  • 12. Item 4:Versioning Solution • Use strict versioning • Prefer ranges to strict version number : e.g [1.0,1.1) rather than 1.0 • Use and understand OSGi RFC proposal • Version is a 4 digits string • Major.minor.sub.discriminant • 1.0.0.1 • Enables you (an engine!!!) to really compare versions • Far from stupid Maven strings • What can you do (as an engine) with a 1.2.5.FINAL version number ? • No natural (and easy to implement) order relationship
  • 13. Item 5:Spring-DM usage Introduction • Spring-Dm enables to do OSGi like programming with POJOs • Relies on ApplicationContext & BeanFactory standard Spring patterns • Code showing OSGi services as Spring beans • May use XML / annotation • Implies • No easy way to do natural OSGi stuff (how to get a BundleContext instance?) • Application bootstrapping becomes tricky • Because of threads launched by Spring D-M • Spring XML has a very strong impact • I/O • Memory footprint of the beans context
  • 14. Item 5 : Spring D-M Solution • Use standard OSGi facilities & patterns • Declarative Services • Provisioning • Library wrapping  Implies :  Don't just run an OSGi shell but use a design well suited to OSGi SOA approach....
  • 15. Item 6:Not using bnd ? Introduction • Developement made using any mechanism (PDE on Eclipse) without control of the MANIFEST.MF file ? • Application is out of control • Maintenance will be very hard • Beware of shortcuts used by some developers (COPY/PASTE our best enemy)
  • 16. Item 6:Not using bnd ? Solution • Use it !!! • Integration with Maven/ANT/Eclipse/intelliJ Idea • Directly or through a layer like the excellent BndTools for Eclipse • Why ? • The only tool reflecting the OSGi norm spirit • Provides quick & standard answer to the most common problems
  • 17. Item 6 : Not using bnd ? Bndtools runtime view
  • 18. Item 6 : Not using bnd ? BndTools components view
  • 19. Item 7:Not using Web-Console ? Introduction • How to diagnose weird problems at runtime ? • Unmet dependencies • Receivers listening on bad topics (typo in the name spelling) • Logging ? • Performance impact • What to do with many traces not appearing (because of code not invoked) ? • Debuging may be useful when possible.....
  • 20. Item 7:Not using Web-Console ? Solution • Use it !!! • How ? • Add a few bundles • Type in an url into your web browser and that's it !!! • Moreover... • It's an open system (plugins like architecture) • It's free • Very low footprint and weak requirements • You get an easy way to monitor your system • CPU • memory • But • Beware on mobile devices , the NIO stack used by Jetty (default Http server ) may not be available on your JVM so for such contexts please refer to the Http server from makewave.
  • 21. Item 7 : Web-Console bundles list & states
  • 22. Item 7 : Web-Console displaying components
  • 23. Item 7 : Web-Console getting system info
  • 24. Item 8:Are you really using modules ? introduction • Do you separate API bundles from implementation ones ? • Can you pick off any implementation bundle and put another one in place without breaking the whole system ? • Major benefit from the SOA approach • Enables early testing and suits well with Agile methods • Mocking is so easy in the OSGi world...
  • 25. Item 8:Are you really using modules ? Solution • Isolate API (interfaces) from implementation • Inject dependency over the API with any implementation • As usual Declarative Services is your friend – Free – Powerful – dynamic
  • 26. Item 9:Are you really using modules(2) • Can you put your bundle into another shell without pulling the whole Java constellation of libraries as dependencies ? • Too much dependencies implies a very particular context • Beware of the never ending stories • A requires B requires C and D , C requires F and D requires..... • Headache warranty • May be sign for not reusable components
  • 27. Item 9 : Are you really using modules(2) ? • Unproper control over dependencies is the heart of this problem • Different solutions • Rewrite some routines • Wrap some portions of libraries into dedicated bundles • All theses solutions are related to the design phase
  • 28. Item 10 : Still don't understand versioning ? Problem : You think that 2.5.6.PRE-FINAL is a nice version number for your component or 3.1.2.20120223 is correct....
  • 29. Item 10 : Still Don't understand versioning ? Solution Read the excellent doc : semantic versioning Use the numbering scheme as purposed by OSGi Alliance : Major.minor.subminor.modifier All four fields as plain numbers.... Benefits : Natural ordering is so easy …. Or use part of this scheme : Major.minor.subminor is nice in practice ….
  • 30. Bonus Item :How do you solve your problems ? • Alone ? • Can be sufficient for most code related problems... • With newsgroups/forums ? • Pragmatic way but not well suited for design/philosphical problems • Best solution : • Have some OSGi lunches please refer to Peter Kriens blog • Share a beer/glass of wine/ best french fries in the world (only in Lansargues – Herault - France)
  • 31. Thanks !!!! Any question at this point ? It 's up to you now... Apologize for my poor english spoken...