Tuesday, October 22, 2013

OSGi BOF at OSGi Community Event

The OSGi Alliance will be hosting an OSGi BOF at the OSGi Community Event next week.  The BOF is scheduled for 19.00hrs on Weds 30 Oct in the Silchersaal room at the conference which is located at Forum am Schlosspark in Ludwigsburg.

Peter Kriens will provide a short introduction to "OSGi en Route" a new initiative from the Alliance which is intended to make it easier for developers to get started with using OSGi.  Peter will be keen to answer any questions and get your feedback and suggestions on this initiative.

As with any BOF the goal is for everyone to participate, so if you have any burning questions, problems, or 'itches you need to scratch' then please join us for the BOF to share them with us.  These can be anything you want to discuss, from a specific problem you are facing with OSGi development, through to more general community or OSGi futures questions.

We had a great BOF at the Community Event last year with fantastic participation and we are looking forward to repeating it again this year.

If you unfortunately aren't able to join us but have something you would like raised feel free to submit a comment to this post or email me and we will try and cover this during the session and will feed back to you.


Monday, October 21, 2013

bndtools 2.2.2!

There is a new release out for bndtools! What is it? Well, bndtools is an Eclipse plugin that provides some very nice tools to develop OSGi bundles, it is also used by the OSGi Alliance itself to build the RI's and run the test suites. Since it is based on bndlib, it provides lots of functions that work well together with the maven bundle plugin, ant, sbt, gradle, and many other build environments. The bndtools plugin provides a friendly environment to develop bundles that automatically can then also be built in a continuous integration setup, using one of the aforementioned plugins.

The 2.10 release was a major release in which we added baselining. This release has many smaller features but definitely did improve a lot of things.

The easiest way to get started (or update) with this Eclipse plugin is through the Eclipse Marketplace (In the rather unexpected Help menu). You can also install it manually from its update site: http://bndtools-updates.s3.amazonaws.com

Enjoy, and let the team know how they are doing ...

   Peter Kriens @pkriens

Are you coming to Ludwigsburg next week?

The OSGi Community Event 2013 is taking place next week in Ludwigsburg, Germany between Tues 29 and Thurs 31 Oct.

We have a schedule that is overflowing with OSGi goodness.  The conference kicks off with a "Mastering OSGi with Ease" tutorial on Tuesday morning. From Tues afternoon to close on Thursday there are 26 OSGi talks ranging from embedded, to enterprise, to cloud and covering topics from development hints, tips and best practices, to case studies on how OSGi is being in the world. In addition Thursday morning sees an OSGi Keynote from Ian Robinson of IBM called Travelling Light for the Long Haul.

The full schedule is available online.

There will also be an OSGi BOF on one of the evenings offering the opportunity to find out more about some of the current OSGi Alliance initiatives and to discuss OSGi opportunities and challenges that you see.  Further details on the BOF will be announced soon.

The Community Event is co-located with EclipseCon Europe and there is still time to register to secure your place.  All attendees also get full access to the EclipseCon Europe conference. Details on registration, location and hotels are available on the Community Event homepage.

There are of course plenty of social activities and opportunities to network with your friends and peers, and of course drink and eat plenty of German beer and food!  Tuesday evening sees a Stammtisch and Cirque d'Eclipse; and a reception will be held on Wednesday evening.

It you are joining us for the Community Event you may also be interested in the popular full day Code Camp that the OSGi Users' Forum Germany are running the day before the Community Event (Monday 28 Oct) - Building OSGi based HTML5 Web Application with Peter Kriens and Neil Bartlett. Full details of the agenda and how to register for this are available here.

If you have any questions please email the OSGi Community Event Program Committee.

We hope you can join us and look forward to seeing you next week.

Tuesday, October 8, 2013

Breaking Bad

In my quest to get OSGi and JPA working together purely through services I ran head on to an API that breaking my code badly: java(x).sql. After making things work on Java 6, BJ Hargrave (IBM) setup a continuous integration build on Cloudbees. Since Java 6 is end of life, he rightly picked the Java 7 JDK. Unfortunately, this broke my program since I was proxying the DataSource and Connection class from java.sql and javax.sql respectively. After inspecting it turned out that Java 7 had added a number of methods to javax.sql.DataSource and java.sql.Connection, effectively killing every driver and delegating proxy in existence since they did not implement these methods in their implementation classes.

The problem is not breaking backward compatibility. JDBC moves on and if you want those features drivers will have to upgrade, fair enough. The problem is that decision to upgrade your database drivers is now tightly connected with the choice of the VM. If you want to run on Java 7, JDBC 4.1 is forced upon you since every previous driver will fail to run on Java 7.

It is illustrating to look at the hoops a database vendor has to jump through to allow its drivers to run on Java 6 and Java 7. It must compile on Java 7 to see the new methods but generate Java 1.6 byte codes to make the code run on Java 6. However, the vendor must be extremely careful not to pick up any methods or classes in Java 7 that are not available on Java 7. An awful illustration of how painful a type safe language becomes when you do it wrong.

In OSGi this would all be no problem*. There would be a semantically versioned javax.sql package that contains the SQL API. Consumers (in general you) of this package would get a lot of backward compatibility and providers of this package (the database vendors) will have to provide new releases for each new API. Since in runtime multiple releases can coexist in the same VM, the choice for which VM will not unnecessarily constrain the choices for a database vendor. It is kind of odd that Oracle, a database vendor, makes such a mess in the API to their databases ...

The java(x).sql disarray is a fine illustration of how aggregation creates constrains between its constituents. It is at the heart of the OSGi package dependency model. The siren song of one huge library that contains everything one could ever need (and much more) should be resisted in lieu of modularity since over the long run, super aggregation creates more problems than it solves.

   Peter Kriens (@pkriens)

* If it was not for the nasty detail that javax.sql is badly intertwined with java.sql and java.sql can only be loaded from the VM's boot classpath because it is a java package. Sigh.

Blog Archive