CROSS REFERENCE TO RELATED APPLICATION The present invention is related to the following application entitled “Method and Apparatus for Combining Resource Properties and Device Operations Using Stateful Web Services”, Ser. No. ______ attorney docket no. CA920040064US1, filed even date hereof. The above related application is assigned to the same assignee, and is incorporated herein by reference.
BACKGROUND OF THE INVENTION 1. Technical Field
The present invention relates to an improved network data processing system. Particularly, the present invention relates to a method and apparatus for utilizing Web services in the network data processing system. Still more particularly, the present invention relates to a method and apparatus for using Web services to manage data center operations in the network data processing system.
2. Description of Related Art
In recent years, the use of Web services has increased due to the popularity of the World Wide Web. With Web services, businesses may perform transactions with consumers or other businesses. A service provider may publish available services on the Internet using Web services for an end user to subscribe. For example, a customer may subscribe to obtain stock quotes from a financial institution using Web services.
Web services are provided through a number of standards. An example of a Web services standard is Web Services Description language (WSDL). WSDL, a standard published by the World Wide Web Consortium (W3C), allows a service provider to describe Web services in an extensible markup language (XML) format as a set of endpoints operating on messages. WSDL allows endpoints and messages to be described regardless of the message formats or network protocols.
Another Web services standard is Web services invocation framework (WSIF). WSIF is an open application programming interface (API) for invoking Web services regardless of how the Web services are provided. Using WSIF, application developers may interact directly with abstract representations of Web services through their WSDL descriptions instead of using common message formats, such as Simple Object Access Protocol (SOAP). With these standards, Web services are widely used in electronic commerce and business-to-business applications.
Data centers, which connect a variety of servers and devices in different ways, are currently managed by administrators using legacy applications or manual operations. Many of these applications or operations are not extensible because they are platform and programming language dependent. In addition, no existing standard is present to define data center management.
Therefore, it would be advantageous to have a standard method that allows administrators to manage data centers regardless of languages and platforms. It would also be advantageous to have a method and apparatus that utilizes the benefits of Web services to facilitate communications between different types of servers and devices within a data center.
SUMMARY OF THE INVENTION The present invention provides a method, apparatus, and computer instructions for managing data center using Web services. The mechanism of the present invention provides two types of Web services, stateless Web services and stateful Web services. Both of these types of Web services allow data center administrators to manage data center operations. Stateless Web services include an invoker application programming interface that utilizes a Web Services Invocation Framework (WSIF) to invoke data center operations. Stateful Web services include a WSDL definition file that is associated with each data center resource, which defines attributes of the resource and data center operations.
BRIEF DESCRIPTION OF THE DRAWINGS The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
FIG. 1 depicts a pictorial representation of a network of data processing systems in which the present invention may be implemented;
FIG. 2 is a block diagram of a data processing system that may be implemented as a server in accordance with a preferred embodiment of the present invention;
FIG. 3 is a block diagram of a data processing system in which the present invention may be implemented;
FIG. 4 is a diagram illustrating an exemplary data center in accordance with a preferred embodiment of the present invention;
FIG. 5 is a diagram illustrating an exemplary invocation of a stateless Web service to manager a data center resource in accordance with a preferred embodiment of the present invention;
FIG. 6 is a diagram illustrating an exemplary invocation of a stateful Web service to manage a data center resource in accordance with a preferred embodiment of the present invention;
FIG. 7A is a diagram illustrating an exemplary implementation of the invoker API in accordance with a preferred embodiment of the present invention;
FIG. 7B is a diagram illustrating an exemplary implementation of a stateless Web service to reboot a switch is depicted in accordance with a preferred embodiment of the present invention;
FIG. 8 is a diagram illustrating an exemplary implementation of using a stateful Web service to invoke logical device operations and retrieve resource properties is depicted in accordance with a preferred embodiment of the present invention;
FIG. 9 is a class diagram illustrating available Web services resources in accordance with a preferred embodiment of the present invention;
FIG. 10 is a diagram illustrating an exemplary WSDL file provided by the present invention in accordance with a preferred embodiment of the present invention;
FIG. 11 is a flowchart of a process for using stateful Web services to manage data center resource from a client's perspective in accordance with a preferred embodiment of the present invention; and
FIG. 12 is a flowchart of a process illustrating an exemplary process of using stateful Web services to manage data center resource from a server's perspective in accordance with a preferred embodiment of the present invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT With reference now to the figures,FIG. 1 depicts a pictorial representation of a network of data processing systems in which the present invention may be implemented. Networkdata processing system100 is a network of computers in which the present invention may be implemented. Networkdata processing system100 contains anetwork102, which is the medium used to provide communications links between various devices and computers connected together within networkdata processing system100. Network102 may include connections, such as wire, wireless communication links, or fiber optic cables.
In the depicted example,server104 is connected tonetwork102 along withstorage unit106. In addition,clients108,110, and112 are connected tonetwork102. Theseclients108,110, and112 may be, for example, personal computers or network computers. In the depicted example,server104 provides data, such as boot files, operating system images, and applications to clients108-112.Clients108,110, and112 are clients to server104. Networkdata processing system100 may include additional servers, clients, and other devices not shown.
Furthermore,server104 may be connected to other resources, such as router130,server114,switch132 andstorage106. In the present invention, these resources in combination with networkdata processing system100 make up a data center.
In the depicted example, networkdata processing system100 is the Internet withnetwork102 representing a worldwide collection of networks and gateways that use the Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols to communicate with one another. At the heart of the Internet is a backbone of high-speed data communication lines between major nodes or host computers, consisting of thousands of commercial, government, educational and other computer systems that route data and messages. Of course, networkdata processing system100 also may be implemented as a number of different types of networks, such as for example, an intranet, a local area network (LAN), or a wide area network (WAN).FIG. 1 is intended as an example, and not as an architectural limitation for the present invention.
Referring toFIG. 2, a block diagram of a data processing system that may be implemented as a server, such asserver104 inFIG. 1, is depicted in accordance with a preferred embodiment of the present invention.Data processing system200 may be a symmetric multiprocessor (SMP) system including a plurality ofprocessors202 and204 connected tosystem bus206. Alternatively, a single processor system may be employed. Also connected tosystem bus206 is memory controller/cache208, which provides an interface tolocal memory209. I/O bus bridge210 is connected tosystem bus206 and provides an interface to I/O bus212. Memory controller/cache208 and I/O bus bridge210 may be integrated as depicted.
Peripheral component interconnect (PCI)bus bridge214 connected to I/O bus212 provides an interface to PCIlocal bus216. A number of modems may be connected to PCIlocal bus216. Typical PCI bus implementations will support four PCI expansion slots or add-in connectors. Communications links to clients108-112 inFIG. 1 may be provided throughmodem218 andnetwork adapter220 connected to PCIlocal bus216 through add-in connectors.
AdditionalPCI bus bridges222 and224 provide interfaces for additional PCIlocal buses226 and228, from which additional modems or network adapters may be supported. In this manner,data processing system200 allows connections to multiple network computers. A memory-mappedgraphics adapter230 andhard disk232 may also be connected to I/O bus212 as depicted, either directly or indirectly.
Those of ordinary skill in the art will appreciate that the hardware depicted inFIG. 2 may vary. For example, other peripheral devices, such as optical disk drives and the like, also may be used in addition to or in place of the hardware depicted. The depicted example is not meant to imply architectural limitations with respect to the present invention.
The data processing system depicted inFIG. 2 may be, for example, an IBM eServer™ pSeries® system, a product of International Business Machines Corporation in Armonk, N.Y., running the Advanced Interactive Executive (AIX™) operating system or LINUX operating system.
With reference now toFIG. 3, a block diagram of a data processing system is shown in which the present invention may be implemented.Data processing system300 is an example of a computer, such asclient108 in FIG.1, in which code or instructions implementing the processes of the present invention may be located. In the depicted example,data processing system300 employs a hub architecture including a north bridge and memory controller hub (MCH)308 and a south bridge and input/output (I/O) controller hub (ICH)310.Processor302,main memory304, andgraphics processor318 are connected toMCH308.Graphics processor318 may be connected to the MCH through an accelerated graphics port (AGP), for example.
In the depicted example, local area network (LAN)adapter312,audio adapter316, keyboard andmouse adapter320,modem322, read only memory (ROM)324, hard disk drive (HDD)326, CD-ROM driver330, universal serial bus (USB) ports andother communications ports332, and PCI/PCIe devices334 may be connected toICH310. PCI/PCIe devices may include, for example, Ethernet adapters, add-in cards, PC cards for notebook computers, etc. PCI uses a cardbus controller, while PCIe does not.ROM324 may be, for example, a flash binary input/output system (BIOS).Hard disk drive326 and CD-ROM drive330 may use, for example, an integrated drive electronics (IDE) or serial advanced technology attachment (SATA) interface. A super I/O (SIO)device336 may be connected toICH310.
An operating system runs onprocessor302 and is used to coordinate and provide control of various components withindata processing system300 inFIG. 3. The operating system may be a commercially available operating system such as Windows XP™, which is available from Microsoft Corporation. An object oriented programming system, such as the Java™ programming system, may run in conjunction with the operating system and provides calls to the operating system from Java™ programs or applications executing ondata processing system300. “JAVA” is a trademark of Sun Microsystems, Inc.
Instructions for the operating system, the object-oriented programming system, and applications or programs are located on storage devices, such ashard disk drive326, and may be loaded intomain memory304 for execution byprocessor302. The processes of the present invention are performed byprocessor302 using computer implemented instructions, which may be located in a memory such as, for example,main memory304,memory324, or in one or moreperipheral devices326 and330.
Those of ordinary skill in the art will appreciate that the hardware inFIG. 3 may vary depending on the implementation. Other internal hardware or peripheral devices, such as flash memory, equivalent non-volatile memory, or optical disk drives and the like, may be used in addition to or in place of the hardware depicted inFIG. 3. Also, the processes of the present invention may be applied to a multiprocessor data processing system.
For example,data processing system300 may be a personal digital assistant (PDA), which is configured with flash memory to provide non-volatile memory for storing operating system files and/or user-generated data. The depicted example inFIG. 3 and above-described examples are not meant to imply architectural limitations. For example,data processing system300 also may be a tablet computer, laptop computer, or telephone device in addition to taking the form of a PDA.
The present invention provides a method, apparatus, and computer instructions for managing data centers using Web services. A data center typically consists of many different types of servers and devices, such as routers and switches. By using Web services, data center operations and attributes associated with different resources may be defined in a WSDL definition file. Examples of data center operations include adding a server to a cluster of servers, removing a server from the cluster, and setting a server to maintenance mode. Some example resource attributes include server name, server id, and server type.
The administrator may use the WSDL definition file to invoke data center operations on logical device operations, which provides a high-level encapsulation to lower level operation scripts that manipulate data center resources. In this way, administrators may manage the data center without the constraints of different platforms or programming languages.
In a preferred embodiment, the present invention provides two mechanisms, stateless Web services and stateful Web services, for managing data center operations. Stateless Web services do not persist the state of resources. With this type of Web services, an administrator may only invoke a data center operation on a given resource, but may not persist the instance of the given resource for later use. The data center operations may be invoked using the Web services Invocation Framework (WSIF). On the other hand, stateful Web services allow administrators to persist an instance of a given resource to not only invoke data center operations on the resource, but also manipulate the attributes of the given resource and the resource's relationships with other resources.
The present invention provides stateless Web services for managing a data center through the use of an invoker application programming interface (API). An administrator, as a Web service user, may specify a number of input parameters for the invoke method of the invoker API to invoke a specific data center operation. The input parameters in the illustrative examples include a WSDL definition file location, the name of data center operation to be invoked, necessary parameters for the operation, a user name, and a password for accessing the data center resource. Invoker API utilizes the Web services Invocation Framework (WSIF) to invoke data center operations dynamically as specified in the WSDL file. Since stateless Web services do not persist the state of the resource, a resource id is required from the administrator each time an operation is invoked.
For stateful Web services, the present invention allows administrators to not only invoke data center operations on a given resource, but also manipulate the given resource and relationships between different resources. With stateful Web services provided by the present invention, an administrator may access an instance of a resource in the data center by requesting an endpoint reference for the given resource using a property, such as a resource name. As used herein, an endpoint reference is the end location of a particular resource, which is normally represented in the form of a Uniform Resource Identifier (URI) or a Uniform Resource Locator (URL). The administrator may then add the endpoint reference to a Simple Object Access Protocol (SOAP) header, such that the endpoint reference may later be used for subsequent requests. Once the endpoint reference is set, the resource is persistent within the scope of the Web services session. At this time, the administrator may retrieve or set any property associated with the resource and invoke logical device operations to manipulate that resource.
Turning now toFIG. 4, a diagram illustrating an exemplary data center is depicted in accordance with a preferred embodiment of the present invention. As shown inFIG. 4, in this illustrative example,data center400 includes resources, such as,customer402,server404, Virtual Local Area Network (VLAN)406,subnet408,router410,switch412,software products416,load balancer418, anddata container420.
Customer412 may be, for example, a client or an administrator who uses a data processing system, such asdata processing system300 inFIG. 3.Server404 may be implemented as a data processing system, such asdata processing system200 inFIG. 2.Server404 may also be implemented as an application server, which hosts Web services, or other types of servers.Router410 and switch412 facilitate communications between different devices.VLAN406 is a network of computers that behave as if they are connected to the same wire even though they may actually be physically located on different segments of a local area network.Subnet408 is a portion of a network, which may be a physically independent network segment and shares a network address with other portions of the network.
Software products416 are applications that may be executed on a client or a server.Load balancer418 spreads task among multiple systems such that no single system is overwhelmed.Load balancer418 is normally implemented as software running on a data processing system.Data container420 may be a database, such as DB2 Universal Database, a product available from International Business Machines Corporation.
Data center400, as depicted inFIG. 4, is presented for purposes of illustrating the present invention. Other resources, such as, for example, cluster of servers and switch port, also may be included indata center400.
Turning now toFIG. 5, a diagram illustrating an exemplary invocation of a stateless Web service to manager a data center resource is depicted in accordance with a preferred embodiment of the present invention. As shown inFIG. 5, in this illustrative example, whenclient500 wants to perform a data center operation on a resource,client500 invokesclient application502, which may be a Web service interface, to call invokemethod504 of the invoker API provided by the present invention. The invoker API allowsclient500 to invoke stateless Web services onserver508.
When calling invokemethod504,client500 submits input parameters, which include the location ofWSDL file510, the desired operation name, parameters necessary for the operation, a user name and password for access to the resource.WSDL file510 defines resources, their attributes, and a set of operations that the data center administrator can perform on the resources.
Using the user name and password submitted byclient500, the identity of the administrator may be authenticated before access of data center resource is allowed. Once the identity of the administrator is authenticated, instance of the resource,Web service506, is located usingWSDL file510 andlogical data operation514 is invoked byWeb services506 to run lowerlevel workflow scripts516.Workflow scripts516 in turn perform data center operation on the resource indata center520.
In this illustrative example, the present invention allows the administrator to invoke a stateless Web service to perform data center operation on a given resource. However, the administrator is unable to manipulate attributes of the given resource, since the state of the resource is not persistent.
Turning now toFIG. 6, a diagram illustrating an exemplary invocation of a stateful Web service to manage a data center resource is depicted in accordance with a preferred embodiment of the present invention. As depicted inFIG. 6, in this illustrative example, whenclient600 wants to invoke a data center operation on a resource,client600 first invokesclient application602 to access an instance of this resource fromserver601.Client application602 accesses the instance by retrieving an endpoint reference of the resource from WSDL file603 (call606). The endpoint reference is retrieved by using a resource property, such as a server name. Once the instance of the resource,Web services604, is accessed, the endpoint reference is returned toclient application602 in a SOAP element (call608).
When the endpoint reference is received byclient application602,client application602 sets the endpoint reference in a property of the SOAP stub (call610). In addition,SOAP client handler611 sets the endpoint reference to the SOAP message header, such that subsequent requests through the stub may re-use the same endpoint reference (call612). Once the endpoint reference is set in the SOAP header, the resource is now persistent within the scope of the current Web services session andclient600 may access the instance of the resource to invoke a data center operation or retrieve properties for the resource (call614).
After a data center operation is invoked byclient500 viaclient application602,SOAP server handler618 writes the endpoint reference to a SOAP message context (call616) forWeb services604 to extract (call620). When the endpoint reference is extracted, a resource id is retrieved from the message context which identifies a particular resource in the data center to invoke the operation on. After the resource id is retrieved,Web services604 callslogical device operations624, which is a high-level encapsulation of lower level workflow scripts to perform a specific data operation (call622). Thelogical device operations624 run lower level workflows scripts (call626) to manage resource ofdata center630 accordingly (call628).
Thus, using the stateful Web services, an administrator is able to access the instance of a given resource, such that the administrator may create or destroy the instance at any time. In addition, the administrator also may retrieve or set attributes for the given resource, interrogate relationships associated with the given resource and invoke data center operations on the given resource. Furthermore, there is no need for the client to submit a resource ID each time, as in the case of stateless Web services, as an input parameter to the Web service, because the state of the resource is now persistent.
Turning now toFIG. 7A, a diagram illustrating an exemplary implementation of the invoker API is depicted in accordance with a preferred embodiment of the present invention. As shown inFIG. 7A, in this illustrative example, theinvoker API700 includes an invokemethod702, which takes in five input parameters:wsdlLocation704,operationName706, params708, username710, andpassword712.
WsdlLocation704 defines the WSDL file location for the Web service that is to be invoked by the client.OperationName706 defines the name of the data center operation to be invoked.Params708 defines one or more parameters to be passed into the operation. Username710 andpassword712 define the userid and password required for authentication of an administrator in order to access the data center resource. Thus, using invokemethod702 of theinvoker API700, an administrator may dynamically invoke data center operations on a given resource.
Turning now toFIG. 7B, a diagram illustrating an exemplary implementation of a stateless Web service to reboot a switch is depicted in accordance with a preferred embodiment of the present invention. As shown inFIG. 7B, in this illustrative example, an administrator specifies the location of theWSDL file740 in a URL or URI format.
The administrator then specifies the operation as a “reboot”operation742 and a device id of “33333”744 to be included in the list of parameters746 for the “reboot” operation. Once the input parameters are set, the administrator then invokes the invoke method, such as invokemethod702 inFIG. 7A, and passes in the input parameters.
In this illustrative example, the administrator wants to reboot a switch with a device id of “33333”. By specifying the WSDL file location directly, the present invention allows the operation to be invoked on a specific switch.
Turning now toFIG. 8, a diagram illustrating an exemplary implementation of using a stateful Web service to invoke logical device operations and retrieve resource properties is depicted in accordance with a preferred embodiment of the present invention. As shown in FIG.8, in this illustrative example,client application800 may query a server for an endpoint reference of a desired resource. A server name of “IBM WAS Server”802 is used. The endpoint reference is retrieved by invoking afindReferenceByProperties method804. Next, the client adds the endpoint reference to a SOAP header by setting the endpoint reference in the property of theSOAP stub806. Once the endpoint reference is set in the SOAP header, the administrator may access the server resource instance and retrieve attributes of the resource accordingly.
In this illustrative example, the administrator accesses the attributes by invoking agetResourceProperty method808 to retrieve theserver identifier810,isFailed812, theTCP port number814, and thepool name816. In addition to retrieving the attributes, the administrator may also set attributes, define relationships between this resource and other resources, and invoke logical device operations to physically manipulate the server resource in the data center.
In this depicted example, the administrator may set the server resource's maintenance mode to true by invoking asetMaintenance method818, which means no one has access to the server resource other than the administrator. The administrator also adds the server resource to a cluster by invoking the addServer method820. At any time, the administrator may query the status of a request by invoking a getRequestStatus method to determine whether the Web service session should be terminated or whether to destroy the instance of the server resource.
Turning now toFIG. 9, a class diagram illustrating available Web services resources is depicted in accordance with a preferred embodiment of the present invention. As depicted inFIG. 9, On demand infrastructure (ODI) services are web services and infrastructures that support business on demand in an enterprise computing environment.ODI service class900 is a base class that includes a number of default methods. These methods include lock902, unlock904, get resource property906, get multiple resource properties908, set resource properties910, query resource properties912, associate relationship914, de-associate relationship916, find relationship types918, get relationship endpoint reference (EPR) by type920, find references by properties922, assign924 and unassign926.
ODI service900 is inherited by a number of subclasses, which are available resources in the data center. These resources includeApplication service932,server service934,application tier service936,customer service938, fibre channel (FC)fabric service940,router service942, storage area network (SAN)frame service944,software products service946,software stack service948,storage pool service950,sub-network service952, switchport service954,switch service956,VLAN service958 andvolume manager service960.Application service932 provides Web services operations to manipulate the application resource of the data center andserver service934 provides Web services operations to manipulate the server resource of the data center, etc.
Services932-960 inherit default methods902-926 fromODI service900, such that an administrator may manipulate services932-960 once an instance of the resource is obtained. For example, lock method902 allows the administrator to lock a resource. Unlock method904 allows the administrator to unlock the resource.
Get resource property method906 allows the administrator to retrieve an attribute of a resource by the property name, for example, NumberOfBlocks. Get multiple resource properties method908 retrieves the value of an attribute by a list of property names, for example, NumberOfBlocks and Size. Set resource properties910 sets a number of attributes by inputting an XML string. Query resource properties method912 allows an administrator to query attributes by specifying a condition. For example, an administrator may NumberOfBlocks>20 and BlockSize=1024. Associate relationship method914 associates two resources with a given relationship type and de-associate relationship method916 undo the association. For example, a customer resource may be associated with an application resource with a relationship type of “OWN”, since the customer may own an application.
Find relationship types method918 finds relationship types for a given resource based on all possible relationship types for the resource regardless of whether or not the relationship types are associated with other resources. Get relationship EPR by type method920 gets the relationship endpoint references by type. Find references by properties method922 finds the list endpoint references that are associated with a given resource properties. This is the method invoked by the administrator in order to access an instance of a resource. Assign method924 assigns and unassign method926 unassigns a given resource to an application. Thus, default methods902-926 enable the administrator to manipulate the attributes of data center services using properties specified the WSDL definition file.
In addition to default methods902-926 inherited fromODI service900,server service934 also includes customized methods, such as server event927, admin server event928, and set maintenance929. Server event method927 allows an administrator to set the server failure status to either true or false. Admin server event928 allows the administrator to set the admin server failure status to either true or false. Set maintenance method929 allows the administrator put a server resource in maintenance mode by setting it to true or take a server resource out of maintenance mode by setting it to false. As toapplication tier service936, customized methods, such as allocate server and remove server are provided for an administrator to add a server to or remove a server from a cluster.
In this manner, the present invention provides a set of Web services that allows the administrator to manipulate attributes of any given resource in a data center. Other resources may also be provided by inheritingODI service900.
Turning now toFIG. 10, a diagram illustrating an exemplary WSDL file provided by the present invention is depicted in accordance with a preferred embodiment of the present invention. As depicted inFIG. 10,WSDL file1000 adheres to the standard of Web Services Definition Language (WSDL). In theschema section1001, a number of common1002 andserver resource properties1004 are defined. Common resource properties are shared by all data center resources and server resource properties are specific to a server resource. Examples of common property include an identifier1006 and a name of theresource1008. Examples of server resource properties includeisMaintenance1010 andisFailed1012.
In addition to resource properties, the schema section ofWSDL file1000 also defines a number of data elements that will be used by WSDL messages. Subsequent to the schema section, a number ofWSDL message definitions1014 are provided to define data elements of data center operation. Each message includes one or more parts. A message can be compared to an input or output of a function, which contains one or more parts, which are input or output parameters. Examples of messages include ‘assign request’1016 and ‘assign response’1018. Each message represents an input and output of the ‘assign’ operation.
After the messages are defined, a set of operations are defined using the defined messages. For example, operation ‘assign’1020 is defined with an input of ‘assign request’1022 and an output of ‘assign response’1024. Operation ‘assign’ may be compared to a function of a program in traditional programming, except in this example, ‘assign’ is an operation provided by a resource, such as a server resource. These operations represent default methods and customize methods as described inFIG. 9. Once operations are defined,WSDL file1000 defines a Web service to include all defined operations. In this example, ‘server service service’1026 is defined to include the operations.
Turning now toFIG. 11, a flowchart of a process for using stateful Web services to manage data center resource from a client's perspective is depicted in accordance with a preferred embodiment of the present invention. As depicted inFIG. 11, in this illustrative example, a client wants to access a server resource from the data center. The process begins when the client application sets a server name in a resource property (step1102). The client application may use any resource property to obtain an endpoint reference. However, since a server name is unique to each server, using the server name property will locate only a single server from the data center. Next, the client application converts the resource property to an XML string (step1104).
Once the resource property is converted, the client application invokes the findReferenceByProperties method to obtain endpoint reference of the server resource (step1106). After the EPR is obtained, the client application sets the EPR in the SOAP header for future use (step1108). The server resource is now persistent within the scope of the Web services session and the client application may access the instance throughout the resource lifecycle.
The client application may invoke operations that are defined in the WSDL file, such as WSDL file900 inFIG. 9, to manipulate the server resource (step1110). Examples of data center operations include add a server to a cluster, remove a server from a cluster, and set the server maintenance mode to true. The client application also may retrieve or set a number of server resource attributes, such as server identifier and server type. Once the operation is complete, a determination is then made by the client application as to whether to perform additional operations (step1112). If additional operations are to be performed, the client application returns to step1110 to invoke another WSDL defined operations to further manipulate the resource.
If no additional operations are to be performed, the client application invokes the get request status method (step1114) and make a determination as to whether all outstanding requests are complete (step1116). If all requests are complete, the client application terminates the current Web services session (step1118) and destroys the resource instance (step1120). Thus, the process terminates thereafter. Otherwise, the process returns to step1116 until all outstanding requests are complete.
Turning now toFIG. 12, a flowchart of a process illustrating an exemplary process of using stateful Web services to manage data center resource from a server's perspective is depicted in accordance with a preferred embodiment of the present invention. As depicted inFIG. 12, in this depicted example, the process begins when server, such asserver601 inFIG. 6, receives a request from the client for an endpoint reference of a resource (step1202). The server returns a SOAP element with an endpoint reference for the desired resource (step1204). Later, the server receives a data center operation request on the resource (step1206). The server then obtains the endpoint reference from the SOAP header (step1208) and invokes the logical device operation (LDO) with a device ID (step1210).
The LDO provides a high level view of device operations that a client can run. For example, a ‘cluster.AddServer’ LDO provides a base interface that the client can use to add a server to a cluster. The server then calls workflows associated with the particular resource (step1212). Workflows provide detail implementation of the base interface. A client may associate a LDO with workflows for a given device or resource. When the client invokes an LDO with a device ID, as in this example, the server determines which workflows are associated with the LDO. In the present invention, a workflow may call other workflow to perform specific operations. Each workflow also contains low level scripts that are used to manipulate the data center. Finally, the server calls a workflow for the device to perform operation on the resource in the data center (step1214) with the process terminating thereafter.
In summary, the present invention provides a platform and language independent method for managing data centers by using Web services. The present invention recognizes the deficiencies of current solutions for managing data centers and provides both stateless and stateful Web services solutions. With the use of stateful Web services, an administrator may use a standard Web services interface to remotely access a resource in a data center without accessing the actual device. With the benefits of Web services standards, such as WSDL, the present invention enables the administrator to manage resources of the data center more efficiently, because the administrator may use different types of Web based applications, such as hypertext markup language (HTML) and Java server pages (JSP), to access the resource. Furthermore, stateful Web services provide the administrator a way to manage resources based on a specific resource instance. The present invention may also define how long a client or administrator may access a particular resource instance.
It is important to note that while the present invention has been described in the context of a fully functioning data processing system, those of ordinary skill in the art will appreciate that the processes of the present invention are capable of being distributed in the form of a computer readable medium of instructions and a variety of forms and that the present invention applies equally regardless of the particular type of signal bearing media actually used to carry out the distribution. Examples of computer readable media include recordable-type media, such as a floppy disk, a hard disk drive, a RAM, CD-ROMS, DVD-ROMs, and transmission-type media, such as digital and analog communications links, wired or wireless communications links using transmission forms, such as, for example, radio frequency and light wave transmissions. The computer readable media may take the form of coded formats that are decoded for actual use in a particular data processing system.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.