In large organizations, there may be hundreds of computers. Some of these computers may include servers that provide services to other computers both internal and external to the organization. In the past, determining which components are installed and executing on a particular server has been a time-consuming and mostly manual task.
Briefly, aspects of the subject matter described herein relate to providing information about software components. In aspects, an interface is provided via which processes may request component information. The interface is publicly exposed and is callable by both local and remote procedures. In response to a request received at the interface, static information regarding one or more components is retrieved and combined with discovered dynamic information regarding the one or more components. This information is then transformed into a form suitable for sending via the interface.
This Summary is provided to briefly identify some aspects of the subject matter that is further described below in the Detailed Description. This Summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The phrase “subject matter described herein” refers to subject matter described in the Detailed Description unless the context clearly indicates otherwise. The term “aspects” should be read as “at least one aspect.” Identifying aspects of the subject matter described in the Detailed Description is not intended to identify key or essential features of the claimed subject matter.
The aspects described above and other aspects of the subject matter described herein are illustrated by way of example and not limited in the accompanying figures in which like reference numerals indicate similar elements and in which:
Aspects of the subject matter described herein are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with aspects of the subject matter described herein include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microcontroller-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
Aspects of the subject matter described herein may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and so forth, which perform particular tasks or implement particular abstract data types. Aspects of the subject matter described herein may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 110 typically includes a variety of computer-readable media. Computer-readable media can be any available media that can be accessed by the computer 110 and includes both volatile and nonvolatile media, and removable and non-removable media. By way of example, and not limitation, computer-readable media may comprise computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer 110. Communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer-readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media, discussed above and illustrated in
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110, although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160 or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
A programming interface (or more simply, interface) may be viewed as any mechanism, process, or protocol for enabling one or more segment(s) of code to communicate with or access the functionality provided by one or more other segment(s) of code. Alternatively, a programming interface may be viewed as one or more mechanism(s), method(s), function call(s), module(s), object(s), and the like of a component of a system capable of communicative coupling to one or more mechanism(s), method(s), function call(s), module(s), and the like of other component(s). The term “segment of code” is intended to include one or more instructions or lines of code, and includes, for example, code modules, objects, subroutines, functions, and so on, regardless of the terminology applied or whether the code segments are separately compiled, or whether the code segments are provided as source, intermediate, or object code, whether the code segments are utilized in a runtime system or process, or whether they are located on the same or different machines or distributed across multiple machines, or whether the functionality represented by the segments of code are implemented wholly in software, wholly in hardware, or a combination of hardware and software.
Notionally, a programming interface may be viewed generically, as shown in
Aspects of such a programming interface may include the method whereby the first code segment transmits information (where “information” is used in its broadest sense and includes data, commands, requests, etc.) to the second code segment; the method whereby the second code segment receives the information; and the structure, sequence, syntax, organization, schema, timing, and content of the information. In this regard, the underlying transport medium itself may be unimportant to the operation of the interface, whether the medium be wired or wireless, or a combination of both, as long as the information is transported in the manner defined by the interface. In certain situations, information may not be passed in one or both directions in the conventional sense, as the information transfer may be either via another mechanism (e.g., information placed in a buffer, file, etc. separate from information flow between the code segments) or non-existent, as when one code segment simply accesses functionality performed by a second code segment. Any or all of these aspects may be important in a given situation, for example, depending on whether the code segments are part of a system in a loosely coupled or tightly coupled configuration, and so this list should be considered illustrative and non-limiting.
This notion of a programming interface is known to those skilled in the art and is clear from the foregoing detailed description. There are, however, other ways to implement a programming interface, and, unless expressly excluded, these too are intended to be encompassed by the claims set forth at the end of this specification. Such other ways may appear to be more sophisticated or complex than the simplistic view of
A communication from one code segment to another may be accomplished indirectly by breaking the communication into multiple discrete communications. This is depicted schematically in
As illustrated in
The factoring of interfaces may also follow associative, commutative, and other mathematical properties such that the factoring may be difficult to recognize. For instance, ordering of operations may be unimportant, and consequently, a function carried out by an interface may be carried out well in advance of reaching the interface, by another piece of code or interface, or performed by a separate component of the system. Moreover, one of ordinary skill in the programming arts can appreciate that there are a variety of ways of making different function calls that achieve the same result.
In some cases, it may be possible to ignore, add, or redefine certain aspects (e.g., parameters) of a programming interface while still accomplishing the intended result. This is illustrated in
Precision may very well be a meaningful parameter to some downstream or other portion of the computing system; however, once it is recognized that precision is not necessary for the narrow purpose of calculating the square, it may be replaced or ignored. For example, instead of passing a valid precision value, a meaningless value such as a birth date could be passed without adversely affecting the result. Similarly, as shown in
It may also be feasible to merge some or all of the functionality of two separate code modules such that the “interface” between them changes form. For example, the functionality of
For a concrete example, consider that the interface 210 from
A communication from one code segment to another may be accomplished indirectly by breaking the communication into multiple discrete communications. This is depicted schematically in
Similarly, as shown in
Yet another possible variant is to dynamically rewrite the code to replace the interface functionality with something else but which achieves the same overall result. For example, there may be a system in which a code segment presented in an intermediate language (e.g. Microsoft IL, Java® ByteCode, etc.) is provided to a Just-in-Time (JIT) compiler or interpreter in an execution environment (such as that provided by the .Net framework, the Java® runtime environment, or other similar runtime type environments). The JIT compiler may be written so as to dynamically convert the communications from the 1st Code Segment to the 2nd Code Segment, i.e., to conform them to a different interface as may be required by the 2nd Code Segment (either the original or a different 2nd Code Segment). This is depicted in
As can be seen in
It is also noted that the above-described scenarios for achieving the same or similar result as an interface via alternative embodiments may also be combined in various ways, serially and/or in parallel, or with other intervening code. Thus, the alternative embodiments presented above are not mutually exclusive and may be mixed, matched, and combined to produce the same or equivalent scenarios to the generic scenarios presented in
As mentioned previously, in the past, obtaining information about components installed on servers and updating the information to account for changes has been a time-consuming task. Information about a component may include, for example, whether the component is installed, what version of the component is installed, whether the component is running or not running, a human-readable name of the component, a parent of the component, if any, and the like.
In the past, a system administrator or the like might walk from machine to machine and execute administrative tools to determine what was installed on a machine. After doing this, the administrator might then determine which installed components were actually executing and which were simply installed but were not executing. To update the information about the components, the administrator would need to repeat the activities above.
In addition to, or in lieu of, being a physical machine, a “server” (sometimes referred to as a “server application”) may comprise a software application that is equipped to carry out tasks on behalf of, or provide services to, one or more client applications. One common example of a server application is a web server application, which is equipped to receive requests for information from clients executing a browser application. The web server application processes the requests that are received and provides the information to the client applications.
In general, the services that a server is equipped to perform on behalf of clients correspond to, and are defined by, the modules or components of the server application that are installed or otherwise implemented on the computer(s) on which the server application executes, and the decision of the computer's user to cause such modules or components to be executed, either continuously, periodically, or on demand. Overall, the services that a server application makes available to clients may be thought of as “roles” which the server performs for the clients.
A server may be equipped to perform a wide variety of roles. For example, depending on the modules of the server application that are installed or implemented, a server may play the role of a file server, print server, mail server, web application server, terminal server, remote access and/or virtual private network (VPN) server, directory services server, streaming media server, or other server role. A server may perform any number of roles at a time.
A component as used herein indicates one or more pieces of software that may be installed on a server. In some embodiments, one or more components may be grouped by or associated with a role or service of a server. In other embodiments, no grouping or association is required. Unless the context makes clear otherwise, whenever the term “component” is used herein, in one embodiment, this term is to replaced by “role.” In other embodiments, the term “component” is to remain as is and is to be defined as described previously.
Furthermore, although the term server is often used herein, it will be recognized that this term may also encompass a device that often acts as a client, a set of one or more processes distributed on one or more computers, one or more stand-alone storage devices, a set of one or more other devices, a combination of one or more of the above, and the like that is capable of providing services to other processes and/or devices.
Each of the servers 905-909 and the clients 920-921 may be implemented on one or more computers (e.g., computer 110 as described in conjunction with
The clients 920-921 may include component information requesters 930-931, respectively, that allow the clients 920-921 to request the information about components on any of the servers 905-909. In one embodiment, a component information requester may comprise any process on a client that issues a request to a component information provider. A client may issue such a request through a remote procedure call (RPC). Some exemplary architectures that support remote procedure calls are Distributed Component Object Model (DCOM), ActiveX, Simple Object Access Protocol (SOAP), Microsoft® net, Java's Remote Method Invocation (Java RMI), Common Object Request Broker Architecture (CORBA), and others known to those skilled in the art. Most, if not all, of these architectures hide the complexity of passing parameters to a remote procedure. From a programmer's perspective, calling a procedure on a remote device via an RPC via one of these architectures may be as simple as calling a local procedure.
In one embodiment, the component information requesters 930-931 may communicate with the component information providers 910-914 via Windows® Management Instrumentation (WMI). WMI may incorporate SOAP, DCOM, or another transport to communicate information between the requesters and the providers.
In another embodiment, the component information providers 910-914 may be Web services that provide the component information to processes (e.g., component information requesters 930-931) that request the information.
A component information requester may comprise a script, a browser configured to send an appropriate request, an application having a graphical user interface for displaying component information, a database component that collects information from servers and places the information in a database, a service that periodically collects the information and places it in volatile or non-volatile memory, some other process, and the like.
A component information requester may have a capability of querying more than one component information provider. For example, a component information requester may be able to respond to a request to obtain components information for all components for a selected set of servers.
Although the environment described above includes five servers and two clients, it will be recognized that more, fewer, or a different combination of these entities may be employed without departing from the spirit or scope of aspects of the subject matter described herein. Furthermore, the entities and communication networks included in the environment may be configured in a variety of ways as will be understood by those skilled in the art without departing from the spirit or scope of aspects of the subject matter described herein.
The communications mechanism 1035 allows the device 1005 to communicate with other devices to provide information regarding the components on the device 1005. The communications mechanism 1035 may be a network interface or adapter 170, modem 172, or any other mechanism for establishing communications as described in conjunction with
The store 1030 is any storage media capable of storing configuration information regarding the components. The store 1030 may comprise a file system, database, volatile memory such as RAM, other storage, some combination of the above, and the like and may be distributed across multiple devices. The store 1030 may be external or internal to the device 1005.
The component information API 1025 provides a mechanism for requesting and transmitting information about the component information. A local or remote process may call the interface to obtain information about the components. In one embodiment, the component information API 1025 may be defined as follows:
The first parameter, ID, may uniquely identify a component of the server. In one embodiment, the ID may not be NULL and it may be read from the server but not changed via the API 1025. In another embodiment, the ID may be read and changed via the API 1025.
The second parameter, State, may indicate a state of the component including one or more of not applicable, not installed, installed, not running, and running. In another embodiment, additional states that may be indicated by the state parameter may include, for example, blocked, waiting, continue pending, pause pending, start pending, stop pending, started, starting, stopped, paused, any other state information, and the like. As used herein, the term “pending” may refer to any one or more of the pending states above. It is recognized that the list of states above is exemplary and that more, fewer, and/or different states may be found in a particular implementation without departing from the spirit or scope of the subject matter described herein.
Not applicable indicates that the component is installed, but it is unknown whether the application is running or not. Not running indicates that the component is installed but not running. Running indicates that the component is installed and running. In one embodiment, the State may not be NULL and it may be read from the server but not changed via the API 1025. In another embodiment, the State may be read and changed via the API 1025.
The third parameter, ParentID identifies a parent of the component if one exists. Some components may have subcomponents which may have subcomponents and so forth. Some subcomponents may only be able to operate if their parent component is installed and operating. The ParentID property may be set to zero if the component has no parent and may be set to NULL if the parent component cannot be determined. In one embodiment, the ParentID may be read from the server but not changed via the API 1025. In another embodiment, the ParentID may be read and changed via the API 1025.
The fourth parameter, Name, indicates a name of the component. In one embodiment, the name is specified in a particular language (e.g., English) no matter where the server is located. In another embodiment, the name is specified in a language as desired by a software developer, system administrator, or the like. In some embodiments, the Name may be NULL if the display name of the component cannot be determined. In one embodiment, the Name may be read from the server but not changed via the API 1025. In another embodiment, the name may be read and changed via the API 1025.
While four parameters have been indicated above, in other embodiments, more, fewer, and/or different parameters may be allowed by the API 1025. For example, in one embodiment, the API may accept a query that asks whether a certain component is installed on the server. In this embodiment, the API may obtain an ID parameter, determine whether the component is installed, and may then return an installation state. In another embodiment, other state (e.g., running, not running, etc.) of the component may be desired. In this embodiment, the API 1025 may receive an ID of the component and may return the other state of the component. In other embodiments, some other combination or permutation of the parameters above may be needed. In some embodiment, the minimum types of parameters are a parameter that identifies the component and a parameter (or return data structure) that provides some information about the component.
Other exemplary information that may be passed via the API 1025 is history information about the installation of a component. For example, a system administrator may desire to know when a component was installed. This information may be included in the store 1030. With the appropriate parameter or method call, the API 1025 can provide this history information.
Other exemplary information that may be passed via the API 1025 is a list of services that are associated with a component. As mentioned previously, a component may be associated with one or more other components in a hierarchical manner, for example. This association may be stored in the store 1030. With the appropriate parameter or method call, the API 1025 can provide a list of the services associated with a particular component and the state of each of the services.
Other exemplary information that may be passed via the API 1025 includes a list of one or more components that a server is capable of executing. Certain components, for example, may require certain resources such as a certain number or type of processors, memory, hard disk space, and so forth. The API 1025 may include a parameter or method that allows a component information requester to ask whether a certain component may be executed on a particular server or may ask to return a list of components that a server is capable of executing.
It will be recognized by those skilled in the art that many types of information regarding components may be passed via the API 1025 without departing from the spirit or scope of aspects of the subject matter described herein.
Furthermore, while the parameters above have been specified in a particular order, in other embodiments, the parameters may be in other orders.
In operation, the device 1005 may receive a request for information about components installed thereon. This request may be received through the communications mechanism 1035 and passed to the component information API 1025. The request may be passed via a security mechanism if desired. The component information API 1025 may call the information collector 1022 to obtain the information requested in the query.
The information collector 1022 may first call the configuration retriever 1020 to obtain information from the store 1030. The information obtained from the store 1030 may include such things as component identifiers, names of components, identifiers of parent component of the components, if any, and other information as indicated previously. Using this information, the information collector 1022 may query the state detector 1015 to obtain state information (e.g., running, installed, not executing, blocked, etc.) regarding the components.
In obtaining this information, the information collector 1022 may create a data structure that includes the information requested via the component information API 1025. The information collector 1022 may fill out this data structure with information retrieved from both the configuration retriever 1020 and the state detector 1015. In some embodiments, static information (e.g., ID, parent, and name) regarding the components is obtained from the configuration retriever 1020 while dynamic information (e.g., running, not running, installed, etc.) is obtained from the state detector 1015.
After the information collector 1022 has assembled the information, the information collector 1022 may translate the information into a format suitable to be transmitted via the component information API 1025. This may involve extracting data from the information and placing the data in a data structure suitable to be sent via the API 1025. For example, if the component information provider is a provider for a WMI infrastructure, the information collector 1022 may translate the information into a format suitable for that infrastructure. As another example, the form returned may include the fields indicated in the class ComponentInfo indicated above.
Turning to
At block 1115, static information is retrieved from a data store. The data store may comprise a data file, a registry, a general purpose database, an XML, HTML, or other document, a data structure in memory or on disk, and the like. For example, referring to
At block 1120, state information of the components is discovered. State information includes dynamic information (i.e., information that may change depending on whether the component is installed, running, blocked, waiting, not running, etc.). For example, referring to
At block 1125, the static information is combined with the dynamic information. The actions associated with block 1125 may be performed in parallel with the actions associated with blocks 1115 and 1120. For example, a data structure may be filled in with static information from the data store. As the state of each component is discovered, this information may be entered into the data structure.
At block 1130, the combined information is transformed into a form suitable for return via the interface. For example, referring to
At block 1135, the information requested is returned to the requester. For example, referring to
At block 1140, the action end.
As can be seen from the foregoing detailed description, aspects have been described related to providing information about software components. While aspects of the subject matter described herein are susceptible to various modifications and alternative constructions, certain illustrated embodiments thereof are shown in the drawings and have been described above in detail. It should be understood, however, that there is no intention to limit aspects of the claimed subject matter to the specific forms disclosed, but on the contrary, the intention is to cover all modifications, alternative constructions, and equivalents falling within the spirit and scope of various aspects of the subject matter described herein.