Wednesday, September 12, 2012

Disappointed by Jigsaw delay? Java Modularity is here today!

I recently heard that some people are expressing disappointment over the lack of a built-in module system in Java 8, now that Jigsaw is delayed. Some are apparently even looking at technologies other Java because of this. Well, I'd like to point out that There is No Need To Wait! All the modularity that your application needs is already available with OSGi! OSGi pretty much supports everything that Jigsaw was planning to support to allow modularization of applications. And OSGi has more features such as a dynamic lifecycle and a very useful services model. Still OSGi frameworks can be remarkably small. Of the popular implementations Apache Felix is probably the smallest with its implementation in under 500kilobytes. But Eclipse Equinox and our own JBoss OSGi Framework inside AS7 are also very good opensource implementations.

Want to learn how to use OSGi? Like many people I like learning stuff by reading a book. Recently a number of books have been published that provide really good explanations of how to use OSGi, notably OSGi in Action, OSGi in Depth and Kirk Knoernschilds Modular Architecture book, but probably my favorite book is Enterprise OSGi in Action. Besides containing a good description of a number of Enterprise OSGi specs, it also describes really well why certain things are done in OSGi they way they are, which give you a nice and deep understanding of the technology. Additionally it contains some great chapters on how to get your build, test and development environments to work smoothly with OSGi. Enterprise OSGi in Action will be in print later this year, but you can already get it in electronic form from here.

Besides the books, the OSGi Javadoc can be very useful and if you really want to know the details of it all, the OSGi specs are a great resource. Oh, and don't forget to check out the Wikipedia page that shows where you can get implementations of the various OSGi technology.

So in short - no need to wait or turn away from Java if you need Modularity. OSGi is here today and has been used in production by numerous users for many years, just get started by downloading one of the opensource implementations and try it out!

Wednesday, September 5, 2012

Presenting about Cloud Ecosystems at OSGi Community Event 2012

Over the past few months I've been piloting what I started to call an OSGi Cloud Ecosystem. You can see the details on my technical blog <coderthoughts/>. I am coming to the conclusion that OSGi can provide a really interesting basis for a Platform as a Service that can support the fluidity of the cloud, where services migrate from one VM to another and systems can scale up and down as needed, without having to worry about getting swamped by configuring what runs where etc. Your OSGi system is based on a Service Oriented Architecture where your services are implemented and consumed using the widely supported OSGi services programming model. Your system is comprised for multiple cloud VMs each of which may take different roles over time. As the need arises you add or remove cloud VMs that contain some of your OSGi services, migrating services across VMs as needed. However as a consumer you simply use the OSGi Service Registry to find and use your services.
The postings on <coderthoughts/> show a pilot that implements these ideas and I'll be talking more about them (and showing a demo) at the OSGi Community Event 2012 (which is part of EclipseCon Europe 2012) on October 23-25 in Ludwigsburg, Germany. See here for the programme: http://www.osgi.org/CommunityEvent2012/Agenda for general conference information go here: http://www.osgi.org/CommunityEvent2012

Hope to see you there!