SlideShare a Scribd company logo
1 of 27
Download to read offline
Lean microservices
on OSGi
By Christian Schneider
Open Source Architect at Talend
chris@die-schneider.net
@schneider_chris
Participate in Demo
Connect to irc network freenode
Channel #osgichat
Microservices
...way of designing software applications as suites of independently deployable services.... organization around business
capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data. - Martin
Fowler
● Create application out of independently deployable services
● Verticals around business capabilities
● Decentralized data
● Automated deployment
● 1 service per process
● Lightweight communications between services (typically REST)
Spring boot
● Framework for micro service development based on spring
● Easy to start. Paste snippets of “starter” dependencies into pom
● Convention over configuration
● Good docker and cloud support
The Dark side of
microservices
No, no, no. Quicker, easier,
more seductive...
Are microservices
stronger than OSGi?
Dependencies between microservices
Operations
Container vessel - Application Server
Microservices operation - Theory
Microservices operation - Practice
Microservices can not cure bad design
Microservices with
spring-boot…
What is wrong with it?
● Lots of dependencies already
at design time
● Microservices always must
communicate remotely
● Proprietary Annotations / API
● No flexibility in packaging
1 Microservice = 1 Deployment
Unit = 1 Process
A small spring boot project
● Pollutes the classpath
● Difficult to establish rules which APIs to use
90
dependencies
20 MB
jar file
Why is OSGi
different?
● Coding against APIs and specs
● Self describing modules
(bundles)
● OSGi services to communicate
between bundles
● Semantic versioning
● Remote Service Admin for
Remote calls and REST
● Flexible packaging
Semantic Versioning
● MAJOR version - incompatible API changes,
● MINOR version - added functionality in a backwards-compatible manner
● BUGFIX version - backwards-compatible bug fixes
Mind the difference between API and SPI.
Remote Service Admin
● Exports and imports OSGi services
● Service Properties to mark for export and configure transports, …
● Highly customizable (Policies, Transports, Serialization, Discovery)
Rest services with RSA
● Just JAX-RS annotations on interface
REST Endpoint User bundle
HTTP
OSGi
service
CXF Transport for
Aries RSA
Creates
Topology
Manager
Detects
Selects
transport
Lets see it in practice
Small chat application
● Modules talk to each other using
an OSGi ChatListener interface
described in API bundle
● IRC connector using camel
● Shell integration using gogo
● Tinkerforge Display and Motion
detector
● Optional Remoting using Aries
RSA
Chat API
Chat shell integration
Tinkerforge LCD display
IRC Connector
IRC
All in one
● 1 Process
● 6MB runnable jar
● No remote calls inside application
● Still modular as bundles only coupled
through API and OSGi service
Container vessel - OSGi deployment in one process
Chat API
IRC Connector
Aries RSA
IRC
Microservice Deployment
Chat API
Tinkerforge LCD and
motion detect
Aries RSA
Chat API
Chat shell integration
Aries RSA
Zookeeper
Microservice Deployment
● Same bundles as before
● As many deployment units as needed
● Each deployment unit can scale
● Runnable jars or docker containers
● Cloud native if needed
● Aries RSA overhead 300 KB + 800 KB zookeeper lib
● Remote calls or local calls as needed
● Many options for remotings (tcp, fastbin, SOAP, REST, JMS)
But beware of the same management issues as any
other micro services
Demo time
OSGi can scale from very small to very
large
But no simple cure for the operational problems of microservices
Unsure if you actually need a
microservice architecture?
● Develop your application using modular bundles
● Stay on single process as long as possible
● Decide about the packaging and deployment as late as
possible
● Deploy only as fine granular as needed
Further Reading
● Achim Nierbeck - Microservices on OSGi
● Milen Dyankow - Microservices and
Modularity
● OSGi Chat example code
● Example for REST export using Aries RSA
and CXF

More Related Content

What's hot

Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...
mfrancis
 

What's hot (20)

A sail in the cloud
A sail in the cloudA sail in the cloud
A sail in the cloud
 
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
 
APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...
APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...
APIdays Paris 2018 - API Management is Dead, Augusto Marietti, CEO and Co-Fou...
 
API Gateway study
API Gateway studyAPI Gateway study
API Gateway study
 
Introduction to Kong API Gateway
Introduction to Kong API GatewayIntroduction to Kong API Gateway
Introduction to Kong API Gateway
 
Service mesh with istio
Service mesh with istioService mesh with istio
Service mesh with istio
 
Mastering Microservices with Kong (CodeMotion 2019)
Mastering Microservices with Kong (CodeMotion 2019)Mastering Microservices with Kong (CodeMotion 2019)
Mastering Microservices with Kong (CodeMotion 2019)
 
Manage your APIs and Microservices with an API Gateway
Manage your APIs and Microservices with an API GatewayManage your APIs and Microservices with an API Gateway
Manage your APIs and Microservices with an API Gateway
 
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
IPaaS 2.0: Fuse Integration Services (Robert Davies & Keith Babo)
 
Introduction to micro-services @DevOps pune Meetup
Introduction to micro-services @DevOps pune Meetup Introduction to micro-services @DevOps pune Meetup
Introduction to micro-services @DevOps pune Meetup
 
Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...
 
Microservices on kubernetes
Microservices on kubernetesMicroservices on kubernetes
Microservices on kubernetes
 
Kong
KongKong
Kong
 
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
APIdays Singapore 2019 - Blowing Up the Monolith: Adopting a Modern API Strat...
 
WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh? WTF Do We Need a Service Mesh?
WTF Do We Need a Service Mesh?
 
The elegant way of implementing microservices with istio
The elegant way of implementing microservices with istioThe elegant way of implementing microservices with istio
The elegant way of implementing microservices with istio
 
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
 
Cloud-native is just part of the game
Cloud-native is just part of the gameCloud-native is just part of the game
Cloud-native is just part of the game
 
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?
Alfresco DevCon 2019 - Do you know what the Alfresco heartbeat is?
 
Microservices
MicroservicesMicroservices
Microservices
 

Viewers also liked

Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
sullis
 

Viewers also liked (17)

OSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingOSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache Sling
 
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...
 
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
 
Distributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten ZiegelerDistributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten Ziegeler
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
 
OSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ HargraveOSGi Specification Evolution - BJ Hargrave
OSGi Specification Evolution - BJ Hargrave
 
Reactive applications
Reactive applicationsReactive applications
Reactive applications
 
Distributed Eventing in OSGi
Distributed Eventing in OSGiDistributed Eventing in OSGi
Distributed Eventing in OSGi
 
OSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo RulliOSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo Rulli
 
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
 
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)
 
OSGi Best Practices - Tim Ward
OSGi Best Practices - Tim WardOSGi Best Practices - Tim Ward
OSGi Best Practices - Tim Ward
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
Service oriented web development with OSGi
Service oriented web development with OSGiService oriented web development with OSGi
Service oriented web development with OSGi
 
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
 

Similar to Lean Microservices with OSGi - Christian Schneider

Optimizing the Ops in DevOps
Optimizing the Ops in DevOpsOptimizing the Ops in DevOps
Optimizing the Ops in DevOps
Gordon Haff
 

Similar to Lean Microservices with OSGi - Christian Schneider (20)

Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaSService Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
Service Mesh and Serverless Chatbots with Linkerd, K8s and OpenFaaS
 
DevOps and BigData Analytics
DevOps and BigData Analytics DevOps and BigData Analytics
DevOps and BigData Analytics
 
Microservice Pattern Launguage
Microservice Pattern LaunguageMicroservice Pattern Launguage
Microservice Pattern Launguage
 
linkerd.pdf
linkerd.pdflinkerd.pdf
linkerd.pdf
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
 
Sap webinar-briefing-sep-2013-final
Sap webinar-briefing-sep-2013-finalSap webinar-briefing-sep-2013-final
Sap webinar-briefing-sep-2013-final
 
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
AWS Serverless Community Day Keynote and Vendia Launch 6-26-2020
 
Sundance's presentation at B:RAI 2020
Sundance's presentation at B:RAI 2020Sundance's presentation at B:RAI 2020
Sundance's presentation at B:RAI 2020
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
Microservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They MatterMicroservices - How Microservices Have Changed and Why They Matter
Microservices - How Microservices Have Changed and Why They Matter
 
Netflix Open Source Meetup Season 3 Episode 2
Netflix Open Source Meetup Season 3 Episode 2Netflix Open Source Meetup Season 3 Episode 2
Netflix Open Source Meetup Season 3 Episode 2
 
NetflixOSS Meetup season 3 episode 2
NetflixOSS Meetup season 3 episode 2NetflixOSS Meetup season 3 episode 2
NetflixOSS Meetup season 3 episode 2
 
Serverless Boston @ Oracle Meetup
Serverless Boston @ Oracle MeetupServerless Boston @ Oracle Meetup
Serverless Boston @ Oracle Meetup
 
The Fn Project by Jesse Butler
 The Fn Project by Jesse Butler The Fn Project by Jesse Butler
The Fn Project by Jesse Butler
 
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
Microservices , Docker , CI/CD , Kubernetes Seminar - Sri Lanka
 
Microservices at scale with docker and kubernetes - AMS JUG 2017
Microservices at scale with docker and kubernetes - AMS JUG 2017Microservices at scale with docker and kubernetes - AMS JUG 2017
Microservices at scale with docker and kubernetes - AMS JUG 2017
 
Optimizing the Ops in DevOps
Optimizing the Ops in DevOpsOptimizing the Ops in DevOps
Optimizing the Ops in DevOps
 

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

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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Lean Microservices with OSGi - Christian Schneider

  • 1. Lean microservices on OSGi By Christian Schneider Open Source Architect at Talend chris@die-schneider.net @schneider_chris
  • 2. Participate in Demo Connect to irc network freenode Channel #osgichat
  • 3. Microservices ...way of designing software applications as suites of independently deployable services.... organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data. - Martin Fowler ● Create application out of independently deployable services ● Verticals around business capabilities ● Decentralized data ● Automated deployment ● 1 service per process ● Lightweight communications between services (typically REST)
  • 4. Spring boot ● Framework for micro service development based on spring ● Easy to start. Paste snippets of “starter” dependencies into pom ● Convention over configuration ● Good docker and cloud support
  • 5. The Dark side of microservices
  • 6. No, no, no. Quicker, easier, more seductive... Are microservices stronger than OSGi?
  • 8. Operations Container vessel - Application Server
  • 11. Microservices can not cure bad design
  • 12. Microservices with spring-boot… What is wrong with it? ● Lots of dependencies already at design time ● Microservices always must communicate remotely ● Proprietary Annotations / API ● No flexibility in packaging 1 Microservice = 1 Deployment Unit = 1 Process
  • 13. A small spring boot project ● Pollutes the classpath ● Difficult to establish rules which APIs to use 90 dependencies 20 MB jar file
  • 14. Why is OSGi different? ● Coding against APIs and specs ● Self describing modules (bundles) ● OSGi services to communicate between bundles ● Semantic versioning ● Remote Service Admin for Remote calls and REST ● Flexible packaging
  • 15. Semantic Versioning ● MAJOR version - incompatible API changes, ● MINOR version - added functionality in a backwards-compatible manner ● BUGFIX version - backwards-compatible bug fixes Mind the difference between API and SPI.
  • 16. Remote Service Admin ● Exports and imports OSGi services ● Service Properties to mark for export and configure transports, … ● Highly customizable (Policies, Transports, Serialization, Discovery)
  • 17. Rest services with RSA ● Just JAX-RS annotations on interface REST Endpoint User bundle HTTP OSGi service CXF Transport for Aries RSA Creates Topology Manager Detects Selects transport
  • 18. Lets see it in practice Small chat application ● Modules talk to each other using an OSGi ChatListener interface described in API bundle ● IRC connector using camel ● Shell integration using gogo ● Tinkerforge Display and Motion detector ● Optional Remoting using Aries RSA
  • 19. Chat API Chat shell integration Tinkerforge LCD display IRC Connector IRC All in one ● 1 Process ● 6MB runnable jar ● No remote calls inside application ● Still modular as bundles only coupled through API and OSGi service
  • 20. Container vessel - OSGi deployment in one process
  • 21. Chat API IRC Connector Aries RSA IRC Microservice Deployment Chat API Tinkerforge LCD and motion detect Aries RSA Chat API Chat shell integration Aries RSA Zookeeper
  • 22. Microservice Deployment ● Same bundles as before ● As many deployment units as needed ● Each deployment unit can scale ● Runnable jars or docker containers ● Cloud native if needed ● Aries RSA overhead 300 KB + 800 KB zookeeper lib ● Remote calls or local calls as needed ● Many options for remotings (tcp, fastbin, SOAP, REST, JMS)
  • 23. But beware of the same management issues as any other micro services
  • 25. OSGi can scale from very small to very large But no simple cure for the operational problems of microservices
  • 26. Unsure if you actually need a microservice architecture? ● Develop your application using modular bundles ● Stay on single process as long as possible ● Decide about the packaging and deployment as late as possible ● Deploy only as fine granular as needed
  • 27. Further Reading ● Achim Nierbeck - Microservices on OSGi ● Milen Dyankow - Microservices and Modularity ● OSGi Chat example code ● Example for REST export using Aries RSA and CXF