SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
© 2013 IBM Corporation
DS, BP, EJB, CDI, WTF!?
Graham Charters, IBM
OSGi DevCon US 2013
1
© 2013 IBM Corporation
Agenda
 Background
 Criteria
 Component models
 How to choose
2
© 2013 IBM Corporation
Why?
4
© 2013 IBM Corporation
Approach
 Provide some criteria to consider when making a component model choice
 Explain a little bit about the technologies
 Describe how each rates against the criteria
 Reasons aren’t always technical
 We probably won’t always agree
5
My beans are
dynamic and use
annotations.
Your beans smell!!
© 2013 IBM Corporation
Technical Criteria
 Extra-bean definition (e.g. XML-based
declarative model)
 Intra-bean definition (e.g. bean annotation-
based declarative model)
 Extensibility
 Enterprise Qualities of Service
 Quality of Integration with OSGi
6
© 2013 IBM Corporation
Non-technical criteria
 Open Standards
 Open Source implementations
 Choice of implementations
 Availability of tools
 Existing assets
 Existing skills
7
© 2013 IBM Corporation
The technologies: DS, BP, EJB, CDI, WTF
 Declaratives Services (DS)
 Blueprint (not commonly known as BP)
 Enterprise JavaBeans (EJB)
 Contexts and Dependency Injection (CDI)
 World Taekwondo Federation (WTF)
There are a number of other component models, but I’ve
focused on the ones I heard discussed most often.
They’re also all based on open standards
8
© 2013 IBM Corporation
Declarative Services
9
Criterion DS
Inspiration Popularity if DI frameworks, but
designed for OSGi
Approach Extra-bean definition (XML-based
declarative model)
Build-time intra-bean definition
(annotations compiled to XML)
Extensibility No
Enterprise QoS No
OSGi Integration Designed by OSGi for OSGi.
Includes Configuration
Admin
Open Standards OSGi Alliance
Implementations Eclipse Equinox &
Apache Felix
Tools BND & BNDTools
<component name=“DiscountCalculator“ …>
<implementation
class="com.acme.utils.impl.DiscountCalculatorImpl"/>
<service>
<provide
interface="com.acme.utils.DiscountCalculator"/>
</service>
<reference name=“log"
interface="org.osgi.service.log.LogService"
bind="setLog" unbind="unsetLog"
updated=“updateLog" />
</component>
@Component
public class DiscountCalculatorImpl implements
DiscountCalculator {
private Logger logger;
@Reference(policy=DYNAMIC,
policyOption=GREEDY,
cardinality=MANDATORY)
void setLog( LogService log) { ... }
void unsetLog( LogService log) { ... }
void updatedLog( Map<String,?> ref ) { ... }
}
© 2013 IBM Corporation
Blueprint
10
Criterion Blueprint
Inspiration Spring & Spring DM (standardized by
SpringSource)
Approach Extra-bean definition (XML-based
declarative model, includes bean-to-
bean wiring)
Intra-bean definition (Annotations –
Apache Aries Open Source only)
Extensibility Through XML namespaces
– no runtime standard
Enterprise QoS Transactions and
Persistence (Apache
Aries), Security (WebSphere
Application Server), Bus
(CXF), Camel, etc…
OSGi Integration Some life-cycle compromises
Config Admin (open source)
Open Standards OSGi Alliance
Updates in pipeline
Implementations Eclipse Gemini &
Apache Aries
Tools WebSphere Developer Tools (no
charge), Rational Application Developer
<?xml version="1.0" encoding="UTF-8"?>
<blueprint …>
<service id="DiscountCalculatorBeanService"
ref="DiscountCalculatorBean"
interface="com.acme.utils.DiscountCalculator" />
<bean id="DiscountCalculatorBean"
class="com.acme.utils.impl.DiscountCalculatorImpl">
<property name="logger" ref="loggerService" />
</bean>
<reference id="loggerService"
interface="com.acme.utils.Logger" />
</blueprint>
© 2013 IBM Corporation
Enterprise JavaBeans
11
Criterion EJB
Inspiration Version 1.0 - 15 years old this week!
Approach Inheritance & XML bindings (pre-3.0).
Intra-bean definition (bean annotation-
based declarative model) (3.0 or later)
Extensibility Nothing formal (defer to CDI)
Enterprise QoS Transaction, Security, Remoting,
Persistence, Messaging
OSGi Integration Core capabilities (proprietary)
Open Standards JCP, OSGi specification in progress
Implementations All JavaEE App Servers support EJB.
OSGi integration in WebSphere
Application Server, GlassFish, Apache
Aries, Apache OpenEJB
Tools WebSphere Developer Tools (no
charge), Rational Application
Developer, Eclipse WTP
@Stateless
@Local(DiscountCalculator.class)
public class DiscountCalculatorImpl
implements DiscountCalculator {
@Resource(lookup="osgi:service/Logger")
private Logger logger;
public double discount() {
…
}
…
}
© 2013 IBM Corporation
Contexts and Dependency Injection
12
Criterion CDI
Inspiration JBoss Seam, Google Guice & Spring
Approach Intra-bean definition (annotation-based
life-cycle and DI model), Extra-bean
opt-in beans.xml with additional config
(e.g. extensibility)
Extensibility Interceptors, Decorators & Portable
Extensions
Enterprise QoS None. Leverage CDI in other
component models (e.g. EJB)
OSGi Integration Core capabilities (Open Source)
Open Standards JCP, OSGi Alliance in progress
Implementations Weld-OSGi, Pax-CDI, Fighterfish
Tools EE Vendors tools
@Named
@RequestScoped
@OSGiComponent
public class DiscountCalculatorImpl
implements DiscountCalculator {
@Inject @OSGiService
StaticLogger logger;
public double dicount() {...}
...
}
© 2013 IBM Corporation
Some questions to ask when choosing
 What existing skills does my team have?
– Choose the closest match (e.g. Spring? Consider Blueprint)
 What existing assets do I have available?
– Choose the closest match
 Do I need Enterprise capabilities?
– If “yes”, consider Blueprint or EJB, if “no”, consider DS
 Do I want something based on a standard?
– If “yes”, familarize yourself with the scope and direction of existing standards
 Do I need something based on open source?
– Apache Felix, Eclipse Equinox, Apache Karaf, Eclipse Gemini, Apache Aries, Eclipse
Virgo, ….the list goes on…..
 What are the capabilities of my target runtime?
– If a component model isn’t supported, there’s little point choosing it
 What are the capabilities of my tool chain?
– If a component model isn’t supported, you’re asking for pain
 What if I use more than one component model?
– Leverage OSGi services as the common integration point
13
No one component model to rule them all

Contenu connexe

En vedette

презентация абсалямова 36
презентация абсалямова 36презентация абсалямова 36
презентация абсалямова 36arenda-servis-kazan
 
Application modernization meets human factors what's next
Application modernization meets human factors   what's nextApplication modernization meets human factors   what's next
Application modernization meets human factors what's nextJohn Head
 
Repsol: Financial Results First Semester 2015
Repsol: Financial Results First Semester 2015Repsol: Financial Results First Semester 2015
Repsol: Financial Results First Semester 2015Repsol
 
Repsol presenta su Plan de Sostenibilidad de Cartagena
Repsol presenta su Plan de Sostenibilidad de Cartagena Repsol presenta su Plan de Sostenibilidad de Cartagena
Repsol presenta su Plan de Sostenibilidad de Cartagena Repsol
 
Understanding Evolution
Understanding EvolutionUnderstanding Evolution
Understanding EvolutionSamer Hamid
 
Plan de Sostenibilidad de Tarragona 2015
Plan de Sostenibilidad de Tarragona 2015Plan de Sostenibilidad de Tarragona 2015
Plan de Sostenibilidad de Tarragona 2015Repsol
 
Repsol: Strategic Plan 2012-2016
Repsol: Strategic Plan 2012-2016Repsol: Strategic Plan 2012-2016
Repsol: Strategic Plan 2012-2016Repsol
 
The Church and Social Media
The Church and Social MediaThe Church and Social Media
The Church and Social MediaSimeon Adedokun
 
Krishnan S.S.R. - Resume
Krishnan S.S.R. - ResumeKrishnan S.S.R. - Resume
Krishnan S.S.R. - ResumeKrishnan Ssr
 
企画セッションPpt 160806終了
企画セッションPpt 160806終了企画セッションPpt 160806終了
企画セッションPpt 160806終了Yoshihiro Kishimoto
 
агентство по контролю промышленных отходов + предприниматели
агентство по контролю промышленных отходов + предпринимателиагентство по контролю промышленных отходов + предприниматели
агентство по контролю промышленных отходов + предпринимателиBinazir Isenova
 

En vedette (15)

презентация абсалямова 36
презентация абсалямова 36презентация абсалямова 36
презентация абсалямова 36
 
Cv 1 st jan
Cv 1 st janCv 1 st jan
Cv 1 st jan
 
Application modernization meets human factors what's next
Application modernization meets human factors   what's nextApplication modernization meets human factors   what's next
Application modernization meets human factors what's next
 
Repsol: Financial Results First Semester 2015
Repsol: Financial Results First Semester 2015Repsol: Financial Results First Semester 2015
Repsol: Financial Results First Semester 2015
 
Repsol presenta su Plan de Sostenibilidad de Cartagena
Repsol presenta su Plan de Sostenibilidad de Cartagena Repsol presenta su Plan de Sostenibilidad de Cartagena
Repsol presenta su Plan de Sostenibilidad de Cartagena
 
Understanding Evolution
Understanding EvolutionUnderstanding Evolution
Understanding Evolution
 
Plan de Sostenibilidad de Tarragona 2015
Plan de Sostenibilidad de Tarragona 2015Plan de Sostenibilidad de Tarragona 2015
Plan de Sostenibilidad de Tarragona 2015
 
Light
LightLight
Light
 
Day 1.1 intro ccna
Day 1.1 intro ccna Day 1.1 intro ccna
Day 1.1 intro ccna
 
Repsol: Strategic Plan 2012-2016
Repsol: Strategic Plan 2012-2016Repsol: Strategic Plan 2012-2016
Repsol: Strategic Plan 2012-2016
 
The Church and Social Media
The Church and Social MediaThe Church and Social Media
The Church and Social Media
 
Krishnan S.S.R. - Resume
Krishnan S.S.R. - ResumeKrishnan S.S.R. - Resume
Krishnan S.S.R. - Resume
 
企画セッションPpt 160806終了
企画セッションPpt 160806終了企画セッションPpt 160806終了
企画セッションPpt 160806終了
 
Salidaped
SalidapedSalidaped
Salidaped
 
агентство по контролю промышленных отходов + предприниматели
агентство по контролю промышленных отходов + предпринимателиагентство по контролю промышленных отходов + предприниматели
агентство по контролю промышленных отходов + предприниматели
 

Similaire à DS, BP, EJB, CDI, WTF!? - Graham Charters

DS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham ChartersDS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham Chartersmfrancis
 
CDI Integration in OSGi - Emily Jiang
CDI Integration in OSGi - Emily JiangCDI Integration in OSGi - Emily Jiang
CDI Integration in OSGi - Emily Jiangmfrancis
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Liberate your components with OSGi services - Graham Charters
Liberate your components with OSGi services - Graham ChartersLiberate your components with OSGi services - Graham Charters
Liberate your components with OSGi services - Graham Chartersmfrancis
 
Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsIBM UrbanCode Products
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh! Chalermpon Areepong
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
IBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation CustomizationIBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation Customizationgjuljo
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep DiveGabriel Walt
 
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsImpact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsChris Bailey
 
TenYearsCPOptimizer
TenYearsCPOptimizerTenYearsCPOptimizer
TenYearsCPOptimizerPaulShawIBM
 
Rules SDK IBM WW BPM Forum March 2013
Rules SDK IBM WW BPM Forum March 2013Rules SDK IBM WW BPM Forum March 2013
Rules SDK IBM WW BPM Forum March 2013Dan Selman
 
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
RTC/CLM 5.0 Adoption Paths: Deploying in 16 StepsStéphane Leroy
 
Revised Adf security in a project centric environment
Revised Adf security in a project centric environmentRevised Adf security in a project centric environment
Revised Adf security in a project centric environmentJean-Marc Desvaux
 
James Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 PatternsJames Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 Patternsakqaanoraks
 

Similaire à DS, BP, EJB, CDI, WTF!? - Graham Charters (20)

DS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham ChartersDS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham Charters
 
Sightly_techInsight
Sightly_techInsightSightly_techInsight
Sightly_techInsight
 
CDI Integration in OSGi - Emily Jiang
CDI Integration in OSGi - Emily JiangCDI Integration in OSGi - Emily Jiang
CDI Integration in OSGi - Emily Jiang
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
Liberate your components with OSGi services - Graham Charters
Liberate your components with OSGi services - Graham ChartersLiberate your components with OSGi services - Graham Charters
Liberate your components with OSGi services - Graham Charters
 
Extending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with PluginsExtending uBuild and uDeploy with Plugins
Extending uBuild and uDeploy with Plugins
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
IBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation CustomizationIBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation Customization
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive
 
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java ToolsImpact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java Tools
 
What's new in designer
What's new in designerWhat's new in designer
What's new in designer
 
TenYearsCPOptimizer
TenYearsCPOptimizerTenYearsCPOptimizer
TenYearsCPOptimizer
 
Rules SDK IBM WW BPM Forum March 2013
Rules SDK IBM WW BPM Forum March 2013Rules SDK IBM WW BPM Forum March 2013
Rules SDK IBM WW BPM Forum March 2013
 
Grails 101
Grails 101Grails 101
Grails 101
 
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
RTC/CLM 5.0 Adoption Paths: Deploying in 16 Steps
 
Revised Adf security in a project centric environment
Revised Adf security in a project centric environmentRevised Adf security in a project centric environment
Revised Adf security in a project centric environment
 
James Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 PatternsJames Turner (Caplin) - Enterprise HTML5 Patterns
James Turner (Caplin) - Enterprise HTML5 Patterns
 

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

Plus de 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)
 

Dernier

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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
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
 
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
 
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
 
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
 

Dernier (20)

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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
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)
 
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?
 
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
 
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
 

DS, BP, EJB, CDI, WTF!? - Graham Charters

  • 1. © 2013 IBM Corporation DS, BP, EJB, CDI, WTF!? Graham Charters, IBM OSGi DevCon US 2013 1
  • 2. © 2013 IBM Corporation Agenda  Background  Criteria  Component models  How to choose 2
  • 3. © 2013 IBM Corporation Why? 4
  • 4. © 2013 IBM Corporation Approach  Provide some criteria to consider when making a component model choice  Explain a little bit about the technologies  Describe how each rates against the criteria  Reasons aren’t always technical  We probably won’t always agree 5 My beans are dynamic and use annotations. Your beans smell!!
  • 5. © 2013 IBM Corporation Technical Criteria  Extra-bean definition (e.g. XML-based declarative model)  Intra-bean definition (e.g. bean annotation- based declarative model)  Extensibility  Enterprise Qualities of Service  Quality of Integration with OSGi 6
  • 6. © 2013 IBM Corporation Non-technical criteria  Open Standards  Open Source implementations  Choice of implementations  Availability of tools  Existing assets  Existing skills 7
  • 7. © 2013 IBM Corporation The technologies: DS, BP, EJB, CDI, WTF  Declaratives Services (DS)  Blueprint (not commonly known as BP)  Enterprise JavaBeans (EJB)  Contexts and Dependency Injection (CDI)  World Taekwondo Federation (WTF) There are a number of other component models, but I’ve focused on the ones I heard discussed most often. They’re also all based on open standards 8
  • 8. © 2013 IBM Corporation Declarative Services 9 Criterion DS Inspiration Popularity if DI frameworks, but designed for OSGi Approach Extra-bean definition (XML-based declarative model) Build-time intra-bean definition (annotations compiled to XML) Extensibility No Enterprise QoS No OSGi Integration Designed by OSGi for OSGi. Includes Configuration Admin Open Standards OSGi Alliance Implementations Eclipse Equinox & Apache Felix Tools BND & BNDTools <component name=“DiscountCalculator“ …> <implementation class="com.acme.utils.impl.DiscountCalculatorImpl"/> <service> <provide interface="com.acme.utils.DiscountCalculator"/> </service> <reference name=“log" interface="org.osgi.service.log.LogService" bind="setLog" unbind="unsetLog" updated=“updateLog" /> </component> @Component public class DiscountCalculatorImpl implements DiscountCalculator { private Logger logger; @Reference(policy=DYNAMIC, policyOption=GREEDY, cardinality=MANDATORY) void setLog( LogService log) { ... } void unsetLog( LogService log) { ... } void updatedLog( Map<String,?> ref ) { ... } }
  • 9. © 2013 IBM Corporation Blueprint 10 Criterion Blueprint Inspiration Spring & Spring DM (standardized by SpringSource) Approach Extra-bean definition (XML-based declarative model, includes bean-to- bean wiring) Intra-bean definition (Annotations – Apache Aries Open Source only) Extensibility Through XML namespaces – no runtime standard Enterprise QoS Transactions and Persistence (Apache Aries), Security (WebSphere Application Server), Bus (CXF), Camel, etc… OSGi Integration Some life-cycle compromises Config Admin (open source) Open Standards OSGi Alliance Updates in pipeline Implementations Eclipse Gemini & Apache Aries Tools WebSphere Developer Tools (no charge), Rational Application Developer <?xml version="1.0" encoding="UTF-8"?> <blueprint …> <service id="DiscountCalculatorBeanService" ref="DiscountCalculatorBean" interface="com.acme.utils.DiscountCalculator" /> <bean id="DiscountCalculatorBean" class="com.acme.utils.impl.DiscountCalculatorImpl"> <property name="logger" ref="loggerService" /> </bean> <reference id="loggerService" interface="com.acme.utils.Logger" /> </blueprint>
  • 10. © 2013 IBM Corporation Enterprise JavaBeans 11 Criterion EJB Inspiration Version 1.0 - 15 years old this week! Approach Inheritance & XML bindings (pre-3.0). Intra-bean definition (bean annotation- based declarative model) (3.0 or later) Extensibility Nothing formal (defer to CDI) Enterprise QoS Transaction, Security, Remoting, Persistence, Messaging OSGi Integration Core capabilities (proprietary) Open Standards JCP, OSGi specification in progress Implementations All JavaEE App Servers support EJB. OSGi integration in WebSphere Application Server, GlassFish, Apache Aries, Apache OpenEJB Tools WebSphere Developer Tools (no charge), Rational Application Developer, Eclipse WTP @Stateless @Local(DiscountCalculator.class) public class DiscountCalculatorImpl implements DiscountCalculator { @Resource(lookup="osgi:service/Logger") private Logger logger; public double discount() { … } … }
  • 11. © 2013 IBM Corporation Contexts and Dependency Injection 12 Criterion CDI Inspiration JBoss Seam, Google Guice & Spring Approach Intra-bean definition (annotation-based life-cycle and DI model), Extra-bean opt-in beans.xml with additional config (e.g. extensibility) Extensibility Interceptors, Decorators & Portable Extensions Enterprise QoS None. Leverage CDI in other component models (e.g. EJB) OSGi Integration Core capabilities (Open Source) Open Standards JCP, OSGi Alliance in progress Implementations Weld-OSGi, Pax-CDI, Fighterfish Tools EE Vendors tools @Named @RequestScoped @OSGiComponent public class DiscountCalculatorImpl implements DiscountCalculator { @Inject @OSGiService StaticLogger logger; public double dicount() {...} ... }
  • 12. © 2013 IBM Corporation Some questions to ask when choosing  What existing skills does my team have? – Choose the closest match (e.g. Spring? Consider Blueprint)  What existing assets do I have available? – Choose the closest match  Do I need Enterprise capabilities? – If “yes”, consider Blueprint or EJB, if “no”, consider DS  Do I want something based on a standard? – If “yes”, familarize yourself with the scope and direction of existing standards  Do I need something based on open source? – Apache Felix, Eclipse Equinox, Apache Karaf, Eclipse Gemini, Apache Aries, Eclipse Virgo, ….the list goes on…..  What are the capabilities of my target runtime? – If a component model isn’t supported, there’s little point choosing it  What are the capabilities of my tool chain? – If a component model isn’t supported, you’re asking for pain  What if I use more than one component model? – Leverage OSGi services as the common integration point 13 No one component model to rule them all