SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
Peter Kriens | OSGi Evangelist/Director
OSGi R4.3 //
Next Release Overview
Agenda
• Framework & ServiceTracker update to Java 5 generics
• A replacement for Package Admin and Start Level
• A Shell standard
• Managing System.out and System.in per thread
• Formatting and Conversion
• Coordination Service
• Resolver Hook
• Generic Capabilities and Requirements
• Configuration Admin Overhaul
• An easier way to receive configuration updates
• Bytecode weaving
• Minor parts
Framework & ServiceTracker update
to Java 5 generics
• Current API feels “old-fashioned”
– Lack of generics
– Uses of arrays and null return
• Generics have been held back
because the embedded world is still
still on Java 1.4
JSR 14!
• Developed to run Java 5 code on 1.4
VMs
• All compilers recognize the
– source 5 -target jsr14 switches
• Output class format 48 (1.4)
– stores generics in skippable attributes
• Works like a charm
– No annotatons
– No enums
Generic Services
ServiceReference<LogService> lr =
context.getServiceReference( LogService.class );
LogService log = context.getService(lr);
Collection<EventAdmin> rs =
context.getServiceReference(EventAdmin.class);
ServiceRegistration<ConfigurationListener> sr =
context.registerService(ConfigurationListener.class)
ServiceTracker<EventListener> st =
new ServiceTracker<EventListener>( context,
EventListener.class, null);
Adapt Method
• Package Admin and Start Level were
cumbersome to use
– Bundle was almost always
parameter
– Not very OO
• The adapt method converts an
object another type (if supported)
public <T> T adapt( Class<T> clazz );
A Replacement for Package Admin
and Start Level Service
• Package Admin and Start Level now
use the adapt() method.
• Package Admin translated to
BundleWiring, BundleRevision, and
BundleWirings
• Start Level Service translated to Start
Level and Framework Start Level
Bundle Wiring
Bundle
Bundle
Revision
Bundle
Wiring
Bundle
Wirings
adapt to:
adapt to
current:
adapt to
current:
get
BundleVersion
get
BundleWirings
1
0..n0..1
11
0..1
11
1
1
Start Level
Bundle
Start Level
Framework
Start Level
adapt to:
adapt to:
0..1
1
1
0..n
(for system bundle id=0)
(for non-system bundles id!=0)
Shell
• Uses reflection to provide the
commands
– Aligns commands with the
specified API
• Optimizes for typing
• Has closures
• Methods are commands
• Very easy to provide commands
• Terminal abstraction
A Shell
Command
Processor
Aggregate
Converter
Thread IO
Aggregate
Formatter
Formatter
Converter
…
Handler
…
Commands
ThreadIO
osgi.command.scope=…
osgi.command.function=...
Command
Processor
Aggregate
Converter
Aggregate
Formatter
Formatter
Converter
An OSGi Shell
$ bundles | grep eclipse
000000 ACT org.eclipse.osgi-3.3.1.R33x_v20070828
000001 ACT org.eclipse.osgi.util-3.1.200.v20070605
...
000002 ACT org.eclipse.osgi.services-3.1.200.v20070605
$ <bundle 6> headers
Tool Bnd-0.0.169
...
Bundle-SymbolicName biz.aQute.fileinstall
$ <<bundle 6> headers> get Tool
Bnd-0.0.169
$ fi = bundle 6
RegisteredServices [ManagedServiceFactory]
...
StateChanging null
$ $fi stop
$ $fi location
initial@reference:file:biz.aQute.fileinstall_1.3.jar/
Managing System.out. System.err, and
System.in per thread
• System.out, System.in, and
System.err are singletons
• The ThreadIO service turns them
into thread specific streams
• The shell allows commands to
output to System.out
Formatting and Conversion
• Formatter formats an object to a
string
– PART, LINE, INSPECT
• Converter converts an object to
another type
• Uses whiteboard pattern
• Aggregates provided to simplify
normal usage and simple cases
Coordination Service
• Allow multiple parties to collaborate
by signalling the end of a work item
– ended(Coordination)
– failed(Coordination)
• Thread based or specifically passed
as parameter
• Nested
Coordination Service
Coordinator
Some Task
Task
Initiator
TaskTask Coordination
Coordination Service
Coordination c = coordinator.begin();
try {
… do work
c.end();
} catch( FailedCoordinatioNfinally {
}
Resolver Hook
• Allows interception of resolver
• Deny certain dependencies
– Provide context
• Replaces nested frameworks
– Went through nested frameworks,
virtual bundles, and now hooks
• Allows scoping
– Needed for subsystems
Generic Capabilities and
Requirements
• Package-Import, Require-Bundle,
and Bundle-Host are requirements
• Bundle-SymbolicName and
Package-Export are capabilities
• Requirements are filter expressions
• Capabilities are sets of properties
• Pioneered in OBR
• Screen size, certificate, etc.
Configuration Admin Overhaul
• Security
– Segmentation
• Allow a service to register under multiple
pids
– Use aspects: web config, system config
• Coordinated Update
• Version count on Configuration object
• Extension PIDs
– Target a single bundle
• com.example.WebConf-com.bundle.foo-1.2.3-123
An Easier Way to Receive
Configuration Updates
• Configuration Admin uses
properties
– Hard to use in Java
• Would be nice to use Java type …
• Schema of properties defined in a
Java Interface
– PID is classname
– Interfaces can extend other
interfaces
An Easier Way to Receive
Configuration Updates
• Works for Managed Services and
Managed Service Factories
• Data Validation a la Meta Type using
annotations
– mandatory/default
– options
– size
• Implemented in Apache Cade
already (Karaf)...
An Easier Way to Receive
Configuration Updates
public interface WebConf {
String host();
@Default(80) int port();
}
public class X implements Configurable<WebConf> {
public void updated( WebConf web ) {
setPort( web.port() );
}}
public interface MyConf extends WebConf, SysConf { }
PID
Bytecode weaving
• Bytecode weaving very popular in
enterprise applications
• Needs to changes the bytes loaded
by the class loader
• Introduces the service:
org.osgi.framework.weaving.WeavingHook
• Ordering defined by ranking
• Can add additional requirements
Byte Code Weaving
Framework
Weaver
WeavingHook
Minor Updates
• Event Admin
– Reusing properties
• Classpath scanning
– Following the bundle class path
Q&A

Mais conteúdo relacionado

Mais procurados

High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
Albert Chen
 
Version control with subversion
Version control with subversionVersion control with subversion
Version control with subversion
xprayc
 

Mais procurados (20)

Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17
 
#sitNL presentation sap teched berlin v3
#sitNL presentation sap teched berlin v3#sitNL presentation sap teched berlin v3
#sitNL presentation sap teched berlin v3
 
OSGi & Blueprint
OSGi & BlueprintOSGi & Blueprint
OSGi & Blueprint
 
Event Driven Architectures with Camel
Event Driven Architectures with CamelEvent Driven Architectures with Camel
Event Driven Architectures with Camel
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
 
Command box
Command boxCommand box
Command box
 
Upgrading or migrating to a higher AEM version - Planning and process
Upgrading or migrating to a higher AEM version - Planning and processUpgrading or migrating to a higher AEM version - Planning and process
Upgrading or migrating to a higher AEM version - Planning and process
 
High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
 
IXP Automation with SaltStack and NAPALM
IXP Automation with SaltStack and NAPALMIXP Automation with SaltStack and NAPALM
IXP Automation with SaltStack and NAPALM
 
Version control with subversion
Version control with subversionVersion control with subversion
Version control with subversion
 
CommandBox at CFCamp 2014
CommandBox at CFCamp 2014CommandBox at CFCamp 2014
CommandBox at CFCamp 2014
 
Web sphere administration
Web sphere administrationWeb sphere administration
Web sphere administration
 
Simon Jia - The Kohana Framework
Simon Jia - The Kohana FrameworkSimon Jia - The Kohana Framework
Simon Jia - The Kohana Framework
 
Aem maintenance
Aem maintenanceAem maintenance
Aem maintenance
 
美团点评技术沙龙08 - 分布式监控系统实践
美团点评技术沙龙08 - 分布式监控系统实践美团点评技术沙龙08 - 分布式监控系统实践
美团点评技术沙龙08 - 分布式监控系统实践
 
eCAP Developer Walkthru
eCAP Developer WalkthrueCAP Developer Walkthru
eCAP Developer Walkthru
 
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
OSGi for real in the enterprise: Apache Karaf - NLJUG J-FALL 2010
 
201511 - Alfresco Day - Platform Update and Roadmap - Gabriele Columbro - Bo...
201511 -  Alfresco Day - Platform Update and Roadmap - Gabriele Columbro - Bo...201511 -  Alfresco Day - Platform Update and Roadmap - Gabriele Columbro - Bo...
201511 - Alfresco Day - Platform Update and Roadmap - Gabriele Columbro - Bo...
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introduction
 

Semelhante a OSGi Community Event 2010 - OSGi Technical Update

Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
vamsitricks
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
vamsitricks
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1
WSO2
 

Semelhante a OSGi Community Event 2010 - OSGi Technical Update (20)

Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
 
Unleashing the Power: A Lap Around PowerShell 3.0
Unleashing the Power: A Lap Around PowerShell 3.0Unleashing the Power: A Lap Around PowerShell 3.0
Unleashing the Power: A Lap Around PowerShell 3.0
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
ASP.NET vNext
ASP.NET vNextASP.NET vNext
ASP.NET vNext
 
Serverless design with Fn project
Serverless design with Fn projectServerless design with Fn project
Serverless design with Fn project
 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
 
Pharo 10 and beyond
 Pharo 10 and beyond Pharo 10 and beyond
Pharo 10 and beyond
 
Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022
 
Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkins
 
.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric.NET microservices with Azure Service Fabric
.NET microservices with Azure Service Fabric
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
 
Introduction to ASP.NET 5
Introduction to ASP.NET 5Introduction to ASP.NET 5
Introduction to ASP.NET 5
 
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
 
Distributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and ScalaDistributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and Scala
 
Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1Better Enterprise Integration With the WSO2 ESB 4.5.1
Better Enterprise Integration With the WSO2 ESB 4.5.1
 
Afs manager
Afs managerAfs manager
Afs manager
 

Mais de mfrancis

Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
 

Mais de mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

OSGi Community Event 2010 - OSGi Technical Update

  • 1. Peter Kriens | OSGi Evangelist/Director OSGi R4.3 // Next Release Overview
  • 2. Agenda • Framework & ServiceTracker update to Java 5 generics • A replacement for Package Admin and Start Level • A Shell standard • Managing System.out and System.in per thread • Formatting and Conversion • Coordination Service • Resolver Hook • Generic Capabilities and Requirements • Configuration Admin Overhaul • An easier way to receive configuration updates • Bytecode weaving • Minor parts
  • 3. Framework & ServiceTracker update to Java 5 generics • Current API feels “old-fashioned” – Lack of generics – Uses of arrays and null return • Generics have been held back because the embedded world is still still on Java 1.4
  • 4. JSR 14! • Developed to run Java 5 code on 1.4 VMs • All compilers recognize the – source 5 -target jsr14 switches • Output class format 48 (1.4) – stores generics in skippable attributes • Works like a charm – No annotatons – No enums
  • 5. Generic Services ServiceReference<LogService> lr = context.getServiceReference( LogService.class ); LogService log = context.getService(lr); Collection<EventAdmin> rs = context.getServiceReference(EventAdmin.class); ServiceRegistration<ConfigurationListener> sr = context.registerService(ConfigurationListener.class) ServiceTracker<EventListener> st = new ServiceTracker<EventListener>( context, EventListener.class, null);
  • 6. Adapt Method • Package Admin and Start Level were cumbersome to use – Bundle was almost always parameter – Not very OO • The adapt method converts an object another type (if supported) public <T> T adapt( Class<T> clazz );
  • 7. A Replacement for Package Admin and Start Level Service • Package Admin and Start Level now use the adapt() method. • Package Admin translated to BundleWiring, BundleRevision, and BundleWirings • Start Level Service translated to Start Level and Framework Start Level
  • 8. Bundle Wiring Bundle Bundle Revision Bundle Wiring Bundle Wirings adapt to: adapt to current: adapt to current: get BundleVersion get BundleWirings 1 0..n0..1 11 0..1 11 1 1
  • 9. Start Level Bundle Start Level Framework Start Level adapt to: adapt to: 0..1 1 1 0..n (for system bundle id=0) (for non-system bundles id!=0)
  • 10. Shell • Uses reflection to provide the commands – Aligns commands with the specified API • Optimizes for typing • Has closures • Methods are commands • Very easy to provide commands • Terminal abstraction
  • 12. An OSGi Shell $ bundles | grep eclipse 000000 ACT org.eclipse.osgi-3.3.1.R33x_v20070828 000001 ACT org.eclipse.osgi.util-3.1.200.v20070605 ... 000002 ACT org.eclipse.osgi.services-3.1.200.v20070605 $ <bundle 6> headers Tool Bnd-0.0.169 ... Bundle-SymbolicName biz.aQute.fileinstall $ <<bundle 6> headers> get Tool Bnd-0.0.169 $ fi = bundle 6 RegisteredServices [ManagedServiceFactory] ... StateChanging null $ $fi stop $ $fi location initial@reference:file:biz.aQute.fileinstall_1.3.jar/
  • 13. Managing System.out. System.err, and System.in per thread • System.out, System.in, and System.err are singletons • The ThreadIO service turns them into thread specific streams • The shell allows commands to output to System.out
  • 14. Formatting and Conversion • Formatter formats an object to a string – PART, LINE, INSPECT • Converter converts an object to another type • Uses whiteboard pattern • Aggregates provided to simplify normal usage and simple cases
  • 15. Coordination Service • Allow multiple parties to collaborate by signalling the end of a work item – ended(Coordination) – failed(Coordination) • Thread based or specifically passed as parameter • Nested
  • 17. Coordination Service Coordination c = coordinator.begin(); try { … do work c.end(); } catch( FailedCoordinatioNfinally { }
  • 18. Resolver Hook • Allows interception of resolver • Deny certain dependencies – Provide context • Replaces nested frameworks – Went through nested frameworks, virtual bundles, and now hooks • Allows scoping – Needed for subsystems
  • 19. Generic Capabilities and Requirements • Package-Import, Require-Bundle, and Bundle-Host are requirements • Bundle-SymbolicName and Package-Export are capabilities • Requirements are filter expressions • Capabilities are sets of properties • Pioneered in OBR • Screen size, certificate, etc.
  • 20. Configuration Admin Overhaul • Security – Segmentation • Allow a service to register under multiple pids – Use aspects: web config, system config • Coordinated Update • Version count on Configuration object • Extension PIDs – Target a single bundle • com.example.WebConf-com.bundle.foo-1.2.3-123
  • 21. An Easier Way to Receive Configuration Updates • Configuration Admin uses properties – Hard to use in Java • Would be nice to use Java type … • Schema of properties defined in a Java Interface – PID is classname – Interfaces can extend other interfaces
  • 22. An Easier Way to Receive Configuration Updates • Works for Managed Services and Managed Service Factories • Data Validation a la Meta Type using annotations – mandatory/default – options – size • Implemented in Apache Cade already (Karaf)...
  • 23. An Easier Way to Receive Configuration Updates public interface WebConf { String host(); @Default(80) int port(); } public class X implements Configurable<WebConf> { public void updated( WebConf web ) { setPort( web.port() ); }} public interface MyConf extends WebConf, SysConf { } PID
  • 24. Bytecode weaving • Bytecode weaving very popular in enterprise applications • Needs to changes the bytes loaded by the class loader • Introduces the service: org.osgi.framework.weaving.WeavingHook • Ordering defined by ranking • Can add additional requirements
  • 26. Minor Updates • Event Admin – Reusing properties • Classpath scanning – Following the bundle class path
  • 27. Q&A