OSGi as a Framework for Building a Product Line: Experience and Best Practices Ruwan Linton & Afkham Azeez

Slides:



Advertisements
Similar presentations
When Applications can Roam Freely OSGi Service Platform R4 Peter Kriens Technical Director OSGi
Advertisements

Copyright Hub Software Engineering Ltd 2010All rights reserved Hub Document Manager Product Overview.
Chapter 13 Review Questions
 Copyright 2005 Digital Enterprise Research Institute. All rights reserved. The Web Services Modeling Toolkit Mick Kerrigan.
Spring, Hibernate and Web Services 13 th September 2014.
Service Oriented Architecture Concepts March 27, 2006 Chris Armstrong
Service Oriented Architecture
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Integrating SOA and the Application Development Framework Shaun O’Brien Principal Product Manager – Oracle JDeveloper / ADF.
Why OSGi matters for Enterprise Java Infrastructures
Apache Axis2 - OSGi Integration in WSO2 Carbon Platform
OSGi: Open Services Gateway Initiative Richard Chapman 5 Sept
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Page 1 Building Reliable Component-based Systems Chapter 18 - A Framework for Integrating Business Applications Chapter 18 A Framework for Integrating.
Spring Dynamic Modules. Startlocation: Documentation: /1.2.1/reference/html/
Oracle 11g Architecture and Internals by Suresh Karnati
Kasun Indrasiri Associate Technical Lead PMC, Apache Synapse Member, Integration MC WSO2 Inc. May 2013 Introduction to WSO2 ESB.
Understanding and Managing WebSphere V5
® IBM Software Group © IBM Corporation IBM Information Server Service Oriented Architecture WebSphere Information Services Director (WISD)
Talend 5.4 Architecture Adam Pemble Talend Professional Services.
UNIT-V The MVC architecture and Struts Framework.
Client/Server Architectures
95-843: Service Oriented Architecture 1 Master of Information System Management Service Oriented Architecture Oracle SOA Suite 11g.
Agenda Introduction to the Guidewire platform
SOA – Development Organization Yogish Pai. 2 IT organization are structured to meet the business needs LOB-IT Aligned to a particular business unit for.
Introduction to the JBoss Presented by: Hao Shi. Agenda Application Servers What is JBoss JBoss features Architecture of JBoss Installation and running.
SOA, BPM, BPEL, jBPM.
DYNAMICS CRM AS AN xRM DEVELOPMENT PLATFORM Jim Novak Solution Architect Celedon Partners, LLC
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
ESB Guidance 2.0 Kevin Gock
OSGi.
Kuali Rice at Indiana University Rice Setup Options July 29-30, 2008 Eric Westfall.
Introduction to the Atlas Platform Mobile & Pervasive Computing Laboratory Department of Computer and Information Sciences and Engineering University of.
What’s new in Stack 3.2 Michael Youngstrom. Disclaimer This IS a presentation – So sit back and relax Please ask questions.
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
OSGi Enablement for Tuscany Raymond Feng. Overview.
OSGi Service Platform Open Service Gateway initiative.
Webservice versioning using osgi Allard Buijze, Jettro Coenradie.
Component Technology. Challenges Facing the Software Industry Today’s applications are large & complex – time consuming to develop, difficult and costly.
Open Service Gateway Initiative (OSGi) Reporter : 林學灝 侯承育 1.
Copyright © IBM Corp., All rights reserved. From SWT to RCP: Experiences implementing RSSOwl 2.0 with RCP Benjamin Pasero.
Plug-In Architecture Pattern. Problem The functionality of a system needs to be extended after the software is shipped The set of possible post-shipment.
© 2002, Youngjoon Choi, RESL, Inha University Page : 1 Open Services Gateway initiative OSGi Open Services Gateway Initiative Youngjoon Choi © Realtime.
Building a scalable multi-tenanted Cloud-native Application Server using Tomcat, Axis2 & Synapse.
ICT Strategy Intelligent Highways: Endpoint Adapters.
SOA-25: Data Distribution Solutions Using DataXtend ® Semantic Integrator for Sonic ™ ESB Users Jim Barton Solution Architect.
Getting Started with the Open Services Gateway Initiative (OSGi) CNT 5517 Dr. Sumi Helal, Ph.D. Professor Computer & Information Science & Engineering.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Introduction to business component technologies. Component definitions Szyperski: A software component is a unit of composition with contractually specified.
Impala A dynamic module framework for Java web development Phil Zoio Realsolve Solutions Devoxx 12 December, 2008.
Introduction to OSGi +ActorFrame Surya Bahadur Kathayat
Plug-In Architecture Pattern. Problem The functionality of a system needs to be extended after the software is shipped The set of possible post-shipment.
ECLIPSE RICH CLIENT PLATFORM Part 1 Introduction.
XNAT 1.7: Getting Started 6 June, Introduction In this presentation we’ll discuss:  Features and functions in XNAT 1.7  Requirements  Installing.
Build and Learn ASP.NET Workshop.
WebSphere Diego Leone.
Netscape Application Server
Shared Services with Spotfire
Open Source distributed document DB for an enterprise
Overall Architecture and Component Model
Introduction to J2EE Architecture
Advanced Integration and Deployment Techniques
Oracle Architecture Overview
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Developing and testing enterprise Java applications
敦群數位科技有限公司(vanGene Digital Inc.) 游家德(Jade Yu.)
Introduction to SOA Part II: SOA in the enterprise
Plug-In Architecture Pattern
Mulesoft Anypoint Connector for AS/400 and Web Transaction Framework
Presentation transcript:

OSGi as a Framework for Building a Product Line: Experience and Best Practices Ruwan Linton & Afkham Azeez

Agenda SOA Middleware Products Componentized SOA Platform Why OSGi? Challenges faced Best practices WSO2 Carbon

SOA Middleware Products. Traditional SOA platforms are: Overly complex Heavyweight Not internally consistent Hard to learn Acquired, not designed The components don't fit well together The result is: centralizing SOA on a single hub based ESB relying on the “SOA team” to solve problems Replacing centralized monolithic applications with - Centralized monolithic ESB and SOA platform

Customers waste time integrating vendor's products Time that could be spent integrating real applications Product Integration Adding new aspects of SOA (e.g. process choreography) means installing and learning a completely new product Continuity Large SOA platform “components” are actually distinct products Bigger installations encourage centralization SOA Deployment SOA adoption is restricted because tools are so difficult to use Skills Heavyweight, complex and bloated Downloading an evaluation can take days Agile Adoption What is wrong with existing SOA Platforms?

Solution? Componentized SOA Platform –WSO2 Carbon Architecture based on OSGi

Why OSGi? It's a framework which specifies a modular architecture for dynamic component based systems. It can be used as the underlying core modularization technology.

Why OSGi? It's a dynamic module system for Java. –Bundle( == jar) is called the Modularization unit. –Meta data can be specified in manifest headers. –Separate classloader for a bundle. –A bundle can share or hide packages. –Allows multiple versions of the same class in a single VM. This solves jar hell problem.

OSGi services provides in-VM collaborative SOA model –Each bundle can provide services to other bundles –Services are simply Java objects that implement a given interface –There is a Service Registry where you can find a service implementation –Services should be only links between components –Best known way to decouple components from each other. –This allows components to be substituted. –Significantly minimize class loading problems Why OSGi...

Why OSGi.. It's Dynamic –The OSGi component model is a dynamic model –Bundles can be installed, started, stopped, updated, and uninstalled without shutting down the whole system.

What is WSO2 Carbon? OSGi

What is WSO2 Carbon? A framework based on OSGi –Uses Equinox by default Still very closely based on Apache technology –Apache Axis2, Apache Synapse, Apache ODE –Apache Tomcat, Apache Axiom, and many other core libraries A well defined component model for Enterprise Middleware

Core Carbon Framework Security Mgmt Admin UI Bundle Mgmt ClusteringTransports Stats

Enterprise Service Bus Security Mgmt Admin UI Bundle Mgmt ClusteringTransports Stats Tasks Proxy Message Mediation Core Repository

Web Services Application Server Security Mgmt Admin UI Bundle Mgmt ClusteringTransports Stats JSR181 Service Clients Service Hosting Data Services Data Source Mgmt DS Wizard Core Reposity

The Full Component Repository Security Mgmt Admin UI Bundle Mgmt ClusteringTransports Stats AtomPub JSR181 Service Clients Service Hosting Tasks Proxy Message Mediation Script Services Gadgets Scraping Instance UI BPEL Runtime Process UI Data Services Data Source Mgmt DS Wizard Core Repos SOA Govern

A distributed example

Unified management console Can be run independently and connect to any JVM instance

Use case: Data services & mediation Daniel is a Database Administrator – He has used WSO2 Data Services to expose his Data as Secure Web Services across the Enterprise – Now he has been asked to implement an existing schema – By adding the Mediation component and using XSLT or E4X he can effectively convert the existing service interface to match the corporate schema Security Mgmt Admin UI Bundle Mgmt ClusteringTransports Stats Transform Data Services Data Source Mgmt DS Wizard Core Repository

Use case: POJO service and logging Helen is a POJO Service developer – She has an existing POJO service – The analytics department would like her to send a copy of every service request to them – She could write a new Handler in Java, but she discovers it takes 5 minutes to deploy and test the ESB Clone Mediator Security Mgmt Admin UI Bundle Mgmt ClusteringTransports Stats JSR181 Service Clients Service Hosting Message Core Reposty Mediation

Challenges Difficult to convert existing code into OSGi bundles. Legacy jars use class loaders heavily, hence most likely to fail in an OSGi environment. Getting the “start level” of bundles right is hard. No built in support for JSPs in the model Originally designed for embedded devices Needs little more tuning to fit into the server runtime. No support for the new servlet-api specs even in the latest OSGi R4 spec

Getting Started 1. How to convert an existing project into OSGi First create a big OSGi bundle including all your project code and dependent jars. Use a BundleActivator to call the main class. Get your project working. gradually break down the big bundle into manageable bundles. –remove all the dependent jars and use their OSGified versions. –If possible, break down your project into reusable components(bundles)‏ You will get so many issues. Solve them and keep it working!! Use Ant/Maven bundle plugin to create bundles.

Best practices.. 2. Use proper package imports. Import all the packages your bundle needs Use version when importing packages –This avoids version conflicts. –Fixed versions vs. version ranges. User Import-Package instead of Require-Bundle –Import-Package can have many providers –Require-Bundle can only have a single provider. Avoid using Class.forName –a lots of ClassNotFoundExceptions. –Use OSGi services to handle these dynamic collaborations between bundles. –As a workaround for Class.forName, use DynamicImport-Package. But this is not the recommended approach.

Best practices.. 3. Avoid start ordering dependencies. Starting order of bundle may differ on different framework. Use ServiceTracker utility or Declarative Services 4. Whiteboard pattern.

The whole platform was designed to be consistent The products integrate using the Registry out-of-the-box Product Integration Can install new function into an existing deployment The same Admin UI works for all products Continuity Choose the components you need Total platform is <150Mb (1/4 the size of Oracle) Designed for Distributed Deployment with a central registry SOA Deployment Based on industry standards Common patterns can be applied across products Skills Start with the components you need, and grow as needed Agile Adoption What is right with Carbon?

Powered by OSGi OSGi is the underlying core modularization technology – Shipping with Eclipse Equinox by default – Can be supported on Spring dm Server, Felix and Knoplerfish if required Uses the core OSGi approach to support plugging in new function in a managed way Any OSGi bundle can be deployed (e.g. ActiveMQ)‏ New components can be deployed into an existing installation Used for both server runtime as well as for componentized management console Customers can write and deploy their own OSGi components

But more than just OSGi Analogies: – Eclipse uses OSGi but is much more – it defines how you plug Tool components into a Tooling Framework – Microsoft Office uses DLLs, but is much more – it defines how you can share a graph component across multiple document types Carbon uses OSGI, but it also defines how you build a consistent SOA platform – New service types plug into the console – Security, throttling, stats, TryIt, all work on any service component Not just using OSGi for componentizing a single product, but rather entire middleware platform

Summary Highly adaptable to real SOA deployments – Adapt your middleware to your enterprise architecture, not your architecture to the middleware