osgi overview
TRANSCRIPT
OSGi: A Service-Oriented Infrastructure for Smart HomeReference R. S. Hall and H. Cervantes, "Challenges in Building Service-Oriented Applications for OSGi," in IEEE Communications(Impact Factor=2.406), vol. 42, May 2004. OSGi Alliance, OSGi Service Platform Technical Whitepaper 3.0, July 2004. Reporter Chun-Feng Liao Apr 4,2005
Intelligent Space
AgendaIntroductionHow OSGi related to E-Home ?
OSGi Component ModelBundle
Container Component Model Standard Services Definition
Example: Home Security System DiscussionAvailable Open Source ImplementationsOscar Demo
How can we use OSGi ?
Intelligent Space
OSGi Target Market : E-HomeThe initial target market of OSGi is home service gateways. Assume all houses contain a home area network, and nearly all household devices are connected. Now OSGi s vision is expanded to the automobile environment.Service Provider OSGi Platform
OSGi Platform
Intelligent Space
Residential GatewayGateway
Image Source:R. S. Hall and H. Cervantes, "Challenges in Building Service-Oriented Applications for OSGi," in IEEE Communications, vol. 42, May 2004.
Intelligent Space
IntroductionWhat is the major contributions of OSGi Service Platform?Deal with the delivery of managed services into networked environments of embedded devices.Container Component Model Standard Services Definition
What are the key elements of OSGi?1. Lightweight container component model for bundles. 2. Standard services
OSGi(Service-Oriented) : Dynamism Substitutability
Intelligent Space
Autonomous Service Discovery and BindingLocal OBR (Oscar Bundle Repository) XX XX XX A1 XX A2 C XX XX XX XX XX XX Remote OBR / Internet OSGi A3 C1 B1 B2 B A
Intelligent Space
Container Component Model
LWC (Lightweight Container)Apache Avalon Framework (type 1 IoC) Spring Framework (type 2 IoC) Pico Container (type 3 IoC) OSGi Service PlatformECU Proposal
HWC (Heavyweight Container)MIDP (J2ME) EJB (J2EE)
MicrokernelJMX JbossOSGi
Intelligent Space
ECUG A P B S S Component Adaptation Framework Light Weight Container Infrastructural ServicesResource Allocating Services
Auditing Networking Configuration Monitoring Services Services Services Services
Intelligent Space
Bundle (Component in OSGi)Physical ViewA java-based jar file. Can not run without container (how to do unit testing ?)
Logical ViewService provider or consumer. Can publish, discover(?) or bind to another service.
Need not take care of lifecycle issues.Management tasks are done by OSGi platform.
Intelligent Space
Bundle Lifecycle
Intelligent Space
OSGi ApplicationsA typical OSGi application is built around an extensible core. Provide heigher-level application-specific services.OSGi Applications (Bundle)Auth Services Bundle YYY Services Bundle XXX Services Bundle Http Services Bundle ZZZ Services Bundle Mail Services Bundle Management Bundle Log Services Bundle
Standard Services (Cross cutting concerns)
OSGi Service Platform
Intelligent Space
http://research.microsoft.com/adapt/MSBNx/
Example: A Home Security Systemactive
passive event Bayesian Network poll
110
Intelligent Space
DiscussionOSGi, UPnP, HAVi and Jini. Open Source OSGi ImplementationsOscar (R.S.Hall, Grenoble Univ. ) Knopflerfish (Gatespace) Physalis (.NET Compact Framework)
How can we make use of OSGi?
Intelligent Space
Intelligent Space
Device
Intelligent Space
Context
Intelligent Space
Agents
Intelligent Space
Backup
Intelligent Space
Web Services-Technical View
Image Source: Heather Kreger
Intelligent Space
Dependency InjectionDependency Injection provide help us to implement the IoCInterface Injection (type 1 IoC) Setter Injection (type 2 IoC) Constructor Injection (type 3 IoC)
Intelligent Space
Client Course TeachingCourse course teacherUse Relationship injection Instance relationship
Teacher Client
Intelligent Space
Factory ClassFactory factoryCourse TeachingCourse course teacher Teacher TeachingCourseFactory
ClientUse
Relationship injection Instance relationship
Intelligent Space
Dependency Injectionlightweight containerconfigCourse TeachingCourse course teacher Teacher Lightweight container xml
ClientUse
Relationship injection Instance relationship
Intelligent Space
Intelligent Space
Design by InterfaceCourseImpl_A
Course TeachingCourse course teacher
CourseImpl_B
Client
Use Relationship injection Instance relationship
Teacher Lightweight container xml
Intelligent Space