IP Library › Granted Patent US 10,721,791
Granted Patent B1
US 10,721,791 · App. 16/386,524 · Granted Jul 21, 2020

Recommending the refactoring of microservices

Inventors: Roi Gamliel (Tkuma, IL); Amihai Savir (Sansana, IL); Avitan Gefen (Lehavim, IL)
Assignee: EMC IP HOLDING COMPANY LLC
H04W76/36G06F8/433G06F8/72G06F9/5033H04W28/0231H04W48/06H04W72/1226G06F9/5066H04L43/0876H04W28/16
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 10,721,791
App. No.
16/386,524
Granted
Jul 21, 2020
Kind
B1
Abstract

A system recommends the refactoring of microservices. The system generates a graph of connected nodes including a first node, which represents a first atomic part of code in a microservice in an application, and a second node, which represents a second atomic part of code in the microservice. The system determines a nodes connection score based on any connections between the first node and the second node. If the nodes connection score satisfies a nodes connection threshold, the system determines a relative code size based on comparing a size associated with the first atomic part of code against a size of the microservice. If the relative code size satisfies a code size threshold, the system outputs a recommendation to disconnect the first atomic part of code from the microservice, create another microservice in the application, and connect the first atomic part of code to the other microservice.

Claims (64)

1. A system comprising:

one or more processors; and

a non-transitory computer readable medium storing a plurality of instructions, which when executed, cause the one or more processors to:

generate a graph of connected nodes comprising a first node, which represents a first atomic part of code in a microservice in an application, and a second node, which represents a second atomic part of code in the microservice;

determine a nodes connection score based on any connections between the first node and the second node;

determine whether the nodes connection score satisfies a nodes connection threshold;

determine a relative code size based on comparing a size associated with the first atomic part of code against a size of the microservice, in response to a determination that the nodes connection score does not satisfy the nodes connection threshold;

determine whether the relative code size satisfies a code size threshold; and

output a recommendation to disconnect the first atomic part of code from the microservice, create another microservice in the application, and connect the first atomic part of code to the other microservice, in response to a determination that the relative code size satisfies the code size threshold.

2. The system of claim 1 , wherein the plurality of instructions further causes the processor to

determine whether the relative code size satisfies a minimal code size threshold, in response to a determination that the relative code size does not satisfy the code size threshold;

determine whether the first atomic part of code is called by an additional microservice, in response to a determination that the relative code size does not satisfy the minimal code size threshold; and

output a recommendation to move the first atomic part of code to the additional microservice, in response to a determination that the first atomic part of code is called by the additional microservice.

3. The system of claim 1 , wherein the plurality of instructions further causes the processor to:

determine a segments similarity score based on comparing first code segments, associated with a first microservice in the application, against second code segments, associated with a second microservice in the application;

determine whether the segments similarity score satisfies a segments similarity threshold;

determine microservices similarity scores based on comparing a size of similar code segments in the first code segments and the second code segments against sizes of the first microservice and the second microservice, in response to a determination that the segments similarity score satisfies the segments similarity threshold:

determine whether any microservices similarity score satisfies a microservices similarity threshold; and

output a recommendation to merge the first microservice with the second microservice, in response to a determination that any microservices similarity score satisfies the microservices similarity threshold.

4. The system of claim 3 , wherein the plurality of instructions further causes the processor to determine whether the size of similar code segments satisfies a segments size threshold, in response to a determination that not any microservices similarity scores satisfy the microservices similarity threshold.

5. The system of claim 4 , wherein the plurality of instructions further causes the processor to output a recommendation to move the similar code segments from the second microservice to the first microservice, in response to a determination that the size of similar code segments satisfies the segments size threshold.

6. The system of claim 5 , wherein moving the similar code segments from the second microservice to the first microservice comprises linking the second microservice to the similar code segments in the first microservice and deleting the similar code segments from the second microservice.

7. The system of claim 4 , wherein the plurality of instructions further causes the processor to output a recommendation to create a third microservice and to move the similar code segments in the first code segments and the second code segments to the third microservice, in response to a determination that the size of the similar code segments satisfies the segments size threshold.

8. A method comprising:

generating a graph of connected nodes comprising a first node, which represents a first atomic part of code in a microservice in an application, and a second node, which represents a second atomic part of code in the microservice;

determining a nodes connection score based on any connections between the first node and the second node;

determining whether the nodes connection score satisfies a nodes connection threshold;

determining a relative code size based on comparing a size associated with the first atomic part of code against a size of the microservice, in response to a determination that the nodes connection score does not satisfy the nodes connection threshold;

determining whether the relative code size satisfies a code size threshold; and

outputting a recommendation to disconnect the first atomic part of code from the microservice, create another microservice in the application, and connect the first atomic part of code to the other microservice, in response to a determination that the relative code size satisfies the code size threshold.

9. The method of claim 8 , wherein the computer-implemented method further comprises:

determining whether the relative code size satisfies a minimal code size threshold, in response to a determination that the relative code size does not satisfy the code size threshold;

determining whether the first atomic part of code is called by an additional microservice, in response to a determination that the relative code size does not satisfy the minimal code size threshold; and

outputting a recommendation to move the first atomic part of code to the additional microservice, in response to a determination that the first atomic part of code is called by the additional microservice.

10. The method of claim 8 , wherein the computer-implemented method further comprises:

determining a segments similarity score based on comparing first code segments, associated with a first microservice in the application, against second code segments, associated with a second microservice in the application;

determining whether the segments similarity score satisfies a segments similarity threshold;

determining microservices similarity scores based on comparing a size of similar code segments in the first code segments and the second code segments against sizes of the first microservice and the second microservice, in response to a determination that the segments similarity score satisfies the segments similarity threshold:

determining whether any microservices similarity score satisfies a microservices similarity threshold; and

outputting a recommendation to merge the first microservice with the second microservice, in response to a determination that any microservices similarity score satisfies the microservices similarity threshold.

11. The method of claim 10 , wherein the computer-implemented method further comprises determining whether the size of similar code segments satisfies a segments size threshold, in response to a determination that not any microservices similarity scores satisfy the microservices similarity threshold.

12. The method of claim 11 , wherein the computer-implemented method further comprises outputting a recommendation to move the similar code segments from the second microservice to the first microservice, in response to a determination that the size of similar code segments satisfies the segments size threshold.

13. The method of claim 12 , wherein moving the similar code segments from the second microservice to the first microservice comprises linking the second microservice to the similar code segments in the first microservice and deleting the similar code segments from the second microservice.

14. The method of claim 11 , wherein the computer-implemented method further comprises outputting a recommendation to create a third microservice and to move the similar code segments in the first code segments and the second code segments to the third microservice, in response to a determination that the size of the similar code segments satisfies the segments size threshold.

15. A computer program product, comprising a non-transitory computer-readable medium having a computer-readable program code embodied therein to be executed by one or more processors, the program code including instructions to:

generate a graph of connected nodes comprising a first node, which represents a first atomic part of code in a microservice in an application, and a second node, which represents a second atomic part of code in the microservice;

determine a nodes connection score based on any connections between the first node and the second node;

determine whether the nodes connection score satisfies a nodes connection threshold;

determine a relative code size based on comparing a size associated with the first atomic part of code against a size of the microservice, in response to a determination that the nodes connection score does not satisfy the nodes connection threshold;

determine whether the relative code size satisfies a code size threshold; and

output a recommendation to disconnect the first atomic part of code from the microservice, create another microservice in the application, and connect the first atomic part of code to the other microservice, in response to a determination that the relative code size satisfies the code size threshold.

16. The computer program product of claim 15 , wherein the program code includes further instructions to:

determine whether the relative code size satisfies a minimal code size threshold, in response to a determination that the relative code size does not satisfy the code size threshold;

determine whether the first atomic part of code is called by an additional microservice, in response to a determination that the relative code size does not satisfy the minimal code size threshold; and

output a recommendation to move the first atomic part of code to the additional microservice, in response to a determination that the first atomic part of code is called by the additional microservice.

17. The computer program product of claim 15 , wherein the program code includes further instructions to:

determine a segments similarity score based on comparing first code segments, associated with a first microservice in the application, against second code segments, associated with a second microservice in the application;

determine whether the segments similarity score satisfies a segments similarity threshold;

determine microservices similarity scores based on comparing a size of similar code segments in the first code segments and the second code segments against sizes of the first microservice and the second microservice, in response to a determination that the segments similarity score satisfies the segments similarity threshold:

determine whether any microservices similarity score satisfies a microservices similarity threshold; and

output a recommendation to merge the first microservice with the second microservice, in response to a determination that any microservices similarity score satisfies the microservices similarity threshold.

18. The computer program product of claim 17 , wherein the program code includes further instructions to determine whether the size of similar code segments satisfies a segments size threshold, in response to a determination that not any microservices similarity scores satisfy the microservices similarity threshold.

19. The computer program product of claim 18 , wherein the program code includes further instructions to output a recommendation to move the similar code segments from the second microservice to the first microservice, wherein moving the similar code segments from the second microservice to the first microservice comprises linking the second microservice to the similar code segments in the first microservice and deleting the similar code segments from the second microservice, in response to a determination that the size of similar code segments satisfies the segments size threshold.

20. The computer program product of claim 18 , wherein the program code includes further instructions to output a recommendation to create a third microservice and to move the similar code segments in the first code segments and the second code segments to the third microservice, in response to a determination that the size of the similar code segments satisfies the segments size threshold.

Assignments (9)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (050724/0466) Recorded Jun 23, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO WYSE TECHNOLOGY L.L.C.)
Reel/Frame 060753/0486 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053546/0001) Recorded Jun 23, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL MARKETING L.P. (ON BEHALF OF ITSELF AND AS SUCCESSOR-IN-INTEREST TO CREDANT TECHNOLOGIES, INC.); DELL INTERNATIONAL L.L.C.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; DELL MARKETING CORPORATION (SUCCESSOR-IN-INTEREST TO FORCE10 NETWORKS, INC. AND WYSE TECHNOLOGY L.L.C.); EMC IP HOLDING COMPANY LLC
Reel/Frame 071642/0001 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053311/0169) Recorded Jun 23, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
Reel/Frame 060438/0742 →
RELEASE OF SECURITY INTEREST AT REEL 050405 FRAME 0534 Recorded Nov 2, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; WYSE TECHNOLOGY L.L.C.
Reel/Frame 058001/0001 →
SECURITY INTEREST Recorded Jun 5, 2020
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 053311/0169 →
SECURITY AGREEMENT Recorded Apr 22, 2020
From: CREDANT TECHNOLOGIES INC.; DELL INTERNATIONAL L.L.C.; DELL MARKETING L.P.; DELL PRODUCTS L.P.; DELL USA L.P.; EMC CORPORATION; FORCE10 NETWORKS, INC.; WYSE TECHNOLOGY L.L.C.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A.
Reel/Frame 053546/0001 →
PATENT SECURITY AGREEMENT (NOTES) Recorded Oct 15, 2019
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; WYSE TECHNOLOGY L.L.C.
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS COLLATERAL AGENT
Reel/Frame 050724/0466 →
SECURITY AGREEMENT Recorded Sep 17, 2019
From: DELL PRODUCTS L.P.; EMC CORPORATION; EMC IP HOLDING COMPANY LLC; WYSE TECHNOLOGY L.L.C.
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
Reel/Frame 050405/0534 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 17, 2019
From: GAMLIEL, ROI; GEFEN, AVITAN; SAVIR, AMIHAI
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 048910/0525 →
Cited By (2)
US 12,561,370 US 12,602,362