YOUR FEEDBACK
Working at Google vs. Working at Microsoft
Ray the Barbarian wrote: I worked at Microsoft Research, and I had an in p...
SOA World Conference
Virtualization Conference
$50 Savings Expire June 24, 2008... – Register Today!


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SOA World Editorial - Discovering Dr. Dolittle
From the title, you might be thinking that I'm about to start this month's editorial with a reference to talking to animals and somehow tie that into SOA. Instead, what I actually would like to talk about is the pushmi-pullyu (I got the spelling from Wikipedia; I always thought it was 'push-me pull
SYS-CON.TV
TODAY'S TOP SOA & WEBSERVICES LINKS


Universal Middleware: What's Happening With OSGi and Why You Should Care
Containers - Is It Time for Another One?

Digg This!

Page 2 of 3   « previous page   next page »

For example, a customer relationship management (CRM) solution would have modules such as sales, marketing, call center, and customer service. These modules use services exposed by other modules. To implement such a modular SOA pattern in Java-based enterprise systems there are often issues such as class conflict, unintended use of internal functions, interrupted upgrades, and multiple versions. Problems such as bundling, abstractions, dependencies, dynamic loading, lifecycle management, and side-by-side versioning are programmers' nightmares. Ideally containers should take care of these common issues, freeing application developers to solve the business problems.

Unfortunately many containers, including Enterprise JavaBeans (EJB), don't solve these issues satisfactorily. In this article, we'll explain how an Open Services Gateway initiative (OSGi) container would solve them. We'll begin with an introduction to the OSGi's solution to the problem, concepts, and platform, and then we'll delve into the evolution of the OSGi from its past in the world of embedded devices to its future in enterprise systems. We'll also explain the relationship between the OSGi and other initiatives, containers, and technologies to provide a comprehensive picture of the OSGi from the perspective of software development.

OSGi's Background
In March 1999, the OSGi Alliance was formed to provide a dynamic component model for service gateways to develop networked embedded systems.

The OSGi specifications developed provide a standardized, component-oriented platform for Java-based software. The platform solves the dynamic loading, versioning, and lifecycle management issues for Java-based services and also provides services to develop an ecosystem around it. In the last few years, OSGi has progressed far enough beyond embedded systems that its promoters are positioning it as universal middleware.

In retrospect, the use of "G" for "gateway" in the OSGi acronym is something of a misnomer. Universal middleware has a broader scope than just gateways, which are typically brokers on a network edge that provide interaction between external and internal networks. The use of the OSGi specification has broadened beyond embedded devices. This trend is noticeable in the alliance's supporting organizations too. Initially most of the supporting organizations were from the embedded space. Currently they've expanded to include major J2EE application vendors, ESB and middleware vendors.

Introduction to OSGi's Solution and Its Architecture
OSGi provides a component-oriented, lightweight container framework to host dynamically managed services. A module, called bundles in the OSGi, is a jar containing interfaces, their implementations, other classes, and a manifest. A bundle is a basic module for packaging, deploying, and managing the lifecycle of a group of services.

OSGi Bundles Provide an Isolation Model
Each OSGi bundle encapsulates packaged services and controls their visibility through metadata in a manifest file. As shown in Figure 1, a package or service in a module can be made available to other modules by explicitly exporting it. Other modules can't access any internal, non-exported interfaces or their implementations or other internal classes. In Figure 1, notice the import statements. Classes from other bundles can use these exported services by explicitly declaring imports.

OSGi Container Manages Lifecycle & Supports Dynamic Loading
Modules go through lifecycle events such as deploy (install), start, stop, redeploy, and uninstall. When a module (bundle) is being installed, the container checks all the dependencies (imports). If all the dependencies are satisfied, the module is ready to start. Figure 2 shows the lifecycle management of OSGi bundles. The OSGi runtime container provides a lightweight microkernel in which modules can be dynamically added or removed.

OSGi Natively Supports Dynamic Versioning of Services
During the long life span of enterprise software, business and technology changes. The software must reflect these changes and upgrade different modules independently of each other. For example, a company might have a customer data model (CDM) for its sales, order capture, and marketing systems. When there's an upgrade of the CDM, the company might choose to upgrade sales and marketing systems. However, upgrading the order capture system could have implications for business process or stability and so might not be upgraded at the same time, resulting in a need to support two versions of the CDM simultaneously.

The OSGi specification natively supports versioning with version attributes in the export and import instructions (see Figure 1) in the manifest files. It also provides additional control via arbitrary export/import attributes. The selection of an imported service or bundle is based on its version and attribute(s). OSGi also provides a unique isolation model in which multiple versions of the same service can co-exist and each service instance is isolated from the potential problems of class conflicts. A service consumer can get a reference to the correct version by specifying a version and other attributes in a filter as shown in Figure 3.

OSGi Provides a Service-Oriented Programming Model
OSGi also provides a programming model based on SOA. It's important to note that OSGi natively provides service-oriented programming in a dynamic environment. Unlike the RMI service registry, the OSGi service registry is native to the container - the services are automatically registered during the load without having to register them programmatically. A publisher can register a service using the registerService method in its BundleContext. Similarly, a service requester can discover a service using the getServiceReference method from its BundleContext. Unlike EJB or RMI, the services don't need to implement any remotable interface. It's all POJO!

OSGi Can Handle the Dynamic Lifecycle of Services
Again, in enterprise software you can add or remove modules. Since the container automatically manages the registration and deregistration, application programmers have to understand that services come and go at any time. OSGi provides a framework to track and react to lifecycle changes in the service, sending notifications of the registrations and deregistrations to a service layer that also provides a service tracker utility to help client programming in this dynamic environment (Figure 3). There's also a declarative model to handle lifecycle changes. Other containers like EJB/RMI don't handle such changes in lifecycle.

OSGi and Spring: Providing a Stable Proxy in a Dynamic Environment
The OSGi/Spring combination further enriches the solution to the dynamic lifecycle problem. Interface21 is already working to develop OSGi/Spring integration, and in March 2007 provided a first milestone drop for download. The current specification is version 0.7 and is still being evolved. The specification's stated goal is to provide an "easier path to build Spring applications that can be deployed in an OSGi execution environment and that can take advantage of the services offered by the OSGi framework."

The goal of the OSGi/Spring effort is to combine the best features of both OSGi and the Spring framework. This integrated framework inherits isolations and modularity, side-by-side versioning, dynamic deployment, and updates and dynamic discovery from OSGi. Spring provides an easy-to-use framework based on dependency injection (DI) and aspect-oriented programming (AOP), powered by various services.

Spring provides a simple, familiar programming model that enterprise developers can use to exploit the features of the OSGi platform. The OSGi/Spring combination also manages the switching of services in the background. Spring provides a stable proxy for services that can dynamically come and go. If a service in use needs a behind-the-scenes upgrade, the Spring-based proxy lets you to bring down the service and replace it without a glitch in the stateless environment. In stateful Web Services, clients must track the lifecycle of the target service. The OSGi/Spring combination provides a service binder framework to track and react to the binding and unbinding of the target services. The Spring framework provides a stable proxy in a dynamic environment, and the OSGi platform provides dynamic lifecycle and versioning.



Page 2 of 3   « previous page   next page »

About Dave Chappell
David Chappell is vice president and chief technologist for SOA at Oracle Corporation. Chappell has over 20 years of experience in the software industry covering a broad range of roles including Architecture, code-slinging, sales, support and marketing. He is well known worldwide for his writings and public lectures on the subjects of Service Oriented Architecture (SOA), the enterprise service bus (ESB), message oriented middleware (MOM), enterprise integration, and is a co-author of many advanced Web Services standards. Chappell is a regular contributor to SOAWorld Magazine and a speaker at the "SOA World Conference & Expo" since 1999.

About Khanderao Kand
Khanderao Kand is an architect for Oracle Fusion Middleware at Oracle Corp. He is involved in the development of various integration and BPM technologies including ESB. He is an editor of WS-BPEL?s Primer in WS-BPEL?s technical committee at OASIS. Earlier he played roles as an Enterprise Architect of Peopletools and an architect in CRM.

Costin Leau wrote: It's worth mentioning that Spring Dynamic Modules for OSGi Service Platforms (or the Spring OSGi integration in short), had its 1.0 final release, after 3 milestones and 3 release candidates, on January 25th, 2008. The official announcement can be found at: http://w ww.springsource.com/web/g uest/2008/spring-dm-intro
read & respond »
Richard Nicholson wrote: Those interested in a commercial distributed runtime, built from the ground up using OSGi R4 and SCA, may be interested in the Infiniflow Service Fabric - see www.paremus.com, or its open source relation newton.codecauldron.org. In addition to having leveraged these important industry developments for the last 18 months, Infiniflow, described by analysts as a Cloud OS or virtual application server, augments these with industry unique self-managing, self-scaling behaviors, and with transparent runtime support for Spring Dynamic Modules.
read & respond »
SOA WORLD LATEST STORIES
Adobe's Kevin Lynch and Microsoft's Scott Guthrie to Keynote AJAX World RIA Conference & Expo
Two of the biggest launches in Rich Internet Application history took place in 2007/2008 when Adobe launched AIR 1.0 in February '08 and Microsoft launched Silverlight (September '07). At the 6th International AJAXWorld RIA Conference & Expo in October SYS-CON Events is delighted to be
SYS-CON's Virtualization Expo Attracts More Delegates Than Gartner
Virtualization has quickly become a staple new concept for enterprise IT. At SYS-CON's 3rd International Virtualization Conference & Expo, held at the Roosevelt Hotel in New York City, June 23-24, we had exceptional speakers with high-quality use cases not only of how virtualization ma
Progress Software Announces Mindreef and IONA Acqusitions at SOA World Conference
Progress Software has acquired Mindreef, a provider of SOA service validation and testing tools. Mindreef will be fully integrated into Progress Software, and will adopt the Progress Software company name. Progress expects to retain most Mindreef product names, however, this will be re
Web 2.0 Journal Case Study: Transcending E-mail as a Platform for Multi-Person Collaboration
E-mail is extremely easy to adopt and use, and lends itself very well to certain types of collaboration. When two people are attempting to collaborate asynchronously, e-mail is usually the best solution. It's certainly far less frustrating than phone tag. But once more people are invol
Elixir Technology (Represented by JNet Direct) Nominated for SYS-CON's "SOA World Magazine Readers' Choice Awards"
Elixir Technology provides Integrated Business Intelligence with Elixir Repertoire - a product for Dashboard, Reporting, Data ETL and Scheduling. Supporting 'Web 2.0' with RESTful Web Services architectural approach on SOA, Elixir Repertoire aims to power the new generation enterprise
Seagull Software Nominated for SYS-CON's "SOA World Magazine Readers' Choice Awards"
Legacy systems typically contain the most critical information in an enterprise, and many organizations have more than one type of legacy platform. LegaSuite Integration is a middleware tool to simplify and accelerate integration of all types legacy data, business logic and screens wit
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS


ADS BY GOOGLE