1 / 26

OSGi

OSGi. Henry Lau Eric Chim December 4, 2001. What is OSGi?. Open Service Gateway Initiative A Specification A standard for connecting devices to the Internet Define a set of Java APIs and a service gateway architecture implementation.

nayef
Download Presentation

OSGi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OSGi Henry Lau Eric Chim December 4, 2001

  2. What is OSGi? • Open Service Gateway Initiative • A Specification • A standard for connecting devices to the Internet • Define a set of Java APIs and a service gateway architecture implementation

  3. Delivers services from service providers through broadband networks to local networks

  4. Services Gateway • A gateway between the external networks and the local networks and local devices • A platform for communication-based services • Manages and operates these services • Multiple instances can be provided for receiving services from multiple service providers

  5. www.osgi.org

  6. OSGi Java API • Run on any computer operating system platform • Dynamic code-loading capability • Life cycle management • Inter-service dependencies • Device management • Data management • Client access • Security • Resource management

  7. Framework • Consistent programming model • Separates specification of a service from its implementation in order to develop and use these services • The same service interface can have numerous implementations • Allows developers to provide its own code for the service interface and not care for the service implementation • Example: logging service • A logging service stores its messages on a hard drive for a high-end device, while for a disk-less device, it stores its messages on a remote drive. The implementations of the two logging services implement the same interface, but the developers that are going to use the service can write code against the service interface.

  8. Framework - Services • Self-contained and accessed through a service interface • Java classes that perform a certain functionality • The mappings of the services to their implementations is maintained by the Framework, and the Framework manages the dependency between these services • LDAP (Lightweight Directory Access Protocol) based syntax is the query mechanism used to allow installed services to request and use other available services • A service is defined by the developer and is provided with its implementations, then it is registered/published into the Framework • When registered, the service is given a set of attributes so that LDAP made be used for retrieval of the service later • The service registered can also be found through a search filter so that other services made use it by passing a reference to the implementing object along to the ServiceReference of another bundle

  9. Framework - Bundles • Small components partitioned from an application • Self-installable, and can be downloaded on command • The basic unit for delivering services, packaged as JAR files • Each JAR file contains resources that implements zero or more services • Resources may be Java class files or any other data like HTML help files • A Manifest file with headers is included to allow correct installation and usage of this bundle • Parameters in these files include what Java Packages it contains, what packages it needs, how to find the bundle activator, etc. • Services it contains can be registered by other bundles for use • Bundles allow for future expansion, such that new bundles can be installed for added features or to fix bugs without destroying the system • Each bundle has an associated Bundle object that provides information about its class namespace so that there are no class-name conflicts

  10. Bundles - Bundle Context • How bundles and the Framework is interrelated • An execution environment within the Framework where the bundles are activated; created at the instance of activation by the Framework • What it does? • Install new bundles into the Framework • Register services into the registry of the Framework • Get references to other registered services • Subscribe or unsubscribe to events that are transmitted by the Framework • Find information about other bundles that are in the Framework • Provide continuous ample supply to the bundle installed

  11. How Services Are Delivered

  12. Device Access • Device Manager • Attaches driver services to device services • Works with driver locator to download drivers • Driver Locator • Mechanism that dynamically downloads new drivers to an OSGi device • Drivers • Driver Services • Device Services

  13. Device Access Manager • Network independence • Device independence • Automatic discovery/Plug and play • Legacy support • Support for older network technology that do not support automatic discovery • Support for non-OSGi specific devices • Network bundle and device bundle

  14. Example Of The Device Access Architecture

  15. Ways Bundles Are Used Within the Framework

  16. Permission And Policy • The security of the Framework is based on the security specification of Java 2 (The security specification is available online at: http://java.sun.com/products/jdk/1.2/docs/guide/security/spec/security-specTOC.fm.html) • The Framework must provide Java Security API required for Java 2 Security; but if it does not support security, then permission classes may be left out • Three types of permission defined by the Framework: • AdminPermission • ServicePermission • PackagePermission • The system policy of the gateway must be configured in such a way that bundles running in the gateway are given the appropriate permissions to run correctly

  17. Log Service • The only OSGi service required • Defines a service API to let Java-based OSGi services to read and write entries to a log • Useful for operators and developers to pinpoint and resolve problems within the service gateway • The log service can be implemented in various ways, such as transferring to a central management agent or spooling to a local log file • General capabilities and features: • Records current system time, security level, text message, optional Java Throwable object, and the identity of the Java program in the Framework that created the log entry • Log entries representing Framework events, and notify listeners of log entries as entries are being created

  18. HTTP Service • Using servlets and resources, HTTP service will allow the use of services from the internet and other networks from a standard web browser

  19. Configuration Admin Service • Configuration Data Service • Provides common service API for services to store and access data and for change of configuration information • Managed Service • Managed Service Factory

  20. Persistent Data Service • A data service used to store data that needs to outlast the life of the service • Allows services to make any piece of data persistent • Allows other services to store and receive information • Uses high level query language for search of persistent information • Can recover from failure after partial updates • Can synchronise data with server database • Implementations of this service can possibly allow the backup of persistent data on a server machine

  21. Package Admin Service • Allows management bundle to provide policies for package sharing • Include methods to examine status of shared packages

  22. Metatype • Used to describe attribute types • Stores attribute types in computer-readable form as metadata • These attributes are arguments or properties that services use • MetaType Provider • Attributes • Global scope • Localised information for generating user interfaces

  23. Preferences Service • Used to keep persistent properties despite the existence of bundles • Much like the persistent data service except the data are stored into trees • Only supports the storage of scalar values and byte arrays

  24. User Admin Service And Client Access Service • User Admin Service • Authentication • Repository • Basic Authentication • Certificates • Authorization • Client Access Service • Manages user interactions • Automated support for URL name space management • Data format negotiation • To support access devices such as cellular phones and internet browsers

  25. Conclusion • OSGi will provide a service delivery standard that allows multiple services to be delivered over broadband networks to local networks and devices • OSGi will benefit: • service providers by lowering the cost of service assembly and provide them with a bigger consumer base • network providers by increasing network usage, control of new services, and give extra value to the customer base • device manufacturers by adding value to devices, expand product differentiation, and user loyalty • consumers by opening up the market for devices and services to be linked to in-home usage directly, reducing cost of using these services, provide ease of use, and giving security and privacy • Specifications are publicly available

  26. References • http://www.osgi.org • OSGi Specifications 1.0 & OSGi Specifications 2.0 • http://www.osgi.org/resources/spec_download.asp • OSGi Presentations • http://www.osgi.org/resources/collateral.asp • Wirbel, Loring. Second Release of OSGI Spec Addresses Multifunction Gateways. EE Times, October, 2001. • http://www.eetimes.com/story/OEG20011002S0078 • Barr, John. OSGi: Spec Basics, Interface Issues. EE Times, December, 2000. • http://www.eetimes.com/story/OEG20001211S0040

More Related