<< An Interesting Experiment: Sapir-Whorf Hypothesis | Home | Java News Brief (JNB): Migrating To JUnit 4 >>

I've Heard This Story Before

Alex Miller: I was happy to see that InfoQ took up the JSR 277 / JSR 291 stuff again and did a pretty good job weaving together the recent activity (including my own call to interest on the subject).

...

So I then have to ask whether JSR 277 is re-inventing the wheel (to some degree) only to split the market and hurt the overall community. This is a somewhat rhetorical question of course. I believe that everyone involved here is truly trying to build something great. But sometimes I think we need to step back and see the bigger long-term picture and ask some questions about our goals.

Somehow I feel I've heard this story before:

  • Some feature was developed outside the JDK to fulfill a need. And then a similar but different feature is incorporated into the JDK. The first example of such a feature is the Collections API. It offered functionality similar to a commercial product whose name I can't even remember. A second example is the Java Logging API, which in theory should have eclipsed Log4j by now. But Log4j is still being used.
  • A component system is introduced into the JDK with the hope that it will create a vibrant third party component market. The promise is always the same: you can go out and buy a commercial package of ready made components and just plug them in to your project and development time will be cut in half. On top of that, you can assemble your applications with a GUI and a hundred drag-and-drop monkeys. The JavaBeans specification is the first attempt at this. (But how many JavaBeans did you buy last year?) The EJB specification is the second example. It is a huge win—for IBM and BEA—for a few years (and we are all saved by JBoss and then Spring and Hibernate). But did anybody sell any ready made EJBs that can be just dropped into any application server and just worked? And did you remember to turn off the light when your stateful session bean passivates?
  • And then there is the entity bean vs. session bean story. I've heard this story in one of the earlier NFJS symposiums from Bruce Tate. In the early days of the EJB specification creation, there are conflict proposals for how an EJB should be implemented. One proposal, by Oracle if I remember Bruce's story right, is centered around a relational database. Another propose, I forgot by which company, could be Sun or IBM, has a different proposal that does not involve a database. And the EJB 1.0 specification included both as a compromise. And neither was adequate.
  • The Java Generics feature was debated heatedly back in the days just like the current debate, with erasure at the center of the debate. And the wrong side won. As a result, the JDK now contains a Generics feature that is less elegant than the similar feature in C#/.NET.
  • The JDO people yelled and screamed at the EJB people when JPA (EJB 3) was being proposed. To a lot of JDO user's mind, EJB 3 was reinventing a lesser round wheel. But EJB 3 prevailed.

I have no doubt that both sides of the current debate are trying to make Java based systems more modular. But I don't know how the current debate will play itself out. I just wish those involved, especially the big vendors (Sun and IBM, etc.) would put the interest of the community in front of the interest of their company and produce something that's unifying and useful.

Tags :


Re: I've Heard This Story Before

IBM, entity beans. Oracle, session beans.

Another tidbit: Sun started OSGi.

I'm really tired of hearing the "why reinvent the wheel?" argument. I get that a lot with Guice. I'm sorry, but sometimes you just need to start over, especially if the existing product/spec has a bad API and/or a lot of legacy cruft. In Guice's case, we already have something significantly better, and it's going to continue to shoot ahead.

I'm sure OSGi is fine for some people, but I'd rather see something simpler and better integrated at the language level.

Re: I've Heard This Story Before

Thank you for straightening out the entity vs. session bean story.

I didn't know that Sun started OSGi.

Thanks for pointing these out.

When both technologies are released, developers will choose the one technology that will solve their problem simply and elegantly.

Just thinking about this reminded me of another story: the story of RMI-IIOP. I wonder how much network traffic on corporate networks is IIOP with RMI-IIOP being one end of the conversation.

Re: I've Heard This Story Before

TMK, RMI doesn't have a standard wire protocol which means RMI-IIOP also enables interoperability between vendors.

Re: I've Heard This Story Before

I don't really have a problem with creating something new either. And I would also like something that is more tightly integrated with the core Java environment - I'm not opposed to baking this in. The thing that worries me is how the existing installed OSGi base (which by the time of Java 7 adoption will be quite large) can make use of it. It seems like in some areas of overlap that the choices are being made differently and perhaps incompatibly.

Re: I've Heard This Story Before

You are thinking of JGL http://www.stanford.edu/group/coursework/docsTech/jgl/

Re: I've Heard This Story Before

Yes. JGL it is.

Component systems

Eclipse uses OSGi as its plugin system, so users can grab new plugins from "update sites" or even just drop them into the plugins directory. So component systems sometimes turn out better than the blog suggests.

OSGi has a lot of features and it's always easier to produce something smaller and simpler when starting from scratch. However, I'd say very little of OSGi is "cruft". The features are a result of four versions of real world usage. Similar features are slowly creeping into JSR 277 before it has shipped v1 as the set of requirements is essentially the same as for OSGi.


Add a comment Send a TrackBack