Date post: | 27-Mar-2015 |
Category: |
Documents |
Upload: | lauren-houston |
View: | 222 times |
Download: | 0 times |
© copyright 2004 by OSGi Alliance All rights reserved.
OSGi Pre WorkshopPeter 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.
Interactive TV
Kitchen Pad
• Ease of Use
• Internet
• Mobility
Screen Phone
PDA
E-Toys
PC
Cordless & MobilePhone
Consumer View
© 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?
4DHomeNet, Inc., Alpine Electronics Europe GmbhAMI-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 AllianceMembers by Region
41% 32%
27%
Asia/Pacific
EMEA
North/South America
Global Cross Industry Consortium
© 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.
Internet AnyBroadbandModem
MS1000
Home Monitoring & Control
Audio entertainment
Photo storage & sharing with friends and family
Shared internet access with content filter
USB
802.11 & Ethernet
Sensor network
User Access
Instant messaging
Vision - MS1000 Powers The Connected Home
© copyright 2004 by OSGi Alliance. All rights reserved.
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.
Why OSGi?serve@Home 1.0 Introduction package
B/S/H/Residential Gateway
BSH-Gateway and Plint (Powerline Interface)
Tablet PC
WLA
NGSM
Powerline
System Interface
Indoor Communication
Outdoor Communication
© 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 in-vehicle 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
Home
Autom
atio
n
Vehic
le A
utom
atio
n
Mobile
Phones
Deskt
op
Serve
r Sid
e
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
Operating SystemOperating SystemOperating SystemOperating System
JavaJavaVMVMJavaJava
VMVM
The ApplicationThe Application
Crypto-Crypto-graphygraphy UPnPUPnP Direc-Direc-
toriestories
ImagingImaging
MailMail
MediaMediaFWFW SQLSQL
GUIGUI
Distri-Distri-butedbuted
CommCommPortsPorts SecuritySecurity TCP/IPTCP/IP
JTAPIJTAPI 3D3D WebWebServerServer MathMath
SpeechSpeech Blue-Blue-toothtooth XMLXML USBUSB
The ApplicationThe Application
Operating SystemOperating SystemOperating SystemOperating SystemOperating SystemOperating System
Operating SystemOperating System
JavaJavaVMVMJavaJava
VMVMJavaJavaVMVMJavaJava
VMVM
JavaJavaVMVMJavaJava
VMVMJavaJavaVMVMSystem Class LibrariesSystem Class Libraries
OSGiOSGi
OSGiOSGiOSGiOSGi
OSGiOSGi
ApplicationApplicationApplicationApplication
ApplicationApplication
ApplicationApplicationApplicationApplication
ApplicationApplicationApplicationApplication
LibraryLibrary
© 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
• Device• Bundle/Application code• Service
OSGIOSGI
OSGIOSGI
© 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!
OSGIOSGI
OSGIOSGI
© copyright 2004 by OSGi Alliance. All rights reserved.
Evolution
UPnPInitial ProvisioningName SpaceJiniStart LevelIO ConnectorWire AdminXML ParserMeasurement & StatePositionExecution Env.
Application ManagerMIDP ContainerSigned BundlesDeclarative ServicesPower ManagementDevice ManagementSecurity PoliciesUPnP ExporterDiagnostics/MonitoringFramework LayeringInitial ProvisioningUPnP…
2000 2001 2003 2005
R1
R2
R3
Planned R4
Hom
e A
utom
atio
n Veh
icle
Mob
ile
FrameworkHttpLogDevice Access
Package AdminConfiguration AdminPermission AdminUser AdminPreferencesMetaTypeService Tracker
© copyright 2004 by OSGi Alliance. All rights reserved.
Release 3 Services
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
© copyright 2004 by OSGi Alliance. All rights reserved.
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
CDCCDC
ExecutionEnvironment
L0 -•CDC•CLDC•OSGi/Minimum
MODULEL1 - Creates the concept of bundles that use classes from each other in a controlled way according to system and bundle constraints
LIFE-CYCLEL2 - Manages bundles life-cycles in a VM without requiring reboots
SERVICE-REGISTRYL3 - Decouples bundles so that the deployer can mix and match configurations
© 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
Hardware
BundleBundle
Bundle
Operating System
OSGi
Java VM
Bundle (Application)
Driver Driver Driver
= service interfaceexported and importedby bundles
© copyright 2004 by OSGi Alliance. All rights reserved.
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{}
= service, java interface
Bundle B{}
Bundle C{}
© copyright 2004 by OSGi Alliance. All rights reserved.
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
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
© copyright 2004 by OSGi Alliance. All rights reserved.
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
© copyright 2004 by OSGi Alliance. All rights reserved.
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 ); }}
© 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
Framework
Bundle C{ }
Bundle A{ }
Bundle B{ }
Install A
start
events: install
events: register
© copyright 2004 by OSGi Alliance. All rights reserved.
Framework
Dependencies
Bundle C{ }
Bundle B{ }
Uninstall
stop
events: uninstall
events: unregister
Bundle A{ }
© 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
{…}
{…}
SecurityManager
AccessControlContext
ProtectionDomain
Permis-sions
Permis-sion
ProtectionDomain
Permis-sions
Permis-sion
AccessControlContext
call foo()
checkPermission(p)
implies(p)
implies(p)
implies(p) implies(p)
AccessController
• Java 2 security provides a flexible and comprehensive model for security
• Permission subclasses hide the semantics of the permission type– FilePermission– SocketPermission– ServicePermission– …
• Code is associated with a set of permissions
• The SecurityManager checks a permission by creating a permission
© 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.
LocalEthernet
LocalPowernet
Management, protocols or API?
AccessNet
OSGiEnvironment
ManagementSystem
= Bundle
Private protocolfor example:SNMP,CIM, SyncML, etc.
© copyright 2004 by OSGi Alliance. All rights reserved.
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…
Testbundle Director
TargetControlBundle
© 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