IP Library › Granted Patent US 11,740,884
Granted Patent B2
US 11,740,884 · App. 16/575,494 · Granted Aug 29, 2023

Migrating a service to a version of an application programming interface

Inventors: Jack William Donato Evans (Rochester, GB); Martin A. Ross (Gosport, GB); Luke James Powlett (Henley-in-Arden, GB); Jack Richard William Stevenson (Winchester, GB)
Assignee: International Business Machines Corporation
G06F8/65G06F9/44536G06F9/54G06F11/3612
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,740,884
App. No.
16/575,494
Granted
Aug 29, 2023
Kind
B2
Abstract

A method, computer system, and computer program product for migrating a service (e.g. microservice) from using a first application programming interface version to using a second (e.g. newer or updated) application programming interface version. The method may include determining a difference between specifications of the first and second versions of the application programming interface. Historical usage of the first version of the application programming interface by the service may then be analyzed with respect to the difference so as to determine if the service meets the specification of the second version of the application programming interface. Responsive to determining the service meets the specification of the second version of the application programming interface difference, the service may be migrated from using the first version of the application programming interface to using the second version of the application programming interface.

Claims (63)

1. A computer-implemented method for migrating a web service from using a first version of an application programming interface (API) to using a second version of the API, the method comprising:

during an execution of the service, identifying a call from the service to the first version of the API and migrating the service to the second version of the API, wherein two versions of the API exist, and based on historical usage of the first version of the API of the service, wherein the migrating further comprises:

determining a difference between specifications of the first version of the API and the second version of the API, wherein each specification comprises a plurality of fields defining respective requirements, wherein determining the difference between the specifications of the first and second versions of the API comprises identifying a first field of both specifications that defines different requirements;

analyzing the historical usage of the first version of the API by the service with respect to the difference to determine if the service meets the specification of the second version of the API, wherein determining if the service meets the specification of the second version of the API comprises determining if the historical usage of the first version of the API by the service meets the requirement defined by the first field of the specification of the second version of the API;

wherein analyzing the historical usage of the first version of the application programming interface by the service comprises analyzing at least one of:

historical requests from the service to the first version of the application programming interface;

historical responses from the first version of the application programming interface to the service;

payload access patterns for the historical requests from the service using a service mesh; and

payload access patterns for the historical responses to the service using the service mesh;

tracking the payload access patterns for the historical requests and the historical responses to determine if a new version of a target API can be auto-migrated;

in response to determining the service meets the specification of the second version of the API difference, migrating the service from using the first version of the API to using the second version of the API; and

defining a rule in the service mesh to automatically redirect future calls to the service to the second version of the API.

2. The method of claim 1 , wherein migrating the service from using the first version of the application programming interface to using the second version of the application programming interface comprises:

identifying the call from the service to the first version of the application programming interface; and

redirecting the identified call to the second version of the application programming interface.

3. The method of claim 1 , further comprising:

obtaining the historical usage of the first version of the application programming interface by the service from the service mesh configured to handle communications between the service and the application programming interface.

4. The method of claim 1 , wherein determining the difference between the specifications of the first and second versions of the application programming interface comprises:

obtaining first and second specifications for the first and second versions of the application programming interface, respectively, the first and second specifications each adhering to a standardized framework; and

comparing the obtained specifications to identify a difference between the first and second specifications.

5. The method of claim 1 , further comprising:

in response to determining the service does not meet the specification of the second version of the application programming interface difference, preventing migration of the service from the first version of the application programming interface to the second version of the application programming interface.

6. The method of claim 1 , further comprising:

monitoring usage of the second version of the application programming interface by the service to detect occurrence of problems;

in response to detecting the occurrence of problems, reverting the service back to using the first version of the application programming interface.

7. The method of claim 1 , further comprising:

during the execution of the service, identifying the call from the service to the first version of the API and automatically redirecting the identified call to the second version of the API, wherein two versions of the API exist, based on the rule in the service mesh.

8. A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processing unit to cause the processing unit to perform, when run on a computer network, a method for migrating a web service from using a first version of an application programming interface (API) to using a second version of the API, the method, comprising the steps of:

during an execution of the service, identifying a call from the service to the first version of the API and migrating the service to the second version of the API, wherein two versions of the API exist, and based on historical usage of the first version of the API of the service, wherein the migrating further comprises:

determining a difference between specifications of the first version of the API and the second version of the API, wherein each specification comprises a plurality of fields defining respective requirements, wherein determining the difference between the specifications of the first and second versions of the API comprises identifying a first field of both specifications that defines different requirements;

analyzing the historical usage of the first version of the API by the service with respect to the difference to determine if the service meets the specification of the second version of the API, wherein determining if the service meets the specification of the second version of the API comprises determining if the historical usage of the first version of the API by the service meets the requirement defined by the first field of the specification of the second version of the API;

wherein analyzing the historical usage of the first version of the application programming interface by the service comprises analyzing at least one of:

historical requests from the service to the first version of the application programming interface;

historical responses from the first version of the application programming interface to the service;

payload access patterns for the historical requests from the service using a service mesh; and

payload access patterns for the historical responses to the service using the service mesh;

tracking the payload access patterns for the historical requests and the historical responses to determine if a new version of a target API can be auto-migrated;

in response to determining the service meets the specification of the second version of the API difference, migrating the service from using the first version of the API to using the second version of the API; and

defining a rule in the service mesh to automatically redirect future calls to the service to the second version of the API.

9. A system for migrating a web service from using a first version of an application programming interface (API), to using a second version of the application programming interface, the system comprising:

a computer system comprising, a processor, a computer readable storage medium, and program instructions stored on the computer readable storage medium being executable by the processor to cause the computer system to:

during an execution of the service, identifying a call from the service to the first version of the API and migrating the service to the second version of the API, wherein two versions of the API exist, and based on historical usage of the first version of the API of the service, wherein the migrating further comprises:

determining a difference between specifications of the first version of the API and the second version of the API, wherein each specification comprises a plurality of fields defining respective requirements, wherein determining the difference between the specifications of the first and second versions of the API comprises identifying a first field of both specifications that defines different requirements;

analyzing the historical usage of the first version of the API by the service with respect to the difference to determine if the service meets the specification of the second version of the API, wherein determining if the service meets the specification of the second version of the API comprises determining if the historical usage of the first version of the API by the service meets the requirement defined by the first field of the specification of the second version of the API;

wherein analyzing the historical usage of the first version of the application programming interface by the service comprises analyzing at least one of:

historical requests from the service to the first version of the application programming interface;

historical responses from the first version of the application programming interface to the service;

payload access patterns for the historical requests from the service using a service mesh; and

payload access patterns for the historical responses to the service using the service mesh;

tracking the payload access patterns for the historical requests and the historical responses to determine if a new version of a target API can be auto-migrated;

in response to determining the service meets the specification of the second version of the API difference, migrating the service from using the first version of the API to using the second version of the API; and

defining a rule in the service mesh to automatically redirect future calls to the service to the second version of the API.

10. The system of claim 9 , wherein migrating the service from using the first version of the application programming interface to using the second version of the application programming interface comprises:

identifying the call from the service to the first version of the application programming interface; and

redirecting the identified call to the second version of the application programming interface.

11. The system of claim 9 , further comprising:

obtaining the historical usage of the first version of the application programming interface by the service from the service mesh configured to handle communications between the service and the application programming interface.

12. The system of claim 9 , wherein determining the difference between the specifications of the first and second versions of the application programming interface comprises:

obtaining first and second specifications for the first and second versions of the application programming interface, respectively, the first and second specifications each adhering to a standardized framework; and

comparing the obtained specifications to identify a difference between the first and second specifications.

13. The system of claim 9 , further comprising: in response to determining the service does not meet the specification of the second version of the application programming interface difference, preventing migration of the service from the first version of the application programming interface to the second version of the application programming interface.

14. The system of claim 9 , further comprising:

monitoring usage of the second version of the application programming interface by the service to detect an occurrence of problems, and wherein in response to detecting the occurrence of problems, reverting the service back to the first version of the application programming interface.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 19, 2019
From: EVANS, JACK WILLIAM DONATO; ROSS, MARTIN A.; POWLETT, LUKE JAMES; STEVENSON, JACK RICHARD WILLIAM
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 050427/0104 →
Continuity (1)
Related Publication 20210089291A1 · Mar 25, 2021