2004-10-OSGWC_PreCongressWorkshop
Download
Report
Transcript 2004-10-OSGWC_PreCongressWorkshop
OSGi Pre Workshop
Peter Kriens, OSGi Fellow
© copyright 2004 by OSGi Alliance All rights reserved.
Contents
•
•
•
•
•
•
•
•
OSGi Alliance
Consumer View
History
Service Platform
Evolution
Technical View
Remote Management
The Process
© copyright 2004 by OSGi Alliance. All rights reserved.
What will you learn
• What the OSGi tried to achieve
• How the organization evolved a vertical
standard to a horizontal standard
• What the core concepts of the service
platform are
• How the process works
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGi Alliance
• Founded in 1998 by IBM,
Ericsson, Nortel, Sybase,
Sun, Motorola, Oracle,
Nokia, and many others
• Was first called
Connected Alliance
• Goal was to develop a
standard for home
automation
– Based on Java Embedded
Server
© copyright 2004 by OSGi Alliance. All rights reserved.
Consumer View
Cordless & Mobile
Phone
• Ease of Use
• Internet
• Mobility
PC
Interactive TV
PDA
Kitchen Pad
Screen Phone
E-Toys
© copyright 2004 by OSGi Alliance. All rights reserved.
Vision
• Vision
– To provide a common programming platform
between different devices
– Services On Demand
• How
– Java
– Common operating environment called the service
platform
– Comprehensive model for remote management
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGi Alliance
• The economy caught up with the Alliance in 2000 and
much of the momentum was lost, except technically
– SP R1 release was May 2000
– SP R2 release was November 2001
– SP R3 release was March 2003
• The Expert Groups continued working on the
specifications
• The result was a specification that was technically
advanced and applicable in many other areas
– In 2001, the automotive industry joined OSGi
– In 2003, the mobile phone industry became interested
© copyright 2004 by OSGi Alliance. All rights reserved.
Who is the OSGi Alliance?
Global Cross Industry Consortium
4DHomeNet, Inc., Alpine Electronics Europe Gmbh
AMI-C, Atinav Inc., Belgacom, BMW,
Cablevision Systems, Deutsche Telekom,
Echelon Corp., Electricite de France (EDF),
Espial Group, Inc.,
ETRI, France Telecom, Fraunhofer
Gesellschaft,
Gatespace Telematics AB, IBM Corporation,
Insignia Solutions, Institute for Infocomm
Research, KDDI R&D Laboratories Inc.,
Mitsubishi Electric Corporation, Motorola,
Inc.,
Nokia, NTT, Object XP AG, Oracle
Corporation,
Panasonic Technologies, Inc., Philips,
ProSyst Software AG, Robert Bosch Gmbh,
Samsung Electronics Co., Sharp
Corporation, Shell, Siemens, Sun
Microsystems, Telcordia Technologies,
Telefonica I+D, TeliaSonera, Texas
Instruments, Inc., Toshiba Corporation
OSGi Alliance
Members by Region
41%
32%
27%
Asia/Pacific
EMEA
North/South America
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGi Deployment Facts
• 26 OSGi member company deployments (non-confidential)
– Smart Home/Health Care (14)
– Automotive/Infotainment (8)
– Service Provisioning (4)
• Plus 10 EU-projects (using OSGi-certified platforms)
• More information:
Deployment Fact Sheet on www.osgi.org
…AND MORE TO COME…
© copyright 2004 by OSGi Alliance. All rights reserved.
Vision - MS1000 Powers The Connected
Home
Shared internet
access with content
filter
Internet
Any
Broadband
Modem
MS1000
Audio entertainment
802.11 &
Ethernet
User Access
Sensor
network
USB
Home Monitoring & Control
Photo storage & sharing
with friends and family
© copyright 2004 by OSGi Alliance. All rights reserved.
Instant messaging
Shell Home Genie
•
OSGi based-Motorola
Gateway and Motorola
Gateway Management System
(MGMS) selected as the heart
of Shell Home Genie
– Manage climate, lighting, and
small appliances from home
or away 24/7
•
•
New services can be added to
the HomegenieTM offering,
thereby offering a more
connected valuable user
experience
A service that makes
broadband more universally
appealing
© copyright 2004 by OSGi Alliance. All rights reserved.
iPronto: Dashboard for a
Connected Home
© copyright 2004 by OSGi Alliance. All rights reserved.
serve@Home 1.0
Introduction package
Why OSGi?
Tablet PC
B/S/H/
Residen
tial
Gatewa
y
Indoor Communication
Outdoor
Communication
Powerline
BSH-Gateway and Plint (Powerline Interface)
System Interface
© copyright 2004 by OSGi Alliance. All rights reserved.
Eclipse
•
•
•
•
Eclipse is an Open Source IDE
(Integrated Development
Environment)
Eclipse 3.0 is build on OSGi
The Eclipse plugin model was
replaced with bundles in the
Equinox project
Creating desktop products with
RCP is easy and extendable
– IBM based Lotus Workplace
on Eclipse: thus on OSGi
•
Eclipse simplifies deploying
and developing new bundles
© copyright 2004 by OSGi Alliance. All rights reserved.
TLA: Top Level Architecture
•
•
•
Siemens VDO open car
platform based on OSGi
Provides a flexible, modular,
scalable and secure system.
Allows the easy upgrade of invehicle systems with new
features and services
– Even post sale, and
– Inter-working with future
products.
•
•
Guarantees that the lifecycle
mismatch is resolved.
The TLA platform allows the
easy upload of services and
applications due to the OSGi
Service Platform
© copyright 2004 by OSGi Alliance. All rights reserved.
Mobile Phones
• Nokia and Motorola
initiated JSR 232
• JSR 232 will adopt OSGi
for the mobile phone
market
– Both high end PDA
oriented devices
– As well as high volume
devices
• OSGi provides
– A much richer environment
than MIDP
– Better remote management
and deployment facilities
© copyright 2004 by OSGi Alliance. All rights reserved.
The Verticals
R1
R2
R3
R4
© copyright 2004 by OSGi Alliance. All rights reserved.
About the Specifications
• Comprehensive
specification of the OSGi
R3 standard
–
–
–
–
–
Reference Architectures
Examples
Java doc
Elcucidations
Tables
• Available in book form
and downloadable from
the web
© copyright 2004 by OSGi Alliance. All rights reserved.
About the specifications
• The spec was submitted as Java
Specification Request (JSR) 8! One of the
first.
• Java Community Process rules were not
compatible with the consortium’s rules and
it was decided to leave the JCP
• This has created a gap between JSRs and
the OSGi specifications
• JSR 232 hopefully will close this gap
© copyright 2004 by OSGi Alliance. All rights reserved.
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
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGi's Place In The World
• More and more demand
for connected systems
– Remote Diagnostics &
Maintenance
– Downloading and running
new services
• Inter-operability becomes
an issues
– Too many standards
– Bridging is hard or
impossible
– Danger of creating islands
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGi's Place In The World
•
•
•
•
•
Building systems is hard
Connected systems are even
harder to build
– Distribution adds failure points
– Difficult to fix bugs remotely
– Upgrades
How can the devices on a
network inter-operate?
– New devices
– New services
– New standards
It is a giant puzzle!
The keyword is extendibility
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGi's Place In The World
•
•
•
The OSGi specifications define a
Java environment, just like an
operating system, for networked
services.
A networked service:
– Can be deployed over a
network
– Adds a variety of functions to
the device
– May be managed, under the
control of an operator
Intended for all types of devices
as long as they are networked
– Mobile phones, Gateways,
PDAs, desktops, cars, and
enterprise servers
© copyright 2004 by OSGi Alliance. All rights reserved.
Java & OSGi
•
•
•
•
•
•
•
More than a programming
language …
Standardized interfaces: Multiple
implementations
Access to tens of thousands of
software libraries
Application is: start - stop
Is this sufficient for networked
devices?
OSGi Specifications provide:
– An in-VM application model.
– A Service Registry for service
discovery
– A delivery format
The OSGi fills a gap in Java
Application
The Application
Application
Application
Application
Blue-Application
Application
Speech
XML
USB
tooth Application
Library
OSGi
Web
OSGi
OSGi
JTAPI
3D
Math
Server
The
Application
OSGi
Java
Java
Comm
VM Security
Java
Mail
TCP/IP
VM
Ports
VMLibraries
System Class
Java
Media
DistriJava
Imaging
VM SQL
Java
FW
buted
VM
Java
VM
VM
CryptoDirecOperating
System
UPnP
GUI
Operating tories
System
graphy
Operating System
Operating Java
System
Java
VM
VM
Operating System
Operating System
© copyright 2004 by OSGi Alliance. All rights reserved.
UPnP & OSGi
•
•
•
•
•
•
Universal Plug aNd Play
A standard to let appliances
communicate
Functions
– Device/Service Discovery
standard: SSDP
– Remote Execution: SOAP
– Device Interface Descriptions:
WSDL
Allows for pre-defined, device
resident, and generated GUIs
Device
OSGi Based Device
© copyright 2004 by OSGi Alliance. All rights reserved.
UPnP & OSGi
• Sounds
awfully
similar to
OSGi???
• Confused?
© copyright 2004 by OSGi Alliance. All rights reserved.
UPnP & OSGi
• UPnP defines a
communication protocol
• OSGi defines an execution
environment
OSGI
• Device
• Bundle/Application code
• Service
OSGI
© copyright 2004 by OSGi Alliance. All rights reserved.
UPnP & OSGi
•
The OSGi Service Platform is a
perfect execution environment
for UPnP enabled services!
•
The OSGi Alliance has
standardized a UPnP Service
that makes empowering a
device with UPnP very easy
•
The Service Platform could
become available as a
standardized UPnP Device in
the future
•
A marriage made in heaven!
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGI
OSGI
Evolution
Mobile
Planned R4
R3
UPnP
Vehicle
Home Automation
Initial Provisioning
R2
Name Space
Jini
Start Level
IO Connector
Wire Admin
XML Parser
Measurement & State
Position
Execution Env.
Application Manager
MIDP Container
Signed Bundles
Declarative Services
Power Management
Device Management
Security Policies
UPnP Exporter
Diagnostics/Monitoring
Framework Layering
Initial Provisioning
UPnP
…
Package Admin
Configuration Admin
Permission Admin
User Admin
Preferences
MetaType
Service Tracker
R1
Framework
Http
Log
Device Access
2000
2001
2003
© copyright 2004 by OSGi Alliance. All rights reserved.
2005
Framework
Execution Environment
© copyright 2004 by OSGi Alliance. All rights reserved.
URL Handler
Start Level
R2
UPnP Service
Jini Service
Connector Service
Measurement
Position
XML Parser Service
Wire Admin
Permission Admin
Package Admin
R1
User Admin
Service Tracker
Configuration Admin
Preferences Service
Log Service
Http Service
Device Manager
Release 3 Services
OSGi Specifications Content
R3
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
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGi Service Platform
SERVICE-REGISTRY
L3 - Decouples bundles so that the
deployer can mix and match configurations
LIFE-CYCLE
L2 - Manages bundles life-cycles in a VM
without requiring reboots
MODULE
Execution
Environment
CDC
CDC
L1 - Creates the concept of bundles that
use classes from each other in a controlled
way according to system and bundle
constraints
L0 •CDC
•CLDC
•OSGi/Minimum
© copyright 2004 by OSGi Alliance. All rights reserved.
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
© copyright 2004 by OSGi Alliance. All rights reserved.
OSGi Environment
Bundle
Bundle
Bundle
Bundle (Application)
= service interface
exported and imported
by bundles
OSGi
Java VM
Operating System
Driver
Driver
Hardware
© copyright 2004 by OSGi Alliance. All rights reserved.
Driver
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
© copyright 2004 by OSGi Alliance. All rights reserved.
Framework Entities
OSGi Framework
Bundle A
{}
Bundle B
{}
Bundle C
{}
© copyright 2004 by OSGi Alliance. All rights reserved.
= service, java interface
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
© copyright 2004 by OSGi Alliance. All rights reserved.
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
© copyright 2004 by OSGi Alliance. All rights reserved.
Cooperative Model
Java Application Manager
No management bundles
Midlet,
Xlet,
or
Applet
Service
registry
packages
packages
Midlet,
Xlet,
or
Applet
No cooperation
No package management
(versions!)
JAVA
Operating System
Hardware
© copyright 2004 by OSGi Alliance. All rights reserved.
No native code
Service Specifics
• A service is an object registered with the
Framework by a bundle to be used by
other bundles
service
• The semantics and syntax of a service are
specified in a Java interface
© copyright 2004 by OSGi Alliance. All rights reserved.
Services & Java Interfaces
Bundle
Gets from Framework
(with query)
public class SimpleLog implements Log {
public void log(String s) {
System.out.println( s );
}
}
Simple
Log
public interface Log {
public void log(String s);
}
interface
Log
implements
IBM
Log
Motorola
Log
© copyright 2004 by OSGi Alliance. All rights reserved.
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
© copyright 2004 by OSGi Alliance. All rights reserved.
Dependencies
Install A
Framework
start
Bundle A
{}
Bundle B events: register
{}
events: install
Bundle C
{}
© copyright 2004 by OSGi Alliance. All rights reserved.
Dependencies
Framework
Uninstall
stop
Bundle A
{}
Bundle B events:
unregister
{}
events: uninstall
Bundle C
{}
© copyright 2004 by OSGi Alliance. All rights reserved.
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 CLASSATH
for bundles
• Assures that all bundles use the same class (of
the same version)
• Tracks shared usage of packages between
between bundles
© copyright 2004 by OSGi Alliance. All rights reserved.
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
© copyright 2004 by OSGi Alliance. All rights reserved.
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
© copyright 2004 by OSGi Alliance. All rights reserved.
Java 2 Security Primer
•
•
Java 2 security provides a
flexible and comprehensive
model for security
Permission subclasses hide
the semantics of the
permission type
–
–
–
–
•
•
implies(p)
implies(p)
{…}
Protection
Domain
Permissions
Permission
{…}
Protection
Domain
Permissions
Permission
call foo()
FilePermission
SocketPermission
ServicePermission
…
Code is associated with a set
of permissions
The SecurityManager checks a
permission by creating a
permission
implies(p)
checkPermission(p)
Access
Access
Control
Control
Context
Context
Security
Manager
Access
Controller
implies(p)
© copyright 2004 by OSGi Alliance. All rights reserved.
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
© copyright 2004 by OSGi Alliance. All rights reserved.
Management, protocols or
API?
Management
System
= Bundle
Access
Net
OSGi
Environment
Private protocol
for example:
SNMP,
CIM,
SyncML,
etc.
© copyright 2004 by OSGi Alliance. All rights reserved.
Local
Ethernet
Local
Powernet
OSGi Development Process
•
Specifications are developed in the Expert Groups
–
–
–
–
•
•
•
•
•
•
•
•
•
•
CPEG – Core group
VEG – Vehicle Group
MEG – Mobile Group
Requirements Group
Groups meet every 6-12 weeks somewhere in the world
New work is started with an RFP
An RFC tracks the progress of technical work
The RFC is voted upon by the EG
CPEG will validate the design
The editor will then write the specification
The EGs will vote the specification
The specification is submitted to the board
The board asks the members to look for IP
The board approves the specfiication
© copyright 2004 by OSGi Alliance. All rights reserved.
Testing in OSGi
•
•
•
•
•
Test cases are delivered as
bundles
These bundles register a
TestCase service which is
picked up by the director
These bundles contain one or
more bundles that are
downloaded to the target
Sequencing is done from the
control bundle
– Can download helpers
Testing is very similar to JUNIT
with asserts
– Inherit from TestCaseControl
and write methods that begin
with test…
Test
bundle
Director
Control
Bundle
Target
© copyright 2004 by OSGi Alliance. All rights reserved.
For Members
• All information is stored on
– membercvs.osgi.org
• Information is available through web as well as CVS for
convenient access
–
–
–
–
–
–
–
News
Request for Proposals (RFPs)
Request for Comments (RFCs)
Source tree for Reference Implementations as well as Tests
Tutorial
Marketing information
Expert Group minutes and info
• Request a login account at www.osgi.org
© copyright 2004 by OSGi Alliance. All rights reserved.
Whitepaper on www.osgi.org
© copyright 2004 by OSGi Alliance. All rights reserved.
Conclusion
•
•
•
•
•
•
•
Open specification process, not a patented API
Java Based
Cooperative
(Remote) Managed
Secure
Component Market
Contact www.osgi.org for further information
© copyright 2004 by OSGi Alliance. All rights reserved.
The End
+15123514821,
[email protected]
© copyright 2004 by OSGi Alliance. All rights reserved.