Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
The OSGi Gateway and the Network Delivery of Managed Services Dave Marples [email protected] ©2001 OSGi, All Rights Reserved Aims and Objective • To introduce everyone to the OSGi • To show the way in which OSGi is expected to develop • To highlight problems that this deployment model will create • To start people thinking about how they might contribute to solve the problems of next generation software deployment – both to OSGi and in general ©2001 OSGi, All Rights Reserved 2 Overview • Introduction • Where OSGi fits in – purpose and rationale • System Architecture • Technical Overview • Implications for Feature Design • Questions and Open discussion ©2001 OSGi, All Rights Reserved 3 Who is OSGi? 2Wire, ABB, Acronet, Acunia, Adtranz PUTCC, Alcatel, AMI-C, BellSouth, Broadband Gateways, Cablevision, CCL/ITRI, Coactive Networks, Compaq, Deutsche Telekom, Domosys, e2-Home, Echelon, Electricite de France, Electrolux Home Products, Elisa Communications, emWare, Enikia, Ericsson, Espial Group, France Telecom, Gatespace, Hewlett Packard, Home Director, IBM, Infomatec, inSilicon, Invensys Controls, KDD R&D, Legend Computer Systems, Lineo, Lucent Technologies, Maytag, Metavector, Motorola, National Semiconductor, Netpliance, Nokia, Nortel Networks, Novell, Oracle, Panasonic, Patriot Scientific, Philips, ProSyst Software, PTSC, Quest, Samsung Electronics, Schindler Aufzuge, Schneider Electric, ShareGate, Sharp, Shell, Siemens, Sonera, Sony, Sprint Communications, ST Microelectronics, Sun Microsystems, Symbol Technologies, TAC AB, Telcordia Technologies, Telia, Texas Instruments, Tokyo Electric Power Company, Toshiba, Tridium, Ucentric Systems, Ubicom, Union Fenosa, VDO Car Communications, Verizon, Villa Montage Systems, Whirlpool, Wind River Systems, Yello Strom ©2001 OSGi, All Rights Reserved 4 What’s Missing? • There are many wide area network standards • There is no service delivery standard • The are many inhome network standards ©2001 OSGi, All Rights Reserved DOCSIS, DSL, ISDN, Satellite, W-CDMA… OSGi Bluetooth, CEBus HAVi, HomePNA, HomeRF, Jini, LONWORKS, UPnP… 5 What Is A Services Gateway? •A cable modem •A set top box •A DSL modem •A web phone •A PC •A automotive multimedia gateway •A dedicated residential gateway •Anything running the OSGi APIs! ©2001 OSGi, All Rights Reserved 6 Benefits of OSGi To Cable Operators • Increases “content” available on their systems – Creates new service revenue opportunities – Increases customer loyalty – Reduces customer churn by increasing customer switching costs • Transforms set top boxes into an expandable and extensible service delivery platform – Enables provisioning of new services at virtually no incremental cost – Opens new market segments and services ©2001 OSGi, All Rights Reserved 7 System Architecture ©2001 OSGi, All Rights Reserved End-to-End Model with API Locations Gateway Operator Wide Area Network Local Network Devices Open Services Gateway Service Provider Client Client Service Management System ©2001 OSGi, All Rights Reserved Service 1 Service 2 OSGi Framework Device Standardized OSGi API 9 The OSGi API 1.0 Spec Active work Persistent data Configuration data Client access Accounting info HTTP Device Access Log Services Framework Java Virtual Machine Embedded OS ©2001 OSGi, All Rights Reserved 10 The OSGi API • Enables zero-administration services gateways • Supports secure remote operation by a service aggregator • Enables multiple services to cooperatively share a common services gateway • Supports any combination of remote and local networks • Can be used in home, small business, home office, auto, industrial applications ©2001 OSGi, All Rights Reserved 11 Software Stack Bundle Bundle Bundle Bundle (Application) = service interface exported and imported by bundles OSGi Java VM Operating System Driver Driver Driver Hardware ©2001 OSGi, All Rights Reserved 12 Bundle Interaction OSGi Services Framework Service Registry Bundle B {…} get service Bundle A {...} register Install, start, stop, update, uninstall Residential Bluetooth Gateway Local {…} register get Networks Internet Java Virtual Machine Platform (OS and Hardware) ©2001 OSGi, All Rights Reserved 13 Technical Overview ©2001 OSGi, All Rights Reserved Goal • Software framework for large scale electronic service deployment on small devices • Network delivery of managed services… ©2001 OSGi, All Rights Reserved 15 Requirements • Reliable – large scale deployments fail without very high reliability • Portable – Attract third party developers to create the very much needed innovative services • Dynamic – Allow the configuration to adapt to users and operator needs over time ©2001 OSGi, All Rights Reserved 16 Requirements • Security – Protect service providers from each other – Guarantee a certain quality of service • Scalability – Members have very different configurations for their deployment of OSGi frameworks ©2001 OSGi, All Rights Reserved 17 Functions • Life Cycle Management – Install, Start, Stop, Update, Uninstall • Component model • Remote management • Basic utility services: Logging, HTTP, Device access • Clean separation of specification and implementation ©2001 OSGi, All Rights Reserved 18 Key Benefits • Platform independence (Java) • Services can be deployed and upgraded dynamically • Multiple independent services within a single services framework • Java security ©2001 OSGi, All Rights Reserved 19 OSGi Terminology • A Bundle is the deliverable application – Like a Windows EXE file • It registers zero or more services – A service is specified as a Java interface and implemented by some bundles • Lookups can be used to find services from other bundles – Query language ©2001 OSGi, All Rights Reserved 20 Dependency Management • When a bundle is stopped, it is cleaned up – Registered services are removed – References to other services removed • Bundles can be notified when a service they depend on is unregistered • Class path dependencies are managed • Model will allow long running applications with dynamic software updates ©2001 OSGi, All Rights Reserved 21 Management • Residential gateways need remote management • Management system controls via a bundle • Due to the download facility of the resident gateway, APIs can replace protocols • Only protocol required is bootstrap – But this is usually implementation dependent anyway – Being considered for standardization ©2001 OSGi, All Rights Reserved 22 The Next Steps Work for OSGi 2.0 ©2001 OSGi, All Rights Reserved New Work Areas… • Remote Management – Protocols and APIs • Specialist (Vertical?) Segments – In-Vehicle • Dedicated Security Group • Device Discovery and Excitation • User Interface Group, Phones Group, CM Group? ©2001 OSGi, All Rights Reserved 24 Approximate Timescales… • OSGi Service Platform Release 2 – Publicly available end Q2 2001 • Revision of 1.0 specification plus… • Accounting, Configuration Management, User Manager, Preferences • OSGi Vehicle Release 1 (2001) • OSGi Remote Management Release 1 (2001) • OSGi Cable Platform Release 1 (???-TBD) • Individual specifications can be released when ready, and formed into ‘Releases’ when needed. ©2001 OSGi, All Rights Reserved 25 Issues • In this multi-vendor world we’re going to see many different services, from independent operators, all needing to work together. HOW? • We want to be able to deploy services onto the available in home devices to render the service – how can we describe these capabilities? • Our software development and deployment models are not ready for massive scale distribution and interworking – Discuss. ©2001 OSGi, All Rights Reserved 26 Technical Backup ©2001 OSGi, All Rights Reserved Framework • org.osgi.framework • Programmable environment for hosting dynamically downloadable services – service inter-dependency – service download and lifecycle – ... ©2001 OSGi, All Rights Reserved 28 The framework Framework Bundle A {} Bundle B {} Bundle C {} = service, java interface ©2001 OSGi, All Rights Reserved 29 Bundle Bundle A {} • A JAR file (zip) containing – Java classes – Manifest with information about bundle – Resources • Can also act like a DLL (Shared Library) • Framework can install/update/uninstall bundles • Bundles can be started and stopped ©2001 OSGi, All Rights Reserved 30 Service • A service is an object registered by a bundle to be used by other bundles • The specification of a service is a Java interface • Different bundles (read vendors) can implement the same interface • Implementation is indistinguishable for users • The OSGi defines a standard set of services ©2001 OSGi, All Rights Reserved 31 Java Interfaces public interface Log { public void log(String s); } Gets (with query) Bundle Log public class SimpleLog implements Log { public void log(String s) { System.out.println( s ); } } Simple Log ©2001 OSGi, All Rights Reserved interface implements IBM Log Motorola Log 32 The Framework Install A start Framework Bundle A {} Bundle B events: register {} events: install Bundle C {} ©2001 OSGi, All Rights Reserved 33 The Framework Framework Uninstall stop Bundle A {} Bundle B events: unregister {} events: uninstall Bundle C {} ©2001 OSGi, All Rights Reserved 34 A service defined get register Object that get implements a Java Interface get events: REGISTERED, UNREGISTERING, MODIFIED ©2001 OSGi, All Rights Reserved 35 An example with services Bundle A {} Registry register Bundle B {} Publisher get WAP bundle Events: register, unregister Bundle C {} ©2001 OSGi, All Rights Reserved 36 Service Factories • A Factory allows a bundle to control what object a bundle gets • Framework calls back the factory for service creation Bundle A {} Bundle B {} ©2001 OSGi, All Rights Reserved Framework Bundle Standard Bundle Factory 37 Real code! Hello World • HelloWorld.java: package ericsson.osgi.hello; import org.osgi.framework.*; public class HelloWorld implements BundleActivator { public void start( BundleContext context ) throws Exception{ System.out.println( "Hello world" ); } public void stop( BundleContext context ) throws Exception { System.out.println( "Goodbye world" ); } } • Manifest: Manifest-Version: 1.0 Bundle-Activator: ericsson.osgi.hello.HelloWorld ©2001 OSGi, All Rights Reserved 38 To get and register a service • public interface GPS { … } • public void foo( BundleContext context ) { Garmin garmin = new Garmin(…); Hashtable properties = new Hashtable(); properties.put( "vendor", "garmin" ); ServiceRegistration reg = context.registerService( GPS.class.getName(), garmin, properties ); } • public void bar( BundleContext context ) { ServiceReference ref = context.getService( GPS.class.getName() ); GPS gps = context.getService( ref ); … } ©2001 OSGi, All Rights Reserved 39 "Process model" • A bundle is installed on a framework once • Services registered by a bundle can be optionally configurable • OSGi will define more extensive configuration management in the next release – IBM Configuration proposal – ERICSSON Task management ©2001 OSGi, All Rights Reserved 40 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 ©2001 OSGi, All Rights Reserved 41 Native code • Java Supports native code with the "native" keyword – public class Native { public native void test(); } • OSGi has a number of Manifest headers allowing shared libraries to be included – Manifest-Version: 1.0 Bundle-Name: NativeCodeTest Bundle-NativeCode: http.dll;os=Win95;processor=x86 http.so;os=Solaris;processor=x86;language=en http_deutsch.so;os=Solaris;processor=x86;language=de http_sparc.so;os=Solaris;processor=sparc ©2001 OSGi, All Rights Reserved 42 Current Service APIs • Logging – Standard way for a bundle to provide progress information with access to log information • HTTP server, Servlet Engine – Allows registration of servlets, access to resources • Device Access – Interface to hardware – Generic model for matching devices to drivers ©2001 OSGi, All Rights Reserved 43 LOG Service • org.osgi.service.log • This service enables the specification, recording, and receiving of messages (e.g., messages related to specific events and errors) ©2001 OSGi, All Rights Reserved 44 HTTP Service • org.osgi.service.http • This service allows the access to resources (e.g., files, images) and server programs (Java servlets) via HTTP (either HTTP 1.0 or 1.1) ©2001 OSGi, All Rights Reserved 45 Device Access • org.osgi.service.device • This service specifies the way in which devices can be found (through matching) and the appropriate device drivers can be associated with the devices ©2001 OSGi, All Rights Reserved 46 Device Access Device Bundle Camera Driver Locator magic event: register IEEE 1394B Network Interface bundle TV match TV Bundle register Device get Camera Sony CCD542 get register event: register ©2001 OSGi, All Rights Reserved 47 Management, protocols or API? Management System Standard protocol Residential Gateway Local Ethernet Access Net Private protocol Local Powernet = Bundle ©2001 OSGi, All Rights Reserved 48 ©2001 OSGi, All Rights Reserved 49