osgi technology hsin-han yang, cheng-yi chien, po-cheng huang
TRANSCRIPT
OSGi TechnologyOSGi Technology
Hsin-Han Yang, Cheng-Yi Chien,Po-Cheng Huang
2
OutlineOutline
What is OSGi TechnologyIntroduction
AllianceSpecificationsKey BenefitsOSGi Terminology
OSGi FrameworkService & BundleUse CasesOSGi Implementation
3
What is OSGi TechnologyWhat is OSGi Technology
It’s a module system for the Java platformIt’s dynamicIt’s service-orientedA specification of the OSGi Alliance, a non-profit organization
4
OutlineOutline
What is OSGi TechnologyIntroduction
AllianceSpecificationsKey BenefitsOSGi Terminology
OSGi FrameworkService & BundleUse CasesOSGi Implementation
5
AllianceAlliance
“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…
6
SpecificationsSpecifications
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
7
SpecificationsSpecifications
OSGi frameworkStandard service definitions
Log ServiceHttp ServiceDevice ServicePackage Administration ServicePermission Administration ServiceConfiguration Administration ServicePreferences ServiceUser Administration Service
SpecificationsSpecifications
8
Key BenefitsKey Benefits
Platform IndependenceApplication IndependenceMultiple Service SupportService Collaboration SupportMultiple Network Technology SupportSecuritySimplicity
14
Key BenefitsKey Benefits
Avoids Java Archive (JAR) file hellReuse code "out of the box"Simplifies multi-team projectsEnables smaller systemsManages deployments local or remotelyExtensive tool supportNo lock in, many providers of core technology including many open sourceVery high adoption rate
15
OSGi TerminologyOSGi Terminology
Services gatewayFrameworkServiceBundle
16
OutlineOutline
What is OSGi TechnologyIntroduction
AllianceSpecificationsKey BenefitsOSGi Terminology
OSGi FrameworkService & BundleUse CasesOSGi Implementation
17
OSGi FrameworkOSGi Framework
Services gatewayGeneric application framework
Lightweight frameworkSimple component modelService registrySupport for deployment
18
OSGi FrameworkOSGi Framework
20
OSGi FrameworkOSGi 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.
23
OSGi FrameworkOSGi Framework
24
OutlineOutline
What is OSGi TechnologyIntroduction
AllianceSpecificationsKey BenefitsOSGi Terminology
OSGi FrameworkService & BundleUse CasesOSGi Implementation
25
Service & BundleService & Bundle
ServicesProvide 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
26
Bundle Life CycleBundle Life Cycle
27
28
29
30
OutlineOutline
What is OSGi TechnologyIntroduction
AllianceSpecificationsKey BenefitsOSGi Terminology
OSGi FrameworkService & BundleUse CasesOSGi Implementation
31
Typical Use CasesTypical Use Cases
Internet AccessPersonal CommunicationsHome AutomationHome SecurityHome Health Care MonitoringEntertainmentInformation managementTelematics (Automotive)
32
Typical Use CasesTypical Use Cases
33
Typical Use CasesTypical Use Cases
35
OutlineOutline
What is OSGi TechnologyIntroduction
AllianceSpecificationsKey BenefitsOSGi Terminology
OSGi FrameworkService & BundleUse CasesOSGi Implementation
36
Framework ImplementationFramework Implementation
IBM Lotus ExpeditorProSyst SoftwareKnopflerfish OSGi
Makewave (formerly Gatespace Telematics)
Equinox OSGi (Eclipse project)Objectweb Oscar
Apache Felix
Knopflerfish Installation (1)Knopflerfish Installation (1)
Software EnvironmentJRE 1.6.0_10Window XP
Download jar filehttp://www.knopflerfish.org/download.htmlCurrent release OSGi R4 - Knopflerfish 2.0.5Download knopflerfish_osgi_<version>.jar
Knopflerfish Installation (2)Knopflerfish Installation (2)Execute knopflerfish_osgi_<version>.jar
double-clicking on the distribution fileor by the command: java -jar knopflerfish_osgi_<version>.jar
Startup KnopflerfishStartup KnopflerfishChange the directory to the installation directory and start Knopflerfish
double-clicking on framework.jaror by the command: java -jar framework.jar
Eclipse – Develop OSGi BundleEclipse – Develop OSGi Bundle
Software EnvironmentEclipse 3.1-3.4http://www.eclipse.org/downloadsKnopflerfish plug-in for Eclipsehttp://www.knopflerfish.org/eclipse_plugin.html
Programming TutorialKnopflerfish tutorialhttp://www.knopflerfish.org/tutorials.htmlOscar Tutorialhttp://oscar-osgi.sourceforge.net/tutorial/