Tuesday, August 31, 2010

Easier Configuration Admin

We are likely to introduce a new service that makes Configuration Admin significantly easier to use. How? By using the Java type machine. Though properties are nice and flexible, they tend to cause cluttered code because of the required checks and conversions. The new model therefore defines configuration types with interfaces. For example, this is how a simple configuration type for a web service would look like:
package com.acme.webconf;
public interface WebConf {
int port();
String host();
}
The PID is defined by the interface name, in this example it is com.acme.webconf.WebConf. This "record" has a port (an integer) and a host name (a String). A bundle that wants to receive this information, only has to register a Configurable<WebConf> service. For example:
 @Component
public Webserver implements Configurable<WebConf> {
public void setup(WebConf conf ) {
web( conf.port(), conf.host() );
}
public void deleted(WebConf conf) {
stop();
}
}
No more type error prone type conversions, no more spelling errors in property names or PIDs! And you're not restricted to a single PID, you can extend the interfaces with other interfaces and each extended interface name will automatically be used as PID, merging all underlying configuration records. Annotations in this specification will also make data validation easier.

It is also possible to use factories. In that case, register a ConfigurableFactory, which looks like:
 public interface ConfigurableFactory<WebConf> {
Configurable<WebConf> newInstance();
void noConfigurations();
}
This specification will make Configuration Admin significantly easier to use.

Peter Kriens

P.S. Did you already register for the community event?
P.S. And did you look at the Masterclass On OSGi (with certificate) in Girona?

Thursday, August 19, 2010

OSGi Community Event Sept. 29-30 in London


Just a small reminder that you still have to register for the OSGi Community Event, September 29-30 in London! We really have a very strong program this year, there are lots of very interesting presentations. From the program it is clear that OSGi is maturing in many verticals of the software industry. From the Appstore for the connected home market to the enterprise application twins Apache Aries and and Eclipse Virgo, it is clear that OSGi provides a modularity solution that transcends the silos in our industry.

OSGi provides the solid foundation that is needed when applications grow in size, as applications always do. After a certain scale, strong modularity becomes a necessity to stay on top of the complexity. The community event is an excellent opportunity to learn a software technology that will become increasingly important in the next few years.

The program at the event is interesting for many different people. For beginners because there are tutorials for building enterprise applications, handling dependencies (the hallmark of any large software system), and bndtools (an Eclipse based development tool for OSGi bundles). For experts, because some of the presentations take a deep dive in the complexity of componentizing large systems, providing insights in the problems as well as providing guidance towards solving these problems. There will also be plenty of presentations providing guidance how to modularize your existing applications. And for business people because several presentations take a good look at the business cases for OSGi. The planned sessions are:
And of course as the moderator, I have to invite you to a panel: “I Love OSGi. Now Let’s Change It!” that will host some of the key people in our industry.

This event is targeted at people that have invested in OSGi and want to meet their peers, software architects that need to know more about OSGi, developers that are using OSGi, and business people looking for new opportunities in the software world. So register quickly.

I am looking forward to meet you in London next month!

Peter Kriens

Friday, August 13, 2010

OSGi Masterclass Oct. 12-15

Neil Bartlett and Peter Kriens (that being me) have decided to hold a masterclass together. Neil and I have been working for some time on different tools and we felt that though there are are lots of introductory tutorials there are no places where you can learn in-depth about using (and designing with) OSGi. Together we have quite a bit of experience in the area and we can cover quite a lot of ground.

We intend to run this masterclass very hands on. With the group we will analyze use cases (your use cases are welcome), design a solution, and create prototypes. We intend to cover a lot of different areas: service based design, distributed OSGi, persistence, GUIs, etc. As tool we will be using Neil's bndtools. If you feel not completely sure about your basic OSGi knowledge, we have an introductory day to bring you up to speed.

To keep the cost down, we've organized this masterclass in a hotel near the Girona airport. Girona is very well connected to most European cities because it is a Ryanair and Easyjet hub. Also the price of the masterclass is kept low and the class is limited to 20 people. To top it off, there is also a discount when you register before September 15.

So, consider participating because I am sure about one thing: it will be an interesting masterclass!

Blog Archive