SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
Enhancing OSGi with Explicit, Vendor Independent
Extra-functional Properties
Kamil Ježek Premek Brada Lukáš Holý
Department of Computer Science and Engineering
University of West Bohemia
Univerzitni 8, 30614 Pilsen, Czech Republic
{kjezek|brada|lholy}@kiv.zcu.cz

TOOLS 2012

1 / 17
Introduction

Agenda

Component-based programming + Extra-functional properties
Semantics weak extra-functional properties in OSGi
Proposed semantic rich extra-functional properties
Application to OSGi

2 / 17
Component-based Programming Motivation

Motivation

Motivation
Component deployment

Different vendors
From repository

Binding compatibility checks
Development

Assembly

Component independently developed and deployed
Different groups of people involved
Compatibility verification more important than before
Extra-functional properties should be considered
3 / 17
Component-based Programming Motivation

Extra-functional Properties Overview

What are Extra-functional Properties?
No common understanding:
Palladio simulates systems to asses performance and reliability
ProCom defines parametrised values
PECOS composes Petri-nets to model timing and synchronisation
In this work:
An extra-functional property holds measurable values,
explicitly provided with a software system, to specify a
characteristic of the system apart from its genuine
functionality, to enrich client’s understanding of the usage of
the system, supported by technical [computational] means.
E.g.: System A: Require - network_speed = 10Mb/s

4 / 17
OSGi

Overview

OSGi Overview

OSGi is:
Industrial standard to modularised systems
Modules (components) Java jar files – called Bundles
Explicit lifecycle of Bundles from Install and Start to Stop and
Uninstall

Strong isolation of each Bundle (on classpath level)
Communication (among others) via explicitly registered services
Only exported packages are accessible
Better isolation control than Java coarse grained access modifiers
Provided and required features explicitly stated in manifest file

5 / 17
OSGi

Parametrised Binding

OSGi Parametrised Packages
Parametrised packages
Export-Package: cz.zcu.kiv.web.html;
version=1.3,html_version=5.0
Import-Package: cz.zcu.kiv.web.html;version=1.3;
resolution:=optional,html_version=5.0
version – build-in parameter
html_version – user defined parameter
Drawbacks:
No explicit semantics and unification of user defined parameters
(e.g. html_version vs. version_html)
Different vendors do not have to even know existence of these
parameters
6 / 17
OSGi

Parametrised Binding

OSGi Capabilities
Capabilities:
Provide-Capability: cz.zcu.kiv.web.ui;ui_library=Qt
Require-Capability: osgi.ee;
filter:="(|(ui_library=GTK)(ui_library=Qt))"
osgi.ee – build-in name-space
cz.zcu.kiv.web.ui – user defined name-space
Drawback:
Name-spaces should have proposed semantics, however, no
technical mean to exchange user defined ones among developers
is provided
7 / 17
OSGi

Parametrised Binding

OSGi Parametrised Services
Parametrised services:
HashTable ht = new HashTable();
ht.put("network_speed", 10);
bundleContext.registerService(Net.class, this, ht);
services = bundleContext.getServiceReferences(
Net.class, "(network_speed >= 10)");
Drawback:
Developers must study source-code or run bundles to determine
services parameters
Declarative Services:
Services defined in XML files
Solves need to study source-code
Semantics of parameters still weak
8 / 17
EFFCC

Overview

Proposed Solution
EFFCC – Extra-Functional properties Featured Compatibility Checks
Explicit definitions of properties in repository
Same properties shared by different developers

Properties grouped by application domain
Semantics assigned for each domain
Sub-domains supported

Component deployment

OSGi
EF FCC

Powered

Different vendors
EFPs from repository

Binding compatibility checks
Development

Assembly

9 / 17
EFFCC

Example and Formalisation

EFFCC Example and Formalisation
e = (n, Ed , γ, V , M)
GR = (id, name, {ei })

462, Browser: {
network_speed,
{}, Integer, decreasing, {fast, slow}, "Mb/s", ... }
LR = (id, GR, name, {LRi }, S, D)
463, Intel Dual Core 2.8GHz {
network_speed: slow = [1..10), fast = [10..100), ...
A = F ×E ×VA , VA = S×D×V ×computed

RenderingEngine {
Require-Capability : 462.network_speed = 463.slow, ..
10 / 17
Application to OSGi

Enriched OSGi Parameters Semantics

Enriched OSGi Parameters Semantics
All properties stored in unified remote repository (J2EE Server)
Actually used properties mirrored in XML file, distributed with
Bundles
XML contains semantic rich properties
Original OSGi parameters, attributes and filters linked with XML
files
GR: e1, e2, ...
LR1: s1, s2, … , d1, d2, ...
LR2: s1, s2, ...
LR3: ...
e : properties
s, d : simple, derived
values
f
: features

Repository

Mirror

f1: (e1,(LR1,s1))
f2: (e1, (LR2,d2))
f3: (e1, „value“)
f4: (e1, ...)
MANIFEST.MF
<ds>.XML

11 / 17
Application to OSGi

Attributes, Parameters and Filters Format

Attributes, Parameters and Filters Format

New proposed format to write down OSGi attributes and filter:
<gr-id>.<efp>=<lr-id>.<value>
<gr-id> – link to XML domain definitions part
<lr-id> – link to XML sub-domain part
<value> – value from XML, original OSGi value or formula
E.g.:
Original OSGi: network_speed = 10
Enriched OSGi: 462.network_speed = 463.slow
462.dhtml = 465.computed, true ⇔ jsver > 0&htmlver ≥ 4

12 / 17
Application to OSGi

Enriched OSGi Life-cycle

Enriched OSGi Life-cycle
ResolverHook

Services

Packages,
Capabilities

FindHook
13 / 17
Application to OSGi

Enriched OSGi Life-cycle

Implementation
Two hook methods:
ResolverHook:
void filterMatches(BundleRequirement requirement,
Collection<BundleCapability> candidates)
It represents set of candidates fulfilling requirement
FindHook:
void find(BundleContext context, String name,
String filter, boolean allServices,
Collection<ServiceReference<?>> references);
It represents set of services fulfilling name and service filter
In both cases, candidates can be removed according to additional
compatibility checks
14 / 17
Application to OSGi

Enriched OSGi Life-cycle

Implementation (II)

15 / 17
Conclusion

Conclusion

OSGi allows ad-hoc extra-functional properties definitions
Package export/import allows only comparison to equality
(replaceable by capabilities)
Limited number of data types (Number, String, Version)
User-defined types may be added. Unfortunately, not implemented
in Apache Felix and Equinox (solution: external “manifest”)
Problem to evaluate e.g. “slow” vs. “fast” – OSGi compares as
Strings

Generic extra-functional properties mechanism proposed
Mechanism applied to OSGi
OSGi extended but not modifications
Declarative services suggested

16 / 17
Questions

Thank you for your attention
Contact us:
{kjezek|brada|lholy}@kiv.zcu.cz
Research group: http://www.kiv.zcu.cz/research/groups/dss/
EFFCC project: http://www.assembla.com/spaces/show/efps

17 / 17

Más contenido relacionado

Similar a EnhancingOSGi with Explicit, Vendor Independent Extra-functional Properties

What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)David Bosschaert
 
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiToni Epple
 
Productionalizing ML : Real Experience
Productionalizing ML : Real ExperienceProductionalizing ML : Real Experience
Productionalizing ML : Real ExperienceIhor Bobak
 
Expanding your impact with programmability in the data center
Expanding your impact with programmability in the data centerExpanding your impact with programmability in the data center
Expanding your impact with programmability in the data centerCisco Canada
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
What's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specsWhat's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specsCarsten Ziegeler
 
What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...
What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...
What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...mfrancis
 
Application Parameter Description Scheme For Multiple Job Generation In Probl...
Application Parameter Description Scheme For Multiple Job Generation In Probl...Application Parameter Description Scheme For Multiple Job Generation In Probl...
Application Parameter Description Scheme For Multiple Job Generation In Probl...James Heller
 
Probe Debugging
Probe DebuggingProbe Debugging
Probe DebuggingESUG
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using GoCloudOps2005
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
 
Flex for enterprise applications
Flex for enterprise applicationsFlex for enterprise applications
Flex for enterprise applicationsdarshanvartak
 
e-SUAP - Data access server side (English)
e-SUAP - Data access server side (English)e-SUAP - Data access server side (English)
e-SUAP - Data access server side (English)Sabino Labarile
 
SharePoint for the .NET Developer
SharePoint for the .NET DeveloperSharePoint for the .NET Developer
SharePoint for the .NET DeveloperJohn Calvert
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopJimmy Guerrero
 

Similar a EnhancingOSGi with Explicit, Vendor Independent Extra-functional Properties (20)

What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)What's cool in the new and updated OSGi Specs (2013)
What's cool in the new and updated OSGi Specs (2013)
 
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and NagiosNagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
Nagios Conference 2013 - Eric Stanley and Andy Brist - API and Nagios
 
Frankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGiFrankenstein's IDE: NetBeans and OSGi
Frankenstein's IDE: NetBeans and OSGi
 
Corba model ppt
Corba model pptCorba model ppt
Corba model ppt
 
Productionalizing ML : Real Experience
Productionalizing ML : Real ExperienceProductionalizing ML : Real Experience
Productionalizing ML : Real Experience
 
Expanding your impact with programmability in the data center
Expanding your impact with programmability in the data centerExpanding your impact with programmability in the data center
Expanding your impact with programmability in the data center
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
What's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specsWhat's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specs
 
What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...
What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...
What’s cool in the new and updated OSGi specs (DS, Cloud and more) - David Bo...
 
Application Parameter Description Scheme For Multiple Job Generation In Probl...
Application Parameter Description Scheme For Multiple Job Generation In Probl...Application Parameter Description Scheme For Multiple Job Generation In Probl...
Application Parameter Description Scheme For Multiple Job Generation In Probl...
 
Probe Debugging
Probe DebuggingProbe Debugging
Probe Debugging
 
Development withforce
Development withforceDevelopment withforce
Development withforce
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
Kamala_latest_CV
Kamala_latest_CVKamala_latest_CV
Kamala_latest_CV
 
Flex for enterprise applications
Flex for enterprise applicationsFlex for enterprise applications
Flex for enterprise applications
 
e-SUAP - Data access server side (English)
e-SUAP - Data access server side (English)e-SUAP - Data access server side (English)
e-SUAP - Data access server side (English)
 
SharePoint for the .NET Developer
SharePoint for the .NET DeveloperSharePoint for the .NET Developer
SharePoint for the .NET Developer
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 

Último

Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 

Último (20)

Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 

EnhancingOSGi with Explicit, Vendor Independent Extra-functional Properties

  • 1. Enhancing OSGi with Explicit, Vendor Independent Extra-functional Properties Kamil Ježek Premek Brada Lukáš Holý Department of Computer Science and Engineering University of West Bohemia Univerzitni 8, 30614 Pilsen, Czech Republic {kjezek|brada|lholy}@kiv.zcu.cz TOOLS 2012 1 / 17
  • 2. Introduction Agenda Component-based programming + Extra-functional properties Semantics weak extra-functional properties in OSGi Proposed semantic rich extra-functional properties Application to OSGi 2 / 17
  • 3. Component-based Programming Motivation Motivation Motivation Component deployment Different vendors From repository Binding compatibility checks Development Assembly Component independently developed and deployed Different groups of people involved Compatibility verification more important than before Extra-functional properties should be considered 3 / 17
  • 4. Component-based Programming Motivation Extra-functional Properties Overview What are Extra-functional Properties? No common understanding: Palladio simulates systems to asses performance and reliability ProCom defines parametrised values PECOS composes Petri-nets to model timing and synchronisation In this work: An extra-functional property holds measurable values, explicitly provided with a software system, to specify a characteristic of the system apart from its genuine functionality, to enrich client’s understanding of the usage of the system, supported by technical [computational] means. E.g.: System A: Require - network_speed = 10Mb/s 4 / 17
  • 5. OSGi Overview OSGi Overview OSGi is: Industrial standard to modularised systems Modules (components) Java jar files – called Bundles Explicit lifecycle of Bundles from Install and Start to Stop and Uninstall Strong isolation of each Bundle (on classpath level) Communication (among others) via explicitly registered services Only exported packages are accessible Better isolation control than Java coarse grained access modifiers Provided and required features explicitly stated in manifest file 5 / 17
  • 6. OSGi Parametrised Binding OSGi Parametrised Packages Parametrised packages Export-Package: cz.zcu.kiv.web.html; version=1.3,html_version=5.0 Import-Package: cz.zcu.kiv.web.html;version=1.3; resolution:=optional,html_version=5.0 version – build-in parameter html_version – user defined parameter Drawbacks: No explicit semantics and unification of user defined parameters (e.g. html_version vs. version_html) Different vendors do not have to even know existence of these parameters 6 / 17
  • 7. OSGi Parametrised Binding OSGi Capabilities Capabilities: Provide-Capability: cz.zcu.kiv.web.ui;ui_library=Qt Require-Capability: osgi.ee; filter:="(|(ui_library=GTK)(ui_library=Qt))" osgi.ee – build-in name-space cz.zcu.kiv.web.ui – user defined name-space Drawback: Name-spaces should have proposed semantics, however, no technical mean to exchange user defined ones among developers is provided 7 / 17
  • 8. OSGi Parametrised Binding OSGi Parametrised Services Parametrised services: HashTable ht = new HashTable(); ht.put("network_speed", 10); bundleContext.registerService(Net.class, this, ht); services = bundleContext.getServiceReferences( Net.class, "(network_speed >= 10)"); Drawback: Developers must study source-code or run bundles to determine services parameters Declarative Services: Services defined in XML files Solves need to study source-code Semantics of parameters still weak 8 / 17
  • 9. EFFCC Overview Proposed Solution EFFCC – Extra-Functional properties Featured Compatibility Checks Explicit definitions of properties in repository Same properties shared by different developers Properties grouped by application domain Semantics assigned for each domain Sub-domains supported Component deployment OSGi EF FCC Powered Different vendors EFPs from repository Binding compatibility checks Development Assembly 9 / 17
  • 10. EFFCC Example and Formalisation EFFCC Example and Formalisation e = (n, Ed , γ, V , M) GR = (id, name, {ei }) 462, Browser: { network_speed, {}, Integer, decreasing, {fast, slow}, "Mb/s", ... } LR = (id, GR, name, {LRi }, S, D) 463, Intel Dual Core 2.8GHz { network_speed: slow = [1..10), fast = [10..100), ... A = F ×E ×VA , VA = S×D×V ×computed RenderingEngine { Require-Capability : 462.network_speed = 463.slow, .. 10 / 17
  • 11. Application to OSGi Enriched OSGi Parameters Semantics Enriched OSGi Parameters Semantics All properties stored in unified remote repository (J2EE Server) Actually used properties mirrored in XML file, distributed with Bundles XML contains semantic rich properties Original OSGi parameters, attributes and filters linked with XML files GR: e1, e2, ... LR1: s1, s2, … , d1, d2, ... LR2: s1, s2, ... LR3: ... e : properties s, d : simple, derived values f : features Repository Mirror f1: (e1,(LR1,s1)) f2: (e1, (LR2,d2)) f3: (e1, „value“) f4: (e1, ...) MANIFEST.MF <ds>.XML 11 / 17
  • 12. Application to OSGi Attributes, Parameters and Filters Format Attributes, Parameters and Filters Format New proposed format to write down OSGi attributes and filter: <gr-id>.<efp>=<lr-id>.<value> <gr-id> – link to XML domain definitions part <lr-id> – link to XML sub-domain part <value> – value from XML, original OSGi value or formula E.g.: Original OSGi: network_speed = 10 Enriched OSGi: 462.network_speed = 463.slow 462.dhtml = 465.computed, true ⇔ jsver > 0&htmlver ≥ 4 12 / 17
  • 13. Application to OSGi Enriched OSGi Life-cycle Enriched OSGi Life-cycle ResolverHook Services Packages, Capabilities FindHook 13 / 17
  • 14. Application to OSGi Enriched OSGi Life-cycle Implementation Two hook methods: ResolverHook: void filterMatches(BundleRequirement requirement, Collection<BundleCapability> candidates) It represents set of candidates fulfilling requirement FindHook: void find(BundleContext context, String name, String filter, boolean allServices, Collection<ServiceReference<?>> references); It represents set of services fulfilling name and service filter In both cases, candidates can be removed according to additional compatibility checks 14 / 17
  • 15. Application to OSGi Enriched OSGi Life-cycle Implementation (II) 15 / 17
  • 16. Conclusion Conclusion OSGi allows ad-hoc extra-functional properties definitions Package export/import allows only comparison to equality (replaceable by capabilities) Limited number of data types (Number, String, Version) User-defined types may be added. Unfortunately, not implemented in Apache Felix and Equinox (solution: external “manifest”) Problem to evaluate e.g. “slow” vs. “fast” – OSGi compares as Strings Generic extra-functional properties mechanism proposed Mechanism applied to OSGi OSGi extended but not modifications Declarative services suggested 16 / 17
  • 17. Questions Thank you for your attention Contact us: {kjezek|brada|lholy}@kiv.zcu.cz Research group: http://www.kiv.zcu.cz/research/groups/dss/ EFFCC project: http://www.assembla.com/spaces/show/efps 17 / 17