SlideShare a Scribd company logo
Java 9/OSGi?
Microservices?
Maciek Próchniak
Timeline
Meanwhile...
FFW 2017
Bootiful future?
Bootiful future?
But...
How tall are you?
Case 1 - startup
Case 2 - frameworks?
Case 3 - Enterprise
Case 3 - Enterprise
What are microservices
for?
Decoupling
Decoupling
Coupling
●
●
●
●
Code level
Deployment level
Runtime coupling?
Stop in between?
Stop in between?
Stop in between?
JVM?
Java modules
●
○
○
○
●
○
○
Jigsaw...
Leave prejudice
… for next 30min
Module
Module
Export/Import
module mproch.services.order {
requires mproch.services.user;
exports pl.mproch.services.order.api;
}
Export-Package: pl.mproch.services.order.api;
uses:="javax.ws.rs,javax.ws.rs.core";version="1.0.0"
Import-Package: javax.ws.rs;version="[2.0,3)"
What should be module?
●
●
●
●
●
API vs Library vs Service
API vs Library vs Service
API vs Library vs Service
Deployment?
Deployment?
Versioning?
Semantic versioning
OSGi?
Error executing command: Error restarting bundles: Unable to start bundle 278: Uses constraint
violation. Unable to resolve resource demo-persistence-jpa [demo-persistence-jpa [278](R 278.0)]
because it is exposed to package 'javax.persistence' from resources javax.persistence
[javax.persistence [248](R 248.0)] and org.apache.geronimo.specs.geronimo-jpa_2.0_spec
[org.apache.geronimo.specs.geronimo-jpa_2.0_spec [266](R 266.0)] via two dependency chains. Chain
1: demo-persistence-jpa [demo-persistence-jpa [278](R 278.0)] import:
(&(osgi.wiring.package=javax.persistence)(version>=2.1.0)) | export: osgi.wiring.package:
javax.persistence javax.persistence [javax.persistence [248](R 248.0)] Chain 2:
demo-persistence-jpa [demo-persistence-jpa [278](R 278.0)] import:
(osgi.wiring.package=org.hibernate.proxy) | export: osgi.wiring.package=org.hibernate.proxy;
uses:=javax.persistence com.springsource.org.hibernate [com.springsource.org.hibernate [230](R
230.0)] import: (&(osgi.wiring.package=javax.persistence)(version>=1.0.0)(!(version>=2.0.0))) |
export: osgi.wiring.package: javax.persistence org.apache.geronimo.specs.geronimo-jpa_2.0_spec
[org.apache.geronimo.specs.geronimo-jpa_2.0_spec [266](R 266.0)] Unresolved requirements:
[[demo-persistence-jpa [278](R 278.0)] osgi.wiring.package;
(osgi.wiring.package=org.hibernate.proxy)]
Java 9?
Versioning is HARD...
Modules over microservices
●
●
●
●
Service is not only code
Service = Code + Behaviour
Behaviour
●
●
●
Spring/CDI?
@Singleton
public class UserService {
@Value(“#{user.maxAge}”)
private int maxAge;
@PostConstruct
public void init() {
}
}
Java 9?
module UserModule {
provides pl.mp.user.api.UserService with pl.mp.user.impl.DbUserService;
}
module OrderModule {
requires UserModule;
uses pl.mp.user.api.UserService;
}
ServiceLoader<UserService> services = ServiceLoader.load(UserService.class);
services.iterator()
DI - Service Registry
(name=”userService”)name=”userService”
Context separation
@Singleton
@OsgiServiceProvider
public class UserService {
}
public class OrderService {
@OsgiService
@Inject
UserService userService
}
Context separation
DOSGi
Lifecycle?
@Singleton
public class UserService {
@PostConstruct
public void init() {
}
}
@Component
public class UserService {
@Activated
@Updated
public void init() {
}
}
Dynamic updates?
Thread::kill
Services over microservices
●
●
●
●
But does it have Spring
Boot??
But does it have Spring Boot??
‘Enterprise’ features
●
●
●
●
●
●
●
Declarative profiles
Profiles deployment
DEMO
But does it have Spring Boot??
OSGi + Karaf platform
●
●
●
●
Does it work in
production?
Our case
●
●
●
●
Our case
Do we still need modularity?
What do you need?
What do you need?
What do you need?
Thanks

More Related Content

Similar to jSession #4 - Maciej Próchniak - Java 9, OSGi - czy w epoce mikroserwisów potrzebujemy modularnej Javy?

Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
The Eclipse Foundation
 
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to MicroservicesLessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
VMware Tanzu
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Ambassador Labs
 
Es build presentation
Es build presentationEs build presentation
Es build presentation
PT Citra Niaga Teknologi
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?
Maciej Lasyk
 
HPC on OpenStack
HPC on OpenStackHPC on OpenStack
HPC on OpenStack
Erich Birngruber
 
Nodejs
NodejsNodejs
CSCAMP2013 - Introduction to pwnCore
CSCAMP2013 - Introduction to pwnCoreCSCAMP2013 - Introduction to pwnCore
CSCAMP2013 - Introduction to pwnCore
Anwar Mohamed
 
Mobile Virtualization Management
Mobile Virtualization ManagementMobile Virtualization Management
Mobile Virtualization Management
Yaniv Bronhaim
 
Puppet Camp Phoenix 2015: Continuous Integration Using Puppet (Intermediate)
Puppet Camp Phoenix 2015:  Continuous Integration Using Puppet (Intermediate)Puppet Camp Phoenix 2015:  Continuous Integration Using Puppet (Intermediate)
Puppet Camp Phoenix 2015: Continuous Integration Using Puppet (Intermediate)
Puppet
 
Continuous Integration with Puppet
Continuous Integration with PuppetContinuous Integration with Puppet
Continuous Integration with Puppet
Miguel Zuniga
 
Green Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: FlutterGreen Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: Flutter
Green Custard
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice framework
Fabrice Sznajderman
 
Understanding concurrency
Understanding concurrencyUnderstanding concurrency
Understanding concurrency
Anshul Sharma
 
Software Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicSoftware Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business Logic
ICS
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
Bruce Li
 
oVirt – open your virtual datacenter
oVirt – open your virtual datacenteroVirt – open your virtual datacenter
oVirt – open your virtual datacenter
Bergamo Linux Users Group
 
Supercharge your releases with netflix nebula
Supercharge your releases with netflix nebulaSupercharge your releases with netflix nebula
Supercharge your releases with netflix nebula
Danijel Mitar
 
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Pôle Systematic Paris-Region
 
From prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.ioFrom prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.io
Máté Lang
 

Similar to jSession #4 - Maciej Próchniak - Java 9, OSGi - czy w epoce mikroserwisów potrzebujemy modularnej Javy? (20)

Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
 
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to MicroservicesLessons Learned from Migrating Legacy Enterprise Applications to Microservices
Lessons Learned from Migrating Legacy Enterprise Applications to Microservices
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 
Es build presentation
Es build presentationEs build presentation
Es build presentation
 
Shall we play a game?
Shall we play a game?Shall we play a game?
Shall we play a game?
 
HPC on OpenStack
HPC on OpenStackHPC on OpenStack
HPC on OpenStack
 
Nodejs
NodejsNodejs
Nodejs
 
CSCAMP2013 - Introduction to pwnCore
CSCAMP2013 - Introduction to pwnCoreCSCAMP2013 - Introduction to pwnCore
CSCAMP2013 - Introduction to pwnCore
 
Mobile Virtualization Management
Mobile Virtualization ManagementMobile Virtualization Management
Mobile Virtualization Management
 
Puppet Camp Phoenix 2015: Continuous Integration Using Puppet (Intermediate)
Puppet Camp Phoenix 2015:  Continuous Integration Using Puppet (Intermediate)Puppet Camp Phoenix 2015:  Continuous Integration Using Puppet (Intermediate)
Puppet Camp Phoenix 2015: Continuous Integration Using Puppet (Intermediate)
 
Continuous Integration with Puppet
Continuous Integration with PuppetContinuous Integration with Puppet
Continuous Integration with Puppet
 
Green Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: FlutterGreen Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: Flutter
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice framework
 
Understanding concurrency
Understanding concurrencyUnderstanding concurrency
Understanding concurrency
 
Software Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicSoftware Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business Logic
 
Nodejs web service for starters
Nodejs web service for startersNodejs web service for starters
Nodejs web service for starters
 
oVirt – open your virtual datacenter
oVirt – open your virtual datacenteroVirt – open your virtual datacenter
oVirt – open your virtual datacenter
 
Supercharge your releases with netflix nebula
Supercharge your releases with netflix nebulaSupercharge your releases with netflix nebula
Supercharge your releases with netflix nebula
 
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...Designing and coding for cloud-native applications using Python, Harjinder Mi...
Designing and coding for cloud-native applications using Python, Harjinder Mi...
 
From prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.ioFrom prototype to production - The journey of re-designing SmartUp.io
From prototype to production - The journey of re-designing SmartUp.io
 

Recently uploaded

Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 

Recently uploaded (20)

Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 

jSession #4 - Maciej Próchniak - Java 9, OSGi - czy w epoce mikroserwisów potrzebujemy modularnej Javy?