Showing posts with label modularity. Show all posts
Showing posts with label modularity. Show all posts

Wednesday, July 22, 2009

R4.2: Next release of OSGi, and what's next

Alex Blewitt posted a great write up to InfoQ of Peter Kriens' recent presentation on the next release of OSGi, which is called R4.2.

This release started in September 2006 with the OSGi Enterprise Workshop. When I volunteered to co-chair the EEG in December I remember being told it would take about two years to get the release out. Pretty close I guess...

The presentation is kind of long (112 minutes), but well worth watching if you're interested in OSGi, or in hearing Peter's view of what's gone wrong with the Java Modularity initiative as currently defined in the JSR 294 community (of which he is a member) and how to fix it.

The new features in R4.2 are spread across the Core and Compendium parts of the , but the major changes in R4.2 are being driven by enterprise requirements, primarily represented in the Remote Services (formerly RFC 119) and Blueprint Container (formerly RFC 124) additions to the Compendium. The new service registry hooks in the core were similarly based on enterprise requirements (specifically from the Remote Services work).

But of course not done with the enterprise requirements. The EEG is meeting again next week, primarily to continue working on the Java EE component mappings Peter briefly references, which we hope to publish at the end of the year in an "Enterprise Profile" document, and start thinking about what's going to be in R5, scheduled for June 2010.

And we need to continue working on application metadata and the OSGi Bundle Repository definitions (despite the fact that Peter doesn't want to define an application ;-). The main reason for this is to provide a better foundation for the kind of development lifecycle tooling commonly used for enterprise application development.

We have made a good start, but there's lots more to do. Meanwhile the debate continues about whether or not it's a good idea to use OSGi for developing enterprise applications directly, or only indirectly through its incorporation in products.

R4.2 represents a significant step in this direction, but we still have a lot to do.

Thursday, June 11, 2009

OSGi Standard Questions

In my role as OSGi Enterprise Expert Group co-chair, I get a lot of questions about OSGi. I thought I'd post some of the more interesting ones here.

First, I was very surprised to hear someone from a large end-user organization say that they would be very interested in using OSGi, if only it were a standard.

The OSGi Specification is as much a standard as any specification developed in the Java Community Process, and more than some. I interpret this as what this person's Java EE vendor has been telling them, privately and in confidence of course, about OSGi.

The OSGi Specification started as JSR 8 back in 1999, and the current version (R4.2) is, as previous versions have been, an evolution of the original work, which was formally handed off from the JCP to the OSGi Alliance at the time. Certainly you could say the scope of modularizing Java (which is the essence of the OSGi Specification, after all) is potentially very broad, and you might question whether its entire potential scope has been standardized.

But you can also look at JSR 291 and see that the previous version of the OSGi Specification (R4.1) has already been officially adopted as a Java specification for a dynamic modularity system. The OSGi Alliance is, if anything, more open than the Java Community Process (and yes, I have participated in each, both at the technical level and the board level - in the case of JCP the former IONA rep elected to the EC reported to me).

Sun has never given up its control over the JCP or any specification it chooses to take the lead on. Anyone can join the OSGi Alliance and participate equally in the development of its specification. This is part of what is meaningful about a standard, that its future direction is open for anyone to participate. No vendor wants to invest a lot in implementing a standard that one of your competitors effectively controls the future of. (Thus the current controversy around the JCP and the whole debate about the future of the Java industry, whether it will continue to fragement etc.)

I suspect what this person really meant was "OSGi is not part of Java EE." That is true. But that is not necessarily a bad thing. I mean, having Java EE based on the OSGi Framework would be great. But having the future of OSGi under the control of the JCP, even to the extent of meeting the requirements of becoming part of Java EE, might not be very helpful to it (or to the future of modular programming in Java).

Before I get on to the next obvious question about Project Jigsaw (which you will notice studiously avoids mentioning OSGi), I want to point out that all Java EE vendors have already adopted OSGi, and built their app servers internally on it (well except JBoss, who has sort of tried to bolt OSGi onto their own microkernel, which seems weird). But they are, so far at least, advising against their customers obtaining the same benefits that motivated them to adopt the OSGi programming model internally - apparently including the argument that "OSGi is not a standard." This does not make sense, at least not for the consumers.

AFIAK Project Jigsaw is Sun's latest attempt to re-invent OSGi, or in any case block OSGi or create a substitute they can control. I understand the potential benefits of modularizing the language itself, and I know that the JSR 294 spec lead (Alex Buckley) spent some time liasing with the OSGi EEG (even attending a meeting and taking the abuse, pretty well anyway - I give him credit for trying to do the right thing), and that JSR 294 (which also studiously avoids mentioning OSGi) in theory is not strictly a documentation exercise for whatever they come up with in the OpenJDK project (which by the way is open in the same sense that the JCP is open - meaning it is under Sun's control), and that also in theory the modularity layer is "pluggable." All of this is sort of meant to indicate that OSGi compatibility or mapping is something the Project Jigsaw folks have in mind, if they are not actually working on it (which they are not as far as I can tell, and they also say nothing about this publicly - apparently only when someone brings up the topic of OSGi).

I was not at Java One this year, so I may have the wrong impression sitting remotely as I am, but my understanding is that the Project Jigsaw talks and demos did not mention OSGi. Nor did the descriptions of the plans for Java 7. So the short answer to the question of whether Project Jigsaw is a threat to Java modularity is that yes, it is.

One more thing to add - I have been following the Project Jigsaw public email list, and from what I could gather what was presented at Java One was more or less equivalent to what they could manage to get done by then. And while the demo looked interesting, and certainly seems to prove they got something working, it also is pretty scary when you think how far away that is from what's already available in the OSGi Framework.

Thursday, March 5, 2009

Modularity Reduces Complexity

It's taken me a while to post, this apologies for that.

The most important thing I got out of Roger Sessions' presentation at the January IASA NE meeting in Boston is that modularity helps reduce complexity.

I'm not sure Roger would put it that way, but I think he'd agree it's part of the solution to reducing the complexity of IT systems. I think his main message was that everyone needs to take reducing complexity into account whenever they're designing or upgrading an IT system. Just as you would design in security or usability, you'd design out complexity. So he says...

I'm starting to think that finding the right methodology, or the approach to software development is more important than ever. Much more important than technology per se. For one thing, I think we have the basic technology we need - operating systems, languages, databases, middleware, Web servers, etc.

For another, this often comes up in the debate over enterprise OSGi. A key issue around adoption of the OSGi programming model for enteprise applications appears to be the learning curve, or the mindset. Constructing applications using services is very different from using APIs, especially when the services support dynamic deployment, dynamic activation, and dynamic update.

Modularity is not limited to the OSGi framework at all, its variations include SOA, Web services, CORBA, .NET, Java EE, Spring, and so on. The potential relationship of complexity to modularity (i.e. as in adopting modularity as a technique to reduce complexity) was therefore the most interesting part of the presentation.

(BTW I realize this list mentions SOA and a list of technologies - typically SOA is mentioned as the approach rather than the technology. And this is correct. The most successful SOA projects I know of succeeded because of their "governance" - and I mean this in the logical sense of how people and projects are governed, not anything to do with registry or repository products. I believe the same will be true for finding industrial methods and reducing complexity through modularity.)