SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Fast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaFast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaCharles Nutter
 
Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Olle E Johansson
 
Media Handling in FreeSWITCH
Media Handling in FreeSWITCHMedia Handling in FreeSWITCH
Media Handling in FreeSWITCHMoises Silva
 
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesAsterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesDan Jenkins
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with KamailioFred Posner
 
Simple callcenter platform with PHP
Simple callcenter platform with PHPSimple callcenter platform with PHP
Simple callcenter platform with PHPMorten Amundsen
 
Scaling Asterisk with Kamailio
Scaling Asterisk with KamailioScaling Asterisk with Kamailio
Scaling Asterisk with KamailioFred Posner
 
Pros & cons of svelte
Pros & cons of sveltePros & cons of svelte
Pros & cons of svelteElenorWisozk
 
ネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chefネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chefnpsg
 
Getting a live_transcript_of_your_call_using_the_ari
Getting a live_transcript_of_your_call_using_the_ariGetting a live_transcript_of_your_call_using_the_ari
Getting a live_transcript_of_your_call_using_the_ariPascal Cadotte-Michaud
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with nettyZauber
 
Using Kamailio for Scalability and Security
Using Kamailio for Scalability and SecurityUsing Kamailio for Scalability and Security
Using Kamailio for Scalability and SecurityFred Posner
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用Shengyou Fan
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskMoises Silva
 
Kamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesKamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesPaolo Visintin
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting startedMunish Mehta
 
Python/Django를 이용한 쇼핑몰 구축(2018 4월 Django Girls Seoul)
Python/Django를 이용한 쇼핑몰 구축(2018 4월 Django Girls Seoul)Python/Django를 이용한 쇼핑몰 구축(2018 4월 Django Girls Seoul)
Python/Django를 이용한 쇼핑몰 구축(2018 4월 Django Girls Seoul)Youngil Cho
 

Was ist angesagt? (20)

Fast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible JavaFast as C: How to Write Really Terrible Java
Fast as C: How to Write Really Terrible Java
 
Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.Why is Kamailio so different? An introduction.
Why is Kamailio so different? An introduction.
 
Media Handling in FreeSWITCH
Media Handling in FreeSWITCHMedia Handling in FreeSWITCH
Media Handling in FreeSWITCH
 
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesAsterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilities
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with Kamailio
 
Simple callcenter platform with PHP
Simple callcenter platform with PHPSimple callcenter platform with PHP
Simple callcenter platform with PHP
 
Scaling Asterisk with Kamailio
Scaling Asterisk with KamailioScaling Asterisk with Kamailio
Scaling Asterisk with Kamailio
 
Pros & cons of svelte
Pros & cons of sveltePros & cons of svelte
Pros & cons of svelte
 
ネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chefネットワークエンジニアのための Puppet / Chef
ネットワークエンジニアのための Puppet / Chef
 
Getting a live_transcript_of_your_call_using_the_ari
Getting a live_transcript_of_your_call_using_the_ariGetting a live_transcript_of_your_call_using_the_ari
Getting a live_transcript_of_your_call_using_the_ari
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with netty
 
Using Kamailio for Scalability and Security
Using Kamailio for Scalability and SecurityUsing Kamailio for Scalability and Security
Using Kamailio for Scalability and Security
 
Loom promises: be there!
Loom promises: be there!Loom promises: be there!
Loom promises: be there!
 
Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012
 
以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用以 Laravel 經驗開發 Hyperf 應用
以 Laravel 經驗開發 Hyperf 應用
 
Kamailio on Docker
Kamailio on DockerKamailio on Docker
Kamailio on Docker
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in Asterisk
 
Kamailio with Docker and Kubernetes
Kamailio with Docker and KubernetesKamailio with Docker and Kubernetes
Kamailio with Docker and Kubernetes
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
 
Python/Django를 이용한 쇼핑몰 구축(2018 4월 Django Girls Seoul)
Python/Django를 이용한 쇼핑몰 구축(2018 4월 Django Girls Seoul)Python/Django를 이용한 쇼핑몰 구축(2018 4월 Django Girls Seoul)
Python/Django를 이용한 쇼핑몰 구축(2018 4월 Django Girls Seoul)
 

Ähnlich wie 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
 
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
 
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays
 

Ähnlich wie 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
 
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
 
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
apidays LIVE Hong Kong 2021 - Multi-Protocol APIs at Scale in Adidas by Jesus...
 

Kürzlich hochgeladen

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Kürzlich hochgeladen (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

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