Tag Archives: Jigsaw

Discovering Jigsaw, the new major java 9 feature.


Discovering Jigsaw, the new major java 9 feature.

The goal of Project Jigsaw is to design and implement a standard module system for the Java SE Platform, and to apply that system to the Platform itself and to the JDK. It was postponed many times, it’s planed now for java 9 and until now no announcement from oracle that it’s postponed again.

Here’s what Mark Reinhold said about the motivations behind the Jigsaw modular system:

A standard module system for the Java Platform will ease the construction, maintenance, and distribution of large applications, at last allowing developers to escape the “JAR hell” of the brittle and error-prone class-path mechanism.

It sounds very good, but It Isn’t the same motivations as the mature OSGi? especially since they are many known java applications using it like Eclipse  and JDeveloper. Why waiting for many years to provides another module system?

A first possible explanation , is that the JRE itself needs to be modular. and in this case a modular system must be managed by the JRE, and not by an external container like OSGi.

Jigsaw has two major benefits :

OSGi: the gateway into micro-services architecture


OSGi: the gateway into micro-services architecture

The terms “modularity” and “microservices architecture” pop up quite often these days in context of building scalable, reliable distributed systems. Java platform itself is known to be weak with regards to modularity (Java 9 is going to address that by delivering project Jigsaw), giving a chance to frameworks like OSGi and JBoss Modules to emerge.

When I first heard about OSGi back in 2007, I was truly excited about all those advantages Java applications might benefit of by being built on top of it. But very quickly the frustration took place instead of excitement: no tooling support, very limited set of compatible libraries and frameworks, quite unstable and hard to troubleshoot runtime. Clearly, it was not ready to be used by average Java developer and as such, I had to put it on the shelf. With years, OSGi has matured a lot and gained a widespread community support.

The curious reader may ask: what are the benefits of using modules and OSGi in particular? To name just a few problems it helps to solve: