Reputation: 2068
I am going to implement a server application that should update client software remotely. Clients mostly use pull mechanism for receiving updated software.
As a beginner I am looking for architectures to implement this application. And I know that Life Cycle layer of OSGi would give such service.
I want to know is there any other architectures that give similar service to clients?
Upvotes: 2
Views: 206
Reputation: 6682
If you're writing an Eclipse based application then p2 is the probably the simplest way to go. But if your application is either maven built or you're intending to run more generically on other OSGi containers (Karaf, Felix etc) then you should consider an OSGi Bundle Repository (see standard spec) such as the Felix implementation. If the OBR doesn't quite do what you want, then is API is exposed so you can manipulate it.
The OSGi lifecycle you refer to will give you true hot-deploy (as well as other "perks" of modularity) but the automatic update functionality is much more high level and not part of the framework core (container don't have to implement a remote update mechanism to be compliant).
Where I work we're using Karaf XML features (sets of versioned bundles constituting functionality or an entire application) which are created as part of maven build. From the OSGi shell we can use commands to instruct the OSGi container to find and install these features. This is really neat from a controlled deploy point of view, but if you want fully automatic updates then an OBR is what you want.
If your question refers to alternatives to OSGi as the basis for an update mechanism, then you're looking at things like webstart (JNLP) etc - which will only give you updates at start up time.
IMO OSGi is worth investigating as it's very pleasant to code with and deploy to. As an update/plugin mechanism it cannot really be beaten and you can embed the framework or customize it easily.
Upvotes: 1