Thursday, November 10, 2011

OSGi DevCon Subsmissions, You've Got Until Nov 18!



The submission system for OSGi DevCon was supposed to close tomorrow but as seems customary nowadays the submission time has been extended to serve all those people out there that did not have enough time ... So the deadline is now November 18!

We already have an interesting list of submissions but it would be nice to have a larger set. There are so many issues that seem to generate some controversy that I would expect more pundits. Some topics that seem to scream for the use of the wonderful soap box a presentation at OSGi DevCon is:
  • Jigsaw versus OSGi
  • Package imports versus Module dependencies
  • Manifest first like PDE versus manifest as output like bndtools
  • Subsystem versus bundles
  • Inversion of Control versus Delegation of Control
  • Semantic Versioning
  • Relase models
  • Extending type safety into the Module system
  • Statics versus instances
  • Services versus Central control
I would love to see an OSGi DevCon where we get really good discussions trying to get to the heart of these issues, it really can help to further the software industry.  Where are the academics to help us find the answers to these issues? But you are of course also more than welcome to submit your position when you're not an academic!

Of course we also want presentations about experiences (good or bad) or that show interesting products/frameworks based on OSGi.. There is always room and more than enough interest in these presentations.

So given this extra week, you no longer have an excuse not to submit a presentation. Looking at the issues that are currently playing, combined with the enthusiasm of the EclipseCon organization I expect this to become a very good OSGi DevCon/EclipseCon in 2012. You're surely do not want to miss this premier event to interact with the key players in the OSGi eco system.

You can submit here until Nov 18 2012: http://www.eclipsecon.org/2012/submissions-are-open

Hope to see many of you in Reston in March 2012.

Peter Kriens

Monday, October 24, 2011

What to Depend On

Why do we need modularity in the first place? Lets get rid of this extraneous layer and make life simpler as Erlang's Joe Armstrong argues. Then again, maybe not.

The reason we need modules is that Object Oriented (OO) technology is starting to fail us. OO gave us a tremendous boost in productivity for 25 years but it is running out of steam for today's systems and especially for statically typed languages like Java. The reason is simply too much coupling. Using a single class from a library drags in its whole transitive dependency, to run even a simple program we have to download the internet. The independent evolution of these dependencies tend to create nightmares like JAR hell. After assemblers, subroutines/functions, modules, classes, and packages it is time for the next paradigm in software! A paradigm that must explicitly address the problem of too much coupling in Java systems.

Jigsaw and JBoss A7 claim to provide the solution to the dependency pains of Java by providing modularity since modularity provides encapsulation; we all know that encapsulation can reduce coupling. But do they? Sure, they make it much simpler to assemble a large class path because it becomes largely self assembling. However, they do not fundamentally change the way the class path works today. That is, they actually only provide a more convenient way towards JAR hell (Personally, I prefer a slightly different destination).

Worse, the hallmark of modularity, encapsulation, is severely compromised by the Jigsaw/JBoss model and Java's best practices.Virtually all Java code has become contaminated with class loading hacks to fight coupling. Java interfaces provided us with a tool to make clean decoupled class diagrams but at the same time created the problem of instance coupling: how to get the instance that implements that interface. In Java, instance coupling is generally achieved with dynamic class loading hacks. Unfortunately, most of those patterns need to violate the module's boundaries to get access to the client and implementation classes.

Once you see this problem (and it is not obvious), the solution is rather clear: we need a concept to handle the interaction between modules, a contract. Just like a class can implement one or more interfaces (the type contract), a module should be able to provide one or more services (the module contract). A module should depend on the services it needs, not on the JAR that holds those implementations. Exactly like a type should depend on an interface and not on an implementation class.

How to specify the service contract? An interface? The granularity of an interface is too small in almost all of the most trivial cases. In general a contract describes a collaboration between multiple actors, defined in interfaces, abstract or base classes, permissions, utility functions, etc.  Like Jigsaw, could we (ab)use the virtual module as the "interface" of a module? Nope. That model has no representation in the type system and is therefore fundamentally unsafe. It also is wrong to restrict a module to providing a single service; remember why interfaces were added to Java? Only because we had single inheritance and it was felt that the 1:1 relation was too constraining.

The logical choice in Java is obviously the package. A Java package is already the Java module: it provides encapsulation, a namespace, is part of the Java language, is part of the type system, it has a name, can easily be versioned, and it has the proper granularity for a contract. A module should provide a number of packages and depend on a number of packages that specify contracts between the modules. Just like methods provide the contract between classes. Since the dependencies are expressed in packages, modules can be substituted.

Anybody that doubts package imports/exports are a bad idea should consider that OSGi also supports the module-to-module dependency of Jigsaw/Maven/JBoss, it can even separate types. Since each OSGi user has the choice, why do you think that over time they use packages? Maybe because it works?

The need for package imports/exports is crystal clear when you really understand the violation of encapsulation caused by the interaction of the Jigsaw/JBoss programming model and popular Java patterns. Five years from now I might be able to say: "I told you so," but I still have hope that enough people will put in an effort to understand the looming problem to prevent another 5 years lost to the gains of true Java modularity.

Peter Kriens



Saturday, October 15, 2011

Another bndtools Hackathon

The house feels rather silent after 4 days of intense hacking on bndtools with PK Sörelde, Neil Bartlett, Joakim, Stuart McCulloch, David Savage (remote from the UK), and Ferry Huberts here in my house. We closed a lot of bugs and we (well almost) reached our goal to run bndtools on the OSGi build faster than anything else. Then again, maybe I should say we reached our goal since Neil just informed me with Skype from an English bus that he was now really close.

Neil Bartlett started already quite some time ago to create the ultimate OSGi IDE based on Eclipse. Since he was using bnd to do the low level building I convinced him to also use the more advanced build features in bnd, which resulted in a fruitful collaboration. This brought ComActivity into the game. A couple of years ago they hired me as a consultant to help them with their OSGi work. At that time we used bnd as an Eclipse plugin to do the build. Last year they switched to bndtools since it has a much more extensive GUI. PK Sörelde from ComActivity even contributed the version release management tool. With over an increasing number of listeners on the bndtools list we were getting in an area that bndtools needed to become rock solid stable so it could be used by more people. Two weeks ago PK proposed to do an intense round of finalizing open issues and I gladly offered my house.

We also had Stuart McCulloch from Sonatype here to help us out with maven. Since maven is quite popular as an OSGi build tool with the maven bundle plugin, which is based on bnd, collaborating is quite natural. Initially we wanted to do the complete build in bndtools but after brainstorming we found out that we could use the m2-eclipse plugin quite elegantly for building, leaving the bundle development (coding, manifest, debugging, etc) to bndtools. Using m2-eclipse will give us full fidelity with the offline and IDE build.

The coming week we will test the heck out of bnd and bndtools and hope to release a rock solid fast new version next week.

So lots of bugs closed, lots of fun (the weather was fantastic!), interesting discussions, good food, lots of plans, and a very nice result.

Peter Kriens

Monday, October 10, 2011

American Pie

"Steve Jobs died," someone yelled in the San Francisco Hilton lobby. First a wave of sadness descended upon me and then I got angry at myself for giving in to celebritis. Yes, he is a big part part of the tools I use daily to get my work done and he is part of the many Apple gadgets around the house as well as much of their content, as so many people today. And it is likely he will sorely be missed in the coming years for not providing his constant stream of innovations. Every death is sad because something is lost forever but the death of a well known figure should not feel like someone close to you died. So why was it so hard to shake of this sadness?

There is of course the identification: Steve Jobs was only 3 years older, he worked in the same industry, and in moments of grandeur I have envisioned myself as a Steve Jobs if only I had been born a bit earlier and in the US instead of Rotterdam. When someone that plays such a role for you his death confronts you with your own mortality. So was this sadness only caused by a rather solipsistic fear of death?

I guess there was his constant presence through my career. When I soldered my first computer, he made the Apple II. When I designed our newspaper page make-up terminal in the eighties we got inspired by Smalltalk and Steve Jobs was inspired by the Alto, both closely related results from Xerox' PARC Place. Also Postscript, another result of PARC Place, was a shared inspiration though admittedly Apple made it viable with their LaserWriter. Around 1985 I developed an object oriented language called CO2. I had been inspired by Brad Cox, the inventor of Objective-C. So when Steve Jobs came up with the NeXT, largely based on Objective-C, I had to get one. A mind blowing experience only numbed by the excruciatingly slow optical drive.

So maybe the reason for the sadness was not egocentric but more the loss of the rare someone that shared the same enthusiasm for the combination of computers and esthetics. Someone that struggled with the same problems (though he admittedly much more successful than I ever did) in the eighties. Maybe the sadness is caused by losing the subject of a my rather rare envy. Though I share his focus on tomorrow but I do lack his ruthlessness and risk taking nature that is required for great products. His gusto to break backward compatibility only so that tomorrow's product could become better than anything else. I unfortunately tend to cave in because the others really seem desperate to want to have that feature ...

Of course I can rationalize that the almost absolute powers granted to a Steve Jobs are an anomaly and that in general we have to balance the interest of different parties. The route I've taken in my life is to find a better way to develop software, software based on collaboration and open environments like the OSGi Alliance. In such an environment compromises are inevitable but maybe the sadness is caused because Steve Jobs' death shines such a harsh light on all the compromises I agreed to only for backward compatibility and special interests.

And maybe one should not analyze those feelings to deeply and just accept the sadness, it will pass. And maybe after all it is just celebritis; for someone with very few heroes I guess am just not used to it.

Peter Kriens


Thursday, September 8, 2011

Events

These months are quite hectic. I could just finish the draft for the Residential Specification hours before my flight left for the "Masterclass on OSGi" in Stockholm. Neil Bartlett and I had the masterclass in Stockholm because we had been asked to organize it there. We were told there were lots of eager OSGi afficionados that would love to come. In the end we had a single person from Sweden (and he came from the other coast) so from that perspective Stockholm was not good. However, the location, Djüronaset, was absolutely fantastic.
This must be one of the best locations in the world to learn OSGi! Beautiful spot, sauna, swimming pool, coffee and tea all day around, and a good conference room. Even the food was excellent. Combine this with a very good class and you have the recipe for  a thoroughly enjoyable week. This was a very international master class as we had people from Holland, England, Belgium, Sweden, Germany, US, Bulgaria, and Serbia. And one, ehh, guess Australia. Gerd Wütherich had brought Sheepie, a toy sheep secretly put in his backpack by his daughter. Sheepie had many adventures during the week, all photographed by Nils Hartmann for the book about Sheepie. I think we could actually provide Sheepie with the Masterclass certificate because she became an OSGi master along the way.

All participants were experienced so we could focus on the really interesting parts. With an experienced group like this it is possible to really discuss problems people have in day to day practice. Those 4 days were gone before we knew it and saying goodbye was actually hard. We are looking for a similar location on the East coast of the US so if you have suggestions, let us know. Believe, this is fun.

The rest of the week was largely catching up after having been glued to my Framemaker for almost three months. And of course doing the chores for the different events that are coming up. First the OSGi DevCon in Reston, VA next march. The Call for Papers will go out next week and we have started planning the details. Not much time for this as next week we have a meeting in Palo Alto, CA for a combined CPEG and EEG meeting. I had promised many people to provide feedback to their work so that is taking my time.

And then, last but absolutely not least, the OSGi Community Event! This year in Darmstadt, hosted by Deutsche Telekom. The Community Event Puzzle was solved but I will not give out the answer, really interested to see how many people found the word. You can tell me next week! Really looking forward to this event, hoping to meet the OSGi crowd and more. I am moderating a panel about "The Future of OSGi", a subject you can understand that is close to my heart. I've lined up some great people so this will be very interesting. I'll be flying to Darmstadt right after the weekend that I returned from California. I sure hope to see you there.

Then after returning from Darmstadt another week playing catchup so that the week after I can go to JavaOne where BJ Hargrave and I have 3 events going on. An OSGi BOF, a presentation about "Why OSGi?" (Isn't it obvious) and "Migrating to OSGi Services First." And then it is already October ...

Busy busy busy ...

Peter Kriens

1. Updated West coast to East coast


Wednesday, August 24, 2011

A Puzzle for the Community Event

Next month we're having the community event in Darmstadt, Germany, Sept. 20 and 21 (with Alex Blewitt as keynote btw). Now before you click away because you were just hoping for some juicy Jigsaw information, I'd like to challenge you! I was inspired by Masquerade, an amazing puzzle book, after seeing a documentary about it on BBC 4. I therefore decided to create my own puzzle. Not in the league of Masquerade but I think it is sufficient complex to keep some geeks like us busy. The first prize is a free registration for the Community Event. It also happens to be the only prize (and I'll buy you a drink at the Community Event if you found all the answers).

If you're really clever enough to solve it but just too slow to win then do not hesitate to send me a mail because I am interested in anybody that is clever enough to solve this puzzle.

Kit Williams, the author of Masquerade went into recluse after his puzzle went viral in the late seventies. He is living in a hideaway in Gloucestershire in England still making amazing art but in general shying away from public. I am pretty sure this puzzle is too geeky to get that kind of following.

Anyway, go solve the puzzle if you can!

Peter Kriens



Thursday, August 18, 2011

Join us for the Community Event, 20&21 September 2011

It is time to register for the OSGi Community Event in Darmstadt September 20 & 21! We have a really good agenda this year and lots of OSGi people will be present. Looking at the lunches map, we should have quite a lot of attendants as we're in the heart of the OSGi Continent.

I'll be chairing a panel on "What Are the Major Tasks to Tackle Within the Next Two Years?" and I will be looking forward to your input.

If you register in the next two days you will get a substantial early bird discount.

I hope I will see you in Darmstadt next month!

  Peter Kriens