<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-18772002</id><updated>2008-07-03T17:08:56.169Z</updated><title type='text'>OSGi Alliance Blog</title><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default?start-index=26&amp;max-results=25'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml'/><author><name>OSGi Alliance</name><uri>http://www.blogger.com/profile/03796133538243294756</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>112</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18772002.post-6775570255633795095</id><published>2008-07-02T06:04:00.004Z</published><updated>2008-07-02T08:28:30.523Z</updated><title type='text'>QVO VADIMUS?</title><content type='html'>We are seeing more and more outlines appearing for the next OSGi release. One of the major issues is legacy code. Not only inside the OSGi, but if you go to the web you see a lot of people struggling to get old code to work inside OSGi frameworks. Obviously, we want to mitigate the issues around legacy code as much as possible, the more people that use OSGi the better. However, lately I have some (personal, this absolutely is not an OSGi standpoint!) musings about how to attack the issue of legacy code.&lt;br /&gt;&lt;br /&gt;A short story to illustrate my musings. In the eighties, I worked on a page-makeup terminal for the newspaper industry. Petr van Blokland, a graphic designer turned computer specialist, introduced me to the layout grid. This grid had columns and between the columns there was a small gutter. Text and pictures were placed on this grid, usually encompassing multiple columns and gutters. Like:&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;img src="https://www.osgi.org/wiki/uploads/Blog/grid.png" /&gt;&lt;/center&gt;&lt;br /&gt;The OSGi always reminds me of this grid. Why? Because they both restrict you severely but in return they provide simplicity. Instead of having infinite freedom to do whatever you feel like, you must obey some pretty basic rules, which some people find upsetting. But what you get back is that the elements work together as a whole, instead of fighting with each other.&lt;br /&gt;&lt;br /&gt;Layouts done with this grid almost invariably look good with no effort (try working with the average layout manager in Swing or SWT!). The advantage is that elements always line up and there is always the same space between elements. Without a grid, it is very hard to avoid unwanted visual effects.&lt;br /&gt;&lt;br /&gt;Genuine OSGi bundles almost invariably collaborate with each other without much effort (anybody saw the combination Eclipse and Spring coming?) because modules are self-contained and can only export packages and communicate via services instead of the myriad of ways people have devised in Java.&lt;br /&gt;&lt;br /&gt;Interestingly, both are achieved by &lt;i&gt;restricting ones freedom&lt;/i&gt;, the opposite of providing more features. But neither OSGi nor this grid is simplistic. A simplistic grid would be a square 8x8 grid, and they just do not work. A simplistic OSGi would be some Class.forName based system without handling versions and dependencies. Both OSGi and the grid seem to be in a sweet spot: simple but not simplistic, providing maximum bang for the buck.&lt;br /&gt;&lt;br /&gt;However, legacy code seems to be forcing us to add more and more mechanisms to the OSGi specification. Unfortunately, these mechanisms are often also then used for new OSGi applications because the legacy concepts they represent feel familiar to people. See how many people use Require-Bundle and fragments.&lt;br /&gt;&lt;br /&gt;If we add all these freedoms to the next generation, will we not pollute the original model and become in the end much less attractive? Or, if we do not make it easier to use legacy code, will people turn away because they feel affronted that their direct needs are not addressed? Should we leave these issues to framework implementations making legacy code not really portable?&lt;br /&gt;&lt;br /&gt;The current popularity of OSGi seems to allow the OSGi to make a stand. What do &lt;i&gt;you&lt;/i&gt; think?&lt;br /&gt;&lt;br /&gt;&lt;a style="margin-left: 20px;" href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/07/qvo-vadimus.html' title='QVO VADIMUS?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=6775570255633795095&amp;isPopup=true' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/6775570255633795095'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/6775570255633795095'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-401071185705982790</id><published>2008-06-17T14:43:00.005Z</published><updated>2008-06-18T08:12:04.240Z</updated><title type='text'>JSR 277 and Import-Package</title><content type='html'>&lt;img style="padding: 10px;" src="http://www.aqute.biz/uploads/About/peter120x120.gif" align="left" /&gt;It looks like Sun is not convinced that Import-Package is a good idea. On the &lt;a href="http://mail.openjdk.java.net/mailman/listinfo/jsr277-eg-observer"&gt;JSR 277 mailing list&lt;/a&gt; there was an interesting discussion about the dependency model: Does Import-Package have value over Require-Bundle (to use the OSGi terms)?&lt;br /&gt;&lt;br /&gt;Require-Bundle has an intuitive appeal that is hard to deny. These are the artifacts on the class path during compile time and there is a clear advantage to have these same artifacts during deployment. Import-Package is cumbersome to maintain by hand and basically requires tools like &lt;a href="http://www.aqute.biz/Code/Bnd"&gt;bnd&lt;/a&gt;. Besides, the whole world seems to use the Require-Bundle model (maven, ivy, netbeans, ...). So, who would ever want to use Import-Package?&lt;br /&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: right; cursor: pointer; width: 160px;" src="https://www.osgi.org/wiki/uploads/Main/chewing-gum-heel.jpg" alt="" border="0" /&gt;Well, have you ever had chewing gum in your hair?&lt;br /&gt;&lt;br /&gt;The harder you try to remove it, the more entangled it gets? This is what Require-Bundle gives you. Import-Package is more like &lt;a href="http://www.hasbro.com/playdoh/"&gt;Play-Doh&lt;/a&gt;. It is still better not to have it in your hair, but you can ask any kindergarten teacher what she prefers!&lt;br /&gt;&lt;br /&gt;So, now we have the right mental image, what is the technical reason for this stickiness? I see two reasons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Require-Bundle gives you much more than you actually &lt;i&gt;use&lt;/i&gt; because your class files just do not refer to it, a key advantage of a static typed language. Now before you jump to the conclusion you do not care because it is free, realize that there is rent to pay for these &lt;i&gt;unused&lt;/i&gt; parts. These unused parts have their own dependencies that need to be satisfied; so they've has just become &lt;i&gt;your&lt;/i&gt; dependencies. Visualize the chewing gum in that strand of hair? Dependencies are annoying, and unnecessary dependencies are worse, but these kinds of tied dependencies can be a death knell if they turn out not to be compatible with yours when your code is combined with other bundles to create a system.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;You depend on the whims of the bundle's author. He usually has no clue what parts of his bundle are used and is already busy working on the next version. He will make decisions based on his needs, not yours. It is therefore likely that the constituents in the bundle will change over time. How can you be sure that this migration happens in a way that is compatible with your bundles? Not only can the next version bring quite unnecessary and unexpected new dependencies, it might actually remove the actual packages you depend on. Unfortunately, your bundle resolves because the bundle you require is present, but its changes were just not compatible with your expectations so you get a Class Not Found Exception in the middle of shutting down this nuclear reactor.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The underlying reason for this problem is lack of cohesion. Cohesion is the measure of how much the code in a JAR is related. For example, utility packages or bundles often have quite low cohesion. For example, the Apache Derby SQL database contains a very interesting file system abstraction that is highly usable without Derby. That is, the cohesion between the core SQL database code and this abstraction is very low. The core Derby uses it, but it is not pertinent to being a SQL database. This is common practice because we programmers really dislike to get lots of puny little artifacts.&lt;br /&gt;&lt;br /&gt;It is a fact of life that the cohesion in most JARs is quite low while the cohesion in packages is very high. As an example, the Apache Derby file abstraction is nicely packaged in a specification package and an implementation package. Why not extract it one day? Well, I am fine with this improvement and it would not affect any of my bundles at all. Import-Package does not care what bundle provides the package. If I had not warned them so often, I would feel sorry for all my colleagues that just had their bundles broken by a lone programmer somewhere in the world ...&lt;br /&gt;&lt;br /&gt;Two very practical use cases that illustrate these problems. Eclipse, who heavily relies on Require-Bundle, needed to support SWT (the graphics library) on the embedded platform and on the SE platform. The embedded platform needed to be a subset of the SE platform. Unfortunately, all users of SWT had been using Require-Bundle. This made the simple solution, refactoring the SWT bundle in two bundles, impossible because it would break each and every Eclipse plugin. Bundles that used Import-Package would have been oblivious of this change.&lt;br /&gt;&lt;br /&gt;The other use case is described in a recent blog: &lt;a href="http://ekkes-corner.blogspot.com/2008/06/catch-22-logging-with-osgi-frameworks.html"&gt;Catch-22 Logging with OSGI Frameworks &lt;/a&gt;. It is a rather long story but it boils down to that he could not combine two libraries due to unnecessary constraints caused by Require-Bundle with respect to logging. If you have the masochistic desire for the same sensation as having chewing gum in your hair, I recommend to read this blog.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/06/jsr-277-and-import-package.html' title='JSR 277 and Import-Package'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=401071185705982790&amp;isPopup=true' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/401071185705982790'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/401071185705982790'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-6427282513783266731</id><published>2008-06-05T13:19:00.002Z</published><updated>2008-06-05T13:45:58.758Z</updated><title type='text'>Community Event</title><content type='html'>You did not forget to register yet, did you?&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="https://www.osgi.org/wiki/uploads/Main/berlin.jpg" /&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;See you next week in Berlin!&lt;br /&gt;&lt;br /&gt;  &lt;a href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;P.S. As an extra bonus we will host an &lt;a href="http://www.se-radio.net/"&gt;SE Radio Interview&lt;/a&gt;! Shouldn't miss it if I were you!</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/06/community-event.html' title='Community Event'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=6427282513783266731&amp;isPopup=true' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/6427282513783266731'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/6427282513783266731'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-2000457852049846537</id><published>2008-05-30T07:41:00.007Z</published><updated>2008-05-30T10:22:17.914Z</updated><title type='text'>Is 9903520300447984150353281023 Too Small?</title><content type='html'>JSR 277's Stanley Ho &lt;a href="http://weblogs.java.net/blog/stanleyh/archive/2008/05/versioning_in_t_1.html"&gt;published a rationale&lt;/a&gt; why (in the so far unpublished EDR2) JAva Modules (JAM) invent a brand new version scheme. A rationale that needs a &lt;span style="font-style: italic;"&gt;lot&lt;/span&gt; of text. I could go in painstaking detail, but I think the rationale derails in one of the first paragraphs where the requirements are (implicitly) described. I highlighted the part that describes in what kind of situations you use the major, minor, micro, update, and qualifier version parts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(204, 204, 204);"&gt;Major version number should be incremented for making changes&lt;/span&gt; &lt;span style="color: rgb(204, 204, 204);"&gt;that are&lt;/span&gt; not backward-compatible. &lt;span style="color: rgb(204, 204, 204);"&gt;The minor and the micro numbers should then be reset to zero and the update number omitted.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(204, 204, 204);"&gt;Minor version number should be incremented for making medium or minor changes where the software remains &lt;/span&gt;largely backward-compatible (although minor incompatibilities might be possible)&lt;span style="color: rgb(192, 192, 192);"&gt;; the micro number should then be reset to zero and the update number omitted.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(204, 204, 204);"&gt;Micro version number should be incremented for changing implementation details where the software remains &lt;/span&gt;largely backward compatible (although minor incompatibilities might be possible)&lt;span style="color: rgb(204, 204, 204);"&gt;; the update number should then be omitted.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(204, 204, 204);"&gt;Update version number should be incremented for adding bug fixes or performance improvements in a &lt;/span&gt;highly compatible fashion.&lt;/li&gt;&lt;li style="color: rgb(204, 204, 204);"&gt;Qualifier should be changed when the &lt;span style="color: rgb(0, 0, 0);"&gt;build number or milestone&lt;/span&gt; is changed.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Can you spot the difference between &lt;span style="font-style: italic;"&gt;minor&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;micro&lt;/span&gt;? I can't, and that is the reason that OSGi  proposes the following convention: incompatible (major), backward compatible (minor), no API change/bugfix (micro), and builds or variations (qualifier). That is, our &lt;span style="font-style: italic;"&gt;micro&lt;/span&gt; is Sun's &lt;span style="font-style: italic;"&gt;update&lt;/span&gt; because Sun's &lt;span style="font-style: italic;"&gt;minor&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;micro&lt;/span&gt; appear to have an identical purpose.&lt;br /&gt;&lt;br /&gt;And ever thought about the concept of &lt;span style="font-style: italic;"&gt;largely backward compatible&lt;/span&gt;? Isn't that something like a &lt;span style="font-style: italic;"&gt;little bit pregnant&lt;/span&gt;?&lt;br /&gt;&lt;br /&gt;There are always reason to improve on existing schemes, but any improvement should be balanced against the interests of the existing and future audiences. I am not stating that the OSGi version is the mother of all version schemes, we are as fallible as all of us. Maybe we were too rationalistic; we looked at a lot of schemes and saw how people were also looking for more room at the low-end of the version scheme and hardly ever incremented the first numbers. If you standardize there is always a tension between allowing as much freedom as possible but also minimizing the complexity of the implementations that are depending on the variations you offer. We chose simplicity.&lt;br /&gt;&lt;br /&gt;Is the OSGi scheme usable? Well, we have no outstanding requirements or bugs in this area, nor were any proposed in JSR 291, while at the same time it is heavily used. Jason van Zyl, Maven, told me they were thinking of adopting the scheme as well. SpringSource converted almost 400 open source projects to bundles and they did not complain. Seems there is a lot of practical usage out there.&lt;br /&gt;&lt;br /&gt;Wouldn't it be a lot more productive  for &lt;span style="font-style: italic;"&gt;all&lt;/span&gt; of us if Sun would just adopt the OSGi scheme? There is lots of work to do on the module API, why not reuse existing specifications where you can? And if the OSGi scheme has burning issues, why not report that as a bug or change request, after all Sun is a distinguished OSGi member.&lt;br /&gt;&lt;br /&gt;With an infinite number of builds or variations, 9903520300447984150353281023 possible bug fixes (80.000 fixes per microsecond until the Sun implodes), 4611686014132420609 backward compatible changes, and 2147483647  incompatible releases, the OSGi spec seems to have enough room to breathe for mere mortals.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;P.S. You did register for the &lt;a href="http://www.osgi.org/CommunityEvent/HomePage"&gt;OSGi Community Event in Berlin, June 10-11&lt;/a&gt;? Please do so, we have a very strong program prepared with lots of cool demos. Hope to see you there!</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/05/is-9903520300447984150353281023-too.html' title='Is 9903520300447984150353281023 Too Small?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=2000457852049846537&amp;isPopup=true' title='7 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/2000457852049846537'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/2000457852049846537'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-5223613086707268662</id><published>2008-05-27T15:07:00.003Z</published><updated>2008-05-27T17:20:04.346Z</updated><title type='text'>BUGs I Like!</title><content type='html'>Last week I blackmailed Ken Gilmer of &lt;a href="http://www.buglabs.net/"&gt;Buglabs&lt;/a&gt; into finally sending me an evaluation set. He had promised me this set for some time and I wanted him to show this kit on the &lt;a href="http://www.osgi.org/CommunityEvent/HomePage"&gt;OSGi Community Event on June 10-11&lt;/a&gt; (You did register I hope?). Ken could not come due to other obligations so I promised to make a demo if he would send me an evaluation kit.&lt;br /&gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="https://www.osgi.org/wiki/uploads/Links/box.jpg" alt="" border="0" width="100" /&gt;So yesterday Fedex delivered a nice red box at my doorstep! It is always nice when a company spends a bit of effort on designing the box; this package reminded me of my first TomTom, a company that also took care in making the unwrapping experience fun.&lt;br /&gt;&lt;br /&gt;The content was a BUG with 4 modules. The BUG itself is the core computer that drives (hopefully) cheap modules. The core contains a small LCD, a minimal joystick, a push button and 4 LEDs that can also be pressed. It is powered through a separate (universal) power supply. Unfortunately, the also present small USB connector is not used to power the device; it is only there for the communications with the development computer. A slide-switch acts as on-off button.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="https://www.osgi.org/wiki/uploads/Links/bug_front.jpg" style="margin: 0pt 10px 10px 0pt; cursor: pointer;" /&gt;&lt;/center&gt;&lt;br /&gt;There are 4 modules included:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;LCD Display&lt;/li&gt;&lt;li&gt;GPS&lt;/li&gt;&lt;li&gt;Motion Detector&lt;/li&gt;&lt;li&gt;Camera&lt;/li&gt;&lt;/ol&gt;The modules insert into one of the 4 slots of the BUG, there are no specific positions nor are you limited to a single type per BUG. That is, if you want 4 LCD displays, go ahead and do it. I think the modules should be hot swappable but that did not work for me. Hope that will work in the future.&lt;br /&gt;&lt;br /&gt;The development environment is based on (surprise!)  Eclipse, called &lt;span style="font-style: italic;"&gt;DragonFly&lt;/span&gt;. They told me to use Eclipse 3.3 (Europa) but I decided to live risky and use my current 3.4 Ganymede copy of Eclipse. At least this way I can only blame myself for some of the things that did not work. DragonFly replaces PDE but there are a number of similarities. Also, the manifest file is the driver for the generation. Overall it was very simple to write a new bundle when you are familiar with Eclipse. DragonFly nicely creates a complete project for you with the classpath setup correctly.&lt;br /&gt;&lt;br /&gt;For debugging there is a pretty good emulator that reuses the same Java code and implements the services that abstract the devices. You just ask a project to "Debug As" and the select the Virtual Bug. Very smooth. Once the Virtual BUG is running it appears as a device in the list of Bugs. You can drag and drop your project to these devices and that will install them. This drag and drop interface works very well for device management.&lt;br /&gt;&lt;br /&gt;The runtime is of course the most interesting part of this device. It runs the (now) open source &lt;a href="https://phoneme.dev.java.net/"&gt;PhoneME&lt;/a&gt; project. This is a CDC VM that supports most of the core Java SE libraries. On top of this VM, BUGLabs uses a &lt;a href="http://concierge.sourceforge.net/"&gt;Concierge&lt;/a&gt; framework. Concierge took the decision to not move to Release 4 but stick on Release 3 because of size reasons. This makes my feelings toward concierge slightly ambivalent. Release 4 added some very important changes that I hate to miss. I know that size matters, but the difference is not that dramatic with today's memory prices. Ok, I prefer OSGi over no OSGi, but staying behind on release level is very tricky. Lots of bundles now use the Bundle.getBundleContext() method, like Declarative Services, which is not part of R3. Also, the modularity layer got an important boost in R4. However, the biggest problem is compliance. Concierge was not tested for compliance and with the OSGi's current rules we cannot certify it anymore. During the development of R4 we seriously discussed the problem of the size the new features would take. Siemens, who had their own OSGi implementation for the vehicle market, even did a study to the impact. We very consciously decided that these new features were worth the added memory. I guess there is not much we can do about this, but it is a pity that we now have a split in OSGi, a split which we tried to avoid so hard. Anyway, better an OSGi R3 than no OSGi I guess ...&lt;br /&gt;&lt;br /&gt;I decided to build a little application to get a feel for the whole thing. I decided to build an automatic camera that would take a picture whenever the GPS indicated that you had moved more than 50 meters. The track thus created would then be available over a web interface. Formatted as a &lt;a href="http://code.google.com/apis/kml/documentation/kml_tut.html"&gt;KML file&lt;/a&gt;, it can be displayed in Google Earth. Simple.&lt;br /&gt;&lt;br /&gt;Well, writing the application was quite smooth and the debugger was great. Getting it to run on the device was a bit harder because it just did not take pictures. It took some time to figure out how to use the Concierge shell. Even that did not help, there was something with the GPS service. Anyway, I guess with some help this will work before the community event. See if I can get my trip to Berlin recorded!&lt;br /&gt;&lt;br /&gt;I wish I had had this device while I was working for Ericsson Research in 1998. It is absolutely perfect for trying out automation scenarios. I remember soldering an &lt;a href="http://www.velleman.be/ot/en/product/view/?id=9383"&gt;IO board&lt;/a&gt;, a movement sensor and a mobile phone to demonstrate a burglar alarm system based on sending a picture to the police. This scenario would have been a snap with the BUG.&lt;br /&gt;&lt;br /&gt;So what are the application areas for the BUG? If you are one of those lucky people that can now and then wander from the virtual world into reality, then this is abslutely your device. You get a quite powerful computer that can be extended with a snap, ehh, 4 snaps. Obviously, if you still can get excited of what you can do with computers (like me), then it is just too much fun to miss. And if you give OSGi tutorials, well, this kind of device makes OSGi shine.&lt;br /&gt;&lt;br /&gt;This is not to say they have arrived. BUG labs still has a lot of work carved out for them. The success will depend on amount of modules they can turn out in the coming years. I wish they had developed a &lt;a href="http://www.radioshack.com/product/index.jsp?productId=2734155"&gt;breadboard&lt;/a&gt; module first so other companies and individuals could make modules. In earlier times I played a lot with the PIC processors from Microchip and it would be quite easy to interface these into the system. Also, a &lt;a href="http://www.maxim-ic.com/products/1-wire/"&gt;1-Wire&lt;/a&gt; interface would be really fantastic.  1-wire devices are relatively cheap, and very easy to interface. For a few dollars you could extend a BUG with a temperature sensor, humidity sensor, unique ids, switches, cryptography tokens, etc. Remember the famous Java ring? Well, that was a 1-wire device.&lt;br /&gt;&lt;br /&gt;The development environment and the documentation also require some work. As a true open source project they use a Wiki for their documentation so do not hesitate to help to make the BUG more popular. There is also a need for more BUG modules as well: Wifi, audio in/out, power switches, video, bar code readers, proximity detectors, RFID readers, fingerprint readers, Zigbee I/O, Bluetooth, infra-red, geiger-tellers, etc., etc.. There is a mighty amount of work awaiting them.&lt;br /&gt;&lt;br /&gt;I really do hope other companies will pick up this concept and start to leverage it. Again, I wish I had had this device in 1998 when we were struggling to create demos!&lt;br /&gt;&lt;br /&gt;   &lt;a href="http://www.blogger.com/www.aQute.biz"&gt;Peter Kriens&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;P.S. But what on earth is the Teleporter module going to do???</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/05/bugs-i-like.html' title='BUGs I Like!'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=5223613086707268662&amp;isPopup=true' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/5223613086707268662'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/5223613086707268662'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-8279467563076856615</id><published>2008-05-13T09:32:00.011Z</published><updated>2008-05-16T07:04:39.821Z</updated><title type='text'>Java Modularity</title><content type='html'>&lt;img style="padding: 10px;" src="http://www.aqute.biz/uploads/About/peter120x120.gif" align="left" /&gt; Before JavaOne, there were clearly changes in the air with respect to JSR 277 Modules for Java and JSR 294 Superpackages. The announcement of &lt;a href="http://blogs.sun.com/dochez/entry/glassfish_v3_runs_on_osgi"&gt;Glassfish to support OSGi&lt;/a&gt; and the &lt;a href="https://fuji.dev.java.net/" net=""&gt;project Fuji&lt;/a&gt; (an ESB/JBI implementation based on OSGi) represent a significant mind-shift at Sun. We also saw Stanley Ho's interoperability paper on the JSR 277 mailing list. I therefore was happily surprised when the JSR 277 Java Modularity spec leads, Alex Buckley and Stanley Ho, when they asked me if I still wanted to join JSR 277.&lt;br /&gt;&lt;br /&gt;This question posed a dilemma for me. Was I still interested? Two years ago when JSR 277 started I was rejected and I made a big fuzz about this, which obviously puts a moral burden on me now. Also, the changes around JSR 294 Superpackages definitely inclined me to join. JSR 294 was now folded back in JSR 277 and its course had changed 180 degrees. Instead of an overly redundant poorly thought out model Alex had kicked the bucket under the superpackages draft and proposed the much simpler concept of an access modifier called &lt;i&gt;module&lt;/i&gt;. Though this idea had not been worked out in detail, it clearly was much, much, more feasible. Modules setup this way could be very usable in the OSGi world. My technical me would love to work on this aspect.&lt;br /&gt;&lt;br /&gt;However, JSR 277 now consists of two good (Repository and Language modules) and one bad part (JAM). Just before JavaOne 2008 Stanley had published a brief OSGi interoperability document. This document was not only very thin on details, it also referred in many places to an invisible Early Draft #2 (EDR2). I asked the EG members BJ Hargrave and Richard Hall if they had seen this EDR2, but it was unknown to them as well. I had recently complained about the lack of discussions on the JSR 277 mailing list, so it seems that work had been going on stealthily.&lt;br /&gt;&lt;br /&gt;During the JSR 277 presentations Alex and Stanley it became clear to me that a &lt;i&gt;lot&lt;/i&gt; of work had happened behind the scenes; Without any communications on the mailing lists.  For somebody in the audience it was absolutely not clear that almost everything that was said was never discussed in the EG. How could I participate in an EG if the only option would be to approve work done at Sun behind the curtains? How much change can there be if the unpublished EDR2 is presented at JavaOne as the stable result for JSR 277? Should I join an EG where most of the work was already done? How many fundamental changes can you achieve in this situation?&lt;br /&gt;&lt;br /&gt;I wish it was differently. Bryan Atsatt did a lot of work to convince Sun to open up, and it worked better than one could have expected. So, there is a lot of moral pressure on me to compromise and accept. As several people said: "Sun will not give up their JAMs, so get over it." Now, it is in my nature to compromise; I prefer working together on technical details instead of fighting. However, I just turned 50 years old and I can recall too many painful events where I compromised against my technical instinct. Years later the forces behind the compromise were forgotten and the inferior technical design remained with my name attached to it. I really do not like that and this seems one of those cases.&lt;br /&gt;&lt;br /&gt;So why do I not like JAMs? Well, who needs them? Do they provide something that OSGi not already provides? Alex and Stanley stressed the "fact" that JAMs are "deterministic" and "simple", the Siren's song of &lt;i&gt;simplistic&lt;/i&gt; solutions. Only when you do not fully understand the problem is JAM an attractive solution. The truth is, JAM creates &lt;span style="font-style: italic;"&gt;unnecessary&lt;/span&gt; complexity, the worst of all.&lt;br /&gt;&lt;br /&gt;There is only one argument that makes sense for a special module layer for the VM: The boot classes. Obviously during the boot phase a full-blown OSGi framework is not feasible because OSGi is written in Java. However, JAM will have exactly the same problems loading java.lang.Object because the environment to run the framework is not loaded yet. How do you process annotations without having the Class class loaded? Write an annotation layer in C? I will not even go into initialization and custom module binding support. Clearly, a special solution is required to modularize the core language packages. This problem was also faced by &lt;a href="http://developers.sun.com/learning/javaoneonline/2006/coreplatform/TS-3752.pdf"&gt;Apache Harmony&lt;/a&gt;. They also did not want to support a full blown OSGi framework in their VM, but they did understand the importance of existing standards. Apache Harmony modularized the bootpath classes and provides them as OSGi bundles using the standardized metadata. Because headers are in the manifest and easy to parse, no complex redundancy is required as with JAM's annotation support. Using the same metadata makes a seamless transition possible from booting all the way to running one of the many application servers defined on top of OSGi. For management systems it is ideal if they only have to worry about a single format.&lt;br /&gt;&lt;br /&gt;We are now at a crucial point in time. Though I'd love to participate in the discussions about modules in the Java language and the repositories, I cannot become responsible for a module system in Java that is creating this complexity for no rational reason. I do hope Sun will  take this last step as well, and drop JAM in favor of the much simpler approach of using the OSGi metadata throughout the system. In the last months we have gotten so far! Please?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;P.S. Did you register at the &lt;a href="http://www.blogger.com/CommunityEvent/HomePage"&gt;Community Event&lt;/a&gt; yet? There are only 190 places and I think they will be filled up. After Sun's embrace of OSGi, a lot more people got interested. You surely do not want to miss it. Last week  we finalized the program it looks surprisingly strong.&lt;br /&gt;&lt;br /&gt;P.P.S. Do you regularly read this blog? Do you know you can become an OSGi supporter? This free of charge and it helps us make it more clear to people that you support OSGi, sometimes numbers help, becoming a supporter does help. Of course if you can afford it, we'd love even better to have you as a full member or adopter. Take a look at the &lt;a href="http://www.osgi.org/About/Join"&gt;conditions&lt;/a&gt;. Appreciated!</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/05/java-modularity.html' title='Java Modularity'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=8279467563076856615&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/8279467563076856615'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/8279467563076856615'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-8949898064945029488</id><published>2008-05-06T12:44:00.004Z</published><updated>2008-05-16T11:43:43.715Z</updated><title type='text'>SpringSource Application Platform + Bundle Repository</title><content type='html'>&lt;img src="http://www.aqute.biz/uploads/About/peter120x120.gif" align="left" /&gt; When &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;SpringSource&lt;/span&gt; announced their &lt;a href="http://www.springsource.com/web/guest/products/suite/applicationplatform"&gt;Application Platform&lt;/a&gt; and &lt;a href="http://www.springsource.com/repository/app/"&gt;Bundle Repository&lt;/a&gt; I was very excited. I had been informed something was coming and picked up rumors from the grapevine.The bundle repository was in one word: stunning. I had been looking into providing such a service but had decided that I could not afford it, despite the fact that I think that many companies would really benefit from such a service. This bundle repository must have been a terrible job to do. &lt;span style="font-style: italic;"&gt;Kudos!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Spring Source Application Platform was, however, a bit of a shock. Looking through the documentation I found lots of headers that &lt;i&gt;felt&lt;/i&gt; like &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;OSGi&lt;/span&gt; but that I did not recognize: Import-Library, Import-Bundle, Application, etc. It looked like &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;SpringSource&lt;/span&gt; had &lt;span style="font-style: italic;"&gt;“improved” &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;OSGi&lt;/span&gt; extensively. This was a bit of a shock, especially because they looked so much like standard &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;OSGi&lt;/span&gt; headers.&lt;br /&gt;&lt;br /&gt;I learned over the past 10 years that just adding a number of headers that solve a particular problem usually backfires. Something that sounds really good, does not have to be that good at all when you inspect it from a different perspective. The problem with standards is, is that it is very easy to add something but impossible to remove. You really have to get right as much as possible the first time; it is therefore better to err on the side of leaving things out. Due to the embedded origin of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;OSGi&lt;/span&gt; we have always been extremely careful to minimize the number of feature. Each additional feature require a lot of eyes and discussions and a very thorough analysis before it makes into the specification. Especially today, with a mature specification the feature interaction can be quite painful.&lt;br /&gt;&lt;br /&gt;Do not get me wrong, as a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;practitioner&lt;/span&gt; I do know the importance of  getting things to work and standards, by definition, are not always sufficient. I also know that a standardization process feels sometimes excruciatingly slow when you live in the trenches, and I love experiments.&lt;br /&gt;&lt;br /&gt;However, Eclipse has the same problem, but they have always been a good citizen in this respect. They always added proprietary headers in their own &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;name space&lt;/span&gt;, learned from their experiences, and then proposed a new standard. In all cases so far, the specification process was able to make the concept more general and fit better in the overall &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;OSGi&lt;/span&gt; model. Having a separate &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;name space&lt;/span&gt; was also a convenience for their customers. A specification process will undoubtedly change the semantics, requiring awkward constructs to distinguish between the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;SpringSource&lt;/span&gt; defined meanings and the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;OSGi&lt;/span&gt; defined meanings. I do realize that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;OSGi&lt;/span&gt; does not own the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;name space&lt;/span&gt; in the manifest, and I do regret heavily that we did no better scope our header names, however, this did not seem overly important 10 years ago.&lt;br /&gt;&lt;br /&gt;Why would the standardized version be better? Because more eyes looked at it, from different perspectives (which sometimes can be quite bad for one's ego). One man's convenience is another man's complexity. This is why so far we have always focused on providing the primitives and not convenience functions because convenience is often in the eye of the beholder and can be provided during the development process in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;IDE&lt;/span&gt; or run-time libraries.&lt;br /&gt;&lt;br /&gt;The biggest danger of a standard like &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;OSGi&lt;/span&gt; today is &lt;i&gt;feature creep&lt;/i&gt;. The leanness of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;OSGi&lt;/span&gt; is one of its main attractions for many newcomers. It really took real hard work and untold man hours to make it this lean, believe me. Maybe the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;SpringSource&lt;/span&gt; headers are a significant improvement over the existing specification, maybe they turn out to be superfluous. Time will tell. I guess it is a sign of becoming more popular that companies try to stretch the specification in their world view. However, I do hope that most developers realize that restricting oneself to the standard may sometimes be a little bit less convenient, but it does provide one with a more options and no vendor lock-in down the line.&lt;br /&gt;&lt;br /&gt;So sadly, my feelings are mixed. I love what they have done with the bundle repository, and also many parts of the S2AP look very impressive, &lt;a href="http://neilbartlett.name/blog/2008/05/01/springsource-app-platform-is-a-curates-egg/"&gt;Neil Bartlett's blog&lt;/a&gt; provides an overview that I can very much sympathize with. I know several Spring &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;Sourcerers&lt;/span&gt; and they are very clever and capable people. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;SpringSource&lt;/span&gt; undeniably is meaning a lot for the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;OSGi&lt;/span&gt; organization and the adoption of the specifications. However, multiplying bundle headers feels more like coming from an apprentice than from the experts I know them to be.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.aqute.biz/"&gt;Peter &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;Kriens&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.osgi.org/wiki/uploads/Main/community-event-2008.png" align="left" /&gt;P.S. On a more positive note. We are reaching the first deadline for registration of the &lt;a href="http://www.osgi.org/CommunityEvent/HomePage"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;OSGi&lt;/span&gt; Community event in Berlin, June 10-11&lt;/a&gt;. I am part of the program committee and I can ensure you that it is worth coming. We actually had to split the second day into two tracks because we had so many good sessions submitted. Looking at the number of submissions it will look like we will sell out the places we have this year. This is the premier &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;OSGi&lt;/span&gt; event in Europe, we are really expecting all the key &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;OSGi&lt;/span&gt; people to be there. Take advantage of the early registration fee and &lt;a href="http://www.regonline.com/Checkin.asp?EventId=601153&amp;amp;RegTypeID=135734"&gt;register today&lt;/a&gt;!</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/05/springsource-application-platform.html' title='SpringSource Application Platform + Bundle Repository'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=8949898064945029488&amp;isPopup=true' title='7 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/8949898064945029488'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/8949898064945029488'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-6785096930816524160</id><published>2008-04-28T08:42:00.002Z</published><updated>2008-04-28T09:51:26.417Z</updated><title type='text'>KISS Principle</title><content type='html'>Wikipedia defines this principle as:&lt;br /&gt;&lt;br /&gt;&lt;div style="margin:10px;"&gt;The KISS principle (acronym for "Keep It Simple, Stupid") states that design simplicity should be a key goal and unnecessary complexity avoided. It serves as a useful principle in a wide array of disciplines, such as software development, animation, photography, engineering, and strategic planning.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Today Google Alerts dumped me into two discussions where OSGi seems to be on the wrong side of the divide regarding the KISS principle. The first is an extensive debate in the &lt;a href="http://www.nabble.com/Osgifing-Tomcat-to16830131.html"&gt;dev@tomcat.apache.org mailing list&lt;/a&gt;, the second is the &lt;a href="http://mail.openjdk.java.net/mailman/listinfo/jsr277-eg-observer"&gt;JSR 277 mailing list&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The Tomcat developers have been asked to &lt;i&gt;osgify&lt;/i&gt; their popular web server. This resulted in a discussion that was very interesting to read. Several people seem to have a disdain for the OSGi &lt;i&gt;zealots&lt;/i&gt;  (which I guess is me) but there seems to be a general uneasiness with this request. However, my key trigger for this blog was that in this discussion I noticed that several people regard OSGi as overly complex and heavy. The JSR 277 discussion raised the same problem from another direction. From the JSR 291 interoperation discussion: &lt;i&gt;"I wanted something in Java that was simpler and cleaner that OSGi-users could leverage if they wanted."&lt;/i&gt;. Is OSGi already ossified?&lt;br /&gt;&lt;br /&gt;The key problem to decide this question is, as so often the case, &lt;i&gt;requirements&lt;/i&gt;. Is Java complex? Hard to answer, if you want to write a  "Hello World" it is humongous overkill. If you are writing a large scale web application it is nice to have a solid foundation. The key phrase in the definition of KISS is &lt;i&gt;unnecessary complexity&lt;/i&gt;. Complexity is in the eye of the beholder.&lt;br /&gt;&lt;br /&gt;First, the OSGi API is very small by any measure. There is only one mandatory package that only has 26 class files, including the security and exception classes. And you can already leverage OSGi without writing Java code. Can you call it intrusive when you can turn a JAR into a bundle by adding one or two manifest lines? All the complexity people complain about is optional. That said, I do agree that even optional things create some kind of conceptual complexity. So maybe there is a lot of cruft in the options?&lt;br /&gt;&lt;br /&gt;Let us take a feature like import packages which is often considered hard. Most dependency mechanisms like Maven, Ivy, and also the original JSR 277 are based on the Require-Bundle concept. I.e. you declare a dependency on the &lt;i&gt;wrapper&lt;/i&gt;. &lt;br /&gt;Wrapper based dependency models are simple to understand for us humans. It would work actually very well in practice if JARs would be highly cohesive and not change their constituent packages over time. Which raises the question: Do you want the woman, or the dress?&lt;br /&gt;&lt;br /&gt;We developers have discovered the wonders of refactoring and things &lt;i&gt;do&lt;/i&gt; change. OSGi is a module system, it is about being able to change software while not breaking the deployments. Though import packages might be harder to understand initially than Require-Bundle, Import-Package does create more resilient systems because it minimizes coupling. That is why people that have used both systems usually decide to standardize on Import-Package (and bnd makes this quite easy). &lt;br /&gt;&lt;br /&gt;Similar to the &lt;code&gt;uses:&lt;/code&gt; directive. In the Tomcat discussion it was stated that the uses directives made the manifest unreadable. It was much nicer to create a manifest by hand, it looked better. I do agree from an aesthetic point of view but who reads a manifest? The manifest is intended to be read by the OSGi Framework. The uses directive is an incredible important concept to maintain classpace consistency when the same class can be loaded multiple times through different class loaders. If you have lived in a world where this model is supported, you understand that uses have a very high value because they minimize runtime problems. &lt;br /&gt;&lt;br /&gt;I do not say that OSGi has no unnecessary complexity at all. Obviously, the specification has been evolving over almost ten years. We have to tried to keep it is simple as possible, but we are as fallible as all of us. However, requirements have always come first in OSGi and fulfilling requirements just forbid you to make things too simple because they force you to understand the problem.&lt;br /&gt;&lt;br /&gt;Obviously the key question is, are many of these requirements highly specialized cases  not useful for the majority. Or are they just solving problems that awaits anybody that ventures into the wonderful land of modularity?&lt;br /&gt;&lt;br /&gt;  &lt;a href="http:/www.aQute.biz"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/04/kiss-principle.html' title='KISS Principle'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=6785096930816524160&amp;isPopup=true' title='4 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/6785096930816524160'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/6785096930816524160'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-4700958312246896930</id><published>2008-04-25T09:31:00.003Z</published><updated>2008-04-25T10:12:03.739Z</updated><title type='text'>First book on OSGi at JAX 2008!</title><content type='html'>Last evening I got back from a very pleasant trip to JAX 2008 in Wiesbaden. I was asked to give the best practice and the OSGi modularity presentations. Rod Johnson had already warmed the audience for OSGi with the result that we had to close the room when people where sitting, crawling, and standing everywhere even though there were still 40-50 people standing outside. Good news for OSGi, but I had to give the presentation for a second time that evening at 21.15, where I was surprised that there were still 50-60 people present that late in the evening. The next day was even better  because I got a much bigger room that was also filled. Feels good after gotten used to preaching to audiences of 10 people for so many years.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://luebken.com/wp-content/uploads/2008/03/2635.jpg"&gt;&lt;img style="margin:20px;" width="120px" src="http://luebken.com/wp-content/uploads/2008/03/2635.jpg" alt="" align="left" border="0" /&gt;&lt;/a&gt;I also got handed a copy of the first official OSGi book in the world. The book, written by Gerd Wütherich, Matthias Lübken, Nils Hartmann, and Bernd Kolb.&lt;br /&gt;&lt;br /&gt;This is a thorough book on OSGi (though Equinox biased) that I recommend to anyone who is using OSGi or wants to know more about it. You can buy it at &lt;a href="http://www.dpunkt.de/buecher/2635.html"&gt;d.punkt&lt;/a&gt;. I hope they translate it in English soon. I already read most of the text during my Christmas vacation to help them with a review. Gerd had already shown me on the first day the &lt;i&gt;thank you&lt;/i&gt; section. They had been really nice, and made the thank you in Dutch! Great work! It is great to finally being able to point to a good OSGi book.&lt;br /&gt;&lt;br /&gt;JAX is a great conference, very well organized. Well, there is so much to do that I'll keep it short. Though there is one observation, unrelated to OSGi, I can't help myself making. On the way back with Ryan Air I observed that people can be incredibly rude at jumping the queue, and not just the one that look like it, even elegantly looking older people showed an incredible rudeness. Though I admire Ryan Air for many things, their queue management is non existent, seeming to call out the worst behavior in people. I figured people behaved so badly so that to get the best seats in the plane. However, when I boarded at the end of the queue the emergency seats in the middle were still mostly free. So why are people so much in a hurry that they are jumping the queue? One day I have to debug this, but now back to the build!&lt;br /&gt;&lt;br /&gt;&lt;a style="margin-left:20px" href="http://www.aqute.biz"&gt;Peter Kriens&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;P.S. Talking about books, you can now also &lt;a href="http://www.aQute.biz/Sales/OSGi"&gt;order the specification&lt;/a&gt; (core + compendium) in printed form for a special price.</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/04/first-book-on-osgi-at-jax-2008.html' title='First book on OSGi at JAX 2008!'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=4700958312246896930&amp;isPopup=true' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/4700958312246896930'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/4700958312246896930'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-1384228145038559196</id><published>2008-04-19T14:52:00.008Z</published><updated>2008-04-20T15:40:23.624Z</updated><title type='text'>Is XML Part of the Problem?</title><content type='html'>&lt;img src="http://www.osgi.org/wiki/uploads/Main/xml.png" align="left"/&gt;Last week I had a great time in Stockholm working two days at &lt;a href="http://www.comactivity.net/"&gt;ComActivity AB&lt;/a&gt;. They are reworking their applications so they can take advantage of OSGi in their server applications. In this process they are investigating lots of technologies. And as is so often the case, one runs in modularity problems while using &lt;i&gt;legacy&lt;/i&gt; libraries. Ok, they are not all legacy libraries, they are often brand new and provide valuable functionality, and so often for free as well. What a world!&lt;br /&gt;&lt;br /&gt;However, integrating libraries into an OSGi based system is often fraud with class loader problems. In this case we took an in-depth look at the &lt;a href="http://www.spicefactory.org/cinnamon/"&gt;Cinnamon library&lt;/a&gt; from &lt;a href="http://www.spicefactory.org"&gt;www.spicefactory.org&lt;/a&gt;. This library is a Remote Procedure Call (RPC) library for Flex based applications using the &lt;a href="http://download.macromedia.com/pub/labs/amf/amf3_spec_121207.pdf"&gt;AMF&lt;/a&gt; protocol. AMF is an Adobe (publicized) standard for serializing ActionScript objects from Flash. &lt;br /&gt;&lt;br /&gt;At the start of the visit I was shown a very nice demo of the application. Fast, powerful, and looking good despite the austere theme they were using. As can be expected, the application took advantage of the OSGi architecture. A top level application used the service registry to discover &lt;i&gt;modules&lt;/i&gt; that implemented a specific application functionality. This module provided the Flex flash SWF file and provided the receiving end of the RPC interface. It was kind of cool to see how they made new bundles with &lt;a href="http://www.aqute.biz/Code/Bnd"&gt;bnd&lt;/a&gt;, deployed them with &lt;a href="http://felix.apache.org/site/apache-felix-file-install.html"&gt;File Install&lt;/a&gt; and during the whole morning never restarted their Tomcat that was hosting their OSGi WAR file.&lt;br /&gt;&lt;br /&gt;During the demo we went through the design by looking at the source code, modifying things, and then testing it. One thing I noticed was the large amount of configuration and specialized classes to make this application work with Cinnamon. I once write a tiny &lt;a href="http://www.osgi.org/blog/2006/09/osgi-uis-and-web.html"&gt;webrpc&lt;/a&gt; application and did not think it had to be that hard. (I am an optimist).&lt;br /&gt;&lt;br /&gt;One of the key issues was configuration. The Cinnamon library had two types of configuration: Spring based and a private XML configuration format. The key problem is that these text based configuration files are forced to use dynamic class loading. If these classes must come from other bundles, then OSGi (rightfully) barks. The whole purpose of the OSGi modularity is to have &lt;i&gt;controlled&lt;/i&gt; class loading, taking care of versions and other constraints. Doing Class.forName blissfully ignores such mundane details. A large part of the custom code was necessary to find the right classes at the right time.&lt;br /&gt;&lt;br /&gt;Obviously, this was working. However, &lt;i&gt;cruft&lt;/i&gt; frustrates me and I convinced them we should try to get rid of it. So at the last two hours of the second day we created a new project and started from scratch. No Spring XML and no Cinnamon XML. It was already at the end of the second day so we had little time but it turned out to be surprisingly simple to use the Cinnamon library from Java only, taking advantage of the facilities of the service registry (and that without even reading the manual or javadoc). Still, by getting rid of the XML configuration things became significantly easier. All of the class loading problems disappeared as by magic because from the Java code we had direct access to the right types without requiring dynamic loading.&lt;br /&gt;&lt;br /&gt;By single-stepping through the Cinnamon library I also noticed how much code was spent on making the library flexible and adaptable. As so many libraries today, it was doing impressive class loader gymnastics to implement yet another plugin system. I think the library could be significantly simplified if it had been using OSGi to provide this plugin mechanism with bundles and services. It is sad to see how many time the same wheels are invented over and over again.&lt;br /&gt;&lt;br /&gt;Anyway, I also remembered how I had a similar experience with Hibernate last year. In an effort to &lt;a href="http://www.osgi.org/blog/2007/06/osgi-and-hibernate.html"&gt;use Hibernate from an OSGi based system&lt;/a&gt;, I switched from the XML configuration to do the configuration in Java code. Also in that case, a lot of things that caused class loading issues just disappeared because classes could be manipulated as classes (with the proper versioning) and not as strings.  &lt;br /&gt;&lt;br /&gt;Different, but still related, the day before we had another experience where we significantly simplified life. They had used Spring to define global configuration for database connections. This is obviously highly specific information for each of their customers. With Spring they could provide this configuration through a bundle. However, if they wanted to change the configuration, they had to update this bundle. Looking closer at the configuration file it was clear that they were specifying several connections to databases. This looked like a clear case for the Configuration Admin's Managed Service Factory. We modified their pool manager to use the Configuration Admin by registering a Managed Service Factory service. This was only a few lines of code. They were already using &lt;a href="http://felix.apache.org/site/apache-felix-file-install.html"&gt;File Install&lt;/a&gt;, and File Install makes it easy to set new configurations by placing a property file in the watched directory. It was kind of sad to see how small and readable the property file was in comparison with the XML configuration it replaced.&lt;br /&gt;&lt;br /&gt;Now do not get me wrong. I am very impressed with the Spring, Cinnamon, and Hibernate libraries and I do see the value of centralizing configuration files. Maybe OSGi changes the rules a bit and this XML based model works better in monolithic applications. Lets face it, what is the difference of changing XML or Java code in Eclipse? However, last weeks experience makes me wonder if we should not be a little bit more critical before using XML to solve problems that are much cleaner and better solved in plain old Java? &lt;br /&gt;&lt;br /&gt;&lt;a style="margin-left:20px" href="http://www.aQute.biz"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/04/is-xml-part-of-problem.html' title='Is XML Part of the Problem?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=1384228145038559196&amp;isPopup=true' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/1384228145038559196'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/1384228145038559196'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-6730264173978069182</id><published>2008-04-08T06:22:00.003Z</published><updated>2008-04-08T08:48:43.807Z</updated><title type='text'>JSR 294 Superpackages No More</title><content type='html'>&lt;img src="http://www.osgi.org/wiki/uploads/Main/superman.png" align="left" /&gt;Alex Buckley posted a mail to the &lt;a href="http://altair.cs.oswego.edu/pipermail/jsr294-modularity-eg/2008-March/000171.html"&gt;JSR 294 list&lt;/a&gt; with was more or less superpackages meeting &lt;a href="http://en.wikipedia.org/wiki/Kryptonite"&gt;kryptonite&lt;/a&gt;. Though in this case, Alex is in my opinion the good guy! He basically abandons all the unnecessary complexity of the earlier proposal, &lt;a href="http://www.osgi.org/blog/2007/11/jsr-294-superpackages.html"&gt;see my blog about this subject&lt;/a&gt;, and comes up with a guiding principle: ''simpler is better''.&lt;br /&gt;&lt;br /&gt;The proposal definitely follows that principle. A source file is marked with the word ''module'', just like a package. And that is basically it.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package org.osgi.framework;&lt;br /&gt;module org.osgi.core;&lt;br /&gt;&lt;br /&gt;public class AdminPermission {&lt;br /&gt;module void checkCertificate();&lt;br /&gt;...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The compiler encodes the module membership in the class file and the VM can enforce that any member attached with the module keyword is not accessible from another member unless it is in the same module. I like it! This can actually be quite useful, also for some of the work we are currently doing in the OSGi Alliance concerning modularization. More detail is needed, but this significant simplification is absolutely in the right direction. There are some rough edges obviously, and I like to weigh my input on them.&lt;br /&gt;&lt;br /&gt;Module membership should not be on the source but on the package because it is ''inherently'' safer. Alex argues in his &lt;a href="http://blogs.sun.com/abuckley/"&gt;blog&lt;/a&gt; that from a technical point of view the best place for module membership declaration is the package (package-info.java), but that from a ''moral'' point of view the class file is better because it allows one to introspect a class file and have all information together.  &lt;span style="font-style: italic;"&gt;Moral&lt;/span&gt; in this case should be seen as the Java philosophy, which he defines as focus on understandability by not letting the compiler infer information, but requiring that the programmer states his intentions clearly, even if this is redundant. I.e.&lt;br /&gt;&lt;pre&gt;  &lt;br /&gt;  List&amp;lt;List&amp;lt;List&amp;lt;CharSequece&amp;gt;&amp;gt;&amp;gt; list = new ArrayList&amp;lt;List&amp;lt;List&amp;lt;CharSequence&amp;gt;&amp;gt;&amp;gt;()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Is for me harder to read than:&lt;br /&gt;&lt;pre&gt;  &lt;br /&gt;  List&amp;lt;List&amp;lt;List&amp;lt;CharSequece&amp;gt;&amp;gt;&amp;gt; list = new ArrayList&amp;lt&amp;gt;()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Because I can trust the compiler to do the right thing and I trust it more with these things than my reading capabilities.&lt;br /&gt;&lt;br /&gt;I guess this was also attempted in the JLS, which is also highly redundant. Personally I think this decreases readability because you tend to glaze over sections you already have read 5 times in the previous page. However, this makes it too easy to miss small, highly important differences.&lt;br /&gt;&lt;br /&gt;Anyway, I guess consistency is important (though I strongly believe Java would be more readable with ''less'' verbosity, less is more!) but I still very much prefer inherent safe models instead of tool enforced safe models. Why would you introduce a data structure that can be wrong if you can also do it in a way that does not allow those errors? Let me explain this a bit more.&lt;br /&gt;&lt;br /&gt;Both Alex and I seem to agree wholeheartedly that packages are first class citizens and that you can not have modules criss-cross through packages. I.e. each package member &lt;span style="font-style: italic;"&gt;must&lt;/span&gt; have the same module membership. That is, you can not have two classes in the same package that would not belong to the same module. So module membership is therefore not on the type but on its package. Placing the module membership in the source of the type just allows you to create invalid configurations when two sources in the same package would have a different module membership, which will just require more tools to fix them.&lt;br /&gt;&lt;br /&gt;Putting the membership on the package would also be a good reason to overhaul the  reflection methods of Package. Packages have always been second class citizens in the Java VM, for example you can not find its members. By placing the module membership on the package we have a perfectly good reason to fix these deficiencies.&lt;br /&gt;&lt;br /&gt;Additionally, I do have some more wishes for the EDR2. I'll go through them shortly.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Module private interfaces - Modules should have module private interfaces. Currently, when you implement an interface, you are forced to make your method public. It must be possible to implement interfaces without forcing you to declare the  implementation methods public.&lt;/li&gt;&lt;li&gt;Class Loaders - Modules should be able to cross class loaders (with the restriction that packages do not cross class loaders). This will multiple bundles to form one module.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Dynamic Membership - I do hope the API will allow dynamic module membership. That is, it should be possible to add and remove packages to/from a module in runtime.&lt;/li&gt;&lt;li&gt;Module-Export - I think there  is a need to export a member or type to another module only. I.e. if module M1 imports M2, it should be possible for M2 to selectively exports members and types to an importer. This could be done with a keyword or an export on the module.  for example:&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;        M1: Import-Module: M2&lt;br /&gt;      public class Foo {&lt;br /&gt;        void bar() {&lt;br /&gt;          Ok ok = new Ok();           // no problem&lt;br /&gt;          new Fail(); }       // not visible&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      M2:&lt;br /&gt;      export module class Ok { }&lt;br /&gt;      module class Fail { }&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Scoping - Currently type references are only encoded with their name. It will be necessary to add the module name to a type reference, and while we are at it, it would be terrific if this then also encoded the version it was compiled against. This will allow the module system to calculate dependencies instead of relying on the old model of the serendiptity of the classpath. Obviously the module file should be able to change the hard references from versions (1.3.2) to a range (1.3,1.4).&lt;/li&gt;&lt;li&gt;Versions First class citizens - As show in the previous example, versions should become first class citizens. I do not think annotations are the right way to go for this.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The previous points are requirements, and not solutions. I do not envy Alex's task to come up with JLS changes. This is the same as open heart surgery.&lt;br /&gt;&lt;br /&gt;From an OSGi perspective I think modules as proposed by Alex will be a welcome addition to&lt;br /&gt;the language. I think it addresses some of our uses cases we are working on. Nice work!&lt;br /&gt;&lt;br /&gt; Peter Kriens</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/04/jsr-294-superpackages-no-more.html' title='JSR 294 Superpackages No More'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=6730264173978069182&amp;isPopup=true' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/6730264173978069182'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/6730264173978069182'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-4631708667888291007</id><published>2008-03-27T08:53:00.006Z</published><updated>2008-04-01T08:41:10.433Z</updated><title type='text'>Ghost Town JCP</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.flickr.com/photos/confusedvision/" alt="Picture by confusedvision on flickr.com"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://farm2.static.flickr.com/1025/1329430615_9cf7311981_o.jpg" alt="" border="0"&gt;&lt;/a&gt;Is JSR 277 a ghost JSR or did the work move elsewhere? The last message on the JSR 277 mailing list was more than a month ago and before that traffic was virtually absent. Since June there is about a message per month on average, of which several are house keeping messages. Even &lt;a href="http://weblogs.java.net/blog/stanleyh/"&gt;Stanley Ho's blog&lt;/a&gt; has not seen a new entry since June. Did the discussions move to the Open JDK process? Looking at the &lt;a href="http://mail.openjdk.java.net/pipermail/modules-discuss/"&gt;modules-discuss archives&lt;/a&gt;, this does not seem to be the case. There is very little activity and the mails that I can read are about builds, and requests for information. The &lt;a href="http://mail.openjdk.java.net/pipermail/modules-dev/"&gt;modules-dev list&lt;/a&gt; contains nightly build reports, the last one is from Sunday March 2.  It therefore seems that work is going on, however, it seems hard to believe that there are no issues to discuss in this phase of the project. I assume that the people working in OpenJDK have another (closed?) mailing list where they discuss issues.&lt;br /&gt;&lt;br /&gt;The problem with free organizations (as in free beer) the cost are carried by one party that in exchange demands special rights. For example, the OpenJDK projects is mostly paid for by Sun, just like the JCP. However, the consequence is that if you submit a source code, you must grant Sun a perpetual and full license, with the rights to sub license, for all your code.Though the OpenJDK is available under the GPL license, this choice of license is a Sun decision. You can not submit your code as GPL to the OpenJDK project, the GPL is a license granted by Sun to its users. You therefore have to sign the &lt;a href="http://www.sun.com/software/opensource/contributor_agreement.jsp"&gt;Sun Contribution Agreement&lt;/a&gt;. In this contract you oblige yourself to&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;Share your copyrights with Sun &lt;/li&gt;&lt;br /&gt;  &lt;li&gt;License any patents bearing on your contributions to Sun &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;They key is now that Sun provides the  OpenJDK to anyone under GPL  and parts of it with the Classpath exception that allows you to run code on it. However, for many companies this is too restrictive because they have special patents they are not willing to share or can not share their source code for other reasons. Obviously, Sun is willing to provide the OpenJDK under an an alternate license for an appropriate fee, or not. It is their call.&lt;br /&gt;&lt;br /&gt;If you do serious work in the JCP or OpenJDK, it is highly likely that the value of your donation to Sun significantly exceeds any membership fees of any open organizations.&lt;br /&gt;&lt;br /&gt;When I started using Java in 1996 I had a lot of confidence in Sun because I always thought that the way they handled the standardization of NFS in an exemplary way. I still do believe that most people working for Sun have the best intentions. However, for the good of the community the shepherd should not be one of the sheep.&lt;br /&gt;&lt;br /&gt;Zucht (Sigh in Dutch). Another blog side tracked about non-technical issues. I wish we could focus on the technical issues so we can show why and how the OSGi service platform is more ambitious and provides more and superior solutions for the modularity problem than JSR 277+294. It feels so sad that instead on working together on a suitable standard, Sun, against a lot of industry pressure, bifurcates the market for no technical reason. I do not claim the OSGi specs are perfect, there is work to do. However, they are mature, proven, have a large audience, and seem to provide more functionality than JSR 277 attempts to implement now (with a large learning curve ahead of them). Would such a situation have arisen when the Java community was shepherded in an more independent way?&lt;br /&gt;&lt;br /&gt; &lt;a href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;P.S. I just learned that &lt;a href="http://neilbartlett.name/blog/"&gt;Neil Bartlett&lt;/a&gt; had the same idea and also posted a blog about the same subject ...</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/03/ghost-town-jcp.html' title='Ghost Town JCP'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=4631708667888291007&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/4631708667888291007'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/4631708667888291007'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-2050492372136411995</id><published>2008-03-19T22:50:00.006Z</published><updated>2008-03-19T23:37:09.302Z</updated><title type='text'>OSGi DevCon, Here We Still Are!</title><content type='html'>&lt;img src="http://farm4.static.flickr.com/3224/2345720231_7fee277884.jpg?v=0" align="right" /&gt;Sorry for not updating yesterday, but it is kind of hectic here. It seems almost impossible to walk more than 100ft without being asked a question about OSGi. But hey! That is a lot better than desperately getting people's attention. But it makes it kind of hard to update a blog.&lt;br /&gt;&lt;br /&gt;Anyway, yesterday we had a full program with lots of OSGi talks. Though I must admit the keynote was very entertaining, even without OSGi. The keynote was given by &lt;a href="http://fakesteve.blogspot.com/"&gt;Dan Lyons (Fake Steve Jobs)&lt;/a&gt;. Well, I let the pictures do the talking again.&lt;br /&gt;&lt;br /&gt;BJ Hargrave (IBM) and Neil Bartlett in their Android for OSGi presentation&lt;br /&gt;&lt;center&gt;&lt;img src="http://farm4.static.flickr.com/3163/2346549414_be5dcfc48d.jpg?v=0"/&gt; &lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Christer Larsson and Eric Wistrand from Makewave working hard to get it to work.&lt;br /&gt;&lt;center&gt;&lt;img src="http://farm4.static.flickr.com/3233/2346549322_9a3eff1f6e.jpg?v=0"/&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Marcel Offermans and Karl Pauls from Luminis making sure BJ and Neil got it right.&lt;br /&gt;&lt;center&gt;&lt;img src="http://farm3.static.flickr.com/2256/2346549522_ed77ce5ed1.jpg?v=0"/&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Yesterday evening we had an OSGi BOF, with drinks. There were quite a lot of people and everybody seems to have a good time.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;img src="http://farm3.static.flickr.com/2175/2345720381_393a3ed761.jpg?v=0" /&gt; &lt;img src="http://farm3.static.flickr.com/2275/2346549616_66f021997f.jpg?v=0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm4.static.flickr.com/3110/2345720435_2b762039da.jpg?v=0" /&gt; &lt;img src="http://farm3.static.flickr.com/2044/2346549684_7053c692d9.jpg?v=0" /&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Well, today we had the Bug Labs presentation (cool hardware!) and the Virtual OSGi presentation from Jan Rellermeyer (which has recently become our second Invited Researcher next to Richard Hall). &lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="http://farm4.static.flickr.com/3122/2345720601_2c525d1c8a.jpg?v=0"/&gt; &lt;img src="http://farm4.static.flickr.com/3128/2346549850_90f7b18aef.jpg?v=0"/&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Sprint, ProSyst, and IBM presented the Sprint Titan program, which uses the OSGi framework in the incarnation of JSR 232, as a cornerstone. These phones support an amazing amount of standards. The Titan platform will become a very interesting platform, the first that will allow you to write code that runs in binary form on a phone, desktop, server, and mainframe.&lt;br /&gt;&lt;center&gt; &lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2215/2345720789_e422e382b1.jpg?v=0"/&gt; &lt;img src="http://farm3.static.flickr.com/2120/2346550002_f5f10485ba.jpg?v=0"/&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;I did not get a chance to to visit all session, unfortunately. There is so much going on at the same time. One thing that was very nice today, btw, was that I had a meeting with some of the Jason van Zijl, Eugene Kuleshov, Carlos Sanchez, and Jeff McAffer and we discussed aligning the mapping of the Bundle Symbolic Name and version issues. Watch this space.&lt;br /&gt;&lt;br /&gt;Tomorrow we will have the services versus extensions panel. This morning we met and it looks like it will be an interesting panel. Lots of people are interested in this subject.&lt;br /&gt;&lt;br /&gt;Wish you were here! &lt;br /&gt;&lt;br /&gt;   &lt;a href="http://www.aQute.biz"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/03/osgi-devcon-here-we-still-are.html' title='OSGi DevCon, Here We Still Are!'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=2050492372136411995&amp;isPopup=true' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/2050492372136411995'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/2050492372136411995'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-1308470033881687634</id><published>2008-03-18T13:53:00.002Z</published><updated>2008-03-18T14:33:57.423Z</updated><title type='text'>OSGi DevCon, Here We Are</title><content type='html'>We are getting ready for the second day of the conference. Yesterday, was (free!) tutorial day and the program was packed. I ran between tutorials to take pictures and see how things are going. The OSGi tutorials were very well attended and in several rooms there were not enough places. Anyway, let the pictures do the talking.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm4.static.flickr.com/3249/2342490919_697b42f2dc.jpg?v=0"/&gt;&lt;img src="http://farm4.static.flickr.com/3159/2342491701_c24aa0c07f.jpg?v=0"&gt; &lt;br /&gt;&lt;img src="http://farm4.static.flickr.com/3024/2343321284_687ac18c96.jpg?v=0"&gt; &lt;img src="http://farm3.static.flickr.com/2031/2343320998_2cceac298a.jpg?v=0"&gt;&lt;br /&gt;&lt;br /&gt;All pictures can be found at: &lt;a href="http://www.flickr.com/photos/49627806@N00/sets/72157604151597371/"&gt;Flickr&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So the real conference starts today with the keynote of &lt;a href="http://www.eclipsecon.org/2008/index.php?page=sub/&amp;id=537"&gt;Fake Steve Jobs&lt;/a&gt;. Then the short talks, Android, Services &amp; DI &amp; Extension points, Android, Building large applications and the BOF. And so much more where OSGi is involved. Last year, OSGi was a buzz, this year it feels like a roar!&lt;br /&gt;&lt;br /&gt;So if you are at OSGi DevCon/EclipseCon do not forget to come to the BOF at 7.30 pm. It would be great to meet you all. Ok, off to breakfast and a great day ...&lt;br /&gt;&lt;br /&gt;   &lt;a href="http://www.aQute.biz"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/03/osgi-devcon-here-we-are.html' title='OSGi DevCon, Here We Are'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=1308470033881687634&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/1308470033881687634'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/1308470033881687634'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-4648388844678345457</id><published>2008-03-17T13:21:00.006Z</published><updated>2008-03-17T21:12:50.438Z</updated><title type='text'>OSGi DevCon, Here We Come!</title><content type='html'>&lt;img src="http://www.aqute.biz/uploads/About/peter120x120.gif" align="left" /&gt;&lt;img src="http://www.osgi.org/wiki/uploads/Conference/osgi-devcon-small.gif" align="right" /&gt; Today, March 17, we are starting the OSGi DevCon. This year has a tremendous amount of events devoted to OSGi. The program has a special icon for OSGi events (thank you!) and it is littered over the schedule.&lt;br /&gt;&lt;br /&gt;Today is tutorial day and for the first time the tutorials are free. Select your tutorials carefully, though it is likely many will be full. I wanted to give you an overview but the OSGi talks are marked so well on the program that I just give you the link to the &lt;a href="http://www.eclipsecon.org/2008/index.php?page=table/&amp;amp;date=2008-03-17"&gt;Monday tutorials overview&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The first sessions have started and we have some photos fresh from the event.&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;img src="https://www.osgi.org/wiki/uploads/Conference/26.jpg"/&gt;&lt;br /&gt;&lt;img src="https://www.osgi.org/wiki/uploads/Conference/36.jpg"/&gt;&lt;br /&gt;&lt;img src="https://www.osgi.org/wiki/uploads/Conference/41.jpg"/&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href="http://www.aQute.biz"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/03/osgi-devcon-here-we-come.html' title='OSGi DevCon, Here We Come!'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=4648388844678345457&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/4648388844678345457'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/4648388844678345457'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-7555282766716330340</id><published>2008-02-27T14:05:00.004Z</published><updated>2008-02-27T14:22:29.869Z</updated><title type='text'>OSGi DevCon/EclipseCon</title><content type='html'>&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 120px;" src="http://www.osgi.org/wiki/uploads/Conference/osgi-devcon-small.gif" alt="" border="0" /&gt;I hope you did &lt;a href="http://www.eclipsecon.org/2008/"&gt;register&lt;/a&gt; at OSGi DevCon/EclipseCon? It is only three weeks to this event and we would really like to see you there. I think this years program is exceptionally strong. For sure the  OSGi DevCon program. It was really hard to choose this year from the large number of excellent proposals.&lt;br /&gt;&lt;br /&gt;Do you know that this year the registration includes tutorials? This is the first time I see this in a conference and I think it is an excellent idea. It allows you to choose without having to worry about the financial consequences. The only problem is that there are so many interesting subjects that it is hard to choose.&lt;br /&gt;&lt;br /&gt;The supposed dichotomy between services and extensions keeps people occupied. I hope we can finally decide this year when and where to use what. Not only do we have a tutorial, a presentation, but also a panel about this subject. To muddy the waters even further, a Jazz member will speak about a proposal that is supposed to merge the concepts. Whatever comes out of it, I am pretty sure it will be interesting.&lt;br /&gt;&lt;br /&gt;On Tuesday we have a BOF at 19:30. The OSGi Alliance board has a meeting in the valley and many of them will be present to talk to you. This will be an excellent moment to tell them your ideas, issues, and maybe kudos. Oh yeah, and there will be drinks!&lt;br /&gt;&lt;br /&gt;After the OSGi BOF, there will be a Distributed OSGi BOF that I really want to attend. Easy, it will be in the same room. My famous friend Jeff McAffer will have an Equinox/OSGi BOF on Wednesday so you will be able to find me there as well.&lt;br /&gt;&lt;br /&gt;There is an &lt;a href="http://www.osgi.org/Conference/HomePage"&gt;overview page&lt;/a&gt; with the whole OSGi DevCon program.&lt;br /&gt;&lt;br /&gt;I am really looking forward to see you this year at OSGi DevCon/EclipseCon. If there is only one conference you can go to this year, I urge you to pick this one. Don't wait too long with registering. There is a maximum and it is very likely they will reach this maximum this year.&lt;br /&gt;&lt;br /&gt;See you all in Santa Clara!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/02/osgi-devconeclipsecon.html' title='OSGi DevCon/EclipseCon'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=7555282766716330340&amp;isPopup=true' title='2 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/7555282766716330340'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/7555282766716330340'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-3368447532717199223</id><published>2008-02-21T14:43:00.005Z</published><updated>2008-02-21T17:23:35.745Z</updated><title type='text'>Research Challenges for OSGi</title><content type='html'>On my flight back from Berlin this week I listened to a podcast from &lt;a href="http://www.se-radio.net/"&gt;Software Engineering Radio&lt;/a&gt;. They interviewed Dave Thomas (OTI Dave Thomas) and it was a very interesting interview. One of the triggering parts was that Dave mentioned that PhD students often have a hard time finding good research challenges. That made me start thinking what the OSGi research challenges would be. Well, these are the ones I came up with.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;The Stale Service Problem&lt;/h2&gt;&lt;br /&gt;The OSGi Framework provides isolation between bundles using a &lt;span style="font-style: italic;"&gt;class loader&lt;/span&gt; model. This model is quite effective, especially when security is also turned on. However, it is clearly not perfect because we have something called the &lt;i&gt;stale service&lt;/i&gt; problem. Bundles in an OSGi platform exchange objects. These objects are linked through their class to a class loader which is closely connected to a specific bundle. What happens when this bundle is started and stopped? Well, the specification tells the other  bundles to remove their references to any objects by sending out service notifications. These stale references will exist and hang around because they cannot be garbage collected. Those services refer to the class loader so a single stale reference can pin all the loaded classes of a bundle into memory for as long as it lives.&lt;br /&gt;&lt;br /&gt;But the refering bundle can remove any references and everything is ok! So what is the problem? Well, if you really came up with that question I suggest you do some code inspections of open source or in-house software. It is sometimes quite amazing what actually ends up being used. Let's face it, this cleaning up is hard and very error prone.&lt;br /&gt;&lt;br /&gt;From a specification point of view we have tried to minimize this problem. The &lt;a href="http://www.aqute.biz/Snippets/Tracker"&gt;service tracker&lt;/a&gt; is a direct result of this effort. After Richard S. Hall and Humberto Cervantes pioneered the &lt;a href="http://www.blogger.com/post-edit.g?blogID=18772002&amp;amp;postID=3368447532717199223"&gt;Service Binder&lt;/a&gt; we added the derived &lt;a href="http://www.aqute.biz/Snippets/HelloWorldComponent"&gt;Declarative Services&lt;/a&gt; to minimize the complexity of handling this stale service problem. However, from a specification point of view there is no way the problem can be handled full (or fool) proof.&lt;br /&gt;&lt;br /&gt;The simple solution is to place bundles in different memory spaces. This can be done with one VM per bundle or a more efficient method is to use isolates from &lt;a href="http://jcp.org/aboutJava/communityprocess/final/jsr121/index.html"&gt;JSR 121&lt;/a&gt;. The JSR 121 provides a very attractive model for isolation but is very intrusive for the programming model, just like a multiple process model. Once you go to a different memory space all your calls need to be &lt;i&gt;marshalled&lt;/i&gt;. Marshalling is the process that moves the parameter objects over the process/isolate boundary. Isolates provide a very efficient socket like interface between isolates but it still means you need some form of serialization or proxying of &lt;i&gt;all&lt;/i&gt; your obejcts that cross the boundary. This tends to be very intrusive for object oriented code. It also adds at least a time penalty that is at least a number of magnitudes over normal method calls. There is obviously also a significant memory penalty running code in multiple processes or isolates.&lt;br /&gt;&lt;br /&gt;These penalties are such a pity. Java is a language that pioneered (as far as I know) the concept of &lt;i&gt;security&lt;/i&gt; on language level. One of the great promises has always been to run the code from different parties in the same VM and have them protected from each other while collaborating when necessary without cost. I really do believe we have come quite far with a standard VM and adding OSGi brings us tantalizing close to this goal.&lt;br /&gt;&lt;br /&gt;Therefore, the first research challenge I post to the research community is to create an OSGi platform that provides the advantage of direct method calls but allows a bundle to be safely stopped and removed from the VM, even if other bundles do not cooperate.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;OSGi Resolver&lt;/h2&gt;&lt;br /&gt;Some OSGi installations can have thousands of bundles. During the booting of the framework, these bundles must be wired so that there imports and exports match up in a consistent and optimal way. This is a task that is on the critical part for startup so performance is at a premium.&lt;br /&gt;&lt;br /&gt;Why optimal? Isn't good good enough? Well, no. The hardest part addressed in OSGi frameworks is &lt;i&gt;sharing&lt;/i&gt;. Most of the OSGi framework is setting rules about this sharing and enforcing them where possible. However, these rules allow considerable leeway in the solutions that the &lt;i&gt;resolver&lt;/i&gt; can use. This is necessary because many correct solutions cause the class space to be split between bundles. That is, one bundle can no longer use the services from another bundle because the packages they use for the service or used classes/interfaces come from different bundles. For example, one bundle uses version 1.0 and the other bundle uses version 2.0. Once this happen, these bundles live in different worlds and can not easily collaborate. The resolver must therefore find solutions where packages are shared as much as possible.&lt;br /&gt;&lt;br /&gt;A couple of months ago we had a big discussion about this problem, Thomas Watson (IBM) posted the question if the resolver is an &lt;a href="http://en.wikipedia.org/wiki/Np-complete"&gt;NP-complete problem&lt;/a&gt;. We had some very interesting and long conference calls (software engineers love this stuff) and I do not think we found real proof for this statement. However, we clearly all agreed it is a hard nut to crack.&lt;br /&gt;&lt;br /&gt;So I pose the second grand OSGi challenge: Provide an OSGi resolver that can resolve a set of bundles in linear time, or prove that this is impossible.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Multiple Versions&lt;/h2&gt;&lt;br /&gt;The most attractive property of R4 is clearly the fact that it can support multiple versions of the same package in the same VM. Though one should &lt;i&gt;never&lt;/i&gt; design a system with this in mind, it is a life saver when you discover two of your bundles require incompatible versions of the same package. And with today's development model of tens if not hundreds of open source products it is almost guaranteed that you will need it.&lt;br /&gt;&lt;br /&gt;To allow bundles to collaborate, packages must be shared. It is therefore very beneficial to maximize the flexibility in imports. This is the reason that one can specify a &lt;i&gt;version range&lt;/i&gt; for an import package. This range indicates that this bundle can operate with a set of packages. Great! But, ehh, how does the developer manage this?&lt;br /&gt;&lt;br /&gt;Normally, there is only a single version on the classpath during development. Tools like PDE, Maven, or JDT provide no support for adding a version dimension to the classpath. The direct result is that many people compile against the latest version. If they use &lt;a href="http://www.aqute.biz/Code/Bnd"&gt;bnd&lt;/a&gt; they automatically get an import statement (provided the exporter is a properly marked up bundle) for this latest version. If this has to be maintained by hand then it is even harder. The developer must intricately be aware of what is using what. Import ranges are really hard to set properly because they explode the number of combinations that must be tested. Trying to do this by hand is painful.&lt;br /&gt;&lt;br /&gt;As an aside, I believe life would have been easier if we would have had export ranges because the exporter of a package knows exactly to which version he is compatible, being the responsible person for that package. If he changes a package, he is the one thinking and deciding about backward compatibility. The importer is almost always &lt;i&gt;guessing&lt;/i&gt;. That is, if I make a change to a package called p, I can knowingly say that I am package p version 2, but I am completely compatible to version 1 I therefore can export p;[1,2]. In contrast, if I import package p I have no clue if version 1 and 2 will be compatible except for the convention of version number interpretation. Alas, export versions did not make it to R4.&lt;br /&gt;&lt;br /&gt;The third challenge is therefore support for import version ranges. How should the development tools be altered to support version ranges in such a way that the resolver has maximum flexibility while the import range presents valid tested configurations.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Application Identity&lt;/h2&gt;&lt;br /&gt;The cool news with an OSGi framework is that you can run multiple applications on a single VM. The bad news is that you can run multiple applications on a single VM. If you share the VM between applications you run into several issues where you would like to know the identity of one you are doing the work for. Inside an JEE application server this is relatively straightforward because applications run autistically in silos. In OSGi, bundles that make up the applications are shared and call each other through the myriad of callbacks. None of the Java or OSGi concepts (Threads, Code base, Bundles, etc) map really well to this identity problem.&lt;br /&gt;&lt;br /&gt;The last research challenge is therefore to come up with an identity concept that can be used for security and resource management in a collaborative environment like OSGi.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;br /&gt;So, if there are students that are looking for research challenges then the previous problems should keep them occupied. Some of them are really hard problems that do not have clear solutions. However, solving them will solve real problems and enable further possibilities.&lt;br /&gt;&lt;br /&gt;Good Luck! Kind regards,&lt;br /&gt;&lt;br /&gt;  &lt;a href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2008/02/research-challenges-for-osgi.html' title='Research Challenges for OSGi'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=3368447532717199223&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/3368447532717199223'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/3368447532717199223'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-3724936559311942692</id><published>2007-12-12T15:42:00.000Z</published><updated>2008-01-30T11:02:48.094Z</updated><title type='text'>JSR 294 SuperPackages Revisited</title><content type='html'>Some of my questions about JSR 294 have been answered by Alex Buckley from Sun. I have updated the existing blog to not hide that I had some misunderstanding. If you're interested in 294 it might be interesting to take a look at these changes, I definitely started to understand 294 better, though I am afraid to say that it did not improve my feeling about it. So please read again and watch the [] for changes.&lt;br /&gt;&lt;br /&gt;&lt;a href="/blog/2007/11/jsr-294-superpackages.html"&gt;JSR 294 SuperPackages&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.aqute.biz/"&gt;Peter Kriens&lt;/a&gt;</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2007/12/jsr-294-superpackages-revisited.html' title='JSR 294 SuperPackages Revisited'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=3724936559311942692&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/3724936559311942692'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/3724936559311942692'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-878898301786808759</id><published>2007-12-03T07:48:00.000Z</published><updated>2007-12-03T09:26:53.018Z</updated><title type='text'>JCP, or What?</title><content type='html'>In my vanity I subscribe to &lt;a href="http://www.google.com/alerts"&gt;Google Alerts&lt;/a&gt; on my name. This morning it pointed me to the blog of &lt;a href="http://www.jroller.com/scolebourne/entry/is_the_jcp_broken"&gt;Stephen Colebourne&lt;/a&gt;. Stephen argues against the JCP for many of the same reasons I have, (guess that is why he quoted me so he popped up in my vanity alert). Stephen makes some very sensible proposals. However, some comments posted on the blog are a bit worrying. Yes, I agree the current JCP is bad because its owner (Sun) is more interested in its own interest than the interest of the Java community. Ok, it is also flawed because the process has no requirements phase and is often lead by the commercial interests of one party. However, at the core of some of the comments is a discussion of what is more relevant: an implementation or a specification?&lt;br /&gt;&lt;br /&gt;This discussion has been raised inside the OSGi Alliance as well. Why not pick one framework implementation and put a stamp on it and name it the standard?  Obviously a single implementation is simpler, what do we get from a time consuming specification process that forces people to compromise?&lt;br /&gt;&lt;br /&gt;Well, just as obviously, people's requirements differ. Equinox is optimized for very large systems, uses lots of caching, but is therefore much bigger than Knopflerfish or Apache Felix. The best part about OSGi technology is that it still strives to write applications once and run anywhere, and it is really getting closer. An independent specification allows different implementations that optimize for a certain area.&lt;br /&gt;&lt;br /&gt;The second advantage is neutrality. Comments on Stephen's blog make it sound that today most Java innovation takes place on the OpenJDK mailing list. I am not sure if this will create a coherent API in the long run though I am pretty sure it will create bloat because one man's holy grail is another man's unnecessary complexity. The specification process allows the balancing of the interest of several parties before it is cast. Note that the implementation freedom inherent in specifications is a good way to keep the specifications aligned, just implement if differently.&lt;br /&gt;&lt;br /&gt;The third advantage is time. Though the slow process of standardization is often used as a negative, I think it is actually a positive (within limits). Last year we started the requirements process for Enterprise OSGi and one of the main aspects is Distributed OSGi. In the past 6 months you can see how the different parties started to understand each other's use cases and requirements and how they are not trying to find solutions that are much broader than if any of them had hacked together a solution on their own. I really think that most of the OSGi specifications actually reflect this focus on industry wide solutions and not trying to solve a small acute problem under great time pressure.&lt;br /&gt;&lt;br /&gt;The fourth advantage is the whole struggle with intellectual property rights (IPR). Life might be beautiful if everything was free, but it isn't. We live in a world where companies have legitimate rights to the fruits of their labor. Interestingly, the most free for all movement (GNU) creates the biggest problem of all because of its viral nature, affecting anything it touches. It turns out a lot easier handle the IPR issues in an implementation than in a specification because there is much less IPR involved (and therefore much less touching).&lt;br /&gt;&lt;br /&gt;In a way, the world of creating implementations and specifications is similar to classes and interfaces. I am pretty sure no Java programmer wants to give up interfaces, the reuse of Java code would be significantly harder. Therefore, could Java be maintained by an open source community as some think? I do not think so. The language would quickly drift in a direction the hardest pushers push it into, it will bloat and become unusable for many applications.&lt;br /&gt;&lt;br /&gt;What we need is a strong modularity layer so different solutions can compete evenly. The market can then decide which solutions work best. However, to evolve the core platform Java &lt;span style="font-style: italic;"&gt;will &lt;/span&gt;need a community process, just one that is not dominated by the interest of a single commercial party.&lt;br /&gt;&lt;br /&gt;Peter Kriens&lt;br /&gt;&lt;br /&gt;P.S. One of the comments states that OSGi is more complex than JSR 277. Sigh. The OSGi framework API is significantly smaller counted as methods and classes/interfaces. We just have more good documentation. And obviously we cover the cases that JSR 277 will discover in the next 5 years.</content><link rel='alternate' type='text/html' href='http://www.osgi.org/blog/2007/12/jcp-or-what.html' title='JCP, or What?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18772002&amp;postID=878898301786808759&amp;isPopup=true' title='6 Comments'/><link rel='replies' type='application/atom+xml' href='http://www.osgi.org/blog/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/878898301786808759'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18772002/posts/default/878898301786808759'/><author><name>Peter</name><uri>http://www.blogger.com/profile/11373850803487010328</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-18772002.post-8376400032543812595</id><published>2007-11-27T09:00:00.004Z</published><updated>2008-01-30T08:25:18.170Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='modules'/><category scheme='http://www.blogger.com/atom/ns#' term='osgi'/><category scheme='http://www.blogger.com/atom/ns#' term='jsr 294'/><category scheme='http://www.blogger.com/atom/ns#' term='jsr 277'/><category scheme='http://www.blogger.com/atom/ns#' term='superpackages'/><title type='text'>JSR 294 SuperPackages</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/superman.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 60px;" src="http://www2.osgi.org/wiki/uploads/Main/superman.png" alt="" border="0" /&gt;&lt;/a&gt;This blog is updated after a pleasant conversation with Alex Buckley over email in which he explained some of the finer points. These sections are marked with []. JSR 294 has produced their public draft of &lt;span style="font-style: italic;"&gt;superpackages&lt;/span&gt;! (Somehow the exclamation mark seems necessary with this name ... ) Anyway, superpackages are a new construct for Java 7 to improve the modularity of the Java language. Originally &lt;a href="http://jcp.org/en/jsr/detail?id=277"&gt;JSR 277&lt;/a&gt; was going to take care of modularity but Gilad Bracha (formerly Sun) thought that deployers could not be trusted with language elements and spun off &lt;a href="http://jcp.org/en/jsr/detail?id=294"&gt;JSR 294&lt;/a&gt; after he published a spin about superpackages in his &lt;a href="http://blogs.sun.com/gbracha/entry/developing_modules_for_development"&gt;blog&lt;/a&gt;. Gilad left, but the JSR 294 expert group churned on and they produced a public draft, this blog is a review of that draft.&lt;br /&gt;&lt;br /&gt;Superpackages address the ever present need to modularize. Types encapsulate types, fields and methods, packages encapsulate types, and superpackages encapsulate, packages and nested superpackages. When Java was designed packages were intended to be a set of closely related types, a.k.a. a &lt;span style="font-style: italic;"&gt;module&lt;/span&gt;. However, systems have become larger and larger and packages turned out to not have the right granularity for many. It could have worked if packages had been nested, but this would of course have limited the flexibility of the programmer and Sun used to favor configuration over convention.&lt;br /&gt;&lt;br /&gt;For the OSGi specifications we came up with the JAR file as a module of packages. Packages can be exported and imported, allowing the developer to keep classes private or expose them to be used by others. Modularity in OSGi is therefore a deployment concept, the same packages can be members of different modules/bundles. OSGi service platforms enforce these rules with the aid of class loaders.&lt;br /&gt;&lt;br /&gt;However, purists want to have the modularity in the language itself, therefore superpackages were born in Sunville. Superpackages group a set of named (super-)packages and export types from these packages.&lt;br /&gt;&lt;br /&gt;First let me make clear that I have not seen anything in the public review draft that would make it hard for OSGi to support superpackages. The current incarnation of the OSGi framework will be more or less oblivious of superpackages. The accessibility rules are enforced by the VM and the system works with normal class/resource loading rules. Superpackages and its member types must come from the same class-loader/bundle, but that does not look like an issue. So from an OSGi point of view there is no reason for concern with JSR 294 as long as a superpackage and its member packages come from the same bundle.*&lt;br /&gt;&lt;br /&gt;So the remainder is just a technical review of the technical merits of 294, the OSGi specifications are not affected by it.&lt;br /&gt;&lt;br /&gt;The superpackages specification is surprisingly complex and there is no overview. The spec is a set of changes to the existing Java Language Specification. I'll try to show you my understanding.&lt;br /&gt;&lt;br /&gt;The current model is depicted in the following picture.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/classpackage.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www2.osgi.org/wiki/uploads/Main/classpackage.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;When you begin a class you give it a package name with the package keyword:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  package com.foo;&lt;br /&gt;class A { ... }&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;That is, the class defines its membership to a package. This is different from a superpackage that honors its name looking at the complexity it introduces. The following picture shows a similar diagram when superpackages are introduced.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/superpackages.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www2.osgi.org/wiki/uploads/Main/superpackages.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This clearly is supercomplex in comparison with the current model. The major drawback is the redundancy that is introduced by this model. When I went to school ages ago I was thought that redundancy is evil. Over time I learned that redundancy can improve a system but the cost always remains. In this case the redundancy actually seems to create a very brittle structure that makes deployment unnecessary rigid. Let's explore.&lt;br /&gt;&lt;br /&gt;[] Before first. As you can see, the Package is dashed now. The reason is that Sun is a bit ambiguous about packages in this specification. In this specification a package is treated as a name with structure (com.foo.bar is a sub-superpackage of com.foo), this is not uncommon. However, in Java a package is (well should be) a first class citizen but it often is not. Packages do provide access rules and there is the java.lang.Package class (not in java.lang.reflect). However, this class is not reflective; it is impossible to find the classes belonging to a package. Would you accept that a class could not enumerate its fields and methods? So why should a package not be able to enumerate its members? In contrast, a superpackage is in java.lang.reflect can enumerate is contained superpackages and, strangely enough, its member &lt;span style="font-style: italic;"&gt;types&lt;/span&gt;, not its packages. Interestingly, to be able to enumerate the types the VM must be able to enumerate the packages because the superpackage class file only enumerates the package &lt;span style="font-style: italic;"&gt;names&lt;/span&gt;, not the individual members. I would advise the JSR 294 expert group to take the packages seriously and allow full reflection.&lt;br /&gt;&lt;br /&gt;First, superpackage links are always bidirectional and can therefore easily be wrong. A class file points to the superpackage file and the superpackage file points to the package of the class files. That is, if you move a package to another superpackage the superpackage definition file and the sources of the types must be modified. Fortunately wildcards can be used in the superpackage to identify the exported classes, though this means that most (if not all) changes in a type require recompilation of the superpackage definition.&lt;br /&gt;&lt;br /&gt;The same is true for superpackage parenthood (enclosement) and membership (nesting).  This link is also bidirectional, the parent must list its children and the children must list their parent. A superpackage is restricted to one parent, it is a true hierarchy. By the way, the top of the hierarchy is the &lt;span style="font-style: italic;"&gt;unnamed&lt;/span&gt; superpackage. Oh yes, also all superpackages with a simple name (no dot in them) are automatically visible (in scope) to any superpackage if I read 7.4.5 correctly (took me some time to figure that out).&lt;br /&gt;&lt;br /&gt;[]The unnamed superpackage is &lt;span style="font-style: italic;"&gt;really &lt;/span&gt;special. Any top level super package  is automatically a member of this &lt;span style="font-style: italic;"&gt;super&lt;/span&gt;superpackage. Any class can see &lt;span style="font-style: italic;"&gt;any &lt;/span&gt;exported type from a top level superpackage. I missed this the first time, the specification could make this more clear. Because the rules for the unnamed superpackage are so different. For example, membership is automatic, all exported members are visible to anyone, and the unnamed package is not open for reflection, it is represented as null.  I wonder if this unnamed superpackage should not just be named the global space. I.e. there is no supersuperpackage so do not imply it by calling the superpackage that shall not be named?&lt;br /&gt;&lt;br /&gt;The data structure for superpackages is not elegant. Though we have good refactoring tools today in Eclipse, IDEA, and Netbeans, I do not think it is a good excuse to design data structures that are so error prone.&lt;br /&gt;&lt;br /&gt;However, the restriction is something that worries me most because it seems to create a system that I have hard time to see how it should work. The restriction is intentional, from section 7.4.5:&lt;br /&gt;&lt;div style="padding: 30px;"&gt;&lt;span style="font-style: italic;"&gt;If a superpackage did not have to declare which superpackage it is nested in, then the following problem could occur. Consider these superpackages, where Outer.Inner does not declare that it is nested in Outer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;superpackage Outer {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  member superpackage Outer.Inner;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;superpackage Outer.Inner {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  member package foo;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  export foo.C;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;If a type outside the Outer.Inner superpackage tries to access foo.C, then the access&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;would succeed because foo.C is exported from Outer.Inner and neither C.class nor the&lt;/span&gt;&lt;span style="font-style: italic;"&gt; superpackage file for Outer.Inner mentions the fact that Outer.Inner is a non-exported &lt;/span&gt;&lt;span style="font-style: italic;"&gt;nested superpackage of Outer. The intent of the Outer superpackage - to restrict access to members of Outer.Inner - is subverted.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;Clearly, they have chosen restriction over convenience. However, the consequences of this are quite far reaching. Let us take a look at the access rules. I always need pictures for these things so we need a legend:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/sp-legend.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www2.osgi.org/wiki/uploads/Main/sp-legend.png" alt="" border="0" /&gt;&lt;/a&gt;The first access rule in 5.4.4.  in the specification reads that type C is accessible to type D if any of the following conditions is true:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Type C is public and is not a member of a named superpackage&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/unnamed-type.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www2.osgi.org/wiki/uploads/Main/unnamed-type.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Type C is public and both type C and D are a member of the same superpackage S.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/same-superpackage.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www2.osgi.org/wiki/uploads/Main/same-superpackage.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Type C is public and C is an exported member of named superpackage S and D is a member of the enclosing superpackage O of superpackage S&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/sp-nested.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www2.osgi.org/wiki/uploads/Main/sp-nested.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Type C and D reside in the same package p.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/same-package.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://www2.osgi.org/wiki/uploads/Main/same-package.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;At first could not understand how one of the most common cases, a library provider, could work with superpackages. The rules state that a type can only see what is available to its superpackage. This seems to exclude visibility between &lt;span style="font-style: italic;"&gt;peer &lt;/span&gt;superpackages. For example, if OSGi would put all its specification packages in the org.osgi super package, a member type of the com.acme package could not see the OSGi exported types. However, after a lot of puzzling I found that in 7.4.2 it states that &lt;span style="font-style: italic;"&gt;"A superpackage name can be simple or qualified (§6.2). A superpackage with a simple name is trivially in scope in all superpackage declarations."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I guess this means means that a super package has all superpackages with simple names as superpackage members? If this interpretation is true, then any "top" level superpackage would be visible to anybody else. Therefore, the following example should work:&lt;br /&gt;&lt;br /&gt;[] The previous is not correct, the magic is the &lt;span style="font-style: italic;"&gt;unnamed &lt;/span&gt;superpackage. I missed the rule (even after looking after being told) that any top level superpackage makes its exports available to any type in the system, regardless if it is a simple or complex name. That is exported types of top level superpackages are global. The use of the unnamed superpackage confused me because the rule is so different from &lt;span style="font-style: italic;"&gt;normal&lt;/span&gt; superpackages. Silly me.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www2.osgi.org/wiki/uploads/Main/peer.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://www2.osgi.org/wiki/uploads/Main/peer.png" alt="" border="0" /&gt;&lt;/a&gt;It seems Sun is slowly moving to conventions over configuration! Influence of the Ruby guys they hired? A name with no dots means general membership is clearly convention. However, it raises a number of issues.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If the package must have a &lt;span style="font-style: italic;"&gt;simple&lt;/span&gt; name, how do we handle uniqueness? Package names normally are scope with the reverse domain name, like org.osgi... However, org.osgi is not a simple name? [] This is thus not an issue, a superpackage can have a dotted name, the trick is that it must be a top level package, i.e. not being enclosed.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It seems that top level packages are &lt;span style="font-style: italic;"&gt;special&lt;/span&gt;. Then why is a superpackage not just defined in a single file that allows nested superpackages without naming them? This model would significantly simplify the model where the VM must find resources from all over the system that have obligatory relations. A lot of potential errors could be removed this way.&lt;/li&gt;&lt;li&gt;[]Despite my minsunderstanding, the previous point is still relevant. It is not clear why superpackage members are spread out over the file system while they are closely dependent on each other with bidirectional links.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span&gt;I guess I must be missing something ...&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Versioning&lt;/span&gt;&lt;br /&gt;One would expect that in AD 2007 any modularity system in Java should have an evolution model. Alas, I have not been able to find any hint, not even a manifest header, of versions and how a superpackage should evolve. Obviously, this needs to be addressed. Superpackages are related to large systems and large systems do not pop in existence nor do they suddenly disappear. They live a long time and need to change over time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Defining the Content of a Superpackage&lt;/span&gt;&lt;br /&gt;The spec says that a superpackage has only member types and nested superpackages. However, the superpackage file contains a list of packages and lists the nested superpackages. The exports, however, list the exported type names and the exported superpackages.&lt;br /&gt;&lt;br /&gt;These data structures are specified in the superpackage declaration and this is a file that the average developer will love to hate. This file must list all the packages of a superpackage; wildcarding or using the hierarchy is not allowed. Each package must be entered in full detail. Same for member superpackages as well as exported superpackages. Exported types can, however, use a short cut by specifying the exported types with the on-demand wildcard. That is, you can export com.foo.* indicating that you accept all types in the com.foo package (or all nested types in the com.foo type!).  This sounds cool until you look at normal practice. A very common case is that implementation classes in a package have a name that ends in Impl. However, the wildcard in on-demand specifications is all or nothing. This likely means that all exported types must be enumerated by hand. Painful!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Deployment Versus Language&lt;/span&gt;&lt;br /&gt;The key driver to remove JSR 294 from JSR 277 was that deployment artifacts should have no influence on the language. I am not so sure of that. One of the key insights I have obtained in the last few years is that there are many ways to slice and dice a JAR. With the myriad of profiles and configurations in Java, it is likely that you must deploy the same code in different ways to different platforms. For example, one of the really useful tricks of the &lt;a href="http://www.aqute.biz/Code/Bnd"&gt;bnd &lt;/a&gt;tool is the possibility to &lt;span style="font-style: italic;"&gt;copy &lt;/span&gt;code from other bundles. Though many people can get upset about this, it provides me with a way to minimize dependencies without introducing redundancy because there is still one source code base.&lt;br /&gt;&lt;br /&gt;The current solution of superpackages is highly rigid and static with its double linked structure. A class can