SlideShare a Scribd company logo
Modular Java 
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 iniatiave) 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.
Modularity on top of the platform: 
OSGi 
Q: So what is an OSGi runtime ? 
A: 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: com.java2days.seminar.demo.Activator 
Bundle-Vendor: java2days 
Require-Bundle: org.java.jigsaw.core, 
org.java.jigsaw.extensions 
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 
Service-Component: OSGI-INF/service.xml 
Import-Package: com.java2days.seminar.jigsaw.shared;version="1.0.0“ 
Export-Package: com.java2days.seminar.demo.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 
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 
Draft 3 of Jigsaw requirements states that 
application using only standard APIs must remain 
compatible 
Draft 3 of Jigsaw requirements also mentions that 
some JDK-specific APIs must remain compatible but 
no concrete JDK APIs are listed yet
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. 
Currently work on Jigsaw is being done for: 
JEP 200 - define JDK modules (in a modules.xml file in the JDK repo) 
JEP 201 - reorganize JDK sources into modules and modify JDK build 
JEP 220 - restructure JRE/JDK images to accommodate modules
Modularity of the platform: 
Jigsaw 
Q: So what is exactly project Jigsaw ? 
A: Structure of JDK sources as defined by JEP 201: 
old 
src/{share,$OS}/{classes,native}/$PACKAGE/*.{java,c,h,cpp,hpp} 
new 
src/$MODULE/{share,$OS}/classes/$PACKAGE/*.java 
native/include/*.{h,hpp} 
$LIBRARY/*.{c,cpp} 
conf/*
Modularity of the platform: 
Jigsaw 
Q: So what is exactly project Jigsaw ? 
A: In the early exploratory phase of project Jigsaw there was a 
proof-of-concept implementation with JDK8 early-access builds 
(now dropped).
Modularity of the platform: 
Jigsaw 
Q: So what was exactly the exploratory phase of Jigsaw ? 
A: Jigsaw POC provided a modularized version of JDK along with 
additional tools and language support for creating Jigsaw 
modules. JDK8 early-access builds provided 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: 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 in terms of the exploratory phase ? 
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 in terms of the exploratory phase ? 
A: Module versions are compared using a similar approach as the 
one used for Debian package versions … The intent is to be able 
to package a module as an OS-specific package (not applicable 
for Windows/Mac OS)
Modularity of the platform: 
Jigsaw 
Q: What is a Jigsaw module in terms of the exploratory phase ? 
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 in terms of the exploratory phase ? 
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 in terms of the exploratory phase ? 
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 in terms of the exploratory phase ? 
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 in terms of the exploratory phase ? 
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 in terms of the exploratory phase ? 
A: Modules can have a single entry point 
module org.bgjug.A @ 1.0 { 
permits org.bgjug.B; 
class org.bgjug.A.Main; 
} 
the main() method org.bgjug.A.Main is called when invoking: 
java -m org.bgjug.A
Modularity of the platform: 
Jigsaw 
Q: What is a Jigsaw module in terms of the exploratory phase ? 
A: Modules can define multiple views 
module org.bgjug.A { 
exports org.bgjug.A.seminar; 
view org.bgjug.internal.view { 
permits org.bgjug.B 
} 
} 
the main() method org.bgjug.A.Main is called when invoking: 
java -m org.bgjug.A
Modularity of the platform: 
Jigsaw 
Q: What is a Jigsaw module in terms of the exploratory phase ? 
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 in terms of the exploratory phase ? 
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 in terms of the exploratory phase ? 
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: 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.
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
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 … 
Current work on project Penrose is deprecated due 
to the dropped proof-of-concept version of Jigsaw …
OSGi and Jigsaw interoperability: 
Penrose 
Penrose goals: 
– ensuring OSGi frameworks run unmodified in a 
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 metadata
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 APIs 
– more cross delegation between the two systems …
Summary 
Q: Project Jigsaw - when ?
Summary 
Q: Project Jigsaw - when ? 
A: Maybe when the Armagedon comes … 
… or maybe in 2016 …
Summary 
Q: Projects Jigsaw/Penrose - when ? 
A: Unless you … 
… discuss: 
http://mail.openjdk.java.net/mailman/listinfo/jigsaw-dev 
… and code: 
http://hg.openjdk.java.net/jigsaw
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 
Project Jigsaw: Phase Two 
http://mreinhold.org/blog/jigsaw-phase-two 
Project Jigsaw: Goals & Requirements Draft 3 
http://openjdk.java.net/projects/jigsaw/goals-reqs/ 
03
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 (20)

PDF
Java Modularity: the Year After
Sander Mak (@Sander_Mak)
 
PDF
Migrating to Java 9 Modules
Sander Mak (@Sander_Mak)
 
PPTX
Java 9 Modularity and Project Jigsaw
Comsysto Reply GmbH
 
PDF
Java 9 and Project Jigsaw
DPC Consulting Ltd
 
PDF
Modules or microservices?
Sander Mak (@Sander_Mak)
 
PDF
Benefits of OSGi in Practise
David Bosschaert
 
PDF
JDK-9: Modules and Java Linker
Bhanu Prakash Gopularam
 
PPTX
Java Modularity with OSGi
Ilya Rybak
 
PPTX
Java modules using project jigsaw@jdk 9
Mauricio "Maltron" Leal
 
PPTX
Step by step guide to create theme for liferay dxp 7
Azilen Technologies Pvt. Ltd.
 
PDF
Modular Java applications with OSGi on Apache Karaf
Ioan Eugen Stan
 
PDF
Java SE 9 modules (JPMS) - an introduction
Stephen Colebourne
 
PPTX
Modularization With Project Jigsaw in JDK 9
Simon Ritter
 
PDF
Open Services Gateway Initiative (OSGI)
Peter R. Egli
 
PDF
Java 9 preview
Ivan Krylov
 
PDF
Coding Your Way to Java 12
Sander Mak (@Sander_Mak)
 
PDF
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
Mario-Leander Reimer
 
PPTX
Liferay (DXP) 7 Tech Meetup for Developers
Azilen Technologies Pvt. Ltd.
 
PPTX
Java 9 Module System Introduction
Dan Stine
 
PDF
Polygot Java EE on the GraalVM
Ryan Cuprak
 
Java Modularity: the Year After
Sander Mak (@Sander_Mak)
 
Migrating to Java 9 Modules
Sander Mak (@Sander_Mak)
 
Java 9 Modularity and Project Jigsaw
Comsysto Reply GmbH
 
Java 9 and Project Jigsaw
DPC Consulting Ltd
 
Modules or microservices?
Sander Mak (@Sander_Mak)
 
Benefits of OSGi in Practise
David Bosschaert
 
JDK-9: Modules and Java Linker
Bhanu Prakash Gopularam
 
Java Modularity with OSGi
Ilya Rybak
 
Java modules using project jigsaw@jdk 9
Mauricio "Maltron" Leal
 
Step by step guide to create theme for liferay dxp 7
Azilen Technologies Pvt. Ltd.
 
Modular Java applications with OSGi on Apache Karaf
Ioan Eugen Stan
 
Java SE 9 modules (JPMS) - an introduction
Stephen Colebourne
 
Modularization With Project Jigsaw in JDK 9
Simon Ritter
 
Open Services Gateway Initiative (OSGI)
Peter R. Egli
 
Java 9 preview
Ivan Krylov
 
Coding Your Way to Java 12
Sander Mak (@Sander_Mak)
 
Migrating a JSF-Based Web Application from Spring 3 to Java EE 7 and CDI
Mario-Leander Reimer
 
Liferay (DXP) 7 Tech Meetup for Developers
Azilen Technologies Pvt. Ltd.
 
Java 9 Module System Introduction
Dan Stine
 
Polygot Java EE on the GraalVM
Ryan Cuprak
 

Viewers also liked (18)

PPTX
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Martin Toshev
 
PPTX
Security Аrchitecture of Тhe Java Platform
Martin Toshev
 
PPTX
Writing Stored Procedures with Oracle Database 12c
Martin Toshev
 
PPTX
Writing Stored Procedures in Oracle RDBMS
Martin Toshev
 
PPTX
Writing Java Stored Procedures in Oracle 12c
Martin Toshev
 
PPTX
RxJS vs RxJava: Intro
Martin Toshev
 
PPTX
Spring RabbitMQ
Martin Toshev
 
PDF
KDB database (EPAM tech talks, Sofia, April, 2015)
Martin Toshev
 
PPTX
Security Architecture of the Java platform
Martin Toshev
 
PDF
Eclipse plug in development
Martin Toshev
 
PPTX
JVM++: The Graal VM
Martin Toshev
 
PPTX
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Martin Toshev
 
PPTX
The RabbitMQ Message Broker
Martin Toshev
 
PPTX
Oracle Database 12c Attack Vectors
Martin Toshev
 
PPTX
Is An Agile Standard Possible For Java?
Simon Ritter
 
PDF
Real World Java 9 (QCon London)
Trisha Gee
 
PPTX
Spring RabbitMQ
Martin Toshev
 
PPTX
New Features in JDK 8
Martin Toshev
 
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Martin Toshev
 
Security Аrchitecture of Тhe Java Platform
Martin Toshev
 
Writing Stored Procedures with Oracle Database 12c
Martin Toshev
 
Writing Stored Procedures in Oracle RDBMS
Martin Toshev
 
Writing Java Stored Procedures in Oracle 12c
Martin Toshev
 
RxJS vs RxJava: Intro
Martin Toshev
 
Spring RabbitMQ
Martin Toshev
 
KDB database (EPAM tech talks, Sofia, April, 2015)
Martin Toshev
 
Security Architecture of the Java platform
Martin Toshev
 
Eclipse plug in development
Martin Toshev
 
JVM++: The Graal VM
Martin Toshev
 
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Martin Toshev
 
The RabbitMQ Message Broker
Martin Toshev
 
Oracle Database 12c Attack Vectors
Martin Toshev
 
Is An Agile Standard Possible For Java?
Simon Ritter
 
Real World Java 9 (QCon London)
Trisha Gee
 
Spring RabbitMQ
Martin Toshev
 
New Features in JDK 8
Martin Toshev
 
Ad

Similar to Modular Java (20)

PPTX
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Martin Toshev
 
PDF
OpenJDK Penrose Presentation (JavaOne 2012)
David Bosschaert
 
PPTX
An Overview of Project Jigsaw
Rafael Winterhalter
 
PDF
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
JAX London
 
PDF
Jax london 2011
njbartlett
 
PDF
Java 7 Modularity: a View from the Gallery
njbartlett
 
PPTX
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Mihail Stoynov
 
PDF
Jigsaw - Javaforum 2015Q4
Rikard Thulin
 
PDF
Modules all the way down: OSGi and the Java Platform Module System
Tim Ellison
 
PPTX
Introduction to OSGi - Part-1
kshanth2101
 
PDF
Jigsaw what the Heck Happens Now - N Bartlett
mfrancis
 
PDF
OSGi and Java 9+
bjhargrave
 
PDF
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
PPTX
Managing modular software for your nu get, c++ and java development
Baruch Sadogursky
 
PPTX
Osgi platform
Yuriy Shapovalov
 
PDF
CodeCamp Iasi 10 march 2012 - SolvingThePuzzle
Codecamp Romania
 
PDF
What we can expect from Java 9 by Ivan Krylov
J On The Beach
 
PDF
New Modularity Features of the OSGi R4 Service Platform - Richard Hall, Ph.D....
mfrancis
 
PPTX
Java 9 new features
Masudul Haque
 
PDF
Java Future S Ritter
catherinewall
 
Modularity of the Java Platform (OSGi, Jigsaw and Penrose)
Martin Toshev
 
OpenJDK Penrose Presentation (JavaOne 2012)
David Bosschaert
 
An Overview of Project Jigsaw
Rafael Winterhalter
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
JAX London
 
Jax london 2011
njbartlett
 
Java 7 Modularity: a View from the Gallery
njbartlett
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Mihail Stoynov
 
Jigsaw - Javaforum 2015Q4
Rikard Thulin
 
Modules all the way down: OSGi and the Java Platform Module System
Tim Ellison
 
Introduction to OSGi - Part-1
kshanth2101
 
Jigsaw what the Heck Happens Now - N Bartlett
mfrancis
 
OSGi and Java 9+
bjhargrave
 
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
Managing modular software for your nu get, c++ and java development
Baruch Sadogursky
 
Osgi platform
Yuriy Shapovalov
 
CodeCamp Iasi 10 march 2012 - SolvingThePuzzle
Codecamp Romania
 
What we can expect from Java 9 by Ivan Krylov
J On The Beach
 
New Modularity Features of the OSGi R4 Service Platform - Richard Hall, Ph.D....
mfrancis
 
Java 9 new features
Masudul Haque
 
Java Future S Ritter
catherinewall
 
Ad

More from Martin Toshev (10)

PPTX
Building highly scalable data pipelines with Apache Spark
Martin Toshev
 
PPTX
Big data processing with Apache Spark and Oracle Database
Martin Toshev
 
PPT
Jdk 10 sneak peek
Martin Toshev
 
PPT
Semantic Technology In Oracle Database 12c
Martin Toshev
 
PPTX
Practical security In a modular world
Martin Toshev
 
PPT
Java 9 Security Enhancements in Practice
Martin Toshev
 
PPTX
Java 9 sneak peek
Martin Toshev
 
PDF
Concurrency Utilities in Java 8
Martin Toshev
 
PPTX
java2days 2014: Attacking JavaEE Application Servers
Martin Toshev
 
PPTX
Security Architecture of the Java Platform (http://www.javaday.bg event - 14....
Martin Toshev
 
Building highly scalable data pipelines with Apache Spark
Martin Toshev
 
Big data processing with Apache Spark and Oracle Database
Martin Toshev
 
Jdk 10 sneak peek
Martin Toshev
 
Semantic Technology In Oracle Database 12c
Martin Toshev
 
Practical security In a modular world
Martin Toshev
 
Java 9 Security Enhancements in Practice
Martin Toshev
 
Java 9 sneak peek
Martin Toshev
 
Concurrency Utilities in Java 8
Martin Toshev
 
java2days 2014: Attacking JavaEE Application Servers
Martin Toshev
 
Security Architecture of the Java Platform (http://www.javaday.bg event - 14....
Martin Toshev
 

Recently uploaded (20)

PPTX
EO4EU Ocean Monitoring: Maritime Weather Routing Optimsation Use Case
EO4EU
 
PDF
Continouous failure - Why do we make our lives hard?
Papp Krisztián
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
GridView,Recycler view, API, SQLITE& NetworkRequest.pdf
Nabin Dhakal
 
PDF
interacting-with-ai-2023---module-2---session-3---handout.pdf
cniclsh1
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
Dealing with JSON in the relational world
Andres Almiray
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PPTX
CONCEPT OF PROGRAMMING in language .pptx
tamim41
 
PDF
From Chaos to Clarity: Mastering Analytics Governance in the Modern Enterprise
Wiiisdom
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PPTX
PowerISO Crack 2025 – Free Download Full Version with Serial Key [Latest](1)....
HyperPc soft
 
EO4EU Ocean Monitoring: Maritime Weather Routing Optimsation Use Case
EO4EU
 
Continouous failure - Why do we make our lives hard?
Papp Krisztián
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
GridView,Recycler view, API, SQLITE& NetworkRequest.pdf
Nabin Dhakal
 
interacting-with-ai-2023---module-2---session-3---handout.pdf
cniclsh1
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Dealing with JSON in the relational world
Andres Almiray
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
CONCEPT OF PROGRAMMING in language .pptx
tamim41
 
From Chaos to Clarity: Mastering Analytics Governance in the Modern Enterprise
Wiiisdom
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PowerISO Crack 2025 – Free Download Full Version with Serial Key [Latest](1)....
HyperPc soft
 

Modular Java

  • 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 iniatiave) 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.
  • 18. Modularity on top of the platform: OSGi Q: So what is an OSGi runtime ? A: 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.
  • 19. 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: com.java2days.seminar.demo.Activator Bundle-Vendor: java2days Require-Bundle: org.java.jigsaw.core, org.java.jigsaw.extensions Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Service-Component: OSGI-INF/service.xml Import-Package: com.java2days.seminar.jigsaw.shared;version="1.0.0“ Export-Package: com.java2days.seminar.demo.utils
  • 20. 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
  • 21. Modularity on top of the platform: OSGi OSGi continues to evolve …
  • 22. Live Demo Modularity on top of the platform: OSGi
  • 23. Modularity of the platform: Jigsaw
  • 24. 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
  • 25. Modularity of the platform: Jigsaw The JDK is monolithic …
  • 26. 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
  • 27. 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
  • 28. Modularity of the platform: Jigsaw Modularization of the Java platform is a significant change that impacts the entire ecosystem - may even break existing projects
  • 29. Modularity of the platform: Jigsaw Draft 3 of Jigsaw requirements states that application using only standard APIs must remain compatible Draft 3 of Jigsaw requirements also mentions that some JDK-specific APIs must remain compatible but no concrete JDK APIs are listed yet
  • 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. Currently work on Jigsaw is being done for: JEP 200 - define JDK modules (in a modules.xml file in the JDK repo) JEP 201 - reorganize JDK sources into modules and modify JDK build JEP 220 - restructure JRE/JDK images to accommodate modules
  • 32. Modularity of the platform: Jigsaw Q: So what is exactly project Jigsaw ? A: Structure of JDK sources as defined by JEP 201: old src/{share,$OS}/{classes,native}/$PACKAGE/*.{java,c,h,cpp,hpp} new src/$MODULE/{share,$OS}/classes/$PACKAGE/*.java native/include/*.{h,hpp} $LIBRARY/*.{c,cpp} conf/*
  • 33. Modularity of the platform: Jigsaw Q: So what is exactly project Jigsaw ? A: In the early exploratory phase of project Jigsaw there was a proof-of-concept implementation with JDK8 early-access builds (now dropped).
  • 34. Modularity of the platform: Jigsaw Q: So what was exactly the exploratory phase of Jigsaw ? A: Jigsaw POC provided a modularized version of JDK along with additional tools and language support for creating Jigsaw modules. JDK8 early-access builds provided 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
  • 35. Modularity of the platform: Jigsaw Q: What is a Jigsaw module ?
  • 36. 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
  • 37. 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
  • 38. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? 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; }
  • 39. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? A: Module versions are compared using a similar approach as the one used for Debian package versions … The intent is to be able to package a module as an OS-specific package (not applicable for Windows/Mac OS)
  • 40. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? 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; }
  • 41. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? 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);
  • 42. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? 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.*; }
  • 43. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? 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; }
  • 44. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? A: Modules can logically provide other module names (aliases): module com.bgjug.A @ 1.0 { provides com.bgjug.First @ 2.0; }
  • 45. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? A: Modules can have a single entry point module org.bgjug.A @ 1.0 { permits org.bgjug.B; class org.bgjug.A.Main; } the main() method org.bgjug.A.Main is called when invoking: java -m org.bgjug.A
  • 46. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? A: Modules can define multiple views module org.bgjug.A { exports org.bgjug.A.seminar; view org.bgjug.internal.view { permits org.bgjug.B } } the main() method org.bgjug.A.Main is called when invoking: java -m org.bgjug.A
  • 47. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? 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; }
  • 48. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? A: A module can require a service module org.bgjug.B { requires service org.bgjug.A.external.TestService }
  • 49. Modularity of the platform: Jigsaw Q: What is a Jigsaw module in terms of the exploratory phase ? A: A service can also be required optionally module org.bgjug.B { requires optional service org.bgjug.A.TestService; }
  • 50. Modularity of the platform: Jigsaw Q: So why not adopt OSGi (at least the module layer) for modularization of the Java platform ?
  • 51. 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.
  • 52. 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
  • 53. Live Demo Modularity of the platform: Jigsaw
  • 54. OSGi and Jigsaw interoperability: Penrose
  • 55. 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
  • 56. OSGi and Jigsaw interoperability: Penrose Penrose is still in early stage of development … Current work on project Penrose is deprecated due to the dropped proof-of-concept version of Jigsaw …
  • 57. OSGi and Jigsaw interoperability: Penrose Penrose goals: – ensuring OSGi frameworks run unmodified in a 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 metadata
  • 58. 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 APIs – more cross delegation between the two systems …
  • 59. Summary Q: Project Jigsaw - when ?
  • 60. Summary Q: Project Jigsaw - when ? A: Maybe when the Armagedon comes … … or maybe in 2016 …
  • 61. Summary Q: Projects Jigsaw/Penrose - when ? A: Unless you … … discuss: http://mail.openjdk.java.net/mailman/listinfo/jigsaw-dev … and code: http://hg.openjdk.java.net/jigsaw
  • 62. Q&A Thank you Bulgarian JUG mailing list: https://groups.google.com/forum/#!forum/bg-jug
  • 63. 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/
  • 64. 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
  • 65. References Project Jigsaw: Phase Two http://mreinhold.org/blog/jigsaw-phase-two Project Jigsaw: Goals & Requirements Draft 3 http://openjdk.java.net/projects/jigsaw/goals-reqs/ 03
  • 66. 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
  • 67. 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
  • 68. 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
  • 69. 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

  • #6: Some people argue that Java libraries are not modules since they do not provide encapsulation (such as classes and packages).
  • #7: 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.
  • #8: 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.
  • #42: 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
  • #43: 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
  • #44: 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
  • #45: 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
  • #46: 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
  • #47: 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
  • #48: 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
  • #49: The module can use an enhanced version of java.util.ServiceLoader to load the service
  • #50: The module can use an enhanced version of java.util.ServiceLoader to load the service
  • #53: 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.