An Introduction to OSGi: Creating Highly Modular Java Systems Simon Archer, IBM 15 November 2010.

Slides:



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

OpusCollege and Spring-DM. OSGi based web applications – three strategies OSGi container embedded in another container: OSGi Bridge Server (OBS)  e.g.
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
SelfCon Foil no 1 Dynamic component systems 1. SelfCon Foil no 2 Pre-structured systems vs. dynamic component systems Pre-structured – emphasis on content.
OSGi Technology Hsin-Han Yang, Cheng-Yi Chien, Po-Cheng Huang.
® IBM Software Group © 2010 IBM Corporation What’s New in Profiling & Code Coverage RAD V8 April 21, 2011 Kathy Chan
Spring, Hibernate and Web Services 13 th September 2014.
Component Models and Technologies Case Study: OSGI.
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
OSGi as a Framework for Building a Product Line: Experience and Best Practices Ruwan Linton & Afkham Azeez
Why OSGi matters for Enterprise Java Infrastructures
Apache Axis2 - OSGi Integration in WSO2 Carbon Platform
A Brief Introduction to Software Design and Design Quality By Laura Leventhal.
Application Servers What is it? General A set of software frameworks, components, utilities, functionality that enables you to develop and deliver n-tiered.
D-OSDi + Android Progress Presentation Xinyi Dong Long Qiu.
Component and Deployment Diagrams
Pragmatic Application Building: Step by Step Jay Sissom Principal Systems Analyst Indiana University
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
Spring Dynamic Modules. Startlocation: Documentation: /1.2.1/reference/html/
Understanding and Managing WebSphere V5
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Agenda Introduction to the Guidewire platform
© 2009 IBM Corporation 1 RTC ClearQuest Importer and Synchronizer Lorelei Ngooi – RTC ClearQuest Synchronizer Lead.
Web-based design Flávio Rech Wagner UFRGS, Porto Alegre, Brazil SBCCI, Manaus, 24/09/00 Informática UFRGS.
February Semantion Privately owned, founded in 2000 First commercial implementation of OASIS ebXML Registry and Repository.
UML Unified Markup Language Ziya Karakaya Atılım University, Computer Engineering
OSGi.
Gemini – Shaping the Future of Enterprise Java Mike Keith Glyn Normington
Introduction to the Atlas Platform Mobile & Pervasive Computing Laboratory Department of Computer and Information Sciences and Engineering University of.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
Choon Oh Lee OSGi Service Platform. About OSGi Service Platform What it is, Where it is used, What features it provides are Today’s Content.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
© 2007 by «Author»; made available under the EPL v1.0 | Date | Other Information, if necessary Eclipse SOA Tools Platform Project Eric Newcomer IONA Technologies.
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Introduction to J2EE Architecture Portions by Kunal Mehta.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
Webservice versioning using osgi Allard Buijze, Jettro Coenradie.
Open Service Gateway Initiative (OSGi) Reporter : 林學灝 侯承育 1.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
© 2008 IBM Corporation Snehal S. Antani WebSphere XD Technical Lead SOA Technology Practice, ISSW, IBM WebSphere XD Compute Grid Developing Tooling Story.
2012 Agile Conference. Introduction Background Examining a case study of a project that was filled with dead code and how a team turned it around. This.
Kuali Enterprise Workflow Kuali Days – November 2008 Scott Gibson, University of Maryland Bryan Hutchinson, Cornell University James Smith, University.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
© 2002, Youngjoon Choi, RESL, Inha University Page : 1 Open Services Gateway initiative OSGi Open Services Gateway Initiative Youngjoon Choi © Realtime.
ICT Strategy Intelligent Highways: Endpoint Adapters.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Slide 1 ApacheCon 2011 > Doreen Seider> Using OSGi to Build Better Software > Using OSGi to Build Better Software Lessons from a Telemedicine.
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 1 Lars Vogel 4/22/2009.  Who am I?  Eclipse as a platform  What is Eclipse RCP?  Extension Points / Extensions  Equinox  SWT & JFace.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
©2001 Priority Technologies, Inc. All Rights Reserved Meteor Status Miami Face to Face Meeting January 16 – 18, 2002.
Impala A dynamic module framework for Java web development Phil Zoio Realsolve Solutions Devoxx 12 December, 2008.
ITEA S4ALL project, 20th June 2007 S4ALL: Services For ALL ITEA S4ALL Demonstration 4 and 5 Deploying any ITEA S4ALL Infrastructure Automatically Nicolas.
IBM Proof of Technology Discovering the Value of SOA with WebSphere Process Integration © 2005 IBM Corporation SOA on your terms and our expertise WebSphere.
ECLIPSE RICH CLIENT PLATFORM Part 1 Introduction.
Swing OSGi Modular Desktop Application Framework Jaroslav Tulach, Oracle Anton Epple, Eppleton.
The Holmes Platform and Applications
Containers as a Service with Docker to Extend an Open Platform
Overall Architecture and Component Model
Introduction to J2EE Architecture
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Component Technology Bina Ramamurthy 2/25/2019 B.Ramamurthy.
Presentation transcript:

An Introduction to OSGi: Creating Highly Modular Java Systems Simon Archer, IBM 15 November 2010

Who is this guy anyway? I’m a software engineer, just like you. Comp. Sci. degree from the UK, where I learned Smalltalk in the early ’90s. Smalltalk developer in London and then Cary. Smalltalk is the perfect programming language (debate later). Learned Java in 1996 as demand for Smalltalk began to wane. Joined OTI in 1998 and started using OSGi in 1999 when it emerged as a solution for networked devices such as set-top boxes. At OTI we worked with automotive customers that wished to build dynamic telematics applications, for which we used OSGi. Been involved with Eclipse and Equinox since their inception.

Who is this guy anyway? Also at OTI, worked on an RFID edge application that tracks goods as they flow in and out of a warehouse, while communicating with back-end server. All OSGi-based. Since 2006 I’ve worked on the Jazz Foundation team at IBM’s Rational division in RTP. Jazz uses OSGi on the client (it’s an Eclipse-based application) and on the server using the Equinox Servlet Bridge. In February 2010 I co-authored the book “OSGi & Equinox: Creating Highly Modular Java Systems” with Jeff McAffer and Paul Vander Lei. See Talked about all things OSGi at EclipseCon 2010.

OSGi is a hot topic these days; all the major Java application server vendors have adopted OSGi as their base runtime, Eclipse has been using OSGi as the basis of its modularity story and runtime for at least the past five years, and countless others have been using it in embedded and “under the covers” scenarios. All with good reason. From the Preface of “OSGi & Equinox: Creating Highly Modular Java Systems”

What is OSGi? OSGi defines a Java framework for building and executing modular software. Leverages Java’s class loading techology. OSGi once stood for “Open Services Gateway initiative”, but now it’s just “OSGi”. The OSGi Alliance is an independent, non-profit corporation working to define open specifications. The OSGi Service Platform Core Specification describes a software deployment and configuration management architecture. On the web at There are numerous implementations: –Equinox, from Eclipse, –Felix, from Apache, –Knopflerfish,

The OSGi Framework Core framework is remarkably small at just 27 Java types. In OSGi parlance a software module is called a bundle. Application > Bundle > Package > Type > Method OSGi enables the implementation of loosely coupled software modules. OSGi enables the implementation of highly cohesive software modules. OSGi enables dynamic installation, update and removal of software modules; no VM restart required. But using the OSGi framework is not all that it takes…

Coupling? Coupling is an outward view of the number of relationships between a bundle and other bundles in the system. Bundles should be loosely coupled. A loosely coupled bundle is more likely to be used, reused and tested. “Don’t make me inflate an entire universe!” Loosely coupled bundles are simpler to understand, test, debug change, etc.

Loose Coupling is Good

Tight Coupling is Bad!

Cohesion? Cohesion is an inward view of the relevance of the elements of a bundle to one other. In a highly cohesive bundle all parts are directly related to, and focused on, addressing a defined, narrowly focused topic. Sadly, low cohesive bundles are rife. Highly cohesive bundles require careful design to keep them small.

High Cohesion is Good

Low Cohesion is Bad

The Software Crisis Yes, there is still a software crisis! Many applications are fragile monoliths with poorly defined dependencies, collaboration points and behavioral responsibilities. Modularity is remarkably hard without OSGi. OSGi enforces good software modularity. Modularity, it turns out, is the lubricant of collaboration.

Modular Software, Right?

Wrong!

Manage Dependencies

Encapsulation Bundles should be encapsulated from each other. Encapsulation enables loose coupling. Encapsulation enables the hiding of implementation details. A bundle’s API should be split into internal and external. Encapsulation at the module level is challenging in Java due to weak visibility rules.

Good Fences Make Good Neighbors

Granularity Bundle size matters. The size of a bundle affects its coupling and cohesion. Big bundles often have low cohesion and high coupling. Big bundles are harder to: –Use –reuse –Test –Debug

Size Does Matter

Plain Old Java Objects (POJOs) Bundles should be POJOs (as far as possible). While OSGi-defined types exist, you should not create dependencies between your bundles and OSGi types. Bundles that are just POJOs are easier to test, use and reuse.

It's bad mojo to pollute the POJO

OSGi Services Bundles can collaborate via the OSGi service registry. A service is just an instance of a POJO class. Services are often stateless. Services must be thread-safe. Multiple implementations and instances of a service are common. Services are dynamically bound and unbound at runtime by either OSGi-specific wiring code, or the Declarative Services runtime.

Use Services

Not Everything Should be a Service

Importing and Exporting Packages By default a bundle can only see java.* and its own types. Bundles can export packages to other bundles. Bundles can import packages from other bundles. At runtime a bundle is only resolved if its imported packages can be satisfied.

OSGi will make your app dynamic

OSGi on the Server? It is possible to package the OSGi framework inside a WAR and run it in a servlet container on Tomcat, WebSphere, etc. This is what the Jazz Project uses. See: This, and everything mentioned so far is discussed in the book…

Demo Time!

Demo

Interested in JEE? The Apache Aries Project: The Aries project is delivering a set of pluggable Java components enabling an enterprise OSGi application programming model. This includes implementations and extensions of application-focused specifications defined by the OSGi Alliance Enterprise Expert Group (EEG) and an assembly format for multi-bundle applications, for deployment to a variety of OSGi based runtimes. The Eclipse Virgo Project: Eclipse Virgo is a modular open source application server based on OSGi. It supports standard WAR files and modular webapps comprising OSGi bundles.

Questions?