Equinox Framework: A Happier OSGi R6 Implementation



Similar documents
OSGi Service Platform Release 4

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

Eclipse 4 RCP application Development COURSE OUTLINE

Operations and Monitoring with Spring

Aspect Weaving for OSGi. Martin Lippert (akquinet it-agile GmbH)

Best Practices for Programming Eclipse and OSGi

Converting Java EE Applications into OSGi Applications

IRF2000 IWL3000 SRC1000 Application Note - Develop your own Apps with OSGi - getting started

IBM WebSphere Server Administration

Introduction to OSGi and Modularity. InfoSphere MDM, Version 11.x Dany Drouin, Senior Software Engineer MDM

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

IBM FlashSystem. SNMP Guide

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

Building a Modular Server Platform with OSGi. Dileepa Jayakody Software Engineer SSWSO2 Inc.

DEPLOYMENT ROADMAP March 2015

OSGi Service Platform in Integrated Management Environments Telefonica I+D, DIT-UPM, Telvent. copyright 2004 by OSGi Alliance All rights reserved.

WebSphere Application Server - Introduction, Monitoring Tools, & Administration

WebSphere Server Administration Course

IBM WebSphere Application Server

ITG Software Engineering

Providing Load Balancing and Fault Tolerance in the OSGi Service Platform

SW5706 Application deployment problems

IBM WebSphere Partner Gateway V6.2.1 Advanced and Enterprise Editions

ARM-BASED PERFORMANCE MONITORING FOR THE ECLIPSE PLATFORM

TIBCO ActiveMatrix BusinessWorks Plug-in for Microsoft SharePoint Release Notes

Enabling Kerberos SSO in IBM Cognos Express on Windows Server 2008

Apache Sling A REST-based Web Application Framework Carsten Ziegeler cziegeler@apache.org ApacheCon NA 2014

IBM WebSphere Message Broker Message Monitoring, Auditing, Record and Replay. Tim Kimber WebSphere Message Broker Development IBM Hursley Park, UK

How To Integrate Pricing Into A Websphere Commerce Pricing Integration

IBM Rational Asset Manager

Swordfish SOA Runtime Framework

EVALUATION. WA1844 WebSphere Process Server 7.0 Programming Using WebSphere Integration COPY. Developer

InfoSphere Master Data Management operational server v11.x OSGi best practices and troubleshooting guide

Memory-to-memory session replication

Apache Karaf in real life ApacheCon NA 2014

Business Process Management IBM Business Process Manager V7.5

Oracle Identity Analytics Architecture. An Oracle White Paper July 2010

Android Developer Fundamental 1

Inside the Digital Commerce Engine. The architecture and deployment of the Elastic Path Digital Commerce Engine

Talend Open Studio for ESB. Release Notes 5.2.1

Introduction to IBM Worklight Mobile Platform

Developing Eclipse Plug-ins* Learning Objectives. Any Eclipse product is composed of plug-ins

ebay : How is it a hit

E4 development: examples, methods and tools. Eclipse Con France 2014

Oracle JRockit Mission Control Overview

Efficient Monitoring of OSGi Applications

Database lifecycle management

Development Environment and Tools for Java. Brian Hughes IBM

Next Generation Open Source Messaging with Apache Apollo

WebSphere Business Monitor

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Supported Hardware and Software. Sybase Mobiliser Platform 5.1 SP03

IBM Business Monitor. BPEL process monitoring

EclipseLink. Solutions Guide for EclipseLink Release 2.5

IBM WebSphere Application Server

BIRT Application and BIRT Report Deployment Functional Specification

Migration Eclipse 3 to Eclipse 4

IBM TRIRIGA Application Platform Version Reporting: Creating Cross-Tab Reports in BIRT

Developer s Guide. How to Develop a Communiqué Digital Asset Management Solution

FUSE-ESB4 An open-source OSGi based platform for EAI and SOA

StreamServe Persuasion SP5 StreamStudio

Practical Performance Understanding the Performance of Your Application

Release Bulletin EAServer for HP-UX Itanium and IBM AIX

Continuous Automated Deployment with

Using and Extending the Test and Performance Tools Platform (TPTP)

WebSphere Business Monitor

IKAN ALM Architecture. Closing the Gap Enterprise-wide Application Lifecycle Management

What's New in BlackBerry Enterprise Server 5.0 SP4 for Novell GroupWise

Agentry SAP Framework. SAP Mobile Platform 3.0

Oracle WebLogic Server 11g Administration

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

LoadRunner and Performance Center v11.52 Technical Awareness Webinar Training

Avigilon Control Center 5 System Integration Guide. for Software House C Cure 9000

GECKO Software. Introducing FACTORY SCHEMES. Adaptable software factory Patterns

Deploying to WebSphere Process Server and WebSphere Enterprise Service Bus

Developing Service-Oriented Architecture Applications with OSGi

EXAM PRO:Design & Develop Windows Apps Using MS.NET Frmwk 4. Buy Full Product.

Integration of Nagios monitoring tools with IBM's solutions

IBM Tivoli Workload Scheduler Integration Workbench V8.6.: How to customize your automation environment by creating a custom Job Type plug-in

Beyond the SOA/BPM frontiers Towards a complete open cooperative environment

Maximum Availability Architecture. Oracle Best Practices For High Availability. Backup and Recovery Scenarios for Oracle WebLogic Server: 10.

Service-Oriented Software Testing Platform *

IBM Cognos 8 BI: The platform of choice for Software as a Service (SaaS)

IBM Tivoli Remote Control

Performance Characteristics of VMFS and RDM VMware ESX Server 3.0.1

Version Overview. Business value

Developing modular Java applications

Amazon Glacier. Developer Guide API Version

WebSphere Business Monitor

IBM WebSphere Operational Decision Management Improve business outcomes with real-time, intelligent decision automation

Integration of DB oriented CAD systems with Product Lifecycle Management

Software to Simplify and Share SAN Storage Sanbolic s SAN Storage Enhancing Software Portfolio

Transcription:

Equinox Framework: A Happier OSGi R6 Implementation Tom Watson IBM March 18 th 2014 OSGi Alliance Marketing 2008-2010 Page. 1 All Rights Reserved

Agenda New to OSGi R6 Core Redesign Core Equinox and Why What Breaks? Page 2

OSGi R6 Core Finalizing specification in March 2014 Equinox Luna release will be the RI (June 2014) R6 Noteworthy Additions Service Scopes Data Transfer Objects Native Namespace Extension Bundle Activators WeavingHook Enhancements Page 3

OSGi R6 Core Service Scopes Identify the scope of a service object Bundles A B C Service Registry Page 4

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles Singleton object that implements the service contract service.scope = singleton Bundles A B C registers S singleton Service Registry Page 5

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles Each Bundle can get access to the singleton object via the registry Bundles A B C gets S singleton Service Registry Page 6

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles Each Bundle can get access to the singleton object via the registry Bundles A B C gets S singleton Service Registry Page 7

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Bundles A B C registers Service Registry Page 8

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles ServiceFactory that creates one service instance for each bundle Bundle Service Factory used to create a service object for each bundle service.scope = bundle Bundles A B C registers SF bundle Service Registry Page 9

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles Each Bundle can get access to a bundle specific service object via the registry Bundle Service Factory used to create a service object for each bundle Bundles A B C gets SF bundle Service Registry Page 10

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Bundles A B C gets SF bundle Service Registry Page 11

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Bundles A B C gets SF bundle Service Registry Page 12

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 Singleton single instance used by all bundles C S 2 Bundle Service Factory used to create a service object for each bundle Bundles A B C gets SF bundle Service Registry Page 13

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service Bundles A B C registers Service Registry Page 14

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service service.scope = prototype Bundles A B C PrototypeServiceFactory That creates multiple service instances for each bundle registers PSF prototype Service Registry Page 15

OSGi R6 Core Service Scopes Identify the scope of a service object Singleton single instance used by all bundles Each Bundle can request a new instance of the service object via the registry Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service ServiceObjects.getService() Bundles A B C gets PSF prototype Service Registry Page 16

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service Bundles A B C gets PSF prototype Service Registry Page 17

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service Bundles A B C PSF prototype Service Registry Page 18

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service ServiceObjects.getService() Bundles A B C gets PSF prototype Service Registry Page 19

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 S 2... Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service Bundles A B C gets PSF prototype Service Registry Page 20

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 S 2... Singleton single instance used by all bundles Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service ServiceObjects.getService() Bundles A B C gets PSF prototype Service Registry Page 21

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 S 2... Singleton single instance used by all bundles C S 3 Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service Bundles A B C gets PSF prototype Service Registry Page 22

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 S 2... Singleton single instance used by all bundles C S 3 Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service Bundles A B C PSF prototype Service Registry Page 23

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 S 2... Singleton single instance used by all bundles C S 3 Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service ServiceObjects.getService() Bundles A B C gets PSF prototype Service Registry Page 24

OSGi R6 Core Service Scopes Identify the scope of a service object B S 1 S 2... Singleton single instance used by all bundles C S 3 S 4... Bundle Service Factory used to create a service object for each bundle Prototype (new for R6) Prototype Service Factory used to create a service object for each request for the service Bundles A B C PSF prototype Service Registry Page 25

Data Transfer Objects An object that carries data between processes The motivation for its use has to do with the fact that communication between processes is usually done resorting to remote interfaces (e.g. web services), where each call is an expensive operation. Does not have any behavior except for storage and retrieval of its own data https://en.wikipedia.org/wiki/data_transfer_object Page 26

OSGi R6 Core Data Transfer Objects DTOs represent the state of runtime objects Core Framework supplies a number of DTOs Easily serializable Only has public fields with limited types Must form a tree to simplify serialization Data contained is a snapshot of the state DTOs do not track state changes DTOs are not thread safe Page 27

OSGi R6 Core Obtaining Core DTOs Core Framework DTOs obtained via bundle adapt DTOType dto = bundle.adapt(dtotype.class) Page 28

OSGi R6 Core Obtaining Core DTOs Core Framework DTOs obtained via bundle adapt BundleDTO for a bundle: state, id, name, version. BundleDTO dto = bundle.adapt(bundledto.class) Page 29

OSGi R6 Core Obtaining Core DTOs Core Framework DTOs obtained via bundle adapt BundleDTO for a bundle: state, id, name, version. BundleRevisionDTO for a bundle revision: requirements, capabilities BundleRevisionDTO dto = bundle.adapt(bundlerevisiondto.class) BundleRevisionDTO[] dtos = bundle.adapt(bundlerevisiondto[].class) Page 30

OSGi R6 Core Obtaining Core DTOs Core Framework DTOs obtained via bundle adapt BundleDTO for a bundle: state, id, name, version. BundleRevisionDTO for a bundle revision: requirements, capabilities BundleWiringDTO for a bundle wiring: required and provided wires BundleWiringDTO dto = bundle.adapt(bundlewiringdto.class) BundleWiringDTO[] dtos = bundle.adapt(bundlewiringdto[].class) Page 31

OSGi R6 Core Obtaining Core DTOs Core Framework DTOs obtained via bundle adapt BundleDTO for a bundle: state, id, name, version. BundleRevisionDTO for a bundle revision: requirements, capabilities BundleWiringDTO for a bundle wiring: required and provided wires ServiceReferenceDTO for a registered service: properties, using bundles ServiceReferenceDTO[] dtos = bundle.adapt(servicereferencedto[].class) Page 32

OSGi R6 Core Obtaining Core DTOs Core Framework DTOs obtained via bundle adapt BundleDTO for a bundle: state, id, name, version. BundleRevisionDTO for a bundle revision: requirements, capabilities BundleWiringDTO for a bundle wiring: required and provided wires ServiceReferenceDTO for a registered service: properties, using bundles FrameworkDTO for the framework: list installed bundles, services, launch props FrameworkDTO dto = systembundle.adapt(frameworkdto.class) Page 33

OSGi R6 Core Obtaining Core DTOs Core Framework DTOs obtained via bundle adapt BundleDTO for a bundle: state, id, name, version. BundleRevisionDTO for a bundle revision: requirements, capabilities BundleWiringDTO for a bundle wiring: required and provided wires ServiceReferenceDTO for a registered service: properties, using bundles FrameworkDTO for the framework: list installed bundles, services, launch props BundleStartLevelDTO for a bundle start-level and start options BundleStartLevelDTO dto = bundle.adapt(bundlestartleveldto.class) Page 34

OSGi R6 Core Obtaining Core DTOs Core Framework DTOs obtained via bundle adapt BundleDTO for a bundle: state, id, name, version. BundleRevisionDTO for a bundle revision: requirements, capabilities BundleWiringDTO for a bundle wiring: required and provided wires ServiceReferenceDTO for a registered service: properties, using bundles FrameworkDTO for the framework: list installed bundles, services, launch props BundleStartLevelDTO for a bundle start-level and start options FrameworkStartLevelDTO for the framework start-level and initial bundle start-level FrameworkStartLevelDTO dto = systembundle.adapt(frameworkstartleveldto.class) Page 35

OSGi R6 Core Native Namespace Describes the native environment the framework is running Framework provides a capability in the osgi.native namespace Bundle-NativeCode headers are converted in to requirements in the osgi.native namespace Last requirement type in OSGi to be transformed into the generic requirements/capabilities model Page 36

OSGi R6 Core Extension Bundle Activators Allows system.bundle fragments to hook into the initialization and shutdown process of the framework Usecase involves scenarios that require hooks to be in place before any other bundles are resolved Equinox regions uses this to ensure the regions are established before any bundle resolution operations occur Page 37

OSGi R6 Core Weaving Hook Enhancements New WovenClassListener Listen to class weaving process to detect new dynamic imports Needed by isolation engines, such as subsystems, to provide access to imports added by WeavingHook implementations Package import permissions are auto-granted to Woven bundles for package imports added by a WeavingHook With security enabled a woven bundle may be prevented from wiring to a package required by a dynamic import added by a WeavingHook Page 38

Equinox Moving Forward Equinox Framework in need of a redesign One unhappy implementation Dependencies are modelled differently from the generic dependency model of the OSGi specification Requires adapting Equinox resolver types to OSGi wiring types Needed to call out to resolver and weaving hooks Hard to reason about locking strategy OSGi Resolver and Weaving Hooks introduced more callouts to user code Too many abstraction layers! Hard to prototype core OSGi changes for the reference implementation Dependency Resolution (e.g. Native Namespace) Creating DTO snapshots adaptor hooks Hook impls base adaptor resolver OSGI wiring Equinox Page 39

Equinox Redesign the Core Implement a core module container Container Page 40

Equinox Redesign the Core Implement a core module container Responsible for managing resources Container Page 41

Equinox Redesign the Core Implement a core module container Responsible for managing resources Lifecycle Container Page 42

Equinox Redesign the Core Implement a core module container Responsible for managing resources Lifecycle Metadata Capabilities and Requirements Container Page 43

Equinox Redesign the Core Implement a core module container Responsible for managing resources Lifecycle Metadata Capabilities and Requirements Resolution Container Page 44

Equinox Redesign the Core Implement a core module container Container Responsible for managing resources Lifecycle Metadata Capabilities and Requirements Resolution Persistent settings Database Page 45

Equinox Redesign the Core Implement a core module container Container Responsible for managing resources Lifecycle Metadata Capabilities and Requirements Resolution Persistent settings Uses an OSGi R5 Resolver service Currently Apache Felix Resolver Database Page 46

Equinox Redesign the Core Implement a core module container Container Responsible for managing resources Lifecycle Metadata Capabilities and Requirements Resolution Persistent settings Uses an OSGi R5 Resolver service Currently Apache Felix Concurrency in mind from the start Properly handle call outs (hooks) while holding no locks Tools may use it for modelling OSGi wiring (PDE) Resolver Database Page 47

Equinox Redesign the Core Implement a core module container Responsible for managing resources Lifecycle Metadata Capabilities and Requirements Resolution Persistent settings Uses an OSGi R5 Resolver service Currently Apache Felix Concurrency in mind from the start Properly handle call outs (hooks) while holding no locks Tools may use it for modeling OSGi wiring (PDE) Does not deal with bundle content, class loading, service registry, event listeners, security Happy Container bundle content class loading service registry event listeners security Page 48

Equinox Redesign the Framework Happy Container bundle content class loading service registry event listeners security I care about that big X Unhappy Equinox Page 49

Equinox Redesign the Framework Uses the container as the core Keeps complicated concurrency concerns in one place Uses reentrant read/write lock for the module 'database' For long running operations optimistic locking is used. For example, resolution. Container Page 50

Equinox Redesign the Framework Uses the container as the core Keeps complicated concurrency concerns in one place Uses reentrant read/write lock for the module 'database' For long running operations optimistic locking is used. For example, resolution. Implements Framework bits outside of the container Bundle content Class loading Service registry Event listeners Security bundle content class loading service registry event listeners Container security Happy Equinox Page 51

Equinox Configuration Don't access config statically Get rid of static class FrameworkProperties Instead make available an instance of EquinoxConfiguration Greatly simplifies and optimizes embedding and starting multiple Framework instances A special class loader was needed to isolate static config data for each framework instance bundle content class loading service registry event listeners Container security configuration config.ini Happy Equinox Page 52

Equinox Hooks Equinox Hooks are still supported Much of the internal details changed requiring an overhaul of the Equinox Hooks SPI ALL existing Equinox Hook implementers are broken and will need migration Unhappy Equinox had too many Hooks Three class loading hooks now one, but no ability to override bundle class loader implementation Bundle File hook removed, use wrapper hook instead Adaptor hook removed, no more adaptor Bundle Watcher removed, was a glorified bundle listener Added ability to specify a bundle activator that is called during framework start/stop Improved Storage Hook to handle hooks being added/removed better bundle content class loading service registry event listeners Container security configuration Hook impls config.ini Happy Equinox Page 53

Equinox Old State/Resolver Equinox Container has no implementation of old Equinox resolver API Still exports the Equinox resolver API Happy Equinox No longer registers the PlatformAdmin service Container Page 54

Equinox Old State/Resolver Equinox Container has no implementation of old Equinox resolver API Still exports the Equinox resolver API Happy Equinox No longer registers the PlatformAdmin service Equinox Compatibility fragment Hooks into Equinox to register a PlatformAdmin implementation Attempts to mirror the Equinox wiring state in the PlatformAdmin implementation Has some limitations modeling the running state Useful for offline modeling, for example: PDE Container PlatformAdmin Disgruntled Fragment Page 55

Equinox Plugin Converter Equinox Container has no implementation of the Plugin Converter Support for Eclipse 2.0 style plugins Happy Equinox Still exports the plugin converter API No longer registers the PluginConverter service Container Page 56

Equinox Old State/Resolver Equinox Container has no implementation of the Plugin Converter Support for Eclipse 2.0 style plugins Happy Equinox Still exports the plugin converter API No longer registers the PluginConverter service Equinox Compatibility fragment Hooks into Equinox to register a PluginConverter implementation Converts Eclipse 2.0 style plugins into proper bundles Container PluginConverter Disgruntled Fragment Page 57

Equinox What Breaks? All Equinox Framework Hook implementations must be migrated Happy Equinox Some limitations for the compatibility resolver Disconnected from the running wiring state Cannot be used to diagnose resolution errors Cannot be used to disable bundles at runtime Container PlatformAdmin Disgruntled Fragment Page 58

Equinox Current Status Work is being done in the git master branch http://git.eclipse.org/c/equinox/rt.equinox.framework.git/log/?h=master http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/log/?h=master Implementation has been in Luna since M1 Fully compliant with the current suite of compliance tests for OSGi R6 Will be the reference implementation of the Core Framework for R6 Successful if nobody notices Except for the poor Equinox Adaptor Hook implementors Page 59

Evaluate This Session 1 Sign-in: www.eclipsecon.org 2 Select session from schedule 3 Evaluate:

Trademarks IBM and WebSphere are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at Copyright and trademark information at www.ibm.com/legal/copytrade.shtml. Page 61