LWN.net Logo

Project Jigsaw (Mark Reinhold’s Blog)

Java developer Mark Reinhold blogs about the idea of modularizing JDK and other Java components. "The JDK is big—and hence it ought to be modularized. Doing so would enable significant improvements to the key performance metrics of download size, startup time, and memory footprint. Java libraries and applications can also benefit from modularization. Truly modular Java components could leverage the performance-improvement techniques applicable to the JDK and also be easy to publish in the form of familiar native packages for many operating systems. Finally, in order to realize the full potential of a modularized JDK and of modularized applications the Java Platform itself should also be modularized." (Thanks to Nicolas Mailhot).
(Log in to post comments)

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 4, 2008 23:57 UTC (Thu) by allesfresser (subscriber, #216) [Link]

Yeah, good luck with that... I have one word in mind: "inertia". Reorganizing the entire Java platform when lots and lots of people already depend on it being a certain way? And many of those people being corporate developers with lots of legacy code? Hmmm...

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 5, 2008 0:27 UTC (Fri) by drag (subscriber, #31333) [Link]

Well those people can just keep running a older version of java, right?

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 6, 2008 5:35 UTC (Sat) by elanthis (guest, #6227) [Link]

No. Because then libraries end up depending on different versions, and there's no way to use two separate libraries that depend on two incompatible versions of a runtime.

Even in the Open Source world it can take larger projects and libraries to convert to newer runtimes and APIs. In the corporate world, it can take ages.

Breaking compatibility with any major, popular platform consumer just isn't a realistic option if you're trying to deliver a true end-to-end platform rather than just a prepackaged runtime+library kit.

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 6, 2008 16:59 UTC (Sat) by jengelh (subscriber, #33263) [Link]

Which is why we have symbol versioning... Glibc does it for ages already.

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 6, 2008 18:19 UTC (Sat) by nix (subscriber, #2304) [Link]

And it's modelled on the version from... Sun! So I suspect Sun can do
something similar in a modular JDK :)

Exactly.

Posted Dec 5, 2008 14:36 UTC (Fri) by kirkengaard (subscriber, #15022) [Link]

The example of X.org going modular is valuable here. There is a reason that XFree86 did not go modular, or make the other significant changes that X.org has. That reason is inertia, as you say. Developers are used to a continuous development process with rules and aspects of the project that just work the way they are. Discontinuity is the only reason that inertia got broken -- otherwise, any similar effort would have been a minor fork, and likely unsuccessful.

It's the difference between evolution in a static environment vs. under the conditions of punctuated equilibrium. While Sun is in control of Java (I don't expect that to change anytime soon), development will most likely be done in natural progression from the way it is being done now. It would take a punctuation of that equilibrium to bring about this sort of change; its desirability alone will not overcome project inertia.

Exactly.

Posted Dec 5, 2008 18:19 UTC (Fri) by dlang (✭ supporter ✭, #313) [Link]

are you using the xorg modularity as an example of modularity being good? or of it being bad?

I've seen people in the Xorg team comment that going modular did not provide the benifits that they were hoping for and in retrospect they should not have bothered.

Exactly.

Posted Dec 18, 2008 10:52 UTC (Thu) by daenzer (✭ supporter ✭, #7050) [Link]

> I've seen people in the Xorg team comment that going modular did not
> provide the benifits that they were hoping for and in retrospect they
> should not have bothered.

My impression is that's a minority opinion.

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 5, 2008 2:15 UTC (Fri) by jordanb (guest, #45668) [Link]

Blog posts are news now, eh?

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 5, 2008 2:31 UTC (Fri) by sbergman27 (subscriber, #10767) [Link]

Get with the 21st Century Web 2.0 program, Jordan. Bloggers are "Journalists" now. ;-)

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 5, 2008 3:05 UTC (Fri) by drag (subscriber, #31333) [Link]

I'd trust the average blogger before I'd trust the average professional journalist.

It's not so much as malice, but mostly the level of self-delusion about having a bias or not. For most bloggers it's pretty easy to tell were they are coming from, were as journalists try to hide their true feelings. I understand trying to keep to the 'just the facts' and all that, but we are all human.

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 5, 2008 2:33 UTC (Fri) by ncm (subscriber, #165) [Link]

Java vaporware is news, now?

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 5, 2008 10:05 UTC (Fri) by sdalley (subscriber, #18550) [Link]

I found the whole discussion about modularity, or lack of it, in Java, interesting and informative re e.g. _why_ it's so slow to start and takes up such a huge footprint. I'm glad the editor pointed it out.

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 5, 2008 12:04 UTC (Fri) by neiljerram (subscriber, #12005) [Link]

Me too. I'm interested in trying to work out if something similar would be useful for my project (guile). Would be especially interested to hear any LWN reader experience/comments on consequent runtime cost, i.e. the cost of having to dlopen more small libraries, to get everything that an application needs.

Project Jigsaw (Mark Reinhold’s Blog)

Posted Dec 6, 2008 10:58 UTC (Sat) by muwlgr (guest, #35359) [Link]

.Net is as big. But consumer software vendors don't mind redistributing it in one blob with their software (often taking most part of the blob), just in case it is not installed on the target system. Like, ATI Catalyst drivers, HP printer drivers&software and whatever else. You would not require a separate action from the consumer, like, "first go to Microsoft, download .Net and install it". You would have to expect an excessively smart consumer to act properly on these requirements.

Sometimes I heard from developers, "how would we distribute our software written in scripting language? We would have to add the whole runtime of this language to each distributed copy, and this would be heavy". Look, .Net software writers have solved the same problem in exactly this way. Very few people seem concerned about this now. Internet is fast and cheap, and digital media capacity is more than sufficient.

In early years of Java (~1996?) I heard about classloader that would load missing classes from the Internet (later this idea had been swept under the carpet as insecure and unreliable one). Why not resurrect it today ? Load missing classes from the vendor only if you use them, cache them locally, sometimes expire/refresh them. Today, encryption, certificates and digital signing are common things.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds