OSGi Technology
Hsin-Han Yang,
Cheng-Yi Chien,
Po-Cheng Huang
Outline
What is OSGi Technology
Introduction
Alliance
Specifications
Key Benefits
OSGi Terminology
OSGi Framework
Service & Bundle
Use Cases
OSGi Implementation
2
What is OSGi Technology
It’s a module system for the Java platform
It’s dynamic
It’s service-oriented
A specification of the OSGi Alliance, a non-profit
organization
3
Outline
What is OSGi Technology
Introduction
Alliance
Specifications
Key Benefits
OSGi Terminology
OSGi Framework
Service & Bundle
Use Cases
OSGi Implementation
4
Alliance
“Open Service Gateway Institute”
The Alliance has been founded by Sun Microsystems,
IBM, Ericsson and others in March 1999.
Among its members are (as of 2008) more than 35
companies from quite different business areas, for
example Hitachi, Mitsubishi Electric Corporation,
Motorola, NEC, Nokia, Oracle, ProSyst Software, Red
Hat, Siemens Enterprise Communications, Software
AG, SpringSource…
5
Specifications
OSGi Release 1 (R1): May 2000
OSGi Release 2 (R2): October 2001
OSGi Release 3 (R3): March 2003
OSGi Release 4 (R4): October 2005 / September 2006
Core Specification (R4 Core): October 2005
Mobile Specification (R4 Mobile / JSR-232): September
2006
6
Specifications
OSGi framework
Standard service definitions
Log Service
Http Service
Device Service
Package Administration Service
Permission Administration Service
Configuration Administration Service
Preferences Service
User Administration Service
7
Specifications
8
Key Benefits
Platform Independence
Application Independence
Multiple Service Support
Service Collaboration Support
Multiple Network Technology Support
Security
Simplicity
Key Benefits
Avoids Java Archive (JAR) file hell
Reuse code "out of the box"
Simplifies multi-team projects
Enables smaller systems
Manages deployments local or remotely
Extensive tool support
No lock in, many providers of core technology
including many open source
Very high adoption rate
14
OSGi Terminology
Services gateway
Framework
Service
Bundle
15
Outline
What is OSGi Technology
Introduction
Alliance
Specifications
Key Benefits
OSGi Terminology
OSGi Framework
Service & Bundle
Use Cases
OSGi Implementation
16
OSGi Framework
Services gateway
Generic application framework
Lightweight framework
Simple component model
Service registry
Support for deployment
17
OSGi Framework
18
OSGi Framework
The Framework is divided in a number of layers:
Execution Environment, Modules, Life Cycle
Management and Service Registry. Additionally, there
is a security system that is deeply intertwined with all
the layers.
20
OSGi Framework
23
Outline
What is OSGi Technology
Introduction
Alliance
Specifications
Key Benefits
OSGi Terminology
OSGi Framework
Service & Bundle
Use Cases
OSGi Implementation
24
Service & Bundle
Services
Provide applications
Bundles (JAR file)
Provide (export) and reuse (import) services via the
framework
Identify Java packages (classes)
Implement specified interface (services)
Register services with the Service Registry
25
Bundle Life Cycle
26
27
28
29
Outline
What is OSGi Technology
Introduction
Alliance
Specifications
Key Benefits
OSGi Terminology
OSGi Framework
Service & Bundle
Use Cases
OSGi Implementation
30
Typical Use Cases
Internet Access
Personal Communications
Home Automation
Home Security
Home Health Care Monitoring
Entertainment
Information management
Telematics (Automotive)
31
Typical Use Cases
32
Typical Use Cases
33
Outline
What is OSGi Technology
Introduction
Alliance
Specifications
Key Benefits
OSGi Terminology
OSGi Framework
Service & Bundle
Use Cases
OSGi Implementation
35
Framework Implementation
IBM Lotus Expeditor
ProSyst Software
Knopflerfish OSGi
Makewave (formerly Gatespace Telematics)
Equinox OSGi (Eclipse project)
Objectweb Oscar
Apache Felix
36
Knopflerfish Installation (1)
Software Environment
JRE 1.6.0_10
Window XP
Download jar file
http://www.knopflerfish.org/download.html
Current release OSGi R4 - Knopflerfish 2.0.5
Download knopflerfish_osgi_<version>.jar
Knopflerfish Installation (2)
Execute knopflerfish_osgi_<version>.jar
double-clicking on the distribution file
or by the command: java -jar knopflerfish_osgi_<version>.jar
Startup Knopflerfish
Change the directory to the installation directory and start Knopflerfish
double-clicking on framework.jar
or by the command: java -jar framework.jar
Eclipse – Develop OSGi Bundle
Software Environment
Eclipse 3.1-3.4
http://www.eclipse.org/downloads
Knopflerfish plug-in for Eclipse
http://www.knopflerfish.org/eclipse_plugin.html
Programming Tutorial
Knopflerfish tutorial
http://www.knopflerfish.org/tutorials.html
Oscar Tutorial
http://oscar-osgi.sourceforge.net/tutorial/
Descargar

OSGi & UPnP Technology - National Cheng Kung University