SlideShare a Scribd company logo
1 of 44
Download to read offline
Microservices and OSGi
running with Apache Karaf
•No free Lunch - microservices
•microservices or µService?
•Free Lunch? - OSGi µServices
•µServices in the Apache Karaf ecosystem
•https://github.com/ANierbeck/Karaf-Microservices-Tooling
•https://github.com/ANierbeck/Karaf-Microservices
2
Agenda
Showcase:
3
@anierbeck
Senior IT-Consultant @codecentric
Apache Karaf PMC
Apache Member
OPS4j Pax Web Project lead
Co-Author Apache Karaf Cookbook
No Free Lunch - with micro services_
4
01
No Free Lunch - with micro services_
Operations overhead
Instead of one Application (cluster)
micro applications that need to be
clustered / Orchestrated / Operated
01
No Free Lunch - with micro services_
DevOps Skills Required
old school: One AppServer one
application
now: applications that might run on
different infrastructure
Instead of bigger boats,
more boats are needed
01
No Free Lunch - with micro services_
Implicit Interfaces
Changes in:
•syntax
•semantics
01
No Free Lunch - with micro services_
Distributed System
Complexity
network latency
fault tolerance
message serialization
distributed transactions
01
No Free Lunch - with micro services_
A/Synchronicity

is Difficult!
communication is much more
asynchronous
it gets complex when you need to
correlate messages
or distributed transactions
01
No Free Lunch - with micro services_
Testability Challenges
testing a single service is easy
monitoring the dynamic environment
is hard
—> less testing, more monitoring
µService - comparison of two definition_
11
—Peter Kriens, March 2010
http://blog.osgi.org/2010/03/services.html
“What I am promoting is the idea of
µServices, the concepts of an OSGi
service as a design primitive.”
12
–Martin Fowler, March 2014
“In short, the microservice architectural style is an
approach to developing a single application as a
suite of small services, each running in its own
process and communicating with lightweight
mechanisms, often an HTTP resource API. These
services are built around business capabilities and
independently deployable by fully automated
deployment machinery. There is a bare mininum of
centralized management of these services, which
may be written in different programming languages
and use different data storage technologies.”
13
•One main reason for using services as components (rather than libraries) is that
services are independently deployable 

OSGi Bundle
•you can expect many single service changes to only require that service to be
redeployed

OSGi Service / Bundle
•cohesive service boundaries and evolution mechanisms in the service contracts 

OSGi Versioning
•Often it's only documentation and discipline that prevents clients breaking a
component's encapsulation, leading to overly-tight coupling between
components.

OSGi Container enforces this
in detail_
14
Free Lunch? OSGi µServices_
15
01
Free Lunch? OSGi µServices_
Operations Overhead
OSGi Bundles - containing services
One container vessel
One Server to know
Apache_
17
OSGi Framework
18
JAAS
Deployer
Console
Blueprint
LoggingConfig
HttpWAR
Features
Instance
OBR
KAR
JMX
JPA JTA Cellar
CoreStandardApache Karaf_
JNDI JMS JDBC
µServices µServices µServices
JAX-RS
µServices
01
Free Lunch? OSGi µServices_
DevOps Skills Required
requirements are reduced!
- Karaf - Ops
- OSGi - Devs
01
Free Lunch? OSGi µServices_
Implicit Interfaces
semantic versioning
OSGi supports multiple versions
multiple service implementations
tools help
21
Semantic Versioning_
1. major
Packages with versions that have different major parts are not compatible both for providers as
well as consumers. For example, 1.2 and 2.3 are completely incompatible.

2. minor
API consumers are compatible with exporters that have the same major number and an equal or
higher minor version. API providers are compatible with exporters that have the same major and
minor version number. For example, 1.2 is backward compatible with 1.1 for consumers but for
providers it is incompatible. Consumers should therefore import [1.2,2) and providers should
import [1.2,1.3).

3. micro
A difference in the micro part does not signal any backward compatibility issues. The micro
number is used to fix bugs that do not affect either consumers or providers of the API.

4. qualifier
The qualifier is usually used to indicate a build identity, for example a time stamp. Different
qualifiers do not signal any backward compatibility issues.
22
maven-bundle-plugin
Semantic Versioning - Tools_
01
Semantic Versioning - Tools_
Release - Baselining
Fix version 1.0.0
Baseline new version with 1.0.0
version
•Comparing bundle service-api version 1.0.0-SNAPSHOT to version 1.0.0-SNAPSHOT

PACKAGE_NAME DELTA CUR_VER BASE_VER REC_VER WARNINGS

= ================================================== ========== ========== ========== ========== ==========

de.nierbeck.microservices.karaf.calculator unchanged 1.0.0 1.0.0 1.0.0 -

-----------------------------------------------------------------------------------------------------------

de.nierbeck.microservices.karaf.calculator.values unchanged 1.0.0 1.0.0 1.0.0 -

-----------------------------------------------------------------------------------------------------------

Baseline analysis complete, 0 error(s), 0 warning(s)
Semantic Versioning - Baselining_
24
Baselining
01
Free Lunch? OSGi µServices_
Distributed System
Complexity
complexity reduced -> one container
no network traffic
service calls ->
method calls from services found in
service registry.
Clustering: Apache Karaf Cellar
Remote: DOSGi —> CXF, Cellar
01
Free Lunch? OSGi µServices_
A/Synchronicity

is Difficult!
in JVM communication
service calls - transparent call
stateless services
event communication
Out-Of-The-Box
01
Free Lunch? OSGi µServices_
Testability Challenges
POJO tests for business logic
Pax EXAM - Integration tests of OSGi
services.
Shift Focus:
More Testing, less monitoring
28
Service tests - Pax EXAM - Continous Integration_
µServices in the Apache Karaf ecosystem_
29
30
µServices in the Apache Karaf ecosystem_
microservices made of µServices …
01
µServices in the Apache Karaf ecosystem_
Apache Karaf Cellar
Hazelcast based cluster
Groups and Nodes
Services across Clusters
Failover
Load balanced
01
µServices in the Apache Karaf ecosystem_
Apache Karaf Cave
OSGi Repository
Bundle
Requirements
Capabilities
01
µServices in the Apache Karaf ecosystem_
Apache Karaf Decanter
Monitor
Elasticsearch
Kibana
Continous Delivery with Apache Karaf_
34
Continous Deployment_
35
36
{
"type":"EXEC",
"mbean":"org.apache.karaf:type=bundle,name=root",
"operation":"install(java.lang.String,boolean)",
"arguments":["mvn:${project.groupId}/${project.artifactId}/${project.version}", true]
}
•deployment via REST
•Jolokia - REST
•JMX Management
•Maven Plugin
Continous Deployment_
µServices - sum of all services_
37
01
µServices - sum of all services_
Should I do
microservices
YES!
Monolithic blocks are bad
Use:
- Low Coupling
- High Cohesion
01
µServices - sum of all services_
The Silver Bullet?
NO!
OSGi isn’t the silver Bullet
A lot of issues which exist with
µ-Services are already solved in the
OSGi - Eco system
01
µServices - sum of all services_
Blueprint?
YES!
Use it as blueprint for transition to
microservices
OSGi - µServices will help in breaking
up the Monolith
01
µServices - sum of all services_
microservice based on
µServices
instead of building micro-monolith
base on OSGi services.
Questions ?
•images found at flickr - thanks to that
•No Free Lunch with Microservices

http://highscalability.com/blog/2014/4/8/microservices-not-a-
free-lunch.html
•http://karaf.apache.org/
•http://blog.osgi.org/2010/03/services.html
•https://github.com/ANierbeck/Karaf-Microservices-Tooling
•https://github.com/ANierbeck/Karaf-Microservices
END_
43
Links:
Showcase:
44

More Related Content

What's hot

FreeSWITCH on Docker
FreeSWITCH on DockerFreeSWITCH on Docker
FreeSWITCH on Docker建澄 吳
 
How to Avoid the Top 5 NGINX Configuration Mistakes
How to Avoid the Top 5 NGINX Configuration MistakesHow to Avoid the Top 5 NGINX Configuration Mistakes
How to Avoid the Top 5 NGINX Configuration MistakesNGINX, Inc.
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache CamelClaus Ibsen
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOTVMware Tanzu
 
Bootiful Development with Spring Boot and React
Bootiful Development with Spring Boot and ReactBootiful Development with Spring Boot and React
Bootiful Development with Spring Boot and ReactVMware Tanzu
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with nettyZauber
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansibleKhizer Naeem
 
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek StavisiMasters
 
Modern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.jsModern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.jsJonas Bandi
 
How to Write Great Kafka Connectors
How to Write Great Kafka ConnectorsHow to Write Great Kafka Connectors
How to Write Great Kafka Connectorsconfluent
 
DockerからKubernetesへのシフト
DockerからKubernetesへのシフトDockerからKubernetesへのシフト
DockerからKubernetesへのシフトmasaki nakayama
 
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022Lorenzo Miniero
 
用 Kotlin 做自動化工具
用 Kotlin 做自動化工具用 Kotlin 做自動化工具
用 Kotlin 做自動化工具Shengyou Fan
 
Quarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkSVDevOps
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationJohn Lynch
 

What's hot (20)

FreeSWITCH on Docker
FreeSWITCH on DockerFreeSWITCH on Docker
FreeSWITCH on Docker
 
How to Avoid the Top 5 NGINX Configuration Mistakes
How to Avoid the Top 5 NGINX Configuration MistakesHow to Avoid the Top 5 NGINX Configuration Mistakes
How to Avoid the Top 5 NGINX Configuration Mistakes
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
Bootiful Development with Spring Boot and React
Bootiful Development with Spring Boot and ReactBootiful Development with Spring Boot and React
Bootiful Development with Spring Boot and React
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with netty
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Netconf et Yang
Netconf et YangNetconf et Yang
Netconf et Yang
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
RabbitMQ y Symfony
RabbitMQ y SymfonyRabbitMQ y Symfony
RabbitMQ y Symfony
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
[JS EXPERIENCE 2018] Javascript Event Loop além do setInterval - Derek Stavis
 
Modern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.jsModern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.js
 
How to Write Great Kafka Connectors
How to Write Great Kafka ConnectorsHow to Write Great Kafka Connectors
How to Write Great Kafka Connectors
 
DockerからKubernetesへのシフト
DockerからKubernetesへのシフトDockerからKubernetesへのシフト
DockerからKubernetesへのシフト
 
Alfresco Certificates
Alfresco Certificates Alfresco Certificates
Alfresco Certificates
 
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022SIP transfer with Janus/WebRTC @ OpenSIPS 2022
SIP transfer with Janus/WebRTC @ OpenSIPS 2022
 
用 Kotlin 做自動化工具
用 Kotlin 做自動化工具用 Kotlin 做自動化工具
用 Kotlin 做自動化工具
 
Quarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java frameworkQuarkus - a next-generation Kubernetes Native Java framework
Quarkus - a next-generation Kubernetes Native Java framework
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 

Similar to Microservices OSGi-running-with-apache-karaf

MySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL FabricMySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL FabricMark Swarbrick
 
Cloudify 4.6 highlights webinar
Cloudify 4.6 highlights webinarCloudify 4.6 highlights webinar
Cloudify 4.6 highlights webinarCloudify Community
 
Sql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiSql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiAlex Tumanoff
 
SAP on Azure Web Dispatcher High Availability
SAP on Azure Web Dispatcher High AvailabilitySAP on Azure Web Dispatcher High Availability
SAP on Azure Web Dispatcher High AvailabilityGary Jackson MBCS
 
Netherlands Tech Tour 02 - MySQL Fabric
Netherlands Tech Tour 02 -   MySQL FabricNetherlands Tech Tour 02 -   MySQL Fabric
Netherlands Tech Tour 02 - MySQL FabricMark Swarbrick
 
SAP on Azure. Use Cases and Benefits
SAP on Azure. Use Cases and BenefitsSAP on Azure. Use Cases and Benefits
SAP on Azure. Use Cases and BenefitsmyCloudDoor
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cachecornelia davis
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationMuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationPace Integration
 
High Availability of SAP ASCS in Microsoft Azure
High Availability of SAP ASCS in Microsoft AzureHigh Availability of SAP ASCS in Microsoft Azure
High Availability of SAP ASCS in Microsoft AzureGary Jackson MBCS
 
WSO2 Intro Webinar - Scale your business with the cloud enabled WSO2 Applica...
WSO2 Intro Webinar -  Scale your business with the cloud enabled WSO2 Applica...WSO2 Intro Webinar -  Scale your business with the cloud enabled WSO2 Applica...
WSO2 Intro Webinar - Scale your business with the cloud enabled WSO2 Applica...WSO2
 
Микросервисы со Spring Boot & Spring Cloud
Микросервисы со Spring Boot & Spring CloudМикросервисы со Spring Boot & Spring Cloud
Микросервисы со Spring Boot & Spring CloudVitebsk DSC
 
Building Applications with the Typesafe Reactive Platform at Skills Matter, L...
Building Applications with the Typesafe Reactive Platform at Skills Matter, L...Building Applications with the Typesafe Reactive Platform at Skills Matter, L...
Building Applications with the Typesafe Reactive Platform at Skills Matter, L...Lutz Hühnken
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014Sanjay Manwani
 
Reference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to KubernetesReference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to KubernetesRakesh Gujjarlapudi
 
Web Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectWeb Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectSaltlux Inc.
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Markus Eisele
 
VMworld 2013: Deploying vSphere with OpenStack: What It Means to Your Cloud E...
VMworld 2013: Deploying vSphere with OpenStack: What It Means to Your Cloud E...VMworld 2013: Deploying vSphere with OpenStack: What It Means to Your Cloud E...
VMworld 2013: Deploying vSphere with OpenStack: What It Means to Your Cloud E...VMworld
 
Serverless: A love hate relationship
Serverless: A love hate relationshipServerless: A love hate relationship
Serverless: A love hate relationshipJürgen Brüder
 
App Mod 01: Moving existing apps to the cloud
App Mod 01: Moving existing apps to the cloudApp Mod 01: Moving existing apps to the cloud
App Mod 01: Moving existing apps to the cloudJudy Breedlove
 

Similar to Microservices OSGi-running-with-apache-karaf (20)

MySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL FabricMySQL London Tech Tour March 2015 - MySQL Fabric
MySQL London Tech Tour March 2015 - MySQL Fabric
 
Cloudify 4.6 highlights webinar
Cloudify 4.6 highlights webinarCloudify 4.6 highlights webinar
Cloudify 4.6 highlights webinar
 
Sql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen NedaskivskyiSql server 2019 New Features by Yevhen Nedaskivskyi
Sql server 2019 New Features by Yevhen Nedaskivskyi
 
SAP on Azure Web Dispatcher High Availability
SAP on Azure Web Dispatcher High AvailabilitySAP on Azure Web Dispatcher High Availability
SAP on Azure Web Dispatcher High Availability
 
Netherlands Tech Tour 02 - MySQL Fabric
Netherlands Tech Tour 02 -   MySQL FabricNetherlands Tech Tour 02 -   MySQL Fabric
Netherlands Tech Tour 02 - MySQL Fabric
 
SAP on Azure. Use Cases and Benefits
SAP on Azure. Use Cases and BenefitsSAP on Azure. Use Cases and Benefits
SAP on Azure. Use Cases and Benefits
 
Cloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a CacheCloud-native Data: Every Microservice Needs a Cache
Cloud-native Data: Every Microservice Needs a Cache
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP IntegrationMuleSoft London Community October 2017 - Hybrid and SAP Integration
MuleSoft London Community October 2017 - Hybrid and SAP Integration
 
High Availability of SAP ASCS in Microsoft Azure
High Availability of SAP ASCS in Microsoft AzureHigh Availability of SAP ASCS in Microsoft Azure
High Availability of SAP ASCS in Microsoft Azure
 
WSO2 Intro Webinar - Scale your business with the cloud enabled WSO2 Applica...
WSO2 Intro Webinar -  Scale your business with the cloud enabled WSO2 Applica...WSO2 Intro Webinar -  Scale your business with the cloud enabled WSO2 Applica...
WSO2 Intro Webinar - Scale your business with the cloud enabled WSO2 Applica...
 
Микросервисы со Spring Boot & Spring Cloud
Микросервисы со Spring Boot & Spring CloudМикросервисы со Spring Boot & Spring Cloud
Микросервисы со Spring Boot & Spring Cloud
 
Building Applications with the Typesafe Reactive Platform at Skills Matter, L...
Building Applications with the Typesafe Reactive Platform at Skills Matter, L...Building Applications with the Typesafe Reactive Platform at Skills Matter, L...
Building Applications with the Typesafe Reactive Platform at Skills Matter, L...
 
MySQL Fabric
MySQL FabricMySQL Fabric
MySQL Fabric
 
MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014MySQL & Oracle Linux Keynote at Open Source India 2014
MySQL & Oracle Linux Keynote at Open Source India 2014
 
Reference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to KubernetesReference architectures shows a microservices deployed to Kubernetes
Reference architectures shows a microservices deployed to Kubernetes
 
Web Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectWeb Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC Project
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
VMworld 2013: Deploying vSphere with OpenStack: What It Means to Your Cloud E...
VMworld 2013: Deploying vSphere with OpenStack: What It Means to Your Cloud E...VMworld 2013: Deploying vSphere with OpenStack: What It Means to Your Cloud E...
VMworld 2013: Deploying vSphere with OpenStack: What It Means to Your Cloud E...
 
Serverless: A love hate relationship
Serverless: A love hate relationshipServerless: A love hate relationship
Serverless: A love hate relationship
 
App Mod 01: Moving existing apps to the cloud
App Mod 01: Moving existing apps to the cloudApp Mod 01: Moving existing apps to the cloud
App Mod 01: Moving existing apps to the cloud
 

Recently uploaded

renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energyjeyasrig
 
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Inc
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Einstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfEinstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfCloudMetic
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements SolutionsIQBG inc
 
Mobile App Development company Houston
Mobile  App  Development  company HoustonMobile  App  Development  company Houston
Mobile App Development company Houstonjennysmithusa549
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityRandy Shoup
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleShane Coughlan
 
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsMUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsUniversity of Antwerp
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...Maxim Salnikov
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJpolinaucc
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfICS
 
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...telebusocialmarketin
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial FrontiersRaphaël Semeteys
 
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...MyFAA
 
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfMind IT Systems
 
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...jackiepotts6
 
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevLeveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevpmgdscunsri
 
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurPriyadarshini T
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdfOffsiteNOC
 

Recently uploaded (20)

renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energy
 
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
Splashtop Enterprise Brochure - Remote Computer Access and Remote Support Sof...
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Einstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdfEinstein Copilot Conversational AI for your CRM.pdf
Einstein Copilot Conversational AI for your CRM.pdf
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements Solutions
 
Mobile App Development company Houston
Mobile  App  Development  company HoustonMobile  App  Development  company Houston
Mobile App Development company Houston
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scale
 
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow ModelsMUT4SLX: Extensions for Mutation Testing of Stateflow Models
MUT4SLX: Extensions for Mutation Testing of Stateflow Models
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJ
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdf
 
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
Telebu Social -Whatsapp Business API : Mastering Omnichannel Business Communi...
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
 
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
Take Advantage of Mx Tracking Flight Scheduling Solutions to Streamline Your ...
 
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
 
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
 
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevLeveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
 
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
 
8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf8 key point on optimizing web hosting services in your business.pdf
8 key point on optimizing web hosting services in your business.pdf
 

Microservices OSGi-running-with-apache-karaf

  • 1. Microservices and OSGi running with Apache Karaf
  • 2. •No free Lunch - microservices •microservices or µService? •Free Lunch? - OSGi µServices •µServices in the Apache Karaf ecosystem •https://github.com/ANierbeck/Karaf-Microservices-Tooling •https://github.com/ANierbeck/Karaf-Microservices 2 Agenda Showcase:
  • 3. 3 @anierbeck Senior IT-Consultant @codecentric Apache Karaf PMC Apache Member OPS4j Pax Web Project lead Co-Author Apache Karaf Cookbook
  • 4. No Free Lunch - with micro services_ 4
  • 5. 01 No Free Lunch - with micro services_ Operations overhead Instead of one Application (cluster) micro applications that need to be clustered / Orchestrated / Operated
  • 6. 01 No Free Lunch - with micro services_ DevOps Skills Required old school: One AppServer one application now: applications that might run on different infrastructure Instead of bigger boats, more boats are needed
  • 7. 01 No Free Lunch - with micro services_ Implicit Interfaces Changes in: •syntax •semantics
  • 8. 01 No Free Lunch - with micro services_ Distributed System Complexity network latency fault tolerance message serialization distributed transactions
  • 9. 01 No Free Lunch - with micro services_ A/Synchronicity
 is Difficult! communication is much more asynchronous it gets complex when you need to correlate messages or distributed transactions
  • 10. 01 No Free Lunch - with micro services_ Testability Challenges testing a single service is easy monitoring the dynamic environment is hard —> less testing, more monitoring
  • 11. µService - comparison of two definition_ 11
  • 12. —Peter Kriens, March 2010 http://blog.osgi.org/2010/03/services.html “What I am promoting is the idea of µServices, the concepts of an OSGi service as a design primitive.” 12
  • 13. –Martin Fowler, March 2014 “In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare mininum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.” 13
  • 14. •One main reason for using services as components (rather than libraries) is that services are independently deployable 
 OSGi Bundle •you can expect many single service changes to only require that service to be redeployed
 OSGi Service / Bundle •cohesive service boundaries and evolution mechanisms in the service contracts 
 OSGi Versioning •Often it's only documentation and discipline that prevents clients breaking a component's encapsulation, leading to overly-tight coupling between components.
 OSGi Container enforces this in detail_ 14
  • 15. Free Lunch? OSGi µServices_ 15
  • 16. 01 Free Lunch? OSGi µServices_ Operations Overhead OSGi Bundles - containing services One container vessel One Server to know
  • 18. OSGi Framework 18 JAAS Deployer Console Blueprint LoggingConfig HttpWAR Features Instance OBR KAR JMX JPA JTA Cellar CoreStandardApache Karaf_ JNDI JMS JDBC µServices µServices µServices JAX-RS µServices
  • 19. 01 Free Lunch? OSGi µServices_ DevOps Skills Required requirements are reduced! - Karaf - Ops - OSGi - Devs
  • 20. 01 Free Lunch? OSGi µServices_ Implicit Interfaces semantic versioning OSGi supports multiple versions multiple service implementations tools help
  • 21. 21 Semantic Versioning_ 1. major Packages with versions that have different major parts are not compatible both for providers as well as consumers. For example, 1.2 and 2.3 are completely incompatible. 2. minor API consumers are compatible with exporters that have the same major number and an equal or higher minor version. API providers are compatible with exporters that have the same major and minor version number. For example, 1.2 is backward compatible with 1.1 for consumers but for providers it is incompatible. Consumers should therefore import [1.2,2) and providers should import [1.2,1.3). 3. micro A difference in the micro part does not signal any backward compatibility issues. The micro number is used to fix bugs that do not affect either consumers or providers of the API. 4. qualifier The qualifier is usually used to indicate a build identity, for example a time stamp. Different qualifiers do not signal any backward compatibility issues.
  • 23. 01 Semantic Versioning - Tools_ Release - Baselining Fix version 1.0.0 Baseline new version with 1.0.0 version
  • 24. •Comparing bundle service-api version 1.0.0-SNAPSHOT to version 1.0.0-SNAPSHOT
 PACKAGE_NAME DELTA CUR_VER BASE_VER REC_VER WARNINGS
 = ================================================== ========== ========== ========== ========== ==========
 de.nierbeck.microservices.karaf.calculator unchanged 1.0.0 1.0.0 1.0.0 -
 -----------------------------------------------------------------------------------------------------------
 de.nierbeck.microservices.karaf.calculator.values unchanged 1.0.0 1.0.0 1.0.0 -
 -----------------------------------------------------------------------------------------------------------
 Baseline analysis complete, 0 error(s), 0 warning(s) Semantic Versioning - Baselining_ 24 Baselining
  • 25. 01 Free Lunch? OSGi µServices_ Distributed System Complexity complexity reduced -> one container no network traffic service calls -> method calls from services found in service registry. Clustering: Apache Karaf Cellar Remote: DOSGi —> CXF, Cellar
  • 26. 01 Free Lunch? OSGi µServices_ A/Synchronicity
 is Difficult! in JVM communication service calls - transparent call stateless services event communication Out-Of-The-Box
  • 27. 01 Free Lunch? OSGi µServices_ Testability Challenges POJO tests for business logic Pax EXAM - Integration tests of OSGi services. Shift Focus: More Testing, less monitoring
  • 28. 28 Service tests - Pax EXAM - Continous Integration_
  • 29. µServices in the Apache Karaf ecosystem_ 29
  • 30. 30 µServices in the Apache Karaf ecosystem_ microservices made of µServices …
  • 31. 01 µServices in the Apache Karaf ecosystem_ Apache Karaf Cellar Hazelcast based cluster Groups and Nodes Services across Clusters Failover Load balanced
  • 32. 01 µServices in the Apache Karaf ecosystem_ Apache Karaf Cave OSGi Repository Bundle Requirements Capabilities
  • 33. 01 µServices in the Apache Karaf ecosystem_ Apache Karaf Decanter Monitor Elasticsearch Kibana
  • 34. Continous Delivery with Apache Karaf_ 34
  • 37. µServices - sum of all services_ 37
  • 38. 01 µServices - sum of all services_ Should I do microservices YES! Monolithic blocks are bad Use: - Low Coupling - High Cohesion
  • 39. 01 µServices - sum of all services_ The Silver Bullet? NO! OSGi isn’t the silver Bullet A lot of issues which exist with µ-Services are already solved in the OSGi - Eco system
  • 40. 01 µServices - sum of all services_ Blueprint? YES! Use it as blueprint for transition to microservices OSGi - µServices will help in breaking up the Monolith
  • 41. 01 µServices - sum of all services_ microservice based on µServices instead of building micro-monolith base on OSGi services.
  • 43. •images found at flickr - thanks to that •No Free Lunch with Microservices
 http://highscalability.com/blog/2014/4/8/microservices-not-a- free-lunch.html •http://karaf.apache.org/ •http://blog.osgi.org/2010/03/services.html •https://github.com/ANierbeck/Karaf-Microservices-Tooling •https://github.com/ANierbeck/Karaf-Microservices END_ 43 Links: Showcase:
  • 44. 44