©2003 aqute, all rights reserved tokyo, august 2003 : 1 osgi service platform tokyo august 28, 2003...
TRANSCRIPT
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 1
OSGiService PlatformTokyo August 28, 2003
Peter KriensCEO aQute, OSGi Fellow
www.aQute.biz
Mail [email protected] pkriensTel +33 467871853
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 2
What is the OSGi Service Platform?
• A Java framework for developing remotely deployed service applications, that require:
– Reliability– Large scale distribution– Wide range of devices– Collaborative
• Created through collaboration of industry leaders
• Spec 3.0 publicly available at www.osgi.org
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 3
Release 3 Planned Extensions
Framework
OSGi Specifications Content
Execution Environment
Devic
e M
anag
er
Log
Serv
ice
Http
Ser
vice
R1
User
Adm
in
Serv
ice T
rack
er
Conf
igur
atio
n Ad
min
Pref
eren
ces
Serv
ice
Pack
age
Adm
in
Perm
issio
n Ad
min
R2
Conn
ecto
r Ser
vice
Posit
ion
XML
Pars
er S
ervic
e
UPnP
Ser
vice
Jini S
ervic
e
Wire
Adm
in
Mea
sure
men
t
Star
t Lev
el
URL
Hand
ler
R3
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 4
Essentials
• Reliable– Large-scale deployments fail without extremely high reliability
• Portable– Attract third-party developers to create essential innovative services
• Dynamic– Allow configuration to adapt to user & operator needs over time
• Secure– Protect service providers from each other– Guarantee a prescribed quality of service
• Scalable– Members have very different configurations for their deployment of
OSGi frameworks
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 5
Core Functions
• Life Cycle Management– Install, Start, Stop, Update, Uninstall
• Dynamic Service Registry
• Version management
• Open remote management architecture
• Strict separation of specifications and implementations – multiple implementations
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 6
OSGi Environment
Hardware
BundleBundle
Bundle
Operating System
OSGi
Java VM
Bundle (Application)
Driver Driver Driver
= service interfaceexported and importedby bundles
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 7
Framework
• Allows applications to share a single Java VM
• Manages applications– Life cycle, Java Packages, Security, Dependencies
between applications
• Service registry for collaboration
• Extensive notification mechanism
• Policy free
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 8
Framework Entities
OSGi Framework
Bundle A{}
= service, java interface
Bundle B{}
Bundle C{}
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 9
Bundles
• A bundle is the deliverable application– Like a Windows EXE file
• Contains programs + resources
• A bundle registers zero or more services– A service is specified in a Java interface and may be implemented
by multiple bundles
• Searches can be used to find services registered by other bundles– Query language (filters)
• The Framework itself is represented as the system bundle
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 10
Cooperative Model
• Bundles can cooperate through:– service objects– package sharing
• A dynamic registry allows a bundle to find and track service objects
• Framework fully manages this cooperation– Dependencies, security
• More than an Applet, MIDlet, Xlet runner
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 11
Cooperative Model
JAVA
Operating System
Hardware
Java Application Manager
Serviceregistry
packagespackages
Midlet,Xlet,
orApplet
Midlet,Xlet,
orApplet
No native code
No management bundlesServiceregistry
packagespackages No package management
(versions!)
No cooperation
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 12
Service Specifics
• A service is an object registered with the Framework by a bundle to be used by other bundles
• The semantics and syntax of a service are specified in a Java interface
service
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 13
Services & Java Interfaces
LogBundle
IBMLog
MotorolaLog
implements
Gets from Framework (with query)
interface
public interface Log { public void log(String s);}
SimpleLog
public class SimpleLog implements Log { public void log(String s) { System.out.println( s ); }}
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 14
Dependencies
• The Framework manages the dependencies between bundles
• Bundles that are installed and started will register services
• Framework will automatically unregister services when a bundle stops
• Event notifications for all important events
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 15
Dependencies
Framework
Bundle C{ }
Bundle A{ }
Bundle B{ }
Install A
start
events: install
events: register
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 16
Framework
Dependencies
Bundle C{ }
Bundle B{ }
Uninstall
stop
events: uninstall
events: unregister
Bundle A{ }
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 17
The Classpath in OSGi
• Each bundle has its own class loader
• Bundles can only shares packages when:– Import and export clauses in the manifest match– Have permission to do so for those packages
• The framework manages the overall CLASSPATH for bundles
• Assures that all bundles use the same class (of the same version)
• Tracks shared usage of packages between between bundles
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 18
Native code
• JAR file contains both Java classes + native code
• Matching of correct operating system, processor and language
• Life cycle bound to bundles life cycle
• Requires Java 1.2 support
• Notice that JAR format is only delivery format
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 19
OSGi Security
• Separates bundles from each other, in all aspects
• Optional– Base Framework API not linked to java.security
• OSGi uses a single (1) protection domain per bundle
• Framework is policy free
• Administration is done via the Permission Admin service
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 20
Remote Management
• Framework provides mechanisms, but is policy free
• Management policy provided by a bundle specific to the operator: – Called a Management Bundle
• Management policies made/selected by the operator
• Enables standardized OSGi management bundles from network management vendors
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 21
LocalEthernet
LocalPowernet
Management, protocols or API?
AccessNet
OSGiEnvironment
ManagementSystem
= Bundle
Private protocolfor example:SNMP,CIM, SyncML, etc.
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 22
Conclusion
• Open specification process, not a patented API
• Java Based
• Cooperative
• (Remote) Managed
• Secure
• Component Market
• Contact www.aQute.biz for further information
©2003 aQute, All Rights Reserved Tokyo, August 2003 : 23