SlideShare a Scribd company logo
1 of 35
Download to read offline
© 2016 IBM Corporation
Graham Charters
Senior Technical Staff Member,
WebSphere Application Server
Microservices and OSGi:
Better together?
2Page© 2016 IBM Corporation
Agenda
– Introduction to Modularity, Microservices & OSGi
– Comparison of OSGi and Microservice capabilities
– Microservices challenges
– OSGi smoothing the way to Microservices
3Page© 2016 IBM Corporation
What is Modularity
– “Modular programming is a software
design technique that emphasizes
separating the functionality of a
program into independent,
interchangeable modules, such that
each contains everything necessary to
execute only one aspect of the desired
functionality.”
– “A module interface expresses the
elements that are provided and
required by the module. …”
https://en.wikipedia.org/wiki/Modular_programming
Photo by: https://www.flickr.com/photos/zaxl4/
License: https://creativecommons.org/licenses/by-sa/2.0/
4Page© 2016 IBM Corporation
http://martinfowler.com/articles/microservices.html (25 March 2014)
What are Microservices
5Page© 2016 IBM Corporation
http://martinfowler.com/articles/microservices.html
Microservices are Modularity






6Page© 2016 IBM Corporation
What is OSGi
– Enables products to
be assembled from
Modules
– Modules callable
through Services
– Modules and their
Services have a
dynamic lifecycle
BundleBundle
Bundle
listen
provideuse
Service
7Page© 2016 IBM Corporation
Not all modularity is equal
• Not all module technologies
enable the same capabilities
• Modularity Maturity Model
provides a way to compare
technologies and understand
the benefits
• Inspired by customer
experiences adopting OSGi
“Towards a Modularity Maturity Model”,
OSGi Community Event 2011 presentation @ http://slidesha.re/q8EHFp
8Page© 2016 IBM Corporation
Modularity Levels
Level Name Summary
1 Ad Hoc Nothing
2 Modules Formal identity, decoupled from artifact
3 Modularity Formal module contracts, decoupled from identity
4 Loose-Coupling Services, semantic versioning, decoupled from implementation
5 Devolution Modularity-aware repositories, collaboration, governance,
decoupled from ownership
6 Dynamism Life-cycle awareness and independence, decoupled from time
9Page© 2016 IBM Corporation
What was it Lewis and Fowler said?
Level Name Summary
1 Ad Hoc Nothing
2 Modules Formal identity
3 Modularity Formal module contracts
4 Loose-Coupling Services, semantic versioning, Componentization via Services
5 Devolution Modularity-aware repositories, collaboration, governance,
Organized around Business Capabilities
6 Dynamism Life-cycle awareness and independence, Design for failure
10Page© 2016 IBM Corporation
Filling in the gaps
Level Name Summary
1 Ad Hoc Nothing
2 Modules Formal identity, Deployable service (likely a build artefact)
3 Modularity Formal module contracts, Service Contracts – e.g. Swagger
4 Loose-Coupling Services, semantic versioning, Componentization via Services
5 Devolution Modularity-aware repositories, collaboration, governance,
Organized around Business Capabilities
6 Dynamism Life-cycle awareness and independence, Design for failure
11Page© 2016 IBM Corporation
Didn’t you just tell
us we don’t need
OSGi?
https://creativecommons.org/licenses/by-nd/2.0/
https://www.flickr.com/photos/40601656@N07/
12Page© 2016 IBM Corporation
The answer’s Microservices, what’s the question?
https://www.gartner.com/doc/3371727/hype-cycle-application-services-
ByJeremykempatEnglishWikipedia,CCBY-SA3.0,
https://commons.wikimedia.org/w/index.php?curid=10547051
Gartner
says we’re
here
Early publicity produces a number of
success stories—often accompanied by
scores of failures. Some companies take
action; most don't.
Peak of Inflated Expectations
13Page© 2016 IBM Corporation
Evolution, not revolution
Martin Fowler:
“As I hear stories about teams using a microservices architecture, I've noticed a
common pattern.
1. Almost all the successful microservice stories have started with a monolith that
got too big and was broken up
2. Almost all the cases where I've heard of a system that was built as a
microservice system from scratch, it has ended up in serious trouble.”
http://martinfowler.com/bliki/MonolithFirst.html
14Page© 2016 IBM Corporation
Design is still hard
http://www.codingthearchitecture.com/2014/10/01/modularity_and_testability.html
Simon Brown:
“Technologies like Spring Boot make creating and deploying
microservices relatively straightforward, but the design thinking
behind partitioning a software system into services is still as
hard as it's ever been.”
http://www.codingthearchitecture.com/presentations/devnexus2016-modular-monoliths
15Page© 2016 IBM Corporation
Document your
poop
16Page© 2016 IBM Corporation
The costs of Microservices
http://martinfowler.com/articles/microservice-trade-offs.html
17Page© 2016 IBM Corporation
So should we or shouldn’t we do Microservices?
https://creativecommons.org/licenses/by/2.0/
https://www.flickr.com/photos/sufferingsocrates/
18Page© 2016 IBM Corporation
Look before you leap
https://www.flickr.com/photos/ggabernig/
https://creativecommons.org/licenses/by/2.0/
19Page© 2016 IBM Corporation
Monolith-first
Martin Fowler:
“As I hear stories about teams using
a microservices architecture, I've
noticed a common pattern.
1. Almost all the successful
microservice stories have started
with a monolith that got too big
and was broken up
2. Almost all the cases where I've
heard of a system that was built
as a microservice system from
scratch, it has ended up in
serious trouble.”
http://martinfowler.com/bliki/MonolithFirst.html
20Page© 2016 IBM Corporation
Design is still hard
http://www.codingthearchitecture.com/2014/10/01/modularity_and_testability.html
Technologies like Spring
Boot make creating and
deploying microservices
relatively straightforward,
but the design thinking
behind partitioning a
software system into
services is still as hard as
it's ever been.
http://www.codingthearchitecture.com/presentations/devnexus2016-modular-monoliths
21Page© 2016 IBM Corporation
Boundaries
Microservices’ main benefit, in my view, is
enabling parallel development by
establishing a hard-to-cross boundary
between different parts of your system.
By doing this, you make it hard – or at least
harder – to do the wrong thing: Namely,
connecting parts that shouldn’t be
connected, and coupling those that need to
be connected too tightly. In theory, you
don’t need microservices for this if you
simply have the discipline to follow clear
rules and establish clear boundaries
within your monolithic application; in
practice, I’ve found this to be the case only
very rarely.
http://martinfowler.com/articles/dont-start-monolith.html
Don’t start with a monolith
… when your goal is a microservices architecture
Stefan Tilkov
22Page© 2016 IBM Corporation
Boundaries
“Often the true consequences of your
architectural decisions are only evident
several years after you made them. We
have seen projects where a good team,
with a strong desire for modularity, has
built a monolithic architecture that has
decayed over the years. Many people
believe that such decay is less likely with
microservices, since the service
boundaries are explicit and hard to
patch around.”
http://martinfowler.com/articles/microservices.html
23Page© 2016 IBM Corporation
The modular
monolith
If you can't build a
modular monolith,
what makes you
think microservices
are the answer?
http://www.codingthearchitecture.com/2014/07/06/distributed_big_balls_of_mud.html
24Page© 2016 IBM Corporation
Getting to there from here…
https://creativecommons.org/licenses/by/2.0/
https://www.flickr.com/photos/pss/
25Page© 2016 IBM Corporation
Key questions
What will help me create and
maintain a modular
monolith?
What’s the closest you can
get to the microservices
qualities without incurring all
of the associated cost?
http://www.codingthearchitecture.com/presentations/devnexus2016-modular-monoliths
26Page© 2016 IBM Corporation
Refresher…
– Enables products to
be assembled from
Modules
– Modules callable
through Services
– Modules and their
Services have a
dynamic lifecycle
BundleBundle
Bundle
listen
provideuse
Service
27Page© 2016 IBM Corporation
The Modular Monolith
– Use OSGi to modularise your Product
– Not just Business as Usual - organize
around business capabilities,
modularize your data, etc.
– A number of approach have been
documented.
• Services-first
• Java EE -> OSGi
• Strangler Pattern
– These are equally applicable to OSGi
& Microservice discovery
ED
B
F
A
C
H
G
28Page© 2016 IBM Corporation
Evolving to Microservices
– Identify Feature ‘Subsystems’
as individually deployable
units
– Continue to deploy to same
process
ED
B
F
A
C
H
G
29Page© 2016 IBM Corporation
Isolate your Subsystems
– Make ‘boundary services’
remotable
– Enforce isolation using
Application Subsytems
– Handle service unavailability
– Continue to deploy to same
process
ED
B
F
A
C
H
G
G
B
30Page© 2016 IBM Corporation
Deployment independently
– Deploy as independently
scalable microservices
– Automate deployment
– Prove out remoting, latency,
etc.
E
D
B
F
A
C
H
G
G
B
31Page© 2016 IBM Corporation
Modular Monolith+
32Page© 2016 IBM Corporation
Modular Monolith+
33Page© 2016 IBM Corporation
Remoting Services
– OSGi Remote Services &
Remote Services Admin
providers
– Or pick a JAX-RS
implementation
– Future: JAX-RS Whiteboard
(RFC 217)
RS Impl RS Impl
register
proxy
discover
register
endpoint
JAX-RS
endpoint
JAX-RS
proxy
https://github.com/osgi/design/tree/master/rfcs/rfc0217
34Page© 2016 IBM Corporation
Technology choices
– MicroProfile 1.0 defines a technology set for Java EE
• JAX-RS, CDI, JSON-P
– What would the OSGi equivalent be?
• JAX-RS, Declarative Services, JSON-P
– Beyond the core
• Externalize configuration – Config Admin (think 12-factor)
35Page© 2016 IBM Corporation
Summary
– Microservices are an important approach to producing highly-available,
maintainable applications
– Microservices are not for-free, introducing new costs, such as distribution
and operational complexity
– Modular monoliths are seen as an important stepping stone to being able to
produce Microservices
– OSGi is an ideal fit for producing modular monoliths, going well-beyond their
core characteristics
– The OSGi standards cover the core capabilities essential for producing first-
class Java-based microservices

More Related Content

Viewers also liked

Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Carsten Ziegeler
 
Distributed Eventing in OSGi
Distributed Eventing in OSGiDistributed Eventing in OSGi
Distributed Eventing in OSGiCarsten Ziegeler
 
Monitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web ConsoleMonitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web ConsoleCarsten Ziegeler
 
Distributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten ZiegelerDistributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten Ziegelermfrancis
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchevmfrancis
 
Lean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian SchneiderLean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian Schneidermfrancis
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankovmfrancis
 
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...mfrancis
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
 

Viewers also liked (10)

Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)
 
Distributed Eventing in OSGi
Distributed Eventing in OSGiDistributed Eventing in OSGi
Distributed Eventing in OSGi
 
Monitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web ConsoleMonitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web Console
 
Distributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten ZiegelerDistributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten Ziegeler
 
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho DelchevWebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
WebSockets and Equinox OSGi in a Servlet Container - Nedelcho Delchev
 
Lean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian SchneiderLean Microservices with OSGi - Christian Schneider
Lean Microservices with OSGi - Christian Schneider
 
OSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen DyankovOSGi for outsiders - Milen Dyankov
OSGi for outsiders - Milen Dyankov
 
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
The AI Rush
The AI RushThe AI Rush
The AI Rush
 

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

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
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
 
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
 
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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
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
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
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
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
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
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Microservices & OSGi - Better Together? - Graham Charters

  • 1. © 2016 IBM Corporation Graham Charters Senior Technical Staff Member, WebSphere Application Server Microservices and OSGi: Better together?
  • 2. 2Page© 2016 IBM Corporation Agenda – Introduction to Modularity, Microservices & OSGi – Comparison of OSGi and Microservice capabilities – Microservices challenges – OSGi smoothing the way to Microservices
  • 3. 3Page© 2016 IBM Corporation What is Modularity – “Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.” – “A module interface expresses the elements that are provided and required by the module. …” https://en.wikipedia.org/wiki/Modular_programming Photo by: https://www.flickr.com/photos/zaxl4/ License: https://creativecommons.org/licenses/by-sa/2.0/
  • 4. 4Page© 2016 IBM Corporation http://martinfowler.com/articles/microservices.html (25 March 2014) What are Microservices
  • 5. 5Page© 2016 IBM Corporation http://martinfowler.com/articles/microservices.html Microservices are Modularity      
  • 6. 6Page© 2016 IBM Corporation What is OSGi – Enables products to be assembled from Modules – Modules callable through Services – Modules and their Services have a dynamic lifecycle BundleBundle Bundle listen provideuse Service
  • 7. 7Page© 2016 IBM Corporation Not all modularity is equal • Not all module technologies enable the same capabilities • Modularity Maturity Model provides a way to compare technologies and understand the benefits • Inspired by customer experiences adopting OSGi “Towards a Modularity Maturity Model”, OSGi Community Event 2011 presentation @ http://slidesha.re/q8EHFp
  • 8. 8Page© 2016 IBM Corporation Modularity Levels Level Name Summary 1 Ad Hoc Nothing 2 Modules Formal identity, decoupled from artifact 3 Modularity Formal module contracts, decoupled from identity 4 Loose-Coupling Services, semantic versioning, decoupled from implementation 5 Devolution Modularity-aware repositories, collaboration, governance, decoupled from ownership 6 Dynamism Life-cycle awareness and independence, decoupled from time
  • 9. 9Page© 2016 IBM Corporation What was it Lewis and Fowler said? Level Name Summary 1 Ad Hoc Nothing 2 Modules Formal identity 3 Modularity Formal module contracts 4 Loose-Coupling Services, semantic versioning, Componentization via Services 5 Devolution Modularity-aware repositories, collaboration, governance, Organized around Business Capabilities 6 Dynamism Life-cycle awareness and independence, Design for failure
  • 10. 10Page© 2016 IBM Corporation Filling in the gaps Level Name Summary 1 Ad Hoc Nothing 2 Modules Formal identity, Deployable service (likely a build artefact) 3 Modularity Formal module contracts, Service Contracts – e.g. Swagger 4 Loose-Coupling Services, semantic versioning, Componentization via Services 5 Devolution Modularity-aware repositories, collaboration, governance, Organized around Business Capabilities 6 Dynamism Life-cycle awareness and independence, Design for failure
  • 11. 11Page© 2016 IBM Corporation Didn’t you just tell us we don’t need OSGi? https://creativecommons.org/licenses/by-nd/2.0/ https://www.flickr.com/photos/40601656@N07/
  • 12. 12Page© 2016 IBM Corporation The answer’s Microservices, what’s the question? https://www.gartner.com/doc/3371727/hype-cycle-application-services- ByJeremykempatEnglishWikipedia,CCBY-SA3.0, https://commons.wikimedia.org/w/index.php?curid=10547051 Gartner says we’re here Early publicity produces a number of success stories—often accompanied by scores of failures. Some companies take action; most don't. Peak of Inflated Expectations
  • 13. 13Page© 2016 IBM Corporation Evolution, not revolution Martin Fowler: “As I hear stories about teams using a microservices architecture, I've noticed a common pattern. 1. Almost all the successful microservice stories have started with a monolith that got too big and was broken up 2. Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble.” http://martinfowler.com/bliki/MonolithFirst.html
  • 14. 14Page© 2016 IBM Corporation Design is still hard http://www.codingthearchitecture.com/2014/10/01/modularity_and_testability.html Simon Brown: “Technologies like Spring Boot make creating and deploying microservices relatively straightforward, but the design thinking behind partitioning a software system into services is still as hard as it's ever been.” http://www.codingthearchitecture.com/presentations/devnexus2016-modular-monoliths
  • 15. 15Page© 2016 IBM Corporation Document your poop
  • 16. 16Page© 2016 IBM Corporation The costs of Microservices http://martinfowler.com/articles/microservice-trade-offs.html
  • 17. 17Page© 2016 IBM Corporation So should we or shouldn’t we do Microservices? https://creativecommons.org/licenses/by/2.0/ https://www.flickr.com/photos/sufferingsocrates/
  • 18. 18Page© 2016 IBM Corporation Look before you leap https://www.flickr.com/photos/ggabernig/ https://creativecommons.org/licenses/by/2.0/
  • 19. 19Page© 2016 IBM Corporation Monolith-first Martin Fowler: “As I hear stories about teams using a microservices architecture, I've noticed a common pattern. 1. Almost all the successful microservice stories have started with a monolith that got too big and was broken up 2. Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble.” http://martinfowler.com/bliki/MonolithFirst.html
  • 20. 20Page© 2016 IBM Corporation Design is still hard http://www.codingthearchitecture.com/2014/10/01/modularity_and_testability.html Technologies like Spring Boot make creating and deploying microservices relatively straightforward, but the design thinking behind partitioning a software system into services is still as hard as it's ever been. http://www.codingthearchitecture.com/presentations/devnexus2016-modular-monoliths
  • 21. 21Page© 2016 IBM Corporation Boundaries Microservices’ main benefit, in my view, is enabling parallel development by establishing a hard-to-cross boundary between different parts of your system. By doing this, you make it hard – or at least harder – to do the wrong thing: Namely, connecting parts that shouldn’t be connected, and coupling those that need to be connected too tightly. In theory, you don’t need microservices for this if you simply have the discipline to follow clear rules and establish clear boundaries within your monolithic application; in practice, I’ve found this to be the case only very rarely. http://martinfowler.com/articles/dont-start-monolith.html Don’t start with a monolith … when your goal is a microservices architecture Stefan Tilkov
  • 22. 22Page© 2016 IBM Corporation Boundaries “Often the true consequences of your architectural decisions are only evident several years after you made them. We have seen projects where a good team, with a strong desire for modularity, has built a monolithic architecture that has decayed over the years. Many people believe that such decay is less likely with microservices, since the service boundaries are explicit and hard to patch around.” http://martinfowler.com/articles/microservices.html
  • 23. 23Page© 2016 IBM Corporation The modular monolith If you can't build a modular monolith, what makes you think microservices are the answer? http://www.codingthearchitecture.com/2014/07/06/distributed_big_balls_of_mud.html
  • 24. 24Page© 2016 IBM Corporation Getting to there from here… https://creativecommons.org/licenses/by/2.0/ https://www.flickr.com/photos/pss/
  • 25. 25Page© 2016 IBM Corporation Key questions What will help me create and maintain a modular monolith? What’s the closest you can get to the microservices qualities without incurring all of the associated cost? http://www.codingthearchitecture.com/presentations/devnexus2016-modular-monoliths
  • 26. 26Page© 2016 IBM Corporation Refresher… – Enables products to be assembled from Modules – Modules callable through Services – Modules and their Services have a dynamic lifecycle BundleBundle Bundle listen provideuse Service
  • 27. 27Page© 2016 IBM Corporation The Modular Monolith – Use OSGi to modularise your Product – Not just Business as Usual - organize around business capabilities, modularize your data, etc. – A number of approach have been documented. • Services-first • Java EE -> OSGi • Strangler Pattern – These are equally applicable to OSGi & Microservice discovery ED B F A C H G
  • 28. 28Page© 2016 IBM Corporation Evolving to Microservices – Identify Feature ‘Subsystems’ as individually deployable units – Continue to deploy to same process ED B F A C H G
  • 29. 29Page© 2016 IBM Corporation Isolate your Subsystems – Make ‘boundary services’ remotable – Enforce isolation using Application Subsytems – Handle service unavailability – Continue to deploy to same process ED B F A C H G G B
  • 30. 30Page© 2016 IBM Corporation Deployment independently – Deploy as independently scalable microservices – Automate deployment – Prove out remoting, latency, etc. E D B F A C H G G B
  • 31. 31Page© 2016 IBM Corporation Modular Monolith+
  • 32. 32Page© 2016 IBM Corporation Modular Monolith+
  • 33. 33Page© 2016 IBM Corporation Remoting Services – OSGi Remote Services & Remote Services Admin providers – Or pick a JAX-RS implementation – Future: JAX-RS Whiteboard (RFC 217) RS Impl RS Impl register proxy discover register endpoint JAX-RS endpoint JAX-RS proxy https://github.com/osgi/design/tree/master/rfcs/rfc0217
  • 34. 34Page© 2016 IBM Corporation Technology choices – MicroProfile 1.0 defines a technology set for Java EE • JAX-RS, CDI, JSON-P – What would the OSGi equivalent be? • JAX-RS, Declarative Services, JSON-P – Beyond the core • Externalize configuration – Config Admin (think 12-factor)
  • 35. 35Page© 2016 IBM Corporation Summary – Microservices are an important approach to producing highly-available, maintainable applications – Microservices are not for-free, introducing new costs, such as distribution and operational complexity – Modular monoliths are seen as an important stepping stone to being able to produce Microservices – OSGi is an ideal fit for producing modular monoliths, going well-beyond their core characteristics – The OSGi standards cover the core capabilities essential for producing first- class Java-based microservices