Imported: 02 Mar '17 | Published: 26 May '09
USPTO - Utility Patents
The deployment and management of differing versions of software components can be simplified. External interfaces of the component can remain constant in behavior while the internal logic, and possibly internal storage, can change between versions. Such a version management system can be transparent to the client programs, since interfaces can remain backwards compatible between component versions. This transparency can greatly reduce the risks of unpredictable behavior or system failure. A system can maintain each version of a software component, and can use a dispatch technique to determine and instantiate the currently active version whenever a client requests a service from the software component during a session. Old instances, possibly of other versions, can be maintained as long as required on the server. Such systems can apply to stateful and stateless components, using synchronous or asynchronous communications, and which may communicate over networks and may use web services type protocols. This description is not intended to be a complete description of, or limit the scope of, the invention. Other features, aspects, and objects of the invention can be obtained from a review of the specification, the figures, and the claims.
This application claims priority from the following application, which is hereby incorporated by reference in its entirety:
U.S. Provisional Patent Application No. 60/449,961, entitled Systems and Methods for Dynamic Component Versioning by Kyle Marvin, filed Feb. 26, 2003.
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document of the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The present invention relates to the versioning of software and software components.
Developers and system administrators face a continuing problem of maintaining version compatibility between the versions of a software component currently serving a request from a client and new versions of the component newly deployed into the operational software environments. A mismatch in versions between what the client are using and what have been deployed since the request from the client was received can lead to unpredictable behavior and usually system failure. Further complicating the version management issue is the fact that the entity deploying the versions of the software component may have no control over the versions have been instantiated and are currently serving the client. Therefore, any changes in versions of the software component must be carefully managed, otherwise they cannot be ensured to work correctly.
The invention is illustrated by way of example and not by way of limitation in the FIGURES of the accompanying drawings in which like references indicate similar elements. It should be noted that references to an or one or some embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
Systems and methods in accordance with the present invention can simplify the deployment and management of differing versions of a software component. The external interfaces of the software component can remain backwards compatible in behavior while the internal logic, and possibly internal storage, can change between versions. The software component versioning system can be transparent to the programs used by a client since interfaces can remain backwards compatible between component versions. This transparency can greatly reduce the risks of unpredictable behavior or system failure. The system can maintain each version of a software component and can use dispatch techniques to determine the currently active version whenever a client requests a service for the software component during a session. Old instances, possibly of other versions, are maintained as long as required. Such systems can apply to stateful and stateless components, using synchronous or asynchronous communications, which may communicate over networks and may use web services type protocols.
FIG. 1 is an illustration of a software component versioning system 100 in one embodiment of the present invention. Although this diagram depicts components as functionally separate, such depiction is merely for illustrative purposes. It will be apparent to those skilled in the art that the components portrayed in this FIGURE can be arbitrarily combined or divided into separate software, firmware and/or hardware components. Furthermore, it will also be apparent to those skilled in the art that such components, regardless of how they are combined or divided, can execute on the same computing device or multiple computing devices, and wherein the multiple computing devices can be connected by one or more networks.
In the software component versioning system 100 as shown in FIG. 1, differing versions 101-103 of a software component 105 are maintained in a container 106, which is capable of managing and deploying multiple versions of the software component in a runtime environment. The software component is capable of providing a certain service requested by a client 111; such service request may come from the client running software that can be but are not limited to, Web services, client software, embedded systems, server software, and other suitable software. Once the container has deployed a new version of the software component, a unique identifier 104 is assigned to the version and clients can request the services of a deployed software component at any time using said identifier. Once a client initiates a new session requesting a service from that software component, a dispatcher 107 selects a version of the software component currently set as active and creates an instance 108 of the requested software component to serve the client. The dispatcher uses the currently active version of the software component for new sessions, but will continue to use older versions for existing sessions. It uses the unique ID to continue communications between the client and the correct version of the software component for the duration of a running session and will continue to maintain a running instance of the software component until the clients chooses to retire it. Multiple instances 108-110 of different versions of a software component can be running alive at the same time.
FIG. 2 is a flow chart illustrating a software component versioning process in accordance to one embodiment of the invention. Although this FIGURE depicts functional steps in a particular order for purposes of illustration, the process is not limited to any particular order or arrangement of steps. One skilled in the art will appreciate that the various steps portrayed in this FIGURE could be omitted, rearranged, combined and/or adapted in various ways
Referring to FIG. 2, the container in the versioning system is capable of registering, adding, deploying, and deleting versions of a software component at step 201. Once a request for the service of the software component is received from a client at step 202, the dispatcher in the system will choose a version of the software component and instantiate it at step 203 to serve the client. Then the system will keep such instance alive at step 204 for the duration of the session of the service request from the client.
In some embodiments, the external interfaces of the software component can be used locally or over a network. External network interfaces of the software component can define one or more Web-based services and applications.
In some embodiments, the external interfaces of the software component should be backwards compatible from version to version, i.e., the internal logic of the software component can change in any way that does not alter interface behavior from version to version. If storage is used within the software component, it can change in any way from version to version that does not change the interface behavior. The invention allows newer versions of the software component to support new external interfaces, as long as existing external interfaces are not made incompatible with older versions. Since the external interfaces of the software component are backwards compatible, the version update and management process is transparent to any clients using the services of the software component.
In some embodiments, a new version of a software component can be introduced into the container at deployment time. The new version is deployed into a new location or address and is registered along with version information, with the container. The container creates or updates a table containing: a) a unique identifier for the software component, b) the version of the software component, and c) the location for that version of the software component. The system can also set an indicator for the currently active version for that component. When a service request is received from a client, a new instance of the active version of the software component can be created.
In some embodiments, unused versions of a software component can be removed from the container. The system indicates which version or versions can be removed. The version or versions are only removed once the table indicates they are no longer in use.
One basic goal of software component versioning system is to enable the redeployment of compatible versions of runtime software components. Over the lifecycle of a production-deployed software component, its implementation may need to change over time, either in response to defects in the software component or in response to new requirements. This involves changing both the implementation code and the internal state representation for a software component. When a new upgrade version is deployed, all existing in-flight component instances will continue to use the old code/state representation, and any component instances created after deployment will begin to use the new component implementation. Incompatible changes can include any change that modifies the external behaviors (contract) of the software component, as opposed to the internal state representation or implementation. For web services (JWS/JWS), this contract can be represented by the WSDL associated with the software component. For Java callable components (JBCX/JBC), this contract is the public Java interface associated with the software component.
Differing embodiments of the invention may employ a number of alternate strategies during a dispatch cycle to instantiate a software component in a runtime environment. Two possible strategies are known as: early branch versioning and late branch versioning. A dispatcher can employ either early branch versioning or late branch versioning to instantiate the version of a software component to use when a request is received from a client.
Some embodiments can employ early branch versioning, wherein the dispatch decision on how to instantiate a version of the component in satisfying a given request is determined very early in the dispatch cycle. The request is examined, the unique ID is extracted, and a database or version table lookup is done to identify the particular version of the software component to instantiate in satisfying the request. In this model, parallel infrastructure or components (i.e. beans, queues, DB tables) are deployed inside of the container (i.e. a Java EAR), with disjoint infrastructure available for each deployed version. The early branch approach will have code at the front door of the dispatch process parse the request, select an appropriate dispatcher bean from an available set, and dispatch the request into the version-specific infrastructure. Early branch versioning may create some side effects:
A system in accordance with one embodiment employs late branch versioning, wherein the dispatch decision on how to instantiate a version of the component in satisfying a given request is determined very late in the dispatch cycle. The request can be processed using a dispatcher that is largely common for all compatible versions of the component, and the branch point doesn't occur until a specific component instance is required in memory (i.e. instantiation for a new component instance, or load time for an existing component instance).
Late branch versioning may create some side effects, which may need to be accounted for in any particular embodiment. Since instances of multiple versions of a component are potentially available at a very deep and common point in the dispatch architecture, distinct class names may be used for these versions to avoid excessive creation of class loaders on a per-version per-component basis. Conversely, with early branch versioning, same named classes are feasible because they are being used inside of completely distinct J2EE modules, which in term have their own class loader.
One embodiment supporting late branch versioning uses a continuing reliance on Java serialization for persistence support. In some embodiments a distinct source artifact exists in the Integrated Development Environment (IDE) for each available version of the software component. Here, available means that the version is available to dispatch requests or to support asynchronous operations on existing component instances. For example, a project might contain 3 different available versions of the Foo.jws service component:
In some embodiments, an upgrade version change is accomplished by creating a new version (i.e. source artifact). If a user wanted to update Foo_v2.jws, they'd simply make the necessary changes inside of Foo_v2.jws, then rebuild and redeploy the software component. In some embodiments, the final step in creating a new upgrade version can be to change the active version to point to the new version. This effectively says that all new instances of the component will used the upgraded version, while all existing versions will continue to use the version established at component creation.
In some embodiments, there is a set of available versions, and one specific version that is deemed the active version. The active version can be the version of the software component (either top-level or nested component) that will be used by default when the software component is instantiated (either in response to a request to create a component or nested component).
In some embodiments, the mechanism for determining the active version for a specific software component can be pluggable by component type. This approach can enable the system to define their own version selection strategies that are richer than the use the most recent version that is the default in some embodiments. This pluggable code can make the decision on a more dynamic basis, such as activating the upgrade at a particular point in time (distinct from the time of deployment) or selecting a workflow version based upon a certain time of the day. The inputs to the decision can be the list of available versions.
In some embodiments, the available versions of a software component are accessed via a single component endpoint. In the example above, this might be /myproject/Foo.jws. If a request targeted at Foo.jws is a start request (meaning it creates a new component instance to start a conversationa communication with the clients on service request), then the active version of the component can be the version that is instantiated. If the request is targeted at an existing conversation, then the process involved in loading the data from the database can automatically select the correct version, since unique classnames are used for different versions and are included in the data stored in the database.
In some embodiments, the table storing state information of conversations (communications) between the client and the system can include a version column in the state table that is written at the time a new instance is created. This version column may not be used directly in the dispatch cycle, but would provide visibility into the available versions necessary to support all existing component instances.
Some embodiments allow the name of the versions to be arbitrary and include a version mapping mechanism as a type of component grouping. This embodiment can be provided as a means for run-time messaging infrastructure to test the core mechanisms that will be used for integration of the system.
Some embodiments provide specific capability to define the relationship between the versions of a top-level component and versions of its nested components, and thus make these relationships predictable. Since in some cases, nested component instances are lazily instantiated, care must be taken to guarantee this predictability. If the selection of the version of a nested component instance is a point-in-time decision at the time of instantiation, it is possible that two different instances of the same version of a top-level component could contain different versions of a nested component, depending upon the relative timing of top-level component instance, nested component version upgrades, and nested component instantiation. To avoid this situation, the system can guarantee at run-time that the active versions of all nested components are selected at the time of top-level component instantiation. This approach guarantees that this version relationship will be preserved for the life of this top-level component instance, even if nested component is upgraded after top-level component creation but prior to instantiation. In some situations, these techniques may not strictly guarantee that all instances of a particular version of a top-level component will use the same versions of nested components. After an upgrade has taken place, any newly constructed instances of top-level components may begin to use the newly upgraded nested component. What is guaranteed is that the lazy instantiation does not play a role in the nested component versioning decision.
In some embodiments, providing this guarantee has the side effect of causing versioning relationship to be tracked as part of per-instance state, adding overhead/size to maintained state on a per-instance basis. Some alternative embodiments may have well defined version bundles that apply to all instances and are part of global configuration state, but this may require more user configuration and IDE participation in the versioning process. Some embodiments may use compile-time enforcement of forward serialization compatibility for update versions of a class.
One embodiment may be implemented using a conventional general purpose or a specialized digital computer or microprocessor(s) programmed according to the teachings of the present disclosure, as will be apparent to those skilled in the computer art. Appropriate software coding can readily be prepared by skilled programmers based on the teachings of the present disclosure, as will be apparent to those skilled in the software art. The invention may also be implemented by the preparation of integrated circuits or by interconnecting an appropriate network of conventional component circuits, as will be readily apparent to those skilled in the art.
One embodiment includes a computer program product which is a storage medium (media) having instructions stored thereon/in which can be used to program a computer to perform any of the features presented herein. The storage medium can include, but is not limited to, any type of disk including floppy disks, optical discs, DVD, CD-ROMs, micro drive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
Stored on any one of the computer readable medium (media), the present invention includes software for controlling both the hardware of the general purpose/specialized computer or microprocessor, and for enabling the computer or microprocessor to interact with a human user or other mechanism utilizing the results of the present invention. Such software may include, but is not limited to, device drivers, operating systems, execution environments/containers, and applications.
The foregoing description of the preferred embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to the practitioner skilled in the art. Embodiments were chosen and described in order to best describe the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention, the various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents.