This invention relates to providing services in a distributed system and, more particularly, to methods and systems for dynamically provisioning services according to software requirements and compute resource capabilities.
Distributed systems today enable a device connected to a communications network to take advantage of services available on other devices located throughout the network. Each device in a distributed system may have its own internal data types, its own address alignment rules, and its own operating system. To enable such heterogeneous devices to communicate and interact successfully, developers of distributed systems can employ a remote procedure call (RPC) communication mechanism.
RPC mechanisms provide communication between processes (e.g., programs, applets, etc.) running on the same device or different devices. In a simple case, one process, i.e., a client, sends a message to another process, i.e., a server. The server processes the message and, in some cases, returns a response to the client. In many systems, the client and server do not have to be synchronized. That is, the client may transmit the message and then begin a new activity, or the server may buffer the incoming message until the server is ready to process the message.
The Java™ programming language is an object-oriented programming language that may be used to implement such a distributed system. The Java™ language is compiled into a platform-independent format, using a bytecode instruction set, which can be executed on any platform supporting the Java™ virtual machine (JVM). The JVM may be implemented on any type of platform, greatly increasing the ease with which heterogeneous machines can be federated into a distributed system.
The Jini™ architecture has been developed using the Java™ programming language to enable devices in a distributed system to share services using remote method invocation (RMI). Traditional Jini™ systems use RMI to enable a client device to request and receive a service provided by a server device on a remote machine. While conventional Jini™ systems provide a basic architecture for providing services in a distributed system, they do not provide tools specifically directed to providing complex services. Current systems do not address provisioning a service, such as application software, to make it available to the distributed system in the first place. Furthermore, conventional systems do not consider the requirements of a specific service before provisioning the service to make it available in the distributed system.
Methods and systems consistent with the present invention provide a service in a distributed system, the service consisting of a collection of service elements. It is determined whether an instance of each service element in the collection is running in the distributed system. For each service element in the collection that does not have an instance running in the distributed system, a new service element instance is created.
In accordance with an aspect of the invention, a system facilitates providing a service in a distributed system. A list of service elements that together constitute the service is received. For each service element in the list, it is discovered whether an application corresponding to the service element is running in the distributed system. The application corresponding to the service element is created, if the application corresponding to the service element is not running in the distributed system. The application is monitored to detect whether the application fails.
According to the present invention, a method handles events in a distributed system. A capability to notify members of the distributed system when an event of a predetermined type occurs is advertised. Registration requests are received from a plurality of event consumers, the registration requests specifying the predetermined type. When an event of the predetermined type occurs, an order is determined in which to notify each of the plurality of event consumers, and an event notification is sent to each of the plurality of event consumers in the order determined.
Additional features of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate several embodiments of the invention and together with the description, serve to explain the principles of the invention. In the drawings:
The following description of embodiments of this invention refers to the accompanying drawings. Where appropriate, the same reference numbers in different drawings refer to the same or similar elements.
A. Introduction
Systems consistent with the present invention simplify the provision of complex services over a distributed network by breaking a complex service into a collection of simpler services. For example, automobiles today incorporate complex computer systems to provide in-vehicle navigation, entertainment, and diagnostics. These systems are usually federated into a distributed system that may include wireless connections to a satellite, the Internet, etc. Any one of an automobile's systems can be viewed as a complex service that can in turn be viewed as a collection of simpler services.
A car's overall diagnostic system, for example, may be broken down into diagnostic monitoring of fluids, such as oil pressure and brake fluid, and diagnostic monitoring of the electrical system, such as lights and fuses. The diagnostic monitoring of fluids could then be further divided into a process that monitors oil pressure, another process that monitors brake fluid, etc. Furthermore, additional diagnostic areas, such as drive train or engine, may be added over the life of the car.
Systems consistent with the present invention provide the tools to deconstruct a complex service into service elements, provision service elements that are needed to make up the complex service, and monitor the service elements to ensure that the complex service is supported. One embodiment of the present invention can be implemented using the Rio architecture created by Sun Microsystems and described in greater detail below. Rio uses tools provided by the Jini™ architecture, such as discovery and event handling, to provision and monitor complex services in a distributed system.
The computers and devices of distributed system 100 provide services to one another. A “service” is a resource, data, or functionality that can be accessed by a user, program, device, or another service. Typical services include devices, such as printers, displays, and disks; software, such as programs or utilities; and information managers, such as databases and file systems. These services may appear programmatically as objects of the Java™ programming environment and may include other objects, software components written in different programming languages, or hardware devices. As such, a service typically has an interface defining the operations that can be requested of that service.
Memory 202 can be, for example, a random access memory. Secondary storage device 204 can be, for example, a CD-ROM. CPU 206 can support any platform compatible with JVM 220. Input device 208 can be, for example, a keyboard or mouse. Output device 210 can be, for example, a printer.
JVM 220 acts like an abstract computing machine, receiving instructions from programs in the form of bytecodes and interpreting these bytecodes by dynamically converting them into a form for execution, such as object code, and executing them. RMI 218 facilitates remote method invocation by allowing objects executing on one computer or device to invoke methods of an object on another computer or device. Lookup Service 212 and Discovery Server 214 are described in great detail below. Java™ space 222 is an object repository used by programs within distributed system 100 to store objects. Programs use Java space 222 to store objects persistently as well as to make them accessible to other devices within distributed system 100.
A. The Jini™ Environment
The Jini™ environment enables users to build and maintain a network of services running on computers and devices. Jini™ is an architectural framework provided by Sun Microsystems that provides an infrastructure for creating a flexible distributed system. In particular, the Jini™ architecture enables users to build and maintain a network of services on computers and/or devices. The Jini™ architecture includes Lookup Service 212 and Discovery Server 214 that enable services on the network to find other services and establish communications directly with those services.
Lookup Service 212 defines the services that are available in distributed system 100. Lookup Service 212 contains one object for each service within the system, and each object contains various methods that facilitate access to the corresponding service. Discovery Server 214 detects when a new device is added to distributed system 100 during a process known as boot and join, or discovery. When a new device is detected, Discovery Server 214 passes a reference to the new device to Lookup Service 212. The new device may then register its services with Lookup Service 212, making the device's services available to others in distributed system 100. One skilled in the art will appreciate that exemplary distributed system 100 may contain many Lookup Services and Discovery Servers.
As described above, service provider 302 discovers and joins lookup service 306, making the services provided by service provider 302 available to other computers and devices in the distributed system. When service consumer 304 requires a service, it discovers lookup service 306 and sends a lookup request specifying the needed service to lookup service 306. In response, lookup service 306 returns a proxy that corresponds to service provider 302 to service consumer 304. The proxy enables service consumer 304 to establish contact directly with service provider 302. Service provider 302 is then able to provide the service to service consumer 304 as needed. An implementation of the lookup service is explained in “The Jini™ Lookup Service Specification,” contained in Arnold et al., The Jini™ Specification, Addison-Wesley, 1999, pp. 217-231.
Distributed systems that use the Jini™ architecture often communicate via an event handling process that allows an object running on one Java™ virtual machine (i.e., an event consumer or event listener) to register interest in an event that occurs in an object running on another Java™ virtual machine (i.e., an event generator or event producer). An event can be, for example, a change in the state of the event producer. When the event occurs, the event consumer is notified. This notification can be provided by, for example, the event producer.
B. Overview of Rio Architecture
The Rio architecture enhances the basic Jini™ architecture to provision service elements. To provide the complex service, the Rio architecture instantiates and monitors a service instance corresponding to each service element. A service element might correspond to, for example, an application service or an infrastructure service. In general, an application service is developed to solve a specific application problem, such as word processing or spreadsheet management. An infrastructure service, such as the Jini™ lookup service, provides the building blocks on which application services can be used. One implementation of the Jini lookup service is described in U.S. Pat. No. 6,185,611, for “Dynamic Lookup Service in a Distributed System.”
Consistent with the present invention, a complex service can be represented by an operational string.
C. Jini™ Service Beans
A Jini™ Service Bean (JSB) is a Java™ object that provides a service in a distributed system. As such, a JSB implements one or more remote methods that together constitute the service provided by the JSB. A JSB is defined by an interface that declares each of the JSB's remote methods using Jini™ Remote Method Invocation (RMI) conventions. In addition to its remote methods, a JSB may include a proxy and a user interface consistent with the Jini™ architecture.
D. Cybernode Processing
A JSB is created and receives fundamental life-cycle support from an infrastructure service called a “cybernode.” A cybernode runs on a compute resource, such as a computer or device. In one embodiment of the present invention, a cybernode runs as a Java™ virtual machine, such as JVM 220, on a computer, such as computer 102. Consistent with the present invention, a compute resource may run any number of cybernodes at a time and a cybernode may support any number of JSBs.
Service instantiator object 802 is used by cybernode 801 to register its availability to support JSBs and to receive requests to instantiate JSBs. For example, using the Jini™ event handling process, service instantiator object 802 can register interest in receiving service provision events from a service provisioner, discussed below. A service provision event is typically a request to create a JSB. The registration process might include declaring QoS capabilities 808 to the service provisioner. These capabilities can be used by the service provisioner to determine what compute resource, and therefore what cybernode, should instantiate a particular JSB, as described in greater detail below. In some instances, when a compute resource is initiated, its capabilities are declared to the cybernode 801 running on the compute resource and stored as QoS capabilities 808.
Service bean instantiator object 804 is used by cybernode 801 to create JSBs 806 when service bean instantiator object 804 receives a service provision event. Using JSB attributes contained in the service provision event, cybernode 801 instantiates the JSB, and ensures that the JSB and its corresponding service remain available over the network. Service bean instantiator object 804 can be used by cybernode 801 to download JSB class files from a code server as needed.
As described above, JSBs and cybernodes comprise the basic tools to provide a service corresponding to a service element in an operational string consistent with the present invention. A service provisioner for managing the operational string itself will now be described.
E. Dynamic Service Provisioning
A service provisioner is an infrastructure service that provides the capability to deploy and monitor operational strings. As described above, an operational string is a collection of service elements that together constitute a complex service in a distributed system. To manage an operational string, a service provisioner determines whether a service instance corresponding to each service element in the operational string is running on the network. The service provisioner dynamically provisions an instance of any service element not represented on the network. The service provisioner also monitors the service instance corresponding to each service element in the operational string to ensure that the complex service represented by the operational string is provided correctly.
If an instance of the next service is not running on the network (step then service provisioner 906 determines a target cybernode that matches the next service (step 1212). The process of matching a service instance to a cybernode is discussed below. Service provisioner 906 fires a service provision event to the target cybernode requesting creation of a JSB to perform the next service (step 1214). In one embodiment, the service provision event includes service bean attributes object 604 from service element 506. Service provisioner 906 then uses a lookup service to discover the newly instantiated JSB (step 1216) and starts a monitor corresponding to that JSB (step 1208).
As described above, once a service instance is running, service provisioner 906 monitors it and directs its recovery if the service instance fails for any reason. For example, if a monitor detects that a service instance has failed, service provisioner 906 may issue a new service provision event to create a new JSB to provide the corresponding service. In one embodiment of the present invention, service provisioner 906 can monitor services that are provided by objects other than JSBs. The service provisioner therefore provides the ability to deal with damaged or failed resources while supporting a complex service.
Service provisioner 906 also ensures quality of service by distributing a service provision request to the compute resource best matched to the requirements of the service element. A service, such as a software component, has requirements, such as hardware requirements, response time, throughput, etc. In one embodiment of the present invention, a software component provides a specification of its requirements as part of its configuration. These requirements are embodied in service provision management object 602 of the corresponding service element. A compute resource may be, for example, a computer or a device, with capabilities such as CPU speed, disk space, connectivity capability, bandwidth, etc.
In one implementation consistent with the present invention, the matching of software component to compute resource follows the semantics of the Class.isAssignable( ) method, a known method in the Java™ programming language. If the class or interface represented by QoS class object of the software component is either the same as, or is a superclass or superinterface of, the class or interface represented by the class parameter of the QoS class object of the compute resource, then a cybernode resident on the compute resource is invoked to instantiate a JSB for the software component. Consistent with the present invention, additional analysis of the compute resource may be performed before the “match” is complete. For example, further analysis may be conducted to determine the compute resource's capability to process an increased load or adhere to service level agreements required by the software component.
F. Enhanced Event Handling
Systems consistent with the present invention may expand upon traditional Jini™ event handling by employing flexible dispatch mechanisms selected by an event producer. When more than one event consumer has registered interest in an event, the event producer can use any policy it chooses for determining the order in which it notifies the event consumers. The notification policy can be, for example, round robin notification, in which the event consumers are notified in the order in which they registered interest in an event, beginning with the first event consumer that registered interest. For the next event notification, the round robin notification will begin with the second event consumer in the list and proceed in the same manner. Alternatively, an event producer could select a random order for notification, or it could reverse the order of notification with each event.
As described above, in an embodiment of the present invention, a service provisioner is an event producer and cybernodes register with it as event consumers. When the service provisioner needs to have a JSB instantiated to complete an operational string, the service provisioner fires a service provision event to all of the cybernodes that have registered, using an event notification scheme of its choosing.
The foregoing description of an implementation of the invention has been presented for purposes of illustration and description. It is not exhaustive and does not limit the invention to the precise form disclosed. Modifications and variations are possible in light of the above teachings or may be acquired from practicing of the invention. Additional modifications and variations of the invention may be, for example, the described implementation includes software but the present invention may be implemented as a combination of hardware and software or in hardware alone. The invention may be implemented with both object-oriented and non-object-oriented programming systems.
Furthermore, one skilled in the art would recognize the ability to implement the present invention in many different situations. For example, the present invention can be applied to the telecommunications industry. A complex service, such as a telecommunications customer support system, may be represented as a collection of service elements such as customer service phone lines, routers to route calls to the appropriate customer service entity, and billing for customer services provided. The present invention could also be applied to the defense industry. A complex system, such as a battleship's communications system when planning an attack, may be represented as a collection of service elements including external communications, weapons control, and vessel control.
Additionally, although aspects of the present invention are described as being stored in memory, one skilled in the art will appreciate that these aspects can also be stored on other types of computer-readable media, such as secondary storage devices, like hard disks, floppy disks, or CD-ROM; a carrier wave from the Internet or other propagation medium; or other forms of RAM or ROM. The scope of the invention is defined by the claims and their equivalents.
This application is a divisional of U.S. patent application Ser. No. 09/947,528, filed Sep. 7, 2001 now abandoned, which is incorporated by reference. This application is related to U.S. patent application Ser. No. 09/947,549, entitled Distributed Metric Discovery and Collection in a Distributed System, filed Sep. 7, 2001, which is relied upon and incorporated by reference.
Number | Name | Date | Kind |
---|---|---|---|
4430699 | Segarra et al. | Feb 1984 | A |
4567359 | Lockwood | Jan 1986 | A |
4800488 | Agrawal et al. | Jan 1989 | A |
4992940 | Dworkin | Feb 1991 | A |
5101346 | Ohtsuki | Mar 1992 | A |
5253165 | Leiseca et al. | Oct 1993 | A |
5303042 | Lewis et al. | Apr 1994 | A |
5319542 | King, Jr. et al. | Jun 1994 | A |
5327559 | Priven et al. | Jul 1994 | A |
5339430 | Lundin et al. | Aug 1994 | A |
5341477 | Pitkin et al. | Aug 1994 | A |
5446901 | Owicki et al. | Aug 1995 | A |
5459837 | Caccavale | Oct 1995 | A |
5475840 | Nelson et al. | Dec 1995 | A |
5491791 | Glowny et al. | Feb 1996 | A |
5506984 | Miller | Apr 1996 | A |
5511196 | Shackelford et al. | Apr 1996 | A |
5544040 | Gerbaulet | Aug 1996 | A |
5548724 | Akizawa et al. | Aug 1996 | A |
5592375 | Salmon et al. | Jan 1997 | A |
5644720 | Boll et al. | Jul 1997 | A |
5664110 | Green et al. | Sep 1997 | A |
5664111 | Nahan et al. | Sep 1997 | A |
5666493 | Wojcik et al. | Sep 1997 | A |
5671279 | Elgamal | Sep 1997 | A |
5675797 | Chung et al. | Oct 1997 | A |
5682534 | Kapoor et al. | Oct 1997 | A |
5694551 | Doyle et al. | Dec 1997 | A |
5710887 | Chelliah et al. | Jan 1998 | A |
5715314 | Payne et al. | Feb 1998 | A |
5721825 | Lawson et al. | Feb 1998 | A |
5721832 | Westrope et al. | Feb 1998 | A |
5724540 | Kametani | Mar 1998 | A |
5727048 | Hiroshima et al. | Mar 1998 | A |
5729594 | Klingman | Mar 1998 | A |
5742768 | Gennaro et al. | Apr 1998 | A |
5754977 | Gardner et al. | May 1998 | A |
5758077 | Danahy et al. | May 1998 | A |
5758328 | Giovannoli | May 1998 | A |
5761507 | Govett | Jun 1998 | A |
5764915 | Heimsoth et al. | Jun 1998 | A |
5774729 | Carney et al. | Jun 1998 | A |
5778179 | Kanai et al. | Jul 1998 | A |
5790677 | Fox et al. | Aug 1998 | A |
5794207 | Walker et al. | Aug 1998 | A |
5799173 | Gossler et al. | Aug 1998 | A |
5805805 | Civaniar et al. | Sep 1998 | A |
5806042 | Kelley et al. | Sep 1998 | A |
5809144 | Sirbu et al. | Sep 1998 | A |
5850442 | Muftic | Dec 1998 | A |
5915112 | Boutcher | Jun 1999 | A |
5925108 | Johnson et al. | Jul 1999 | A |
5961582 | Gaines | Oct 1999 | A |
5963924 | Williams et al. | Oct 1999 | A |
5978773 | Hudetz et al. | Nov 1999 | A |
5982773 | Nishimura et al. | Nov 1999 | A |
5991808 | Broder et al. | Nov 1999 | A |
5996075 | Matena | Nov 1999 | A |
5999988 | Pelegri-Liopart et al. | Dec 1999 | A |
6003050 | Silver et al. | Dec 1999 | A |
6003065 | Yan et al. | Dec 1999 | A |
6009413 | Webber et al. | Dec 1999 | A |
6009464 | Hamilton et al. | Dec 1999 | A |
6014686 | Elnozahy et al. | Jan 2000 | A |
6016516 | Horikiri | Jan 2000 | A |
6018619 | Allard et al. | Jan 2000 | A |
6032151 | Arnold et al. | Feb 2000 | A |
6034925 | Wehmeyer | Mar 2000 | A |
6044381 | Boothby et al. | Mar 2000 | A |
6055562 | Devarakonda et al. | Apr 2000 | A |
6058381 | Nelson | May 2000 | A |
6078655 | Fahrer et al. | Jun 2000 | A |
6092194 | Touboul | Jul 2000 | A |
6093216 | Adl-Tabatabai et al. | Jul 2000 | A |
6101528 | Butt | Aug 2000 | A |
6104716 | Crichton et al. | Aug 2000 | A |
6134603 | Jones et al. | Oct 2000 | A |
6154844 | Touboul et al. | Nov 2000 | A |
6157960 | Kaminsky et al. | Dec 2000 | A |
6182083 | Scheifler et al. | Jan 2001 | B1 |
6185611 | Waldo et al. | Feb 2001 | B1 |
6189046 | Moore et al. | Feb 2001 | B1 |
6192044 | Mack | Feb 2001 | B1 |
6199068 | Carpenter | Mar 2001 | B1 |
6199116 | May et al. | Mar 2001 | B1 |
6212578 | Racicot et al. | Apr 2001 | B1 |
6216158 | Luo et al. | Apr 2001 | B1 |
6219675 | Pal et al. | Apr 2001 | B1 |
6243716 | Waldo et al. | Jun 2001 | B1 |
6243814 | Matena | Jun 2001 | B1 |
6253256 | Wollrath et al. | Jun 2001 | B1 |
6263350 | Wollrath et al. | Jul 2001 | B1 |
6263379 | Atkinson et al. | Jul 2001 | B1 |
6272559 | Jones et al. | Aug 2001 | B1 |
6282581 | Moore et al. | Aug 2001 | B1 |
6292934 | Davidson et al. | Sep 2001 | B1 |
6301613 | Ahlstrom et al. | Oct 2001 | B1 |
6321275 | McQuistan et al. | Nov 2001 | B1 |
6327677 | Garg et al. | Dec 2001 | B1 |
6339783 | Horikiri | Jan 2002 | B1 |
6343308 | Marchesseault | Jan 2002 | B1 |
6360266 | Pettus | Mar 2002 | B1 |
6363409 | Hart et al. | Mar 2002 | B1 |
6363411 | Dugan et al. | Mar 2002 | B1 |
6385643 | Jacobs et al. | May 2002 | B1 |
6408342 | Moore et al. | Jun 2002 | B1 |
6418461 | Barnhouse et al. | Jul 2002 | B1 |
6418468 | Ahlstrom et al. | Jul 2002 | B1 |
6564174 | Ding et al. | May 2003 | B1 |
6578074 | Bahlmann | Jun 2003 | B1 |
6603772 | Moussavi et al. | Aug 2003 | B1 |
6604127 | Murphy et al. | Aug 2003 | B2 |
6604140 | Beck et al. | Aug 2003 | B1 |
6654793 | Wollrath et al. | Nov 2003 | B1 |
6704803 | Wilson et al. | Mar 2004 | B2 |
6757262 | Weisshaar et al. | Jun 2004 | B1 |
6757729 | Devarakonda et al. | Jun 2004 | B1 |
6779030 | Dugan et al. | Aug 2004 | B1 |
6782421 | Soles et al. | Aug 2004 | B1 |
6801940 | Moran et al. | Oct 2004 | B1 |
6801949 | Bruck et al. | Oct 2004 | B1 |
6804711 | Dugan et al. | Oct 2004 | B1 |
7024450 | Deo et al. | Apr 2006 | B1 |
7065574 | Saulpaugh et al. | Jun 2006 | B1 |
7243356 | Saulpaugh et al. | Jul 2007 | B1 |
7395333 | Saulpaugh et al. | Jul 2008 | B1 |
7660887 | Reedy et al. | Feb 2010 | B2 |
7756969 | Clarke et al. | Jul 2010 | B1 |
8001232 | Saulpaugh et al. | Aug 2011 | B1 |
20020059212 | Takagi | May 2002 | A1 |
20020083166 | Dugan et al. | Jun 2002 | A1 |
20020091800 | Wilkinson et al. | Jul 2002 | A1 |
20020105908 | Blumer et al. | Aug 2002 | A1 |
20020107914 | Charisius et al. | Aug 2002 | A1 |
20020111814 | Barnett et al. | Aug 2002 | A1 |
20030005132 | Nguyen et al. | Jan 2003 | A1 |
20030051029 | Reedy et al. | Mar 2003 | A1 |
20030120825 | Avvari et al. | Jun 2003 | A1 |
20030191842 | Murphy et al. | Oct 2003 | A1 |
20090172091 | Hamel | Jul 2009 | A1 |
Number | Date | Country |
---|---|---|
WO 9917194 | Apr 1999 | WO |
WO 0113228 | Feb 2001 | WO |
WO 0186394 | Nov 2001 | WO |
WO 0190903 | Nov 2001 | WO |
Number | Date | Country | |
---|---|---|---|
20060010234 A1 | Jan 2006 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09947528 | Sep 2001 | US |
Child | 11213810 | US |