SlideShare a Scribd company logo
1 of 78
Modularity of the Java
Platform
Martin Toshev
BG JUG mailing list:
https://groups.google.com/forum/#
!forum/bg-jug
Agenda
• Modularity 101
• Modularity on top of the platform: OSGi
• Modularity of the platform: Jigsaw
• OSGi and Jigsaw interoperability: Penrose
Modularity 101
Modularity 101
• Standard Java libraries are modules - Hibernate,
log4j and any library you can basically think of …
• Build systems like Maven provide transparent
management of modules
Modularity 101
• Benefits of modularization:
– smaller modules are typically tested easier than a
monolithic application
– allows for easier evolution of the system - modules
evolve independently
Modularity 101
• Benefits of modularization:
– development of the system can be split easier
between teams/developers
– increased maintainability of separate modules
Modularity 101
• The dependency mechanism used by the JDK
introduces a number of problems that modular
systems aim to solve:
– The "JAR hell" problem caused by shortcomings of the
classloading process
Modularity 101
• The dependency mechanism used by the JDK
introduces a number of problems that modular
systems aim to solve:
– The lack of dynamicity in managing dependent
modules
– The lack of loose coupling between modules
Modularity 101
• Module systems aim to solve the mentioned
problems and typically provide:
– module management
– module deployment
– versioning
– dependency management
– module repositories
– configuration management
Modularity on top of the
platform: OSGi
Modularity on top of the platform:
OSGi
• OSGi (Open Service Gateway initiave) provides a
specification for module systems implemented in
Java
• It is introduced as JSR 8 and JSR 291 to the Java
platform
Modularity on top of the platform:
OSGi
Q: So what is an OSGi runtime ?
Modularity on top of the platform:
OSGi
Q: So what is an OSGi runtime ?
A: An OSGi runtime (module system) makes use of the Java
classloading mechanism in order to implement a container for
modular units (bundles) and is based on the OSGi spec - a series
of standards by the OSGi Alliance. Many application servers are
implemented using OSGi as a basis - it is also used in systems
from a diversity of areas
Modularity on top of the platform:
OSGi
Q: So what is an OSGi runtime ?
A: An OSGi bundle is a just a JAR file that contains source code,
bundle metadata and resources. A bundle may provide various
services and components to the OSGi runtime. An OSGi runtime
allows for bundles to be installed, started, stopped, updated and
uninstalled without requiring a reboot
Modularity on top of the platform:
OSGi
Q: So what is an OSGi runtime ?
A: The OSGi Core spec defines a layered architecture that
determines what is supported by the runtime – each layer
defines a particular functionality supported by the runtime and
the bundles
OSGi logical units:
 bundles
 services
 services registry
 life-cycle
 modules
 security
 execution environment
OSGi logical layers:
Modularity on top of the platform:
OSGi
Q: So what is an OSGi runtime ?
A: Bundles may export packages for use by other bundles or
import packages exported by other bundles - this dependency
mechanism is referred to as wire protocol and is provided by the
Module layer of OSGi. Bundles may publish services to the
runtime and use already published services from the runtime –
this dependency mechanism is provided by the Service layer of
OSGI.
Modularity on top of the platform:
OSGi
Q: So what is an OSGi runtime ?
A: The MANIFEST.MF file of the bundle’s JAR file describes the
metadata of the bundle
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Sample
Bundle-SymbolicName: com.sample
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: sample.Activator
Bundle-Vendor: QIVICON
Require-Bundle: org.eclipse.smarthome.core,
com.qivicon.extensions
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Service-Component: OSGI-INF/service.xml
Import-Package: com.qivicon.services.hdm;version="3.0.0“
Export-Package: com.sample.utils
Modularity on top of the platform:
OSGi
Q: So what is an OSGi runtime ?
A: The runtime may implement extensions based on the OSGi
Compendium spec that extends the OSGi Core spec. These could
be:
 remote services
 log service
 HTTP service
 device access service
 configuration admin
 metatype service
 preferences service
 user admin
 wire admin
 DMT admin service
 IO connector service
 provisioning service
 UPnP device service
 configuration admin
 declarative services
 event admin service
 deployment admin
 XML parser service
 monitoring service
 others
Modularity on top of the platform:
OSGi
Q: What about Maven support for OSGi bundles ?
Modularity on top of the platform:
OSGi
Q: What about Maven support for OSGi bundles ?
A: Such a support is provided by the Tycho Maven plug-ins that
provide support for packaging types, target platform definitions,
interoperability with the Maven dependency mechanism and so
on …
Modularity on top of the platform:
OSGi
• OSGi continues to evolve …
Live Demo
Modularity on top of the platform: OSGi
Modularity of the platform:
Jigsaw
Modularity of the platform:
Jigsaw
• When speaking of modularity we should also
consider the entire runtime (rt.jar) and the JDK
core libraries …
• … and built-in support for improved "OSGi-like"
modules in the Java platform
Modularity of the platform:
Jigsaw
• The JDK is monolithic …
Modularity of the platform:
Jigsaw
• JDK 8 compact profiles provide smaller versions …
(javac -profile <profile_name> or
make profiles for an OpenJDK build)
compact 1 compact 2 compact 3
Modularity of the platform:
Jigsaw
• The aim of project Jigsaw is to provide a module
system for the Java platform
• Although deferred to JDK 9 some additional effort
such as Compact Profiles and removed/
deprecated inter-library dependencies have been
introduced in JDK8 as an intermediate solution
Modularity of the platform:
Jigsaw
• Modularization of the Java platform is a
significant change that impacts the entire
ecosystem - may even break existing projects
Modularity of the platform:
Jigsaw
Q: So what is exactly project Jigsaw ?
Modularity of the platform:
Jigsaw
Q: So what is exactly project Jigsaw ?
A: Jigsaw will provide the basis for a Java Module System JSR
Modularity of the platform:
Jigsaw
Q: So what is exactly project Jigsaw ?
A: Project Jigsaw provides a modularized version of JDK along
with additional tools and language support for creating Jigsaw
modules. Currently early-access builds provide two types of JDK:
 JDK modules image - all components are preinstalled as
modules
 JDK base image + jmod packages - base JDK installation along
with additional Jigsaw modules of the JDK that can be
installed on-demand using the jmod tool
Modularity of the platform:
Jigsaw
Q: So what is exactly project Jigsaw ?
A: No jre directory exists anymore in the JDK installation, rt.jar
and tools.jar no longer exist. Modular JDK must be compatible
with existing applications to a greater extend. Legacy
applications are expected to run on a Jigsaw JDK if:
– they don't depend upon the internal structure of the
JDK/JRE
– they use only supported APIs
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: A collection of Java classes, native libraries and other
resources along with metadata that provides name and version
of the module and dependencies on other modules
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Jigsaw resolves modules during build and installation.
Jigsaw has no dynamics, no module lifecycle. The module system
assumes the existence of a foundational module named
java.base
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Module can use ("require") other modules and additionally
specify version or version ranges for the module dependency -
modules are loaded with different module classloaders
module org.bgjug.A @ 1.0 {
requires org.bgjug.B @ [2.0, 3.0);
}
module org.bgjug.A {
requires org.bgjug.B @ >= 1.0;
requires org.bgjug.C @ < 2.0;
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Module versions are compared using a similar approach as the
one used for Debian package versions …
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Modules can also "require" optional modules - meaning that
compilation succeeds even if the required module is missing
module org.bgjug.A {
requires optional jdk-corba@8-ea;
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Modules can also "require" local modules - meaning that the
local module is a kind of a "mixin" - it is loaded in the same
classloader as the requiring module
module org.bgjug.A @ 1.0 {
requires local org.bgjug.B @ [2.0, 3.0);
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: A module may export packages and classes
module org.bgjug.A @ 1.0 {
requires org.bgjug.B @ [2.0, 3.0);
exports org.bgjug.A.seminar.Sample;
exports org.bgjug.A.seminar.samples.*;
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Modules can explicitly specify which other modules can
"require" them
module org.bgjug.A @ 2.0 {
exports org.bgjug.A.seminar;
permits org.bgjug.B;
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Modules can logically provide other module names (aliases):
module com.bgjug.A @ 1.0 {
provides com.bgjug.First @ 2.0;
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Modules can have a single entry point
the main() method org.bgjug.A.Main is called when invoking:
java -m org.bgjug.A
module org.bgjug.A @ 1.0 {
permits org.bgjug.B;
class org.bgjug.A.Main;
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: Modules can define multiple views
the main() method org.bgjug.A.Main is called when invoking:
java -m org.bgjug.A
module org.bgjug.A {
exports org.bgjug.A.seminar;
view org.bgjug.internal.view {
permits org.bgjug.B
}
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: A module can declare that it provides a service
module org.bgjug.A {
provides service org.bgjug.A.external.TestService
with org.bgjug.A.external.TestServiceImpl;
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: A module can require a service
module org.bgjug.B {
requires service org.bgjug.A.external.TestService
}
Modularity of the platform:
Jigsaw
Q: What is a Jigsaw module ?
A: A service can also be required optionally
module org.bgjug.B{
requires optional service org.bgjug.A.TestService;
}
Modularity of the platform:
Jigsaw
Q: How are modules compiled ?
Modularity of the platform:
Jigsaw
Q: How are modules compiled ?
A: The javac compiler is extended with a ModulePath - the
equivalent of ClassPath but for module dependencies
(-modulepath option)
For javac the -d option (that specifies the output directory):
– outputs to legacy single-module structure if ClassPath is
set
– outputs to multi-module structure if ModulePath is set
Modularity of the platform:
Jigsaw
Q: How are modules managed ?
Modularity of the platform:
Jigsaw
Q: How are modules managed ?
A: Modules can be added to module libraries. Various tools are
added to support creation of modules, module libraries and
module repositories and packaging of artifacts:
– jmod - for managing modules and module libraries
– jpkg - for packaging modules (uses pack200 compression)
Modularity of the platform:
Jigsaw
Q: So why not adopt OSGi (at least the module layer) for
modularization of the Java platform ?
Modularity of the platform:
Jigsaw
Q: So why not adopt OSGi (at least the module layer) for
modularization of the Java platform ?
A: As chief architect of the Java platform Mark Reinhold states:
The OSGI module layer is not operative at compile time - it
addresses modularity only during packaging, deployment and
execution. It is also strictly build on top of the platform so it
cannot be used to modularize it.
For compile-time resolution of OSGi dependencies during
development IDEs (such as Eclipse) and build tooling (such as
Maven) provide a mechanism for specifying a target platform
which is collection of bundles used to provide compile-time
dependencies
Modularity of the platform:
Jigsaw
Q: So why not adopt OSGi (at least the module layer) for
modularization of the Java platform ?
A: However - according to Peter Kriens (former technical director
at the OSGi Alliance and one of the key drivers behind the OSGi
spec) Jigsaw is not typically needed an will introduce burden to
the platform and modules can be introduced much easier:
The only thing we need to add to the existing system is
versioning information on the package and record this version in
the class file
Modularity of the platform:
Jigsaw
Q: What about IDE support for Jigsaw module development ?
Modularity of the platform:
Jigsaw
Q: What about IDE support for Jigsaw module development ?
A: It is still an early stage to consider possible IDE support - IDE
vendors outline use cases for Jigsaw usage in order to consider
how to extend their IDEs with Jigsaw support (valid mostly for
NetBeans - Eclipse and IntelliJ are still idle).
However - according to Peter Kriens the structure of a JDK module
(especially the module-info.java file) will increase effort needed to
support modules in the various IDEs and build tools
Modularity of the platform:
Jigsaw
Q: What about Maven support for Jigsaw module development ?
Modularity of the platform:
Jigsaw
Q: What about Maven support for Jigsaw module development ?
A: Still at a very early stage of discussion - but most probably
Maven will provide build-in support for Jigsaw modules and
module dependency resolution from upstream Jigsaw repositories
Modularity of the platform:
Jigsaw
Q: What about Maven support for Jigsaw module development ?
A: According the Peter Kriens:
And not to forget the build tools, they will start having to interpret
the module-info file and link to the appropriate module system to
find their class path. Today, a build tool tells the compiler its class
path, in the future it would first have to compile or interpret the
Java file. This alone will probably kill 90% of the ant scripts because
the class path is used in other places then compiling. Also maven
will have to start to interact with this
Live Demo
Modularity of the platform: Jigsaw
OSGi and Jigsaw interoperability:
Penrose
OSGi and Jigsaw interoperability:
Penrose
• When speaking of JDK modules we should
consider interoperability with existing module
systems such as OSGi
• The purpose of project Penrose is to explore
interoperability between OSGi and Jigsaw
OSGi and Jigsaw interoperability:
Penrose
• Penrose is still in early stage of development …
OSGi and Jigsaw interoperability:
Penrose
• Penrose goals:
– ensuring OSGi frameworks run unmodified in an
Jigsaw-enabled runtime
– create modules/bundles that have both OSGi and
Jigsaw metadata in them
– Jigsaw metadata can be extended with OSGi concepts
– extend OSGi to read Jigsaw module info
OSGi and Jigsaw interoperability:
Penrose
• Penrose goals:
– mapping Jigsaw metadata to OSGi metadata
– resolve Jigsaw modules in an OSGi runtime
– enhance OSGi to use Jigsaw repositories and APIs
– more cross delegation between the two systems …
OSGi and Jigsaw interoperability:
Penrose
• Since module-info.java is compiled to module-
info.class this implies that class file must be
parsed in order to read metadata
• Penrose proposes a simpler JSON format
(module-info.json) that can be used to generate
both Jigsaw and OSGi metadata
OSGi and Jigsaw interoperability:
Penrose
MANIFEST.MF (OSGi)
module-info.java (Jigsaw)
module org.bgjug @ 1.0 {
exports org.bgjug.external;
}
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.bgjug
Bundle-SymbolicName: org.bgjug
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: org.bgjug.external;version="1.0.0"
module-info.json (Penrose)
"module" : {
"name" : "org.bgjug",
"version": 1.0,
"exports" : [{
"name" :
"org.bgjug.external",
"org.osgi.version" :
"1.0.0"
}]
}
module-info.json (Penrose)
Summary
Q: Projects Jigsaw/Penrose - when ?
Summary
Q: Projects Jigsaw/Penrose - when ?
A: Maybe when the Armagedon comes …
Summary
Q: Projects Jigsaw/Penrose - when ?
A: Unless you …
… discuss:
http://mail.openjdk.java.net/mailman/listinfo/penrose-dev
http://mail.openjdk.java.net/mailman/listinfo/jigsaw-dev
http://mail.openjdk.java.net/mailman/listinfo/penrose-discuss
… and code:
http://hg.openjdk.java.net/jigsaw
http://hg.openjdk.java.net/penrose
Q&A
Thank you
Bulgarian JUG mailing list:
https://groups.google.com/forum/#!forum/bg-jug
References
OSGi Alliance
http://www.osgi.org/Main/HomePage
Jigsaw Project
http://openjdk.java.net/projects/jigsaw/
Penrose Project
http://openjdk.java.net/projects/penrose/
References
Modularity - what is it ?
http://www.infoq.com/articles/modular-java-
what-is-it/
Java modularity - why ?
http://java.dzone.com/articles/java-modularity-
2-why
Java JAR hell problem
http://en.wikipedia.org/wiki/Java_Classloader#JA
R_hell
References
Java Module System Requirements
http://openjdk.java.net/projects/jigsaw/doc/draf
t-java-module-system-requirements-12
Project Jigsaw: The Big Picture
http://cr.openjdk.java.net/~mr/jigsaw/notes/jigs
aw-big-picture-01
Java 8 Modules Jigsaw and OSGi
http://www.slideshare.net/mfrancis/java-8-
modules-jigsaw-and-osgi-neil-bartlett
References
Project Jigsaw: Late for the train
http://mreinhold.org/blog/late-for-the-train-qa
Unbearable lightness of Jigsaw
http://blog.osgi.org/2011/05/unbearable-
lightness-of-jigsaw.html
Netbeans discussion on Jigsaw
http://wiki.netbeans.org/Jigsaw
References
Java Modularity - OSGi and Project Jigsaw
http://techdistrict.kirkk.com/2009/06/12/java-
modularity-osgi-and-project-jigsaw/
The Modular Java Platform & Project Jigsaw
http://www.jfokus.se/jfokus14/preso/Jigsaw.pdf
JAX 2013: A Project Jigsaw primer
http://jaxenter.com/a-project-jigsaw-primer-
50029.html
References
JavaOne 2013: The Modular Java Platform and Project
Jigsaw
http://parleys.com/play/52549d02e4b0a43ac12
124be/about
OpenJDK Penrose JavaOne 2012
http://www.slideshare.net/bosschaert/open-jdk-
penrose-javaone-2012

More Related Content

What's hot

JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerSimon Ritter
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionStephen Colebourne
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerSimon Ritter
 
Discuss about java 9 with latest features
Discuss about java 9 with latest featuresDiscuss about java 9 with latest features
Discuss about java 9 with latest featuresNexSoftsys
 
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Robert Scholte
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Simon Ritter
 
Java 9 Module System Introduction
Java 9 Module System IntroductionJava 9 Module System Introduction
Java 9 Module System IntroductionDan Stine
 
Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Robert Scholte
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in PractiseDavid Bosschaert
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Robert Scholte
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pavel Bucek
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Peter R. Egli
 
JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?Simon Ritter
 

What's hot (20)

Java Modularity: the Year After
Java Modularity: the Year AfterJava Modularity: the Year After
Java Modularity: the Year After
 
Migrating to Java 9 Modules
Migrating to Java 9 ModulesMigrating to Java 9 Modules
Migrating to Java 9 Modules
 
Java 9 modularity
Java 9 modularityJava 9 modularity
Java 9 modularity
 
Java 9 preview
Java 9 previewJava 9 preview
Java 9 preview
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introduction
 
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java SmallerJDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
 
Java modularization
Java modularizationJava modularization
Java modularization
 
Discuss about java 9 with latest features
Discuss about java 9 with latest featuresDiscuss about java 9 with latest features
Discuss about java 9 with latest features
 
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
Java 9 and the impact on Maven Projects (ApacheCon Europe 2016)
 
Coding Your Way to Java 12
Coding Your Way to Java 12Coding Your Way to Java 12
Coding Your Way to Java 12
 
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014
 
Java 9 Module System Introduction
Java 9 Module System IntroductionJava 9 Module System Introduction
Java 9 Module System Introduction
 
Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)Java 9 and the impact on Maven Projects (JavaOne 2016)
Java 9 and the impact on Maven Projects (JavaOne 2016)
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in Practise
 
Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)Java9 and the impact on Maven Projects (JFall 2016)
Java9 and the impact on Maven Projects (JFall 2016)
 
Intro To OSGi
Intro To OSGiIntro To OSGi
Intro To OSGi
 
Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9Pitfalls of migrating projects to JDK 9
Pitfalls of migrating projects to JDK 9
 
Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)Open Services Gateway Initiative (OSGI)
Open Services Gateway Initiative (OSGI)
 
JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?JDK 9: Mission Accomplished. What Next For Java?
JDK 9: Mission Accomplished. What Next For Java?
 

Similar to Modularity of the Java Platform (OSGi, Jigsaw and Penrose)

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
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)David Bosschaert
 
Java 9 / Jigsaw - AJUG/VJUG session
Java 9 / Jigsaw - AJUG/VJUG  sessionJava 9 / Jigsaw - AJUG/VJUG  session
Java 9 / Jigsaw - AJUG/VJUG sessionMani Sarkar
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011njbartlett
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJAX London
 
As7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongAs7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongjbossug
 
CodeCamp Iasi 10 march 2012 - SolvingThePuzzle
CodeCamp Iasi 10 march 2012 - SolvingThePuzzleCodeCamp Iasi 10 march 2012 - SolvingThePuzzle
CodeCamp Iasi 10 march 2012 - SolvingThePuzzleCodecamp Romania
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiToni Epple
 
Java 9: Deep Dive into Modularity and Dealing with Migration Issues
Java 9: Deep Dive into Modularity and Dealing with Migration IssuesJava 9: Deep Dive into Modularity and Dealing with Migration Issues
Java 9: Deep Dive into Modularity and Dealing with Migration IssuesGlobalLogic Ukraine
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules uploadRyan Cuprak
 
Java modulesystem
Java modulesystemJava modulesystem
Java modulesystemMarc Kassis
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Mihail Stoynov
 
Introduction to OSGi - Part-1
Introduction to OSGi - Part-1Introduction to OSGi - Part-1
Introduction to OSGi - Part-1kshanth2101
 
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
 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...IndicThreads
 

Similar to Modularity of the Java Platform (OSGi, Jigsaw and Penrose) (20)

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/)
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
 
Java 9 / Jigsaw - AJUG/VJUG session
Java 9 / Jigsaw - AJUG/VJUG  sessionJava 9 / Jigsaw - AJUG/VJUG  session
Java 9 / Jigsaw - AJUG/VJUG session
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
 
As7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongAs7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yong
 
CodeCamp Iasi 10 march 2012 - SolvingThePuzzle
CodeCamp Iasi 10 march 2012 - SolvingThePuzzleCodeCamp Iasi 10 march 2012 - SolvingThePuzzle
CodeCamp Iasi 10 march 2012 - SolvingThePuzzle
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGi
 
Java 9: Deep Dive into Modularity and Dealing with Migration Issues
Java 9: Deep Dive into Modularity and Dealing with Migration IssuesJava 9: Deep Dive into Modularity and Dealing with Migration Issues
Java 9: Deep Dive into Modularity and Dealing with Migration Issues
 
Java 9 Jigsaw HackDay
Java 9 Jigsaw HackDayJava 9 Jigsaw HackDay
Java 9 Jigsaw HackDay
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
 
Java modulesystem
Java modulesystemJava modulesystem
Java modulesystem
 
An Overview of Project Jigsaw
An Overview of Project JigsawAn Overview of Project Jigsaw
An Overview of Project Jigsaw
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
 
OSGi introduction
OSGi introductionOSGi introduction
OSGi introduction
 
Introduction to OSGi - Part-1
Introduction to OSGi - Part-1Introduction to OSGi - Part-1
Introduction to OSGi - Part-1
 
Java9
Java9Java9
Java9
 
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)
 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
 
OSGi
OSGiOSGi
OSGi
 

More from Martin Toshev

Building highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkBuilding highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkMartin Toshev
 
Big data processing with Apache Spark and Oracle Database
Big data processing with Apache Spark and Oracle DatabaseBig data processing with Apache Spark and Oracle Database
Big data processing with Apache Spark and Oracle DatabaseMartin Toshev
 
Semantic Technology In Oracle Database 12c
Semantic Technology In Oracle Database 12cSemantic Technology In Oracle Database 12c
Semantic Technology In Oracle Database 12cMartin Toshev
 
Practical security In a modular world
Practical security In a modular worldPractical security In a modular world
Practical security In a modular worldMartin Toshev
 
Java 9 Security Enhancements in Practice
Java 9 Security Enhancements in PracticeJava 9 Security Enhancements in Practice
Java 9 Security Enhancements in PracticeMartin Toshev
 
Writing Stored Procedures in Oracle RDBMS
Writing Stored Procedures in Oracle RDBMSWriting Stored Procedures in Oracle RDBMS
Writing Stored Procedures in Oracle RDBMSMartin Toshev
 
Security Architecture of the Java platform
Security Architecture of the Java platformSecurity Architecture of the Java platform
Security Architecture of the Java platformMartin Toshev
 
Oracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsOracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsMartin Toshev
 
RxJS vs RxJava: Intro
RxJS vs RxJava: IntroRxJS vs RxJava: Intro
RxJS vs RxJava: IntroMartin Toshev
 
Security Аrchitecture of Тhe Java Platform
Security Аrchitecture of Тhe Java PlatformSecurity Аrchitecture of Тhe Java Platform
Security Аrchitecture of Тhe Java PlatformMartin Toshev
 
Writing Stored Procedures with Oracle Database 12c
Writing Stored Procedures with Oracle Database 12cWriting Stored Procedures with Oracle Database 12c
Writing Stored Procedures with Oracle Database 12cMartin Toshev
 
Concurrency Utilities in Java 8
Concurrency Utilities in Java 8Concurrency Utilities in Java 8
Concurrency Utilities in Java 8Martin Toshev
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message BrokerMartin Toshev
 
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)Martin Toshev
 
Writing Java Stored Procedures in Oracle 12c
Writing Java Stored Procedures in Oracle 12cWriting Java Stored Procedures in Oracle 12c
Writing Java Stored Procedures in Oracle 12cMartin Toshev
 

More from Martin Toshev (20)

Building highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache SparkBuilding highly scalable data pipelines with Apache Spark
Building highly scalable data pipelines with Apache Spark
 
Big data processing with Apache Spark and Oracle Database
Big data processing with Apache Spark and Oracle DatabaseBig data processing with Apache Spark and Oracle Database
Big data processing with Apache Spark and Oracle Database
 
Jdk 10 sneak peek
Jdk 10 sneak peekJdk 10 sneak peek
Jdk 10 sneak peek
 
Semantic Technology In Oracle Database 12c
Semantic Technology In Oracle Database 12cSemantic Technology In Oracle Database 12c
Semantic Technology In Oracle Database 12c
 
Practical security In a modular world
Practical security In a modular worldPractical security In a modular world
Practical security In a modular world
 
Java 9 Security Enhancements in Practice
Java 9 Security Enhancements in PracticeJava 9 Security Enhancements in Practice
Java 9 Security Enhancements in Practice
 
Java 9 sneak peek
Java 9 sneak peekJava 9 sneak peek
Java 9 sneak peek
 
Writing Stored Procedures in Oracle RDBMS
Writing Stored Procedures in Oracle RDBMSWriting Stored Procedures in Oracle RDBMS
Writing Stored Procedures in Oracle RDBMS
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
Security Architecture of the Java platform
Security Architecture of the Java platformSecurity Architecture of the Java platform
Security Architecture of the Java platform
 
Oracle Database 12c Attack Vectors
Oracle Database 12c Attack VectorsOracle Database 12c Attack Vectors
Oracle Database 12c Attack Vectors
 
JVM++: The Graal VM
JVM++: The Graal VMJVM++: The Graal VM
JVM++: The Graal VM
 
RxJS vs RxJava: Intro
RxJS vs RxJava: IntroRxJS vs RxJava: Intro
RxJS vs RxJava: Intro
 
Security Аrchitecture of Тhe Java Platform
Security Аrchitecture of Тhe Java PlatformSecurity Аrchitecture of Тhe Java Platform
Security Аrchitecture of Тhe Java Platform
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
Writing Stored Procedures with Oracle Database 12c
Writing Stored Procedures with Oracle Database 12cWriting Stored Procedures with Oracle Database 12c
Writing Stored Procedures with Oracle Database 12c
 
Concurrency Utilities in Java 8
Concurrency Utilities in Java 8Concurrency Utilities in Java 8
Concurrency Utilities in Java 8
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
 
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
 
Writing Java Stored Procedures in Oracle 12c
Writing Java Stored Procedures in Oracle 12cWriting Java Stored Procedures in Oracle 12c
Writing Java Stored Procedures in Oracle 12c
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Modularity of the Java Platform (OSGi, Jigsaw and Penrose)

  • 1. Modularity of the Java Platform Martin Toshev
  • 2. BG JUG mailing list: https://groups.google.com/forum/# !forum/bg-jug
  • 3. Agenda • Modularity 101 • Modularity on top of the platform: OSGi • Modularity of the platform: Jigsaw • OSGi and Jigsaw interoperability: Penrose
  • 5. Modularity 101 • Standard Java libraries are modules - Hibernate, log4j and any library you can basically think of … • Build systems like Maven provide transparent management of modules
  • 6. Modularity 101 • Benefits of modularization: – smaller modules are typically tested easier than a monolithic application – allows for easier evolution of the system - modules evolve independently
  • 7. Modularity 101 • Benefits of modularization: – development of the system can be split easier between teams/developers – increased maintainability of separate modules
  • 8. Modularity 101 • The dependency mechanism used by the JDK introduces a number of problems that modular systems aim to solve: – The "JAR hell" problem caused by shortcomings of the classloading process
  • 9. Modularity 101 • The dependency mechanism used by the JDK introduces a number of problems that modular systems aim to solve: – The lack of dynamicity in managing dependent modules – The lack of loose coupling between modules
  • 10. Modularity 101 • Module systems aim to solve the mentioned problems and typically provide: – module management – module deployment – versioning – dependency management – module repositories – configuration management
  • 11. Modularity on top of the platform: OSGi
  • 12. Modularity on top of the platform: OSGi • OSGi (Open Service Gateway initiave) provides a specification for module systems implemented in Java • It is introduced as JSR 8 and JSR 291 to the Java platform
  • 13. Modularity on top of the platform: OSGi Q: So what is an OSGi runtime ?
  • 14. Modularity on top of the platform: OSGi Q: So what is an OSGi runtime ? A: An OSGi runtime (module system) makes use of the Java classloading mechanism in order to implement a container for modular units (bundles) and is based on the OSGi spec - a series of standards by the OSGi Alliance. Many application servers are implemented using OSGi as a basis - it is also used in systems from a diversity of areas
  • 15. Modularity on top of the platform: OSGi Q: So what is an OSGi runtime ? A: An OSGi bundle is a just a JAR file that contains source code, bundle metadata and resources. A bundle may provide various services and components to the OSGi runtime. An OSGi runtime allows for bundles to be installed, started, stopped, updated and uninstalled without requiring a reboot
  • 16. Modularity on top of the platform: OSGi Q: So what is an OSGi runtime ? A: The OSGi Core spec defines a layered architecture that determines what is supported by the runtime – each layer defines a particular functionality supported by the runtime and the bundles OSGi logical units:  bundles  services  services registry  life-cycle  modules  security  execution environment OSGi logical layers:
  • 17. Modularity on top of the platform: OSGi Q: So what is an OSGi runtime ? A: Bundles may export packages for use by other bundles or import packages exported by other bundles - this dependency mechanism is referred to as wire protocol and is provided by the Module layer of OSGi. Bundles may publish services to the runtime and use already published services from the runtime – this dependency mechanism is provided by the Service layer of OSGI.
  • 18. Modularity on top of the platform: OSGi Q: So what is an OSGi runtime ? A: The MANIFEST.MF file of the bundle’s JAR file describes the metadata of the bundle Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Sample Bundle-SymbolicName: com.sample Bundle-Version: 1.0.0.qualifier Bundle-Activator: sample.Activator Bundle-Vendor: QIVICON Require-Bundle: org.eclipse.smarthome.core, com.qivicon.extensions Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Service-Component: OSGI-INF/service.xml Import-Package: com.qivicon.services.hdm;version="3.0.0“ Export-Package: com.sample.utils
  • 19. Modularity on top of the platform: OSGi Q: So what is an OSGi runtime ? A: The runtime may implement extensions based on the OSGi Compendium spec that extends the OSGi Core spec. These could be:  remote services  log service  HTTP service  device access service  configuration admin  metatype service  preferences service  user admin  wire admin  DMT admin service  IO connector service  provisioning service  UPnP device service  configuration admin  declarative services  event admin service  deployment admin  XML parser service  monitoring service  others
  • 20. Modularity on top of the platform: OSGi Q: What about Maven support for OSGi bundles ?
  • 21. Modularity on top of the platform: OSGi Q: What about Maven support for OSGi bundles ? A: Such a support is provided by the Tycho Maven plug-ins that provide support for packaging types, target platform definitions, interoperability with the Maven dependency mechanism and so on …
  • 22. Modularity on top of the platform: OSGi • OSGi continues to evolve …
  • 23. Live Demo Modularity on top of the platform: OSGi
  • 24. Modularity of the platform: Jigsaw
  • 25. Modularity of the platform: Jigsaw • When speaking of modularity we should also consider the entire runtime (rt.jar) and the JDK core libraries … • … and built-in support for improved "OSGi-like" modules in the Java platform
  • 26. Modularity of the platform: Jigsaw • The JDK is monolithic …
  • 27. Modularity of the platform: Jigsaw • JDK 8 compact profiles provide smaller versions … (javac -profile <profile_name> or make profiles for an OpenJDK build) compact 1 compact 2 compact 3
  • 28. Modularity of the platform: Jigsaw • The aim of project Jigsaw is to provide a module system for the Java platform • Although deferred to JDK 9 some additional effort such as Compact Profiles and removed/ deprecated inter-library dependencies have been introduced in JDK8 as an intermediate solution
  • 29. Modularity of the platform: Jigsaw • Modularization of the Java platform is a significant change that impacts the entire ecosystem - may even break existing projects
  • 30. Modularity of the platform: Jigsaw Q: So what is exactly project Jigsaw ?
  • 31. Modularity of the platform: Jigsaw Q: So what is exactly project Jigsaw ? A: Jigsaw will provide the basis for a Java Module System JSR
  • 32. Modularity of the platform: Jigsaw Q: So what is exactly project Jigsaw ? A: Project Jigsaw provides a modularized version of JDK along with additional tools and language support for creating Jigsaw modules. Currently early-access builds provide two types of JDK:  JDK modules image - all components are preinstalled as modules  JDK base image + jmod packages - base JDK installation along with additional Jigsaw modules of the JDK that can be installed on-demand using the jmod tool
  • 33. Modularity of the platform: Jigsaw Q: So what is exactly project Jigsaw ? A: No jre directory exists anymore in the JDK installation, rt.jar and tools.jar no longer exist. Modular JDK must be compatible with existing applications to a greater extend. Legacy applications are expected to run on a Jigsaw JDK if: – they don't depend upon the internal structure of the JDK/JRE – they use only supported APIs
  • 34. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ?
  • 35. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: A collection of Java classes, native libraries and other resources along with metadata that provides name and version of the module and dependencies on other modules
  • 36. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Jigsaw resolves modules during build and installation. Jigsaw has no dynamics, no module lifecycle. The module system assumes the existence of a foundational module named java.base
  • 37. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Module can use ("require") other modules and additionally specify version or version ranges for the module dependency - modules are loaded with different module classloaders module org.bgjug.A @ 1.0 { requires org.bgjug.B @ [2.0, 3.0); } module org.bgjug.A { requires org.bgjug.B @ >= 1.0; requires org.bgjug.C @ < 2.0; }
  • 38. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Module versions are compared using a similar approach as the one used for Debian package versions …
  • 39. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Modules can also "require" optional modules - meaning that compilation succeeds even if the required module is missing module org.bgjug.A { requires optional jdk-corba@8-ea; }
  • 40. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Modules can also "require" local modules - meaning that the local module is a kind of a "mixin" - it is loaded in the same classloader as the requiring module module org.bgjug.A @ 1.0 { requires local org.bgjug.B @ [2.0, 3.0); }
  • 41. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: A module may export packages and classes module org.bgjug.A @ 1.0 { requires org.bgjug.B @ [2.0, 3.0); exports org.bgjug.A.seminar.Sample; exports org.bgjug.A.seminar.samples.*; }
  • 42. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Modules can explicitly specify which other modules can "require" them module org.bgjug.A @ 2.0 { exports org.bgjug.A.seminar; permits org.bgjug.B; }
  • 43. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Modules can logically provide other module names (aliases): module com.bgjug.A @ 1.0 { provides com.bgjug.First @ 2.0; }
  • 44. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Modules can have a single entry point the main() method org.bgjug.A.Main is called when invoking: java -m org.bgjug.A module org.bgjug.A @ 1.0 { permits org.bgjug.B; class org.bgjug.A.Main; }
  • 45. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: Modules can define multiple views the main() method org.bgjug.A.Main is called when invoking: java -m org.bgjug.A module org.bgjug.A { exports org.bgjug.A.seminar; view org.bgjug.internal.view { permits org.bgjug.B } }
  • 46. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: A module can declare that it provides a service module org.bgjug.A { provides service org.bgjug.A.external.TestService with org.bgjug.A.external.TestServiceImpl; }
  • 47. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: A module can require a service module org.bgjug.B { requires service org.bgjug.A.external.TestService }
  • 48. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ? A: A service can also be required optionally module org.bgjug.B{ requires optional service org.bgjug.A.TestService; }
  • 49. Modularity of the platform: Jigsaw Q: How are modules compiled ?
  • 50. Modularity of the platform: Jigsaw Q: How are modules compiled ? A: The javac compiler is extended with a ModulePath - the equivalent of ClassPath but for module dependencies (-modulepath option) For javac the -d option (that specifies the output directory): – outputs to legacy single-module structure if ClassPath is set – outputs to multi-module structure if ModulePath is set
  • 51. Modularity of the platform: Jigsaw Q: How are modules managed ?
  • 52. Modularity of the platform: Jigsaw Q: How are modules managed ? A: Modules can be added to module libraries. Various tools are added to support creation of modules, module libraries and module repositories and packaging of artifacts: – jmod - for managing modules and module libraries – jpkg - for packaging modules (uses pack200 compression)
  • 53. Modularity of the platform: Jigsaw Q: So why not adopt OSGi (at least the module layer) for modularization of the Java platform ?
  • 54. Modularity of the platform: Jigsaw Q: So why not adopt OSGi (at least the module layer) for modularization of the Java platform ? A: As chief architect of the Java platform Mark Reinhold states: The OSGI module layer is not operative at compile time - it addresses modularity only during packaging, deployment and execution. It is also strictly build on top of the platform so it cannot be used to modularize it. For compile-time resolution of OSGi dependencies during development IDEs (such as Eclipse) and build tooling (such as Maven) provide a mechanism for specifying a target platform which is collection of bundles used to provide compile-time dependencies
  • 55. Modularity of the platform: Jigsaw Q: So why not adopt OSGi (at least the module layer) for modularization of the Java platform ? A: However - according to Peter Kriens (former technical director at the OSGi Alliance and one of the key drivers behind the OSGi spec) Jigsaw is not typically needed an will introduce burden to the platform and modules can be introduced much easier: The only thing we need to add to the existing system is versioning information on the package and record this version in the class file
  • 56. Modularity of the platform: Jigsaw Q: What about IDE support for Jigsaw module development ?
  • 57. Modularity of the platform: Jigsaw Q: What about IDE support for Jigsaw module development ? A: It is still an early stage to consider possible IDE support - IDE vendors outline use cases for Jigsaw usage in order to consider how to extend their IDEs with Jigsaw support (valid mostly for NetBeans - Eclipse and IntelliJ are still idle). However - according to Peter Kriens the structure of a JDK module (especially the module-info.java file) will increase effort needed to support modules in the various IDEs and build tools
  • 58. Modularity of the platform: Jigsaw Q: What about Maven support for Jigsaw module development ?
  • 59. Modularity of the platform: Jigsaw Q: What about Maven support for Jigsaw module development ? A: Still at a very early stage of discussion - but most probably Maven will provide build-in support for Jigsaw modules and module dependency resolution from upstream Jigsaw repositories
  • 60. Modularity of the platform: Jigsaw Q: What about Maven support for Jigsaw module development ? A: According the Peter Kriens: And not to forget the build tools, they will start having to interpret the module-info file and link to the appropriate module system to find their class path. Today, a build tool tells the compiler its class path, in the future it would first have to compile or interpret the Java file. This alone will probably kill 90% of the ant scripts because the class path is used in other places then compiling. Also maven will have to start to interact with this
  • 61. Live Demo Modularity of the platform: Jigsaw
  • 62. OSGi and Jigsaw interoperability: Penrose
  • 63. OSGi and Jigsaw interoperability: Penrose • When speaking of JDK modules we should consider interoperability with existing module systems such as OSGi • The purpose of project Penrose is to explore interoperability between OSGi and Jigsaw
  • 64. OSGi and Jigsaw interoperability: Penrose • Penrose is still in early stage of development …
  • 65. OSGi and Jigsaw interoperability: Penrose • Penrose goals: – ensuring OSGi frameworks run unmodified in an Jigsaw-enabled runtime – create modules/bundles that have both OSGi and Jigsaw metadata in them – Jigsaw metadata can be extended with OSGi concepts – extend OSGi to read Jigsaw module info
  • 66. OSGi and Jigsaw interoperability: Penrose • Penrose goals: – mapping Jigsaw metadata to OSGi metadata – resolve Jigsaw modules in an OSGi runtime – enhance OSGi to use Jigsaw repositories and APIs – more cross delegation between the two systems …
  • 67. OSGi and Jigsaw interoperability: Penrose • Since module-info.java is compiled to module- info.class this implies that class file must be parsed in order to read metadata • Penrose proposes a simpler JSON format (module-info.json) that can be used to generate both Jigsaw and OSGi metadata
  • 68. OSGi and Jigsaw interoperability: Penrose MANIFEST.MF (OSGi) module-info.java (Jigsaw) module org.bgjug @ 1.0 { exports org.bgjug.external; } Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: org.bgjug Bundle-SymbolicName: org.bgjug Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Export-Package: org.bgjug.external;version="1.0.0" module-info.json (Penrose) "module" : { "name" : "org.bgjug", "version": 1.0, "exports" : [{ "name" : "org.bgjug.external", "org.osgi.version" : "1.0.0" }] } module-info.json (Penrose)
  • 70. Summary Q: Projects Jigsaw/Penrose - when ? A: Maybe when the Armagedon comes …
  • 71. Summary Q: Projects Jigsaw/Penrose - when ? A: Unless you … … discuss: http://mail.openjdk.java.net/mailman/listinfo/penrose-dev http://mail.openjdk.java.net/mailman/listinfo/jigsaw-dev http://mail.openjdk.java.net/mailman/listinfo/penrose-discuss … and code: http://hg.openjdk.java.net/jigsaw http://hg.openjdk.java.net/penrose
  • 72. Q&A Thank you Bulgarian JUG mailing list: https://groups.google.com/forum/#!forum/bg-jug
  • 74. References Modularity - what is it ? http://www.infoq.com/articles/modular-java- what-is-it/ Java modularity - why ? http://java.dzone.com/articles/java-modularity- 2-why Java JAR hell problem http://en.wikipedia.org/wiki/Java_Classloader#JA R_hell
  • 75. References Java Module System Requirements http://openjdk.java.net/projects/jigsaw/doc/draf t-java-module-system-requirements-12 Project Jigsaw: The Big Picture http://cr.openjdk.java.net/~mr/jigsaw/notes/jigs aw-big-picture-01 Java 8 Modules Jigsaw and OSGi http://www.slideshare.net/mfrancis/java-8- modules-jigsaw-and-osgi-neil-bartlett
  • 76. References Project Jigsaw: Late for the train http://mreinhold.org/blog/late-for-the-train-qa Unbearable lightness of Jigsaw http://blog.osgi.org/2011/05/unbearable- lightness-of-jigsaw.html Netbeans discussion on Jigsaw http://wiki.netbeans.org/Jigsaw
  • 77. References Java Modularity - OSGi and Project Jigsaw http://techdistrict.kirkk.com/2009/06/12/java- modularity-osgi-and-project-jigsaw/ The Modular Java Platform & Project Jigsaw http://www.jfokus.se/jfokus14/preso/Jigsaw.pdf JAX 2013: A Project Jigsaw primer http://jaxenter.com/a-project-jigsaw-primer- 50029.html
  • 78. References JavaOne 2013: The Modular Java Platform and Project Jigsaw http://parleys.com/play/52549d02e4b0a43ac12 124be/about OpenJDK Penrose JavaOne 2012 http://www.slideshare.net/bosschaert/open-jdk- penrose-javaone-2012

Editor's Notes

  1. Some people argue that Java libraries are not modules since they do not provide encapsulation (such as classes and packages).
  2. Evolution of modules in the default classloading mechanism supported by the Java platform may cause the so called "JAR hell" problem when conflicting versions of the same library are present on the classpath or required by different libraries. In order to evolve libraries in a compatible way using the default classloading mechanism on must design libraries with backward/forward compatibility in mind.
  3. Evolution of modules in the default classloading mechanism supported by the Java platform may cause the so called "JAR hell" problem when conflicting versions of the same library are present on the classpath or required by different libraries. In order to evolve libraries in a compatible way using the default classloading mechanism on must design libraries with backward/forward compatibility in mind.
  4. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  5. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  6. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  7. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  8. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  9. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  10. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  11. The module can use an enhanced version of java.util.ServiceLoader to load the service
  12. The module can use an enhanced version of java.util.ServiceLoader to load the service
  13. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  14. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  15. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  16. multiple packages with the same name can be defined in different modules in that manner (and they are merged when modules are loaded) the optional modules may be explicitly required to "permit" the requiring module in the future
  17. The only benefit in Jigsaw according to Peter Kriens: The only reason I can think of is that is easier for the module system providers to program. In the Jigsaw model traversing the dependencies is as easy as taking the module name + version, combining it with a repository URL, doing some string juggling and using the result as a URL to your module.