SlideShare a Scribd company logo
1 of 70
Download to read offline
What's
not
new
in
modular
Java!
Milen Dyankov
@
Featuring
JDK 9 Early Access
with Project Jigsaw
Developer advocate
@
milendyankov
Liferay
Think of
not new
as in
not new
concept
and not as in
not new
car
Why
is it
about time
to start
thinking
about
modularity
in Java?
JSR 277
JSR 294
JSR 376
JEP 200
JEP 201
JEP 220
JEP 260
JEP 261
...
2005
2014
Antwerp, Belgium,
November 2015
“Survey” at
What
is
modularity
/particularly in Java/
anyway?
"When I use a word,"
Humpty Dumpty said,
in rather a scornful tone,
"it means
just what I choose
it to mean - neither
more nor less."
Modularity Maturity Model
proposed by Dr Graham Charters
at the OSGi Community Event 2011
Level 1 Ad Hoc nothing
Level 2 Modules decoupled from artifact
Level 3 Modularity decoupled from identity
Level 4 Loose-Coupling decoupled from implementation
Level 5 Devolution decoupled from ownership
Level 6 Dynamism decoupled from time
Level 1 Ad Hoc nothing
Level 2 Modules decoupled from artifact
Level 3 Modularity decoupled from identity
Level 4 Loose-Coupling decoupled from implementation
Level 5 Devolution decoupled from ownership
Level 6 Dynamism decoupled from time
Level 7 Peter Kriens only available to people who are Peter Kriens
Modularity Maturity Model
proposed by Dr Graham Charters
at the OSGi Community Event 2011
Modularity Maturity Model
proposed by Peter Kriens
in foreword to “Java Application Architecture”
Level 1 Ad Hoc
Level 2 Modules
Level 3 Modularity
Level 4 Loose-Coupling
Level 5 Devolution
Level 6 Dynamism
Unmanaged / chaos
Managing dependencies
Proper isolation
Minimize coupling
Service-oriented architecture
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5 JuServices
Buzzword compliant
Modularity Maturity Model
Level 1 Monolith Unaware of own dependencies
Level 2 Composite Aware of infrastructural dependencies
Level 3 Containers Aware of functional dependencies
Level 4 Discovery Aware of functional requirements
Level 5 Adapts to changing requirementsJuServices
Buzzword compliant
Modularity Maturity Model
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5 JuServices
Buzzword compliant
Modularity Maturity Model
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5 JuServices
Buzzword compliant
Modularity Maturity Model
Buzzword compliant
Modularity Maturity Model
JuServices
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5
Buzzword compliant
Modularity Maturity Model
JuServices
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5 OSGi
Buzzword compliant
Modularity Maturity Model
JuServices OSGi
JSR 376
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5
Buzzword compliant
Modularity Maturity Model
JuServices OSGi
JSR 376
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5
What
is
modularity
from
application
perspective ?
Java
application
Java
application
Java Platform
Libraries
OSGi
There is nothing
we can do about it!
OSGi
class loaders
There is nothing
we can do about it!
OSGi
class loaders
There is nothing
we can do about it!
Dynamic multi-layer
modular runtime!
OSGi
class loaders
There is nothing
we can do about it!
Dynamic multi-layer
modular runtime!
It's so easy,
everyone
should
release
bundles
(modules)!
OSGi
“Many
people claim
OSGi is hard without
acknowledging that modularizing
applications is the hard part.
. . .
JSR 376 will demonstrate that OSGi
was just the messenger and actually not the cause.”
Peter Kriens
JSR376
JSR376
Modules are
first class citizens!
JSR376
Modules are
first class citizens!
Nothing to do about it,
must use modules!
JSR376
Modules are
first class citizens!
Nothing to do about it,
must use modules!
It's so easy,
everyone
must
release
modules!
not new
except now
you kinda
have to
new
Modular
Java SE
Platform!
Modular
Java SE
Applications!
“A lot of people
will discover that
their babies are not as
modular as they thought”
Peter Kriens
When
is
“keep it
simple!”
not enough?
product
intermediate
intermediate
material
Product
Entity
Entity
Entity
Entity
Entity Entity
Offer
Offer
Offer
Offer
Offer
Offer
Offer
Offer
Offer
Offer
Offer
Application
Artifact
Artifact
Artifact
Artifact
Artifact Artifact
Export
Export
Export
Export
Export
Export
Export
Export
Export
Export
Export
Artifact
OSGi JSR 376
Manifest-Version: 1.0
Bundle-SymbolicName: 
com.mycompany.mymodule
...
MANIFEST.MF
module com.mycompany.mymodule {
...
}
module-info.java
Level 2
decoupled from
artifact
Buzzword compliant
Modularity Maturity Model
JuServices OSGi
JSR 376
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5
OK!
Artifact
OSGi JSR 376
Manifest-Version: 1.0
Bundle-SymbolicName: 
com.mycompany.mymodule
Export-Package: 
com.mycompany.mypackage
...
MANIFEST.MF
module com.mycompany.mymodule {
exports com.mycompany.mypackage;
...
}
module-info.java
Export
Level 3
decoupled from
identity
OSGi JSR 376
Manifest-Version: 1.0
Bundle-SymbolicName: 
com.mycompany.mymodule
Require-Bundle: 
other.module
Import-Package: 
com.some.package;
version="[2,3)",...
...
MANIFEST.MF
module com.mycompany.mymodule {
requires other.module;
...
}
module-info.java
Artifact
Export
Artifact
Level 3
decoupled from
identity
OSGi JSR 376
Manifest-Version: 1.0
Bundle-SymbolicName: 
com.mycompany.mymodule
Require-Bundle: 
other.module
Import-Package: 
com.some.package;
version="[2,3)",...
...
MANIFEST.MF
module com.mycompany.mymodule {
requires other.module;
...
}
module-info.java
Artifact
Export
Artifact
Level 3
decoupled from
identity
Posted by: Neil Bartlett and Kai Hackbarth on Sep 22, 2016
OSGi JSR 376
Manifest-Version: 1.0
Bundle-SymbolicName: 
com.mycompany.mymodule
Require-Bundle: 
com.foo
Import-Package: 
com.generic.powerplug;
version="[2,3)",...
...
MANIFEST.MF
module com.mycompany.mymodule {
requires com.foo;
...
}
module-info.java
Foo
Me
I need power plug!
I need Foo because
I know it offers
power plugs and
I know only Foo
offers power plugs!
Level 3
decoupled from
identity
OSGi JSR 376Level 3
decoupled from
identity
Manifest-Version: 1.0
Bundle-SymbolicName: 
com.mycompany.mymodule
Require-Bundle: 
com.foo
Import-Package: 
com.generic.powerplug;
version="[2,3)",...
...
MANIFEST.MF
module com.mycompany.mymodule {
requires com.foo;
...
}
module-info.java
Foo
Me I'm compatible
with all 2.x.x
versions!
I expect
developer/user to
know which version
will work and provide
it on module path!
OSGi JSR 376Level 3
decoupled from
identity
Manifest-Version: 1.0
Bundle-SymbolicName: 
com.mycompany.mymodule
Export-Package: 
com.mycompany.mypackage;
uses:="com.some.package”
...
MANIFEST.MF
module com.mycompany.mymodule {
exports com.mycompany.mypackage;
requires public other.module;
...
}
module-info.java
Artifact
Artifact
Artifact
Export
Uses
Export
OSGi JSR 376Level 3
decoupled from
identity
Manifest-Version: 1.0
Bundle-SymbolicName: 
com.mycompany.devices
Export-Package: 
com.mycompany.pc; 
uses:="foo.tools.powerplug”
...
MANIFEST.MF
module com.mycompany.devices {
exports com.mycompany.pc;
requires public foo.tools;
...
}
module-info.java
Me
Consumer
Foo
I used a power
plug from Foo!
You may need it!
I used something
from Foo tools,
so you now depend
on Foo tools
as well!
Buzzword compliant
Modularity Maturity Model
JuServices OSGi
JSR 376
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5
Not fully decoupled from identity!
OK!
OSGi JSR 376Level 4
decoupled from
implementation
Artifact
Artifact
Requirement
Need to
connect
device to
power outlet!
Capability
Can
connect
device to
power outlet!
RESOLVER
Bundles with custom
metadata
Requirements and
Capabilities with
LDAP like filters
Bundle lifecycle events
and listeners
Extender pattern
Nothing OOTB.
Use OSGi :)
Probably doable via
external resolver
dynamic modules and
layers
JEE or 3rd
party
solutions on top of JSR
376 may provide
solutions
Buzzword compliant
Modularity Maturity Model
JuServices OSGi
JSR 376
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5
Not fully decoupled from identity!
Some very basic APIs only!
OK!
OSGi JSR 376Level 5
decoupled from
ownership & time
JuServices
Artifact
Artifact
REGISTRY
Service
Service
Service
Service
Service registry with
metadata
Finding services via
LDAP like filters
Service lifecycle,
events and listeners
Multiple component
frameworks
Whiteboard pattern
Traditional Java
ServiceLoader
(not dynamic) moved to
module descriptor
Alternative: minimal
standalone Java
applications with
external service
discovery
Buzzword compliant
Modularity Maturity Model
JuServices OSGi
JSR 376
Level 1 Monolith
Level 2 Composite
Level 3 Containers
Level 4 Discovery
Level 5
Not fully decoupled from identity!
Very limited service layer! DIY dynamism!
OK!OK!
Some very basic APIs only!
Does this mean JSR 376
got modularity wrong?
When they say
modular Java
it means
just what they
choose it to mean -
neither
more nor less!
JSR 376 solves some
issues in Java platform!
Level 5 modularity was never one of them!
Reliable
configuration
Strong
encapsulation
A scalable Java SE
Platform
Greater platform
integrity
Improved
performance
“... once modularization
becomes part of the
Java core tool set,
developers will begin to
embrace it en-masse,
and as they do so, they
will seek more robust
and more mature
solutions. Enter OSGi!”
Victor Grazi
When
an application
needs
modularity
at
higher level ?
The essence of
modularity is
Not knowing
1 platform
over 100 apps
over 600 modules
over 2500 μServices
Some examples of how
deals with not knowing
The essence of
modularity is
Not knowing
Require-Capability: 
osgi.contract; 
filter:="(&(osgi.contract=JavaJAXRS)(version=2))"
Provide-Capability: 
osgi.contract; 
osgi.contract=JavaJAXRS; 
Uses:= "javax.ws.rs, 
javax.ws.rs.core, 
javax.ws.rs.client, 
javax.ws.rs.container, 
javax.ws.rs.ext"; 
version:Version=2
Some examples of how
deals with not knowing
The essence of
modularity is
Not knowing
@Component(
immediate = true,
property = {"javax.portlet.name=other_Portlet"},
service = PortletFilter.class
)
public class MyFilter implements RenderFilter {
...
Some examples of how
deals with not knowing
The essence of
modularity is
Not knowing
@Component(
immediate = true,
property = {"destination.name=" + MONITORING},
service = {MessageListener.class}
)
public class MonitoringMessageListener ...
@Reference(
cardinality = ReferenceCardinality.MULTIPLE,
policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY
)
protected synchronized void registerProcessor(
...
Some examples of how
deals with not knowing
The essence of
modularity is
Not knowing
The essence of
modularity is
Not knowing
Which enforces
optimization for
Predictability
Which results in
application
Agility
The essence of
modularity is
Not knowing
Which enforces
optimization for
Predictability
milen.dyankov@liferay.com
@MilenDyankov
http://www.liferay.com
@Liferay

More Related Content

What's hot

Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 iimjobs and hirist
 
CR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCRBTech
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java Hitesh-Java
 
Quick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview QuestionsQuick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview QuestionsLuis Martín Espino Rivera
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of javavinay arora
 
Learn java in hindi
Learn java in hindiLearn java in hindi
Learn java in hindiVipin sharma
 
Introduction to EclipseRT (JAX 2010)
Introduction to EclipseRT (JAX 2010)Introduction to EclipseRT (JAX 2010)
Introduction to EclipseRT (JAX 2010)Chris Aniszczyk
 
Di with dagger2 in android
Di with dagger2 in androidDi with dagger2 in android
Di with dagger2 in androidBrian Kiptoo
 
An argument for moving the requirements out of user hands - The CMS Experience
An argument for moving the requirements out of user hands - The CMS ExperienceAn argument for moving the requirements out of user hands - The CMS Experience
An argument for moving the requirements out of user hands - The CMS ExperienceIgor Sfiligoi
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)Sujit Majety
 
Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Javanandanrocker
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Java Lover
 

What's hot (20)

Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014 Top 10 Java Interview Questions and Answers 2014
Top 10 Java Interview Questions and Answers 2014
 
Java notes
Java notesJava notes
Java notes
 
CR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slidesCR Bridge Solutions Pvt Ltd. Java slides
CR Bridge Solutions Pvt Ltd. Java slides
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
Quick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview QuestionsQuick answers to Angular2+ Interview Questions
Quick answers to Angular2+ Interview Questions
 
Introducing Java 7
Introducing Java 7Introducing Java 7
Introducing Java 7
 
Introduction to basics of java
Introduction to basics of javaIntroduction to basics of java
Introduction to basics of java
 
Java 1
Java 1Java 1
Java 1
 
Learn java in hindi
Learn java in hindiLearn java in hindi
Learn java in hindi
 
Introduction to EclipseRT (JAX 2010)
Introduction to EclipseRT (JAX 2010)Introduction to EclipseRT (JAX 2010)
Introduction to EclipseRT (JAX 2010)
 
Di with dagger2 in android
Di with dagger2 in androidDi with dagger2 in android
Di with dagger2 in android
 
History of java
History of javaHistory of java
History of java
 
An argument for moving the requirements out of user hands - The CMS Experience
An argument for moving the requirements out of user hands - The CMS ExperienceAn argument for moving the requirements out of user hands - The CMS Experience
An argument for moving the requirements out of user hands - The CMS Experience
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Grade 8: Introduction To Java
Grade 8: Introduction To JavaGrade 8: Introduction To Java
Grade 8: Introduction To Java
 
Intro to Kotlin
Intro to KotlinIntro to Kotlin
Intro to Kotlin
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
 
Liferay on docker
Liferay on dockerLiferay on docker
Liferay on docker
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Industrial Training report on java
Industrial  Training report on javaIndustrial  Training report on java
Industrial Training report on java
 

Viewers also liked

Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Milen Dyankov
 
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...Milen Dyankov
 
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7Milen Dyankov
 
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmxMoved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmxMilen Dyankov
 
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMoved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMilen Dyankov
 
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...Milen Dyankov
 
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMoved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMilen Dyankov
 
Building Fault Tolerant Microservices
Building Fault Tolerant MicroservicesBuilding Fault Tolerant Microservices
Building Fault Tolerant MicroservicesKristoffer Erlandsson
 
Application Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceApplication Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceScott Mansfield
 
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Aysylu Greenberg
 
Java libraries you can't afford to miss
Java libraries you can't afford to missJava libraries you can't afford to miss
Java libraries you can't afford to missAndres Almiray
 
Hitchhiker Trees - Strangeloop 2016
Hitchhiker Trees - Strangeloop 2016Hitchhiker Trees - Strangeloop 2016
Hitchhiker Trees - Strangeloop 2016David Greenberg
 
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Milen Dyankov
 
Reactive Java Robotics IoT - jPrime 2016
Reactive Java Robotics IoT - jPrime 2016Reactive Java Robotics IoT - jPrime 2016
Reactive Java Robotics IoT - jPrime 2016Trayan Iliev
 
Code lifecycle in the jvm - TopConf Linz
Code lifecycle in the jvm - TopConf LinzCode lifecycle in the jvm - TopConf Linz
Code lifecycle in the jvm - TopConf LinzIvan Krylov
 
The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013Matt Raible
 
Microservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafMicroservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafAchim Nierbeck
 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkintakezoe
 
Moved to https://slidr.io/azzazzel/what-is-a-portal
Moved to https://slidr.io/azzazzel/what-is-a-portalMoved to https://slidr.io/azzazzel/what-is-a-portal
Moved to https://slidr.io/azzazzel/what-is-a-portalMilen Dyankov
 

Viewers also liked (20)

Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
Moved to https://slidr.io/azzazzel/software-craftsmanship-in-the-era-of-softw...
 
DIY Java & Kubernetes
DIY Java & KubernetesDIY Java & Kubernetes
DIY Java & Kubernetes
 
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
Moved to https://slidr.io/azzazzel/your-role-in-the-next-release-of-world-pro...
 
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
Moved to https://slidr.io/azzazzel/things-you-cannot-do-before-7
 
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmxMoved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
Moved to https://slidr.io/azzazzel/web-application-performance-tuning-beyond-xmx
 
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsidersMoved to https://slidr.io/azzazzel/osgi-for-outsiders
Moved to https://slidr.io/azzazzel/osgi-for-outsiders
 
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
Moved to https://slidr.io/azzazzel/leveraging-osgi-to-create-extensible-plugi...
 
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterpriseMoved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
Moved to https://slidr.io/azzazzel/liferay-7-microservices-for-the-enterprise
 
Building Fault Tolerant Microservices
Building Fault Tolerant MicroservicesBuilding Fault Tolerant Microservices
Building Fault Tolerant Microservices
 
Application Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceApplication Caching: The Hidden Microservice
Application Caching: The Hidden Microservice
 
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)Building A Distributed Build System at Google Scale (StrangeLoop 2016)
Building A Distributed Build System at Google Scale (StrangeLoop 2016)
 
Java libraries you can't afford to miss
Java libraries you can't afford to missJava libraries you can't afford to miss
Java libraries you can't afford to miss
 
Hitchhiker Trees - Strangeloop 2016
Hitchhiker Trees - Strangeloop 2016Hitchhiker Trees - Strangeloop 2016
Hitchhiker Trees - Strangeloop 2016
 
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
Moved to https://slidr.io/azzazzel/liferay-multi-channel-mobile-delivery-plat...
 
Reactive Java Robotics IoT - jPrime 2016
Reactive Java Robotics IoT - jPrime 2016Reactive Java Robotics IoT - jPrime 2016
Reactive Java Robotics IoT - jPrime 2016
 
Code lifecycle in the jvm - TopConf Linz
Code lifecycle in the jvm - TopConf LinzCode lifecycle in the jvm - TopConf Linz
Code lifecycle in the jvm - TopConf Linz
 
The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013The Modern Java Web Developer - JavaOne 2013
The Modern Java Web Developer - JavaOne 2013
 
Microservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karafMicroservices OSGi-running-with-apache-karaf
Microservices OSGi-running-with-apache-karaf
 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
 
Moved to https://slidr.io/azzazzel/what-is-a-portal
Moved to https://slidr.io/azzazzel/what-is-a-portalMoved to https://slidr.io/azzazzel/what-is-a-portal
Moved to https://slidr.io/azzazzel/what-is-a-portal
 

Similar to Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java

Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Makmfrancis
 
Managing modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java developmentManaging modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java developmentBaruch Sadogursky
 
Java 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the GalleryJava 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the Gallerynjbartlett
 
Java 9 / Jigsaw - LJC / VJUG session (hackday session)
Java 9 / Jigsaw - LJC / VJUG session (hackday session)Java 9 / Jigsaw - LJC / VJUG session (hackday session)
Java 9 / Jigsaw - LJC / VJUG session (hackday session)Mani Sarkar
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Martin Toshev
 
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Martin Toshev
 
Java 9 / Jigsaw - AJUG/VJUG session
Java 9 / Jigsaw - AJUG/VJUG  sessionJava 9 / Jigsaw - AJUG/VJUG  session
Java 9 / Jigsaw - AJUG/VJUG sessionMani Sarkar
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java LanguagePawanMM
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)David Bosschaert
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross IntroductionStuart Lodge
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross SeminarXamarin
 

Similar to Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java (20)

Javantura v4 - What’s NOT new in modular Java - Milen Dyankov
Javantura v4 - What’s NOT new in modular Java - Milen DyankovJavantura v4 - What’s NOT new in modular Java - Milen Dyankov
Javantura v4 - What’s NOT new in modular Java - Milen Dyankov
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Mak
 
Java modularization
Java modularizationJava modularization
Java modularization
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
 
Managing modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java developmentManaging modular software for your nu get, c++ and java development
Managing modular software for your nu get, c++ and java development
 
Nodejs from zero to hero
Nodejs from zero to heroNodejs from zero to hero
Nodejs from zero to hero
 
Java modularity: life after Java 9
Java modularity: life after Java 9Java modularity: life after Java 9
Java modularity: life after Java 9
 
Java 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the GalleryJava 7 Modularity: a View from the Gallery
Java 7 Modularity: a View from the Gallery
 
Tales from the OSGi trenches
Tales from the OSGi trenchesTales from the OSGi trenches
Tales from the OSGi trenches
 
Java 9 / Jigsaw - LJC / VJUG session (hackday session)
Java 9 / Jigsaw - LJC / VJUG session (hackday session)Java 9 / Jigsaw - LJC / VJUG session (hackday session)
Java 9 / Jigsaw - LJC / VJUG session (hackday session)
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
 
effective java
effective javaeffective java
effective java
 
Polyglot OSGi
Polyglot OSGiPolyglot OSGi
Polyglot OSGi
 
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
 
Java 9 / Jigsaw - AJUG/VJUG session
Java 9 / Jigsaw - AJUG/VJUG  sessionJava 9 / Jigsaw - AJUG/VJUG  session
Java 9 / Jigsaw - AJUG/VJUG session
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java Language
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
 
Modular Java
Modular JavaModular Java
Modular Java
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross Introduction
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross Seminar
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Moved to https://slidr.io/azzazzel/what-s-not-new-in-modular-java

  • 1. What's not new in modular Java! Milen Dyankov @ Featuring JDK 9 Early Access with Project Jigsaw Developer advocate @ milendyankov Liferay
  • 2. Think of not new as in not new concept and not as in not new car
  • 3. Why is it about time to start thinking about modularity in Java?
  • 4. JSR 277 JSR 294 JSR 376 JEP 200 JEP 201 JEP 220 JEP 260 JEP 261 ... 2005 2014
  • 6.
  • 7.
  • 9. "When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean - neither more nor less."
  • 10. Modularity Maturity Model proposed by Dr Graham Charters at the OSGi Community Event 2011 Level 1 Ad Hoc nothing Level 2 Modules decoupled from artifact Level 3 Modularity decoupled from identity Level 4 Loose-Coupling decoupled from implementation Level 5 Devolution decoupled from ownership Level 6 Dynamism decoupled from time
  • 11. Level 1 Ad Hoc nothing Level 2 Modules decoupled from artifact Level 3 Modularity decoupled from identity Level 4 Loose-Coupling decoupled from implementation Level 5 Devolution decoupled from ownership Level 6 Dynamism decoupled from time Level 7 Peter Kriens only available to people who are Peter Kriens Modularity Maturity Model proposed by Dr Graham Charters at the OSGi Community Event 2011
  • 12. Modularity Maturity Model proposed by Peter Kriens in foreword to “Java Application Architecture” Level 1 Ad Hoc Level 2 Modules Level 3 Modularity Level 4 Loose-Coupling Level 5 Devolution Level 6 Dynamism Unmanaged / chaos Managing dependencies Proper isolation Minimize coupling Service-oriented architecture
  • 13. Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5 JuServices Buzzword compliant Modularity Maturity Model
  • 14. Level 1 Monolith Unaware of own dependencies Level 2 Composite Aware of infrastructural dependencies Level 3 Containers Aware of functional dependencies Level 4 Discovery Aware of functional requirements Level 5 Adapts to changing requirementsJuServices Buzzword compliant Modularity Maturity Model
  • 15. Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5 JuServices Buzzword compliant Modularity Maturity Model
  • 16. Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5 JuServices Buzzword compliant Modularity Maturity Model
  • 17. Buzzword compliant Modularity Maturity Model JuServices Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5
  • 18. Buzzword compliant Modularity Maturity Model JuServices Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5 OSGi
  • 19. Buzzword compliant Modularity Maturity Model JuServices OSGi JSR 376 Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5
  • 20. Buzzword compliant Modularity Maturity Model JuServices OSGi JSR 376 Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5
  • 24. OSGi
  • 25. There is nothing we can do about it! OSGi
  • 26. class loaders There is nothing we can do about it! OSGi
  • 27. class loaders There is nothing we can do about it! Dynamic multi-layer modular runtime! OSGi
  • 28. class loaders There is nothing we can do about it! Dynamic multi-layer modular runtime! It's so easy, everyone should release bundles (modules)! OSGi
  • 29. “Many people claim OSGi is hard without acknowledging that modularizing applications is the hard part. . . . JSR 376 will demonstrate that OSGi was just the messenger and actually not the cause.” Peter Kriens
  • 32. JSR376 Modules are first class citizens! Nothing to do about it, must use modules!
  • 33. JSR376 Modules are first class citizens! Nothing to do about it, must use modules! It's so easy, everyone must release modules!
  • 34. not new except now you kinda have to new Modular Java SE Platform! Modular Java SE Applications!
  • 35. “A lot of people will discover that their babies are not as modular as they thought” Peter Kriens
  • 38.
  • 39.
  • 40.
  • 43. Artifact OSGi JSR 376 Manifest-Version: 1.0 Bundle-SymbolicName: com.mycompany.mymodule ... MANIFEST.MF module com.mycompany.mymodule { ... } module-info.java Level 2 decoupled from artifact
  • 44. Buzzword compliant Modularity Maturity Model JuServices OSGi JSR 376 Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5 OK!
  • 45. Artifact OSGi JSR 376 Manifest-Version: 1.0 Bundle-SymbolicName: com.mycompany.mymodule Export-Package: com.mycompany.mypackage ... MANIFEST.MF module com.mycompany.mymodule { exports com.mycompany.mypackage; ... } module-info.java Export Level 3 decoupled from identity
  • 46. OSGi JSR 376 Manifest-Version: 1.0 Bundle-SymbolicName: com.mycompany.mymodule Require-Bundle: other.module Import-Package: com.some.package; version="[2,3)",... ... MANIFEST.MF module com.mycompany.mymodule { requires other.module; ... } module-info.java Artifact Export Artifact Level 3 decoupled from identity
  • 47. OSGi JSR 376 Manifest-Version: 1.0 Bundle-SymbolicName: com.mycompany.mymodule Require-Bundle: other.module Import-Package: com.some.package; version="[2,3)",... ... MANIFEST.MF module com.mycompany.mymodule { requires other.module; ... } module-info.java Artifact Export Artifact Level 3 decoupled from identity Posted by: Neil Bartlett and Kai Hackbarth on Sep 22, 2016
  • 48. OSGi JSR 376 Manifest-Version: 1.0 Bundle-SymbolicName: com.mycompany.mymodule Require-Bundle: com.foo Import-Package: com.generic.powerplug; version="[2,3)",... ... MANIFEST.MF module com.mycompany.mymodule { requires com.foo; ... } module-info.java Foo Me I need power plug! I need Foo because I know it offers power plugs and I know only Foo offers power plugs! Level 3 decoupled from identity
  • 49. OSGi JSR 376Level 3 decoupled from identity Manifest-Version: 1.0 Bundle-SymbolicName: com.mycompany.mymodule Require-Bundle: com.foo Import-Package: com.generic.powerplug; version="[2,3)",... ... MANIFEST.MF module com.mycompany.mymodule { requires com.foo; ... } module-info.java Foo Me I'm compatible with all 2.x.x versions! I expect developer/user to know which version will work and provide it on module path!
  • 50. OSGi JSR 376Level 3 decoupled from identity Manifest-Version: 1.0 Bundle-SymbolicName: com.mycompany.mymodule Export-Package: com.mycompany.mypackage; uses:="com.some.package” ... MANIFEST.MF module com.mycompany.mymodule { exports com.mycompany.mypackage; requires public other.module; ... } module-info.java Artifact Artifact Artifact Export Uses Export
  • 51. OSGi JSR 376Level 3 decoupled from identity Manifest-Version: 1.0 Bundle-SymbolicName: com.mycompany.devices Export-Package: com.mycompany.pc; uses:="foo.tools.powerplug” ... MANIFEST.MF module com.mycompany.devices { exports com.mycompany.pc; requires public foo.tools; ... } module-info.java Me Consumer Foo I used a power plug from Foo! You may need it! I used something from Foo tools, so you now depend on Foo tools as well!
  • 52. Buzzword compliant Modularity Maturity Model JuServices OSGi JSR 376 Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5 Not fully decoupled from identity! OK!
  • 53. OSGi JSR 376Level 4 decoupled from implementation Artifact Artifact Requirement Need to connect device to power outlet! Capability Can connect device to power outlet! RESOLVER Bundles with custom metadata Requirements and Capabilities with LDAP like filters Bundle lifecycle events and listeners Extender pattern Nothing OOTB. Use OSGi :) Probably doable via external resolver dynamic modules and layers JEE or 3rd party solutions on top of JSR 376 may provide solutions
  • 54. Buzzword compliant Modularity Maturity Model JuServices OSGi JSR 376 Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5 Not fully decoupled from identity! Some very basic APIs only! OK!
  • 55. OSGi JSR 376Level 5 decoupled from ownership & time JuServices Artifact Artifact REGISTRY Service Service Service Service Service registry with metadata Finding services via LDAP like filters Service lifecycle, events and listeners Multiple component frameworks Whiteboard pattern Traditional Java ServiceLoader (not dynamic) moved to module descriptor Alternative: minimal standalone Java applications with external service discovery
  • 56. Buzzword compliant Modularity Maturity Model JuServices OSGi JSR 376 Level 1 Monolith Level 2 Composite Level 3 Containers Level 4 Discovery Level 5 Not fully decoupled from identity! Very limited service layer! DIY dynamism! OK!OK! Some very basic APIs only!
  • 57. Does this mean JSR 376 got modularity wrong?
  • 58. When they say modular Java it means just what they choose it to mean - neither more nor less!
  • 59. JSR 376 solves some issues in Java platform! Level 5 modularity was never one of them! Reliable configuration Strong encapsulation A scalable Java SE Platform Greater platform integrity Improved performance
  • 60. “... once modularization becomes part of the Java core tool set, developers will begin to embrace it en-masse, and as they do so, they will seek more robust and more mature solutions. Enter OSGi!” Victor Grazi
  • 62. The essence of modularity is Not knowing
  • 63. 1 platform over 100 apps over 600 modules over 2500 μServices Some examples of how deals with not knowing The essence of modularity is Not knowing
  • 64. Require-Capability: osgi.contract; filter:="(&(osgi.contract=JavaJAXRS)(version=2))" Provide-Capability: osgi.contract; osgi.contract=JavaJAXRS; Uses:= "javax.ws.rs, javax.ws.rs.core, javax.ws.rs.client, javax.ws.rs.container, javax.ws.rs.ext"; version:Version=2 Some examples of how deals with not knowing The essence of modularity is Not knowing
  • 65. @Component( immediate = true, property = {"javax.portlet.name=other_Portlet"}, service = PortletFilter.class ) public class MyFilter implements RenderFilter { ... Some examples of how deals with not knowing The essence of modularity is Not knowing
  • 66. @Component( immediate = true, property = {"destination.name=" + MONITORING}, service = {MessageListener.class} ) public class MonitoringMessageListener ... @Reference( cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY ) protected synchronized void registerProcessor( ... Some examples of how deals with not knowing The essence of modularity is Not knowing
  • 67. The essence of modularity is Not knowing Which enforces optimization for Predictability
  • 68. Which results in application Agility The essence of modularity is Not knowing Which enforces optimization for Predictability
  • 69.