Nimble OSGi

So I just sent a rather cryptic twitter message with the instructions:

posh -kc “repos -l springdm;add org.springframework.osgi.samples.simplewebapp@active”

I figure it’s probably worth a short note to explain what this is doing given the narrowband aspect of twitter communications.

This command is running an instance of the posh (sh)ell which ships with Nimble. There are two switch parameters parsed to the shell:

-c: Tells posh to execute the command passed in from the unix shell in the posh (sh)ell environment
-k: Tells posh to remain running after the command has completed and open a tty session for user input

Now we come to the actual commands:

repos -l springdm: tells posh to load the spring dm repository index into the nimble resolver

add org.springframework.osgi.samples.simplewebapp@active: tells nimble to resolve all dependencies for the spring simplewebapp from it’s configured repositories. (more…)

Is this an application which I see before me?

This post has been triggered by two interesting posts on the topic of what it is to be an application in an OSGi environment. This is something I felt I just had to get stuck in with as its exactly what we’ve been working on in the Newton project.

The way we’ve tackled this is very similar to the approach suggested by Mirko, except instead of using Spring-DM as the top level element in the model we’ve picked SCA.

SCA is a relatively new specification but it gives a vendor neutral way of describing the service dependencies and architecture of an application running in an enterprise environment.

The basic pattern is that a component which has a certain implementation (java, spring, bpel, c, etc) is able to publish a number of services (over a range of protocols – in-memory, RMI, WS, JMS, etc) and consume services from other components via references. The combined unit which is the component, it’s services and it’s references are then packaged in an entity called a composite. (more…)