US-12625882-B2 - Intelligent dataset slicing during microservice handshaking
Abstract
A computer-implemented process of intelligent dataset slicing within a network having a plurality of microservices is disclosed. Handshaking between a first microservice and a second microservice is initiated. A vertical reduction of a dataset is required by the second microservice and from the first microservice. A first slice of the dataset generated by the vertical reduction is received by the second microservice and from the first microservice. The sliced dataset is evaluated by the second microservice. The vertical reduction is terminated by the second microservice based upon the evaluating.
Inventors
- Sudheesh S. Kairali
- Ankur Tagra
Assignees
- INTERNATIONAL BUSINESS MACHINES CORPORATION
Dates
- Publication Date
- 20260512
- Application Date
- 20210824
Claims (20)
- 1 . A computer-implemented process of intelligent dataset slicing within a network having a plurality of microservices, comprising: initiating handshaking between a first microservice and a second microservice, requesting, by the second microservice and from the first microservice, a vertical reduction operation on a dataset; receiving, by the second microservice and from the first microservice, a first slice of the dataset generated by the vertical reduction operation as a reduced dataset; evaluating, by the second microservice, the reduced dataset to determine whether the reduced dataset provides a desired result; and communicating, by the second microservice to the first microservice and based upon the evaluating, a communication to terminate the vertical reduction operation.
- 2 . The method of claim 1 , wherein an additional slice of the dataset is requested from the first microservice based upon the evaluating.
- 3 . The method of claim 2 , wherein the evaluating includes: performing data analytics on the first slice of the dataset, determining, based upon the data analytics, that the reduced dataset does not provide the desired result, and requesting the additional slice based upon the determining.
- 4 . The method of claim 3 , wherein the determining is based upon a third microservice that evaluates results from the data analytics.
- 5 . The method of claim 1 , wherein the vertical reduction operation is performed by the first microservice using a dimensionality reduction algorithm.
- 6 . The method of claim 1 , wherein the terminating is based upon the evaluating determining that a desirable result is produced.
- 7 . The method of claim 6 , wherein vertical reduction data regarding the vertical reduction operation on the dataset is saved responsive to the terminating.
- 8 . The method of claim 1 , wherein the initiating, the requesting, the receiving, the evaluating, and the terminating are performed by a vertical reducer, and each of the first and second microservices includes the vertical reducer.
- 9 . A computer hardware system configured for intelligent dataset slicing within a network having a plurality of microservices, comprising: a hardware processor configured to perform the following executable operations: initiating handshaking between a first microservice and a second microservice, requesting, by the second microservice and from the first microservice, a vertical reduction operation on a dataset; receiving, by the second microservice and from the first microservice, a first slice of the dataset generated by the vertical reduction operation as a reduced dataset; evaluating, by the second microservice, the reduced dataset to determine whether the reduced dataset provides a desired result; and communicating, by the second microservice to the first microservice and based upon the evaluating, a communication to terminate the vertical reduction operation.
- 10 . The system of claim 9 , wherein an additional slice of the dataset is requested from the first microservice based upon the evaluating.
- 11 . The system of claim 10 , wherein the evaluating includes: performing data analytics on the first slice of the dataset, determining, based upon the data analytics, that the reduced dataset does not provide the desired result, and requesting the additional slice based upon the determining.
- 12 . The system of claim 11 , wherein the determining is based upon a third microservice that evaluates results from the data analytics.
- 13 . The system of claim 9 , wherein the vertical reduction operation is performed by the first microservice using a dimensionality reduction algorithm.
- 14 . The system of claim 9 , wherein the terminating is based upon the evaluating determining that a desirable result is produced.
- 15 . The system of claim 14 , wherein vertical reduction data regarding the vertical reduction operation on the dataset is saved responsive to the terminating.
- 16 . The system of claim 9 , wherein the initiating, the requesting, the receiving, the evaluating, and the terminating are performed by a vertical reducer, and each of the first and second microservices includes the vertical reducer.
- 17 . A computer program product for intelligent dataset slicing within a network having a plurality of microservices, comprising: a computer readable storage medium having stored therein program code, the program code, which when executed by a computer hardware system, cause the computer hardware system to perform: initiating handshaking between a first microservice and a second microservice, requesting, by the second microservice and from the first microservice, a vertical reduction operation on a dataset; receiving, by the second microservice and from the first microservice, a first slice of the dataset generated by the vertical reduction operation as a reduced dataset; evaluating, by the second microservice, the reduced dataset to determine whether the reduced dataset provides a desired result; and communicating, by the second microservice to the first microservice and based upon the evaluating, a communication to terminate the vertical reduction operation.
- 18 . The computer program product of claim 17 , wherein an additional slice of the dataset is requested from the first microservice based upon the evaluating, and the evaluating includes: performing data analytics on the first slice of the dataset, determining, based upon that the data analytics, that the reduced dataset does not provide the desired result, and requesting the additional slice based upon the determining.
- 19 . The computer program product of claim 17 , wherein the determining is based upon a third microservice that evaluates results from the data analytics.
- 20 . The computer program product of claim 17 , wherein the vertical reduction operation is performed by the first microservice using a dimensionality reduction algorithm, the terminating is based upon the evaluating determining that the desirable result is produced, vertical reduction data regarding the vertical reduction operation on the dataset is saved responsive to the terminating, the initiating, the requesting, the receiving, the evaluating, and the terminating are performed by a vertical reducer, and each of the first and second microservices includes the vertical reducer.
Description
BACKGROUND The present invention relates to computer-implemented microservices, and more specifically, to intelligently providing a reduced dataset from one microservice to another microservice. Software architecture is evolving into a microservice approach. Legacy approaches oftentimes involve a monolithic architecture using a large, tightly-coupled application. By comparison, microservices (also referred to as microservice architecture) are a cloud-native architectural approach in which a single application is composed of many loosely-coupled and independently-deployable smaller components or services (i.e., microservices) that are networked together (e.g., as nodes in a network). The multitude of microservices that make up an application can be connected to one another in a multitude of different ways. For example, individual microservices can be connected in a chain (i.e., serially) and/or as a tree structure and share data amongst one another. For example, a first microservice can provide first dataset to a second microservice that uses that first dataset to generate a second dataset than is then provided to a third microservice. Microservices typically have the following characteristics. They have their own technology stack, inclusive of the database and data management model. Additionally, microservices can communicate with one another over a combination of REST APIs, event streaming, and message brokers. Also, microservices can be organized by business capability with the line separating services often referred to as a bounded context. There are a number of benefits of a microstructure architecture over a monolithic architecture. These benefits include that the code can be updated more easily as new features or functionally can be added without modifying the entire application. Additionally, different stacks and different programming languages can be used for each of the different components. In other words, they can be independently deployable as well as independently modifiable. Still further, the different components can be scaled independently of one another, which reduces the waste and cost associated with having to scale entire applications because, for example, a single feature might be facing too much load. Loose coupling between microservices also builds a degree of fault isolation and better resilience into applications. One of the problems associated with microservices is that microservice architecture typically requires a large amount of data to be transferred from one microservice to another. A monolithic application typically shares a common stack, which oftentimes includes a large, relational database that supports the entire application, and this allows equal access to the database from the individual components of the application. Thus, the individual components in a monolithic application can request only the data that they need to function. However, since microservices typically have their own stacks they do not have access to a common database. Thus, a particular microservice has to rely upon connected microservices for that data and does not have the option to selectively request data. Consequently, there is a need for an approach that allows individual microservices to optimize data transfers when the microservices are connected in a chain and/or a tree structure. SUMMARY A method of intelligent dataset slicing within a network having a plurality of microservices is disclosed. Handshaking between a first microservice and a second microservice is initiated. A vertical reduction of a dataset is required by the second microservice and from the first microservice. A first slice of the dataset generated by the vertical reduction is received by the second microservice and from the first microservice. The sliced dataset is evaluated by the second microservice. The vertical reduction is terminated by the second microservice based upon the evaluating. A computer hardware system for intelligent dataset slicing within a network having a plurality of microservices is disclosed. The system includes a hardware processor configured to perform the following operations. Handshaking between a first microservice and a second microservice is initiated. A vertical reduction of a dataset is required by the second microservice and from the first microservice. A first slice of the dataset generated by the vertical reduction is received by the second microservice and from the first microservice. The sliced dataset is evaluated by the second microservice. The vertical reduction is terminated by the second microservice based upon the evaluating. A computer program product for intelligent dataset slicing within a network having a plurality of microservices is disclosed. The computer program product includes a computer readable storage medium having stored therein program code. The program code, which when executed by a computer hardware system, cause the computer hardware system to perform the following.