In-band service chain in a distributed service environment
By generating and using topic chains for cross-domain communication of service requests in a distributed service environment, the problems of flexibility and difficulty in modification caused by hard coding are solved, the system's flexibility and performance are improved, and monitoring and tracing are simplified.
Patent Information
- Application Number
- CN202580029050.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-04-24
- Filing Date
- 2025-04-16
- Publication Date
- 2026-11-17
AI Technical Summary
In a distributed service environment, the hard-coded communication between service nodes in existing technologies makes it difficult to modify service requests across different timeframes, lacks flexibility, and makes performance monitoring and tracing difficult.
By generating topic chains for service requests, the message passing between service nodes is instructed, avoiding hard-coded topics. The topic chains are dynamically generated to adapt to the state and needs of the service nodes, and the topic chains are included in the messages to achieve cross-domain communication.
It improves the flexibility and performance of the distributed service environment, reduces the demand for computing resources, simplifies the modification of service request spans, and improves performance monitoring and tracing.
Smart Images

Figure CN123125578A_ABST
Abstract
Description
Background Technology
[0001] This disclosure relates to distributed service systems, and more specifically, to service orchestration within distributed service systems.
[0002] Distributed services represent an architectural approach that distributes application functionality and computing resources across different nodes or machines. For example, a software application can be broken down into smaller, independent services. Each of these services can be designed to perform a specific function of the application. For instance, instead of building monolithic applications, microservices can be implemented to perform specific functions of the application. Each microservice can execute its own unique process, maintain its own database, etc. This isolation allows for easier maintenance, testing, and scalability of the application. Summary of the Invention
[0003] This disclosure relates to a computer-implemented method comprising: generating a topic chain for a service request spanning a set of service nodes in a distributed service environment, wherein the topic chain indicates a sequence of topics for publishing the service request to provide the service request to the set of service nodes via the topic sequence. The computer-implemented method further comprises: publishing the service request and the topic chain in a message to a first topic indicated by the topic chain to provide the service request and the topic chain to a first service node in the set of service nodes, and allowing the first service node to subsequently publish the message to a second topic indicated by the topic chain to provide the service request and the topic chain to a second service node in the set of service nodes.
[0004] Additional aspects of this disclosure relate to systems and computer program products configured to perform the methods described above. This invention is not intended to illustrate every aspect, implementation, and / or embodiment of every embodiment of this disclosure. Attached Figure Description
[0005] The accompanying drawings included in this application are incorporated in and form a part of this specification. They illustrate embodiments of the present disclosure and, together with the specification, serve to explain the principles of the disclosure. The drawings are merely illustrative of certain embodiments and are not intended to limit the scope of the disclosure.
[0006] Figure 1 This is a block diagram illustrating an example system for implementing in-band service linking in a distributed service environment according to some embodiments of the present disclosure.
[0007] Figure 2 This is a diagram illustrating an example of an in-band service chain according to some embodiments of the present disclosure.
[0008] Figure 3 This is a diagram illustrating another example of an in-band service chain according to some embodiments of the present disclosure.
[0009] Figure 4 This is a diagram illustrating the extraction of trace information for service requests from messages according to some embodiments of the present disclosure.
[0010] Figure 5 This is a diagram illustrating the use of topic chains to forward service requests to service nodes across different spans, according to some embodiments of this disclosure.
[0011] Figure 6 This is a flowchart illustrating an example method for using an in-band service chain with a topic chain, according to some embodiments of the present disclosure.
[0012] Figure 7 This illustrates some embodiments of recording and execution according to the present disclosure. Figure 6 The flowchart shows an example method for service requests associated with an in-band service chain as described in the document.
[0013] Figure 8 This is a block diagram illustrating an example computing environment that may implement aspects of the present disclosure according to some embodiments of the present disclosure.
[0014] While this disclosure can be modified in various ways and with different alternatives, its details have been shown by way of example in the accompanying drawings and will be described in detail. However, it should be understood that this disclosure is not intended to limit it to the specific embodiments described. Rather, the invention is intended to cover all modifications, equivalents, and alternatives that fall within the spirit and scope of this disclosure. Detailed Implementation
[0015] Various aspects of this disclosure relate to in-band service chains in a distributed service environment. While not limited to these applications, embodiments of this disclosure can be better understood from the above context.
[0016] In a distributed service environment, an application's functionality can be divided into multiple services (e.g., microservices), where each service (referred to herein as a service node) comprises an independent component that performs a specific function or action (such as user authentication, data retrieval, logging, or other functions). Clients, such as web browsers, mobile applications, or other services, generate service requests that span multiple service nodes. Each service node involved performs a separate function or action that collectively completes the service request. For example, a service request to retrieve data might span a first service node authenticating the client, a second service node retrieving data from a database, and a third service node formatting the data according to the client's specifications.
[0017] Message-based communication provides an efficient and decoupled technique for transmitting service requests across multiple service nodes. Unlike direct HTTP communication, where services communicate directly with each other, message-based communication utilizes asynchronous message passing. One architecture for delivering service requests to service nodes is a message bus-based architecture. A message bus is a communication infrastructure that facilitates the exchange of messages between different service nodes. Message bus-based architectures can include publish / subscribe (or pub / sub) models or message queue models. In the publish / subscribe model, a sender (publisher) publishes a message to a specific topic or message queue, and service nodes subscribe to topics to receive messages. A topic is a named entity representing a message feed, while a subscription is a named entity that is interested in receiving messages about a specific topic. In the message queue model, messages are stored on a message queue until they are processed and deleted. Each message in the message queue is processed once by a single consumer (e.g., a service node).
[0018] In some approaches, using a message bus-based architecture in a distributed service environment can present challenges. One challenge arises when service nodes included in a service request span are hard-coded to communicate with each other via topics. For example, the application logic of the first service node might be hard-coded to publish a message to a specific topic, and the application logic of the second service node might be hard-coded to retrieve a message from a specific topic. Hard-coding topics in the application logic of service nodes results in a rigid architecture across the service request span, making it difficult to modify the service request span (e.g., adding / removing service nodes from the service request span) because the application logic of each service node must be modified.
[0019] Advantageously, aspects of this disclosure overcome the aforementioned challenges by generating a topic chain for service requests and including the topic chain in the message to instruct service nodes across the service request span to forward the message to the topic indicated in the topic chain. By including the topic chain in the message used to transmit the service request to the service nodes, hard-coding of topics in the application logic of each service node is avoided. These and other advantages of this disclosure are described below.
[0020] According to one aspect of this disclosure, a computer-implemented method is provided, comprising: generating a topic chain for a service request, the service request spanning a set of service nodes in a distributed service environment, wherein the topic chain indicates a sequence of topics for publishing the service request to provide the service request to the set of service nodes via the topic sequence. The computer-implemented method further comprises: publishing the service request and the topic chain in a message to a first topic indicated by the topic chain to provide the service request and the topic chain to a first service node in the set of service nodes, and allowing the first service node to subsequently publish the message to a second topic indicated by the topic chain to provide the service request and the topic chain to a second service node in the set of service nodes. Advantageously, using topic chains to provide service requests to a set of service nodes reduces dependencies between service nodes. This increases flexibility within the distributed service environment to allow service nodes to handle more than one category of service requests, which can reduce the number of service nodes required in a distributed service and thus reduce the amount of computational resources required to process service requests.
[0021] According to one aspect of the computer-implemented method, generating a topic chain for a service request further includes: identifying a list of rules corresponding to the service request, wherein the list of rules defines the sequence of topics for publishing the service request to allow the group of service nodes to complete the service request; and generating the topic chain to indicate the sequence of topics defined by the list of rules. Advantageously, the use of the list of rules makes it possible to modify the service request span without having to modify the application logic of each individual service node involved in the service request span. This allows service nodes in a distributed service environment to be used for more than one category of service requests, which can reduce the number of service nodes required in a distributed service and thereby reduce the amount of computational resources required to process service requests.
[0022] According to one aspect of the computer-implemented method, generating a topic chain for a service request further includes: obtaining state information for service nodes in the distributed service environment; selecting individual service nodes to handle various aspects of the service request based on the state information; identifying topics subscribed to by the individual service nodes; and generating the topic chain to indicate the topics. Advantageously, the topic chain can be dynamically generated based on the health of service nodes in the distributed service environment. Dynamically generating a topic chain for a service request can improve the performance of the service request by reducing the amount of time required to execute the service request and / or reducing the amount of computational resources used to execute the service request.
[0023] According to one aspect of the computer-implemented method, generating the topic chain for the service request further includes: generating the topic chain at a classifier node implemented in the distributed service environment to generate the topic chain for the service request, wherein the topics subscribed to by the service request through the classifier node are provided to the classifier node. Advantageously, implementing the classifier node in the distributed service environment to generate the topic chain for the service request achieves the previously described advantage of using topic chains to forward service requests to service nodes across the span of service.
[0024] According to one aspect of the computer-implemented method, generating the topic chain for service requests further includes: generating the topic chain at service nodes included in the group of service nodes, wherein the service nodes are configured to act as both service nodes providing microservices and classifiers for generating the topic chain for service requests. Advantageously, implementing the classifier in the service nodes to generate the topic chain for service requests can reduce or eliminate the need for individual classifier nodes, potentially allowing computing resources in a distributed service environment to be used for other purposes.
[0025] According to one aspect of the computer-implemented method, publishing the service request and topic chain further includes incorporating the topic chain into the metadata of the message for publishing the service request to the group of service nodes. Advantageously, including the topic chain in the message metadata achieves the previously described advantage of using topic chains to forward service requests across service nodes.
[0026] According to one aspect of the computer-implemented method, publishing the service request and topic chain further includes incorporating the topic chain as a key-value pair into the payload field of the message of the service request. Advantageously, including the topic chain as a key-value pair in the message payload achieves the previously described advantage of using topic chains to forward service requests across service nodes.
[0027] According to one aspect of the computer-implemented method, the method further includes: at a service node in the group of service nodes, receiving the message including the service request and the topic chain, performing the aspect of the service request corresponding to the service node, identifying the next topic in the topic chain, and publishing the message including the service request and the topic chain to the next topic. Advantageously, configuring the service node to identify the next topic in the topic chain enables the service node to forward the message to the next service node in the service node span, thereby achieving the previously described advantage of using topic chains to forward service requests to the service node span.
[0028] According to one aspect of the computer-implemented method, identifying the next topic in the topic chain further includes: the service node modifying the topic chain to indicate remaining topics in the topic chain to which the message has not yet been published. Advantageously, configuring the service node to modify the topic chain to indicate only remaining topics enables the next service node in the service node span to identify the next topic in the topic chain, which helps to achieve the previously described advantages of using topic chains to forward service requests to the service node span.
[0029] According to one aspect of the computer-implemented method described above, the method further includes: the service node inserting tracing information into the message, wherein the tracing information tracks and records the activities of the service node in relation to the execution of the service request. Advantageously, instead of generating tracing information and storing it in separate service node logs, the tracing information generated by the service node can be aggregated into a single message, which reduces the amount of computational resources required to generate, process, and store the tracing information.
[0030] According to one aspect of the computer-implemented method described above, the method further includes: after at least a portion of the service request has been completed, extracting the trace information of the service request from the message at an extractor node, and using the trace information extracted from the message to log the service request. Advantageously, the trace information can be retained in the message until the extractor node extracts the trace information from the message for logging. This avoids the need to store and maintain individual logs generated by the service node and the need to concatenate trace information to create a single log for the service request, which can reduce the amount of computational resources required to log the service request.
[0031] According to one aspect of this disclosure, a computer-implemented method is provided, comprising: generating a topic chain for a service request, the service request spanning a set of service nodes in a distributed service environment, wherein the topic chain indicates a sequence of topics for publishing the service request to provide the service request to the set of service nodes via the topic sequence. The computer-implemented method further comprises: publishing the service request and the topic chain in a message to a first topic indicated by the topic chain to provide the service request and the topic chain to a first service node in the set of service nodes, and allowing the first service node to subsequently publish the message to a second topic indicated by the topic chain to provide the service request and the topic chain to a second service node in the set of service nodes. The computer-implemented method further comprises: receiving a message including the service request and the topic chain at a service node included in the set of service nodes; performing aspects of the service request corresponding to the service node; inserting trace information into the message by the service node, wherein the trace information tracks and records the activities of the service node in relation to the execution of the service request; and publishing a message including the trace information to the next topic in the topic chain. The computer-implemented method further includes: after at least a portion of the service request has been completed, receiving a message including the tracking information at an extractor node, extracting the tracking information of the service request from the message, and using the tracking information extracted from the message to record the service request. Advantageously, the computer-implemented method described above achieves the associated advantages, improvements, and / or technical effects previously described.
[0032] Additional aspects of this disclosure relate to systems configured to perform any function of any aspect of the computer-implemented methods described above, thereby achieving the associated advantages, improvements, and / or technical effects previously described. Furthermore, additional aspects of this disclosure relate to computer program products comprising one or more computer-readable storage media and program instructions co-stored on the one or more computer-readable storage media, the program instructions being configured to cause one or more processors to perform any function of any aspect of the aforementioned systems, thereby achieving the associated advantages, improvements, and / or technical effects previously described.
[0033] The aspects of this disclosure can be associated with various technical use cases. In one example use case, the computer-implemented method described above can be used to execute in-band service chains for microservices configured to communicate using a MQ (Message Queuing) messaging system. For example, a classifier node can subscribe to service request topics managed by the MQ messaging system to receive service requests for a microservice span. The classifier node evaluates the service requests to determine the sequence of service nodes that will execute the service requests, generates a topic chain for the service requests, and publishes a message including the service request and the topic chain to the first topic in the topic chain managed by the MQ messaging system. Subsequently, service nodes receive messages in the order established by the topic chains, execute their service request portions, and forward the messages to the next topic in the topic chain. Advantageously, messages including service requests, as indicated by the topic chains, are exchanged between service nodes using the MQ messaging system so that communication between service nodes is flexible enough to allow service nodes to be used for more than one class of service requests.
[0034] Now refer to the attached diagram, Figure 1 A block diagram of an example system 100 that can implement in-band service chaining in a distributed service environment 102 according to some embodiments of the present disclosure is shown. As shown, the components of the distributed service environment 102 may include a plurality of service nodes 106A, 106B, 106N (collectively referred to as 106, where N can refer to any positive integer representing any number of service nodes), a message bus 118 for managing topic 112, one or more classifier nodes 104, one or more extractor nodes 110, a log database 116, and other components as will be understood.
[0035] Components of system 100 execute in-band service chains to fulfill service requests spanning multiple service nodes 106. An in-band service chain refers to a technique used to sequentially connect multiple service nodes 106 providing different services (e.g., microservices) to create an end-to-end service. For example, when a service request requires multiple service nodes 106 to work together to execute the service request, the execution of the service nodes 106 can be coordinated to complete the service request. The output of a service node 106 can be either a chain of service nodes 106 or the input of the next service node 106 in the span. As a non-limiting illustration, a service request to place an order with an e-commerce retailer could involve sequentially performing several tasks, such as verifying the customer's identity, performing inventory checks to ensure product availability, processing payment and updating the order status, and arranging for the product to be shipped to the customer.
[0036] Various aspects of this disclosure implement in-band service chaining by connecting the spans of service nodes 106 using topic chains. As used herein, a span of service nodes 106 refers to an end-to-end sequence of service nodes 106 providing services (e.g., microservices) that perform individual tasks to fulfill service requests. As used herein, a topic chain refers to information specifying a sequence 112 of topics for publishing service requests to provide the service request to the spans of service nodes 106 that fulfill the service request. As used herein, a service request includes a request from client 108 to perform a service, task, and / or action, wherein client 108 may be a personal user, computer, application, and / or another service. As used herein, a service request span refers to an end-to-end sequence of tasks performed to fulfill a service request.
[0037] Figure 1 The service node 106 shown includes individual, self-contained, and loosely coupled microservices configured to perform specific functions. Service node 106, as referred to herein, is an instance of a service, which may include microservices. Service node 106 performs its specific functions in response to service requests from client 108 and / or other services. Service requests are delivered to and between service nodes 106 using messages published to topic 112 managed by message bus 118. In some embodiments, distributed service environment 102 may include multiple service nodes 106 as instances of a single microservice. As an illustrative example, distributed service environment 102 may include multiple service nodes 106 that are instances of a single microservice, such as a billing service, a customer account service, a warehouse management service, or another microservice, such that service requests can be distributed among the microservice instances (e.g., via load balancing). As will be described in more detail later, in addition to providing instances of microservices, service nodes 106 included in the span of service nodes read the topic chain included in the message to identify the next topic in the topic chain to forward the message, and publish the message to the next topic.
[0038] Message bus 118 includes a communication architecture configured for exchanging messages between components of distributed service environment 102 and clients 108 of distributed service environment 102. In some embodiments, the message bus-based architecture of message bus 118 includes a publish / subscribe model. In this type of model, a sender (publisher) publishes a message to topic 112, and a receiver (subscriber) subscribes to topic 112. In other embodiments, the message bus-based architecture of message bus 118 includes a message queue model. In this type of model, message queues facilitate asynchronous communication between components of distributed service environment 102, where the message queue acts as an intermediary for transmitting messages published to topic 112 between components. Messages are stored in the message queue until they can be processed by the intended receiver. An example of a message queue model is an MQ (Message Queuing) messaging system. MQ messaging systems facilitate asynchronous communication between service nodes 106. MQ messaging systems act as intermediaries, allowing service nodes 106 to exchange messages without needing to know each other's capabilities or details.
[0039] The topic 112, managed by the message bus 118, serves as a named channel or category to which messages are published. Topic 112 acts as an intermediary channel between publishers (message senders) and subscribers (message receivers). Topic 112 categorizes messages for delivery to its subscribers. As a non-limiting illustration, a topic called "Customer Orders" can be used to categorize messages containing customer order information, so that when a new order is placed, the publisher can send a message to the "Customer Orders" topic, and subscribers (e.g., billing services, customer account services, warehouse management services) can receive messages published to the "Customer Orders" topic.
[0040] As previously described, aspects of this disclosure perform in-band service chaining by connecting the spans of service nodes 106 using topic chains. The topic chain for a service request can be generated by one or more classifiers that evaluate the service request and determine a sequence 112 of topics for publishing the service request, so that the service request is provided to the spans of service nodes 106 subscribed to those topics. In some embodiments, the classifier can be implemented as an independent classifier node 104 in a distributed service environment 102 to generate the topic chain for the service request. In other embodiments, as will be discussed later... Figure 3 As described, the classifier can be implemented as a module in service node 106, such that service node 106 acts as both a service of the distributed application and a classifier for generating topic chains of service requests.
[0041] In some embodiments, the classifier uses a rule list to generate a topic chain for service requests. Generating the rule list for the topic chain involves matching the service request against a rule list that specifies a sequence of topics (subscribed to by the service) used to implement the service request. The rule list can be configured by a system administrator, who creates the rule list to indicate the topic sequence and associates the rule list with a service request class. As an example, the rule list could sequentially indicate a first topic for publishing a service request to provide a service request to a first service node 106A; a second topic for publishing a service request to provide a service request to a second service node 106B; and so on. The classifier can be provided with access to a rule list repository (not shown), and in response to receiving a service request, the classifier can query the rule list repository to identify the rule list corresponding to the service request.
[0042] In some embodiments, the classifier dynamically generates a topic chain for service requests. The dynamic generation of the topic chain includes identifying a set of service nodes 106 to handle service requests and generating a topic chain to indicate the sequence of topics subscribed to by the service nodes 106. In the context of a distributed application, the distributed service environment 102 can simultaneously handle multiple service requests for an application by distributing service requests (e.g., via load balancing) to service nodes 106 as instances of microservices configured to perform specific aspects of the application (e.g., billing services, customer account services, etc.). The goal is to balance the load of service requests to prevent any single service node 106 from being overwhelmed and to prevent service requests from being sent to service nodes 106 that cannot handle service requests (e.g., faulty service nodes).
[0043] The classifier can participate in optimizing the performance of distributed applications by dynamically generating topic chains. Specifically, in some embodiments, the classifier evaluates service requests to determine the span of service nodes 106 for implementing the service request and identifies service nodes 106 capable of handling aspects of the service request. In some embodiments, evaluating service requests to determine the span of service nodes 106 for implementing the service request may include referencing a table (not shown) that maps service request categories to microservices configured to execute aspects of the service request, and a sequence indicating the microservices to execute aspects of the service request. As an example, the table may map service request categories (e.g., customer orders) to a first microservice (e.g., customer service) that executes a first aspect of the service request (e.g., generating an order), a second microservice (e.g., billing service) that executes a second aspect of the service request (e.g., charging a customer), and a third microservice (e.g., warehouse management service) that executes a third aspect of the service request (e.g., initiating product shipment), and indicate the execution order of the microservices (e.g., customer service -> billing service -> warehouse management service).
[0044] After identifying the microservices used to execute service requests and the execution order of these microservices, the classifier identifies the microservices required to provide the service requests in the distributed service environment 102 and the service nodes 106 capable of handling the service requests. In some embodiments, the classifier obtains the status information of the service node 106 from the control plane (not shown) that manages the service node 106. The status information may indicate the health status of the service node 106 (e.g., ready state, disk state, memory state, processing power state, network state, etc.). The classifier uses the status information to evaluate the status of the service node 106 and selects the service node 106 capable of handling the service requests.
[0045] In some embodiments, in addition to identifying service nodes 106 capable of processing service requests, the classifier also determines which service nodes 106 may optimize the performance of service requests (e.g., reduce the time to execute service requests, reduce the amount of computing resources used to execute service requests, etc.). For example, the classifier may use state information obtained from the control plane to evaluate the state of service nodes 106 to identify service nodes 106 that are expected to perform better than other service nodes 106.
[0046] After selecting a span of service node 106 to execute a service request, the classifier identifies topics 112 subscribed to by service node 106, and generates a topic chain to indicate a sequence of topics 112 used to provide service requests to the span of service node 106. For example, in a distributed application architecture, a distributed service environment 102 may include multiple clusters of service nodes 106 providing microservices, and each cluster may include a message bus 118 for providing service requests to service nodes 106 included in the cluster. Therefore, when dynamically generating topic chains, the classifier identifies topics 112 managed by the message bus 118 located in the cluster that hosts the service nodes 106 selected to handle service requests. The classifier can do this for each service node 106 included in the span of the service node 106 selected to handle service requests.
[0047] In some embodiments, a service request span may include more than one classifier (or evaluations performed by the same classifier). In these embodiments, additional classifiers (or evaluations) may be added to the service request span to evaluate the status of the remaining service nodes 106 in the span (e.g., the status of service nodes 106 that have not yet received a service request) and / or to evaluate the service request itself (e.g., the characteristics of the service request are suspicious). As an example, if the classifier's evaluation determines that one or more service nodes 106 should be avoided, the classifier may dynamically update the topic chain to redirect the service request to one or more alternative service nodes 106. As another example, if the classifier's evaluation determines that a service request may contain some kind of error (e.g., the service request appears suspicious), the classifier may dynamically update the topic chain to redirect the service request to an audit node.
[0048] The classifier incorporates the topic chain generated for the service request into the message and publishes the message to the first topic in the topic chain. Incorporating the topic chain into the message used to send the service request across the span of service node 106 enables each service node 106 to forward (republish) the message to the next topic in the topic chain, thereby providing the message to the next service node 106 in the span of service nodes, as described in more detail later. For background, the message includes a header and a payload. The header includes metadata about the message, and the payload includes the content of the message. In some embodiments, the topic chain for the service request is incorporated into the message's metadata. For example, a message can be generated to include the topic chain in the message's metadata field, and the service node 106 receiving the message reads the metadata field to identify the next topic in the topic chain to republish the message. As an illustrative example, the message may include: message PubSubMessage { string data = customer_order; string topic chain = “customer-service”, “billing-service”, “warehouse-management-service”; … } The service node 106 that receives the above message refers to the metadata field including the topic chain to identify the next topic in the topic chain, and the service node 106 forwards (publishes) the message to the next topic, thereby providing the message including the service request to the next service node 106 in the span of the service node 106.
[0049] In other embodiments, the topic chain used for the service request is incorporated into the message payload. In some examples, the topic chain is included in the payload as key-value pairs, where the key indicates a list or order of topic chains, and the value indicates a topic name. As an illustrative example, the message may include: message PubSubMessage { string data = { service_request : "customer_order" topic_1 : “customer-service”, topic_2: “billing-service”, topic_3: “warehouse-management-service”; } The service node 106 that receives the above message refers to the key-value pair to identify the next topic in the topic chain, and the service node 106 republishes the message to the next topic to provide the next service node 106 in the span of the service node 106 with a message including a service request.
[0050] In some embodiments, when a message is forwarded from topic 112 to topic 112 included in the topic chain, service node 106 modifies the message to update the topic chain to include only the remaining topics to which the message has not yet been published. As an example, service node 106 may update the topic chain in the message to remove topic 112 from which it received the message, while leaving the remaining topics 112 in the topic chain to which the message has not yet been published unchanged. As another example, service node 106 may determine the next topic to which it will publish the message from the topic chain included in the message, remove the next topic from the topic chain, and then publish the message to the next topic, such that when the message is forwarded from topic 112 to topic 112, the first position in the topic chain indicates the next topic to which the message will be published.
[0051] Continue to refer to Figure 1 , Figure 2This is a diagram illustrating an example of an in-band service chain using classifier node 104 to generate a topic chain for service requests, according to some embodiments of this disclosure. The in-band service chain originates at source 202 of service request 206, where source 202 can be client 108, a service, or any other entity generating service requests for distributed applications and / or services. As shown, source 202 publishes service request 206 (e.g., a message including the service request) to topic 112A (e.g., a classifier topic) managed by message bus 118. Classifier node 104, an independent node implemented to generate a topic chain for service requests, subscribes to topic 112A to receive service requests published to topic 112A.
[0052] In response to receiving service request 206, classifier node 104 generates a topic chain for service request 206. Classifier node 104 can generate the topic chain using either the previously described rule list technique or a dynamically generated list technique. The resulting topic chain indicates the topic sequences 112B, 112C, and 112D subscribed to by service nodes 106A, 106B, and 106N (span 210 of service nodes), respectively.
[0053] After generating the topic chain, classifier node 104 publishes a message 208, including service request 206 and the topic chain, to the first topic 112B of the topic chain. As will be understood, the message including service request 206 published by source 202 can be modified to include the topic chain. Publishing message 208 to the first topic 112B provides a service request to the first service node 106A in the span 210 of the service nodes. In response to receiving message 208, the first service node 106A executes one aspect of service request 206 (e.g., executes microservice code), identifies the next topic 112C in the topic chain (e.g., via message metadata or key-value pairs), and forwards message 208 to the next topic 112C in the topic chain. For the remaining topics in the topic chain, the process is repeated by the remaining service nodes 106B, 106N in the span 210 of the service nodes. As will be understood, service node 106 in span 210 of service nodes can execute part of its service request 206 and simultaneously forward (publish) message 208 to the next topic in the topic chain. However, in some embodiments, service node 106 may wait to forward message 208 to the next topic until service node 106 has completed part of its service request 206.
[0054] As previously described, when message 208 is forwarded to topic 112 included in the topic chain, in some embodiments, service node 106 updates the topic chain to include only the remaining topics to which message 208 has not yet been published. The last service node 106N in the span 210 that performs a portion of its service request may publish a completion message 214 to topic 112N to indicate that service request 206 has been completed, and may provide the completion message 214 to destination 204 (e.g., client 108, service, or another entity).
[0055] although Figure 2 A single classifier node 104 is shown, but it should be understood that... Figure 2 The in-band service chain shown may include multiple classifier nodes 104 or multiple classifier evaluations. For example, a first classifier node may be provided to generate a topic chain for a first part of the service request, and a second classifier node may be provided to generate a topic chain for a second part of the service request. Furthermore, although... Figure 2 The classifier node 104 is shown as the first node in the sequence of nodes 104, 106A, 106B, and 106N; the classifier node 104 can be placed anywhere in the node sequence, and the node sequence can include any number of classifier nodes 104.
[0056] Continue to refer to Figure 1 , Figure 3 This is a diagram illustrating another example of using a service node 314 configured as classifier 316 to generate an in-band service chain for service requests, according to some embodiments of this disclosure. As previously described, in some embodiments, classifier 316 may be implemented as a module in service node 314, such that service node 314 can act as both a microservice of a distributed application and classifier 316 for generating a topic chain for service requests 306 intended for use in a distributed application.
[0057] Service node 314 subscribes to topic 112A (e.g., a service request topic) to receive service request 306 published by source 302. In response to receiving service request 306 at service node 314, service node 314 executes a portion of its service request 306, and classifier 316 generates a topic chain for service request 306. Subsequently, service node 314 publishes a message 308 including the service request and the topic chain to the first topic 112B in the topic chain. Service nodes 106A and 106N included in service node span 310 forward message 308 down the topic chains 112B and 112C indicated by the topic chains, enabling service node span 310 to execute the corresponding portions of service request 306. The last service node 106N in service node span 310 publishes a completion message 312 to topic 112N to indicate that service request 306 has been completed, and the completion message 312 can then be provided to destination 304 (e.g., client 108, service, or another entity).
[0058] Continue to refer to Figure 1 , Figure 4 This is a diagram illustrating the extraction of trace information for service requests from messages according to some embodiments of the present disclosure. Prior to this disclosure, performance monitoring and tracing of services in a distributed service environment was difficult due to the loose coupling of services. For example, prior to this disclosure, each service included in a service span would generate its own log for service requests, and at some later time, the logs generated by the individual services would be concatenated to create a single log for the service request.
[0059] This disclosure improves service performance monitoring and tracing in a distributed service environment by recording trace information in messages 408 forwarded from service node 106 to service node 106 across service node span 410, such that each service node 106 (or a selected service node 106) records its own trace information in the form of metadata in message 408. After a service request is completed (or at any time before the service request is completed), message 408 can be provided to extractor node 110 (or an extractor module implemented in service node 106), and extractor node 110 can extract and record trace information from message 408.
[0060] Extractor node 110 may include a separate, self-contained, and loosely coupled service configured to process message 408 to identify trace information for service request 406 recorded in message 408 as metadata, and to generate one or more logs based on the trace information. As illustrated above, message 408 created by classifier node 104 may be provided to the service node span 410. As part of executing service request 406, each service node 106 inserts trace information (e.g., timestamps, service request IDs, producer / consumer IDs, transformation contexts, and / or other information) that tracks and records the activities of service node 106 into the header metadata or payload of message 408, and forwards message 408 to the next topic in the topic chain.
[0061] Trace information can be extracted from message 408 at any point during the service request span. For example, after at least part of service request 406 has been completed, message 408 can be provided to extractor node 110 via topic 112N subscribed to by extractor node 110. Extractor node 110 processes message 408 to identify trace information logged to message 408, and extractor node 110 uses the trace information obtained from message 408 to create one or more logs 114 (e.g., service request logs). Extractor node 110 can store logs 114 to... Figure 1 The log data storage shown is 116.
[0062] although Figure 4 A single extractor node 110 is shown, but it will be understood that the in-band service chain described herein can include any number of extractor nodes 110. Furthermore, although... Figure 4 Extractor node 110 is shown as the last node in the sequence of nodes 104, 106A, 106B, 110; it will be understood that extractor node 110 can be placed anywhere within the node sequence.
[0063] Continue to refer to Figure 1 , Figure 5 This is a diagram illustrating the use of topic chains to forward service requests to different spans of service node 106 according to some embodiments of this disclosure. As shown, both source 508A and source 508B can submit service requests to topic 112A (e.g., a classifier topic) subscribed to by classifier node 104 (or a classifier module hosted by service node 106). Classifier node 104 independently evaluates each service request to determine the span of the service node used to execute the service request and generates a topic chain to indicate the sequence of topics 112 subscribed to by the span of the service node.
[0064] As an illustrative example, a service request submitted by source 508A could be a customer order, and a service request submitted by source 508B could be a return order. Classifier node 104 independently evaluates each service request to determine the span of the service node to process the service request, and classifier node 104 generates a topic chain for the service request.
[0065] For a customer order, classifier node 104 determines that service requests classified as "customer orders" are handled by both the customer order service and the warehouse management service. Classifier node 104 then identifies service node 106A providing the customer order service and service node 106N providing the warehouse management service. Classifier node 104 then determines that service node 106A subscribes to topic 112B "customer orders," and service node 106N subscribes to topic 112D "warehouse management." Subsequently, classifier node 104 generates a topic chain for customer orders, indicating topic sequences 112B and 112D. Classifier node 104 then publishes a message to the first topic 112B in the topic chain to include the customer order request and the topic chain. Service nodes 106A and 106N receive messages via topics 112B and 112D, respectively, and execute tasks associated with completing the customer order. An indication that the customer order request has been executed can then be provided to destination 516A via topic 112N.
[0066] For a return order request, classifier node 104 determines that service requests classified as "return orders" are handled by the customer return service and the warehouse management service, respectively. Classifier node 104 then identifies service node 106B, which provides the return order service, and service node 106N, which provides the warehouse management service. Classifier node 104 then determines that service node 106B subscribes to topic 112C "Return Orders," and service node 106N subscribes to topic 112D "Warehouse Management." Classifier node 104 then generates a topic chain for return orders to indicate the sequence of topics 112C and 112D. Classifier node 104 then publishes a message to the first topic 112C indicated by the topic chain to include the return order request and the topic chain. Service nodes 106B and 106N receive messages via topics 112C and 112D, respectively, and perform tasks associated with completing the return order. An indication that the return order request has been executed can then be provided to destination 516B via topic 112N.
[0067] At one or more points during or after the execution of any service request, a message that may be forwarded between service nodes 106 may be provided to extractor node 110, which processes the message to identify trace information recorded in the message by the service node 106 that executed the service request. Extractor node 110 uses the trace information extracted from the message to create one or more logs for the service request.
[0068] In illustrative examples, the same reference numerals may be used in more than one figure. Reference numerals may be repeated in different figures to denote the same elements in different figures. It will be understood that the specific examples illustrated in the figures and discussed above are not intended to be limiting in any way. The aspects described in this disclosure can be used with any distributed application and / or service that utilizes a messaging system to connect loosely coupled services via message buses and topics.
[0069] Figure 1 All or part of the system 100 shown can be, for example, made by Figure 8 The system 100 is implemented using all or a subset of the computing environment 800. In some embodiments, the processing components of the system 100 may be implemented as modules. Typically, a module (also referred to as a program module and / or software module) includes routines, programs, components, and / or data structures that perform specific tasks and / or implement specific abstract data types. In some embodiments, a module may be implemented as a computing service hosted in a cloud environment. For example, a module may be considered a service having one or more processes executing on a server or other computer hardware. Such a service may provide a service application that receives requests and provides output to other services or consumer devices. An application programming interface (API) may be provided for each module to enable a first module to send requests to a second module and receive output from the second module. Such an API may also allow third parties to interface with the module, make requests, and receive output from the module.
[0070] The term "data storage" can refer to any device or combination of devices capable of storing, accessing, organizing, and / or retrieving data. It can include any combination and number of data servers, relational databases, object-oriented databases, clustered storage systems, data storage devices, data warehouses, flat files, and data storage configurations in any centralized, distributed, or clustered environment. Storage system components of a data storage system can include storage systems such as SANs (Storage Area Networks), cloud storage networks, volatile or non-volatile RAM, optical media, or hard disk drive types of media. As will be understood, a data storage system can represent multiple data storage systems.
[0071] Although Figure 1 Examples of system environments in which the above-described techniques can be implemented are shown, but many other similar or different environments are also possible. The illustrated embodiments do not imply physical or structural limitations on how the system is implemented. Other components besides those shown, or components that replace the shown components, may be used. Some components may be unnecessary. Furthermore, these boxes are presented to illustrate some functional components. When implemented in the illustrative embodiments, one or more of these blocks may be combined, divided, or combined and divided into different blocks.
[0072] Now go to Figure 6 The flowchart illustrates an example method 600 for in-band service chaining using topic chains according to some embodiments of the present disclosure. In operation 602, method 600 generates a topic chain for a service request spanning a set of service nodes in a distributed service environment. The topic chain indicates a sequence of topics for publishing the service request so as to provide the service request to the set of service nodes via the topic sequence. The set of service nodes includes an end-to-end sequence of service nodes (e.g., a service node span) providing services (e.g., microservices) for performing various tasks for the service request.
[0073] In some embodiments, method 600 uses a list of rules corresponding to a service request to generate a topic chain for the service request. The rule list defines a sequence of topics for publishing the service request, thereby allowing the group of service nodes to complete the service request. In other embodiments, method 600 dynamically generates the topic chain for the service request by obtaining state information of the service nodes included in the distributed service environment, selecting various aspects of each service node to handle the service request based on the state information, and identifying the topics subscribed to by each service node.
[0074] In some embodiments, method 600 includes generating a topic chain at a classifier node implemented in a distributed service environment to generate a topic chain for service requests. Service requests can be provided to the classifier node via topics subscribed to by the classifier node. In other embodiments, method 600 includes generating a topic chain at a service node in the group of service nodes. The service node can be configured to act as both a service node providing microservices and a classifier generating the topic chain for service requests.
[0075] In operation 604, method 600 publishes the service request and topic chain in a message to a first topic indicated by the topic chain, thereby providing the service request and topic chain to a first service node in the group of service nodes, and allows the first service node to subsequently publish the message to a second topic indicated by the topic chain, thereby providing the service request and topic chain to a second service node in the group of service nodes. Thus, messages are sequentially published to one or more topics indicated by the topic chain to provide a service request to one or more service nodes in the group of service nodes that have subscribed to one or more topics indicated by the topic chain.
[0076] In some embodiments, as part of publishing a service request and a topic chain, method 600 incorporates the topic chain into the message's metadata and publishes the message to a first topic in the topic chain. In other embodiments, method 600 incorporates the topic chain as key-value pairs into the message's payload field and publishes a message including a service request to a first topic in the topic chain.
[0077] After publishing a service request and a topic chain to a first service node in the topic chain, method 600 involves the first service node in the group of service nodes receiving the service request and topic chain. In response, method 600 involves the first service node performing an aspect of the service request. In conjunction with performing the service request, method 600 involves the first service node identifying a second topic in the topic chain and publishing a service request and topic chain to the second topic in the topic chain. In some embodiments, method 600 further includes modifying the topic chain to indicate only the remaining topics in the topic chain to which the message has not yet been published.
[0078] Figure 7 This illustrates some embodiments of recording and execution according to the present disclosure. Figure 6 The flowchart illustrates an example method 700 for a service request associated with an in-band service chain, as described in the diagram. In operation 702, after at least a portion of the service request has been completed, method 700 extracts trace information for the service request from a message. For example, each service node in a set of service nodes inserts trace information into the message to track and log the activity of each service node. At any point during the in-band service chain process, a message may be published to a topic subscribed to by an extractor (e.g., an extractor node or extractor module), and the extractor may process the message to identify the trace information logged into the message by each service node. In operation 704, method 700 uses the trace information extracted from the message to log the service request. For example, the extractor may use the trace information extracted from the message to create a log for the service request and store the log in a log data store.
[0079] The above combination Figure 6 and Figure 7 The described method can be performed by a computer (e.g., Figure 8 The computer 801 in the cloud environment (e.g., Figure 8 It can be executed in cloud 806 or 805, and / or can generally be implemented in fixed-function hardware, configurable logic, logic instructions, etc., or any combination thereof.
[0080] In some alternative implementations of the illustrative embodiments, one or more functions marked in the boxes may occur in a different order than those marked in the figures. For example, in some cases, depending on the functions involved, two boxes shown consecutively may be executed substantially simultaneously, or these boxes may sometimes be executed in reverse order. Furthermore, in addition to the boxes shown in the flowchart or block diagram, other boxes may be added.
[0081] Various aspects of this disclosure are described by narrative text, flowcharts, block diagrams of computer systems, and / or block diagrams of machine logic included in embodiments of a computer program product (CPP). Regarding any flowchart, depending on the technology involved, operations may be performed in a different order than that shown in a given flowchart. For example, again according to the technology involved, two operations shown in consecutive flowchart blocks may be performed in reverse order, as a single integrated step, simultaneously, or in a manner that at least partially overlaps in time.
[0082] Computer Program Product Embodiment (“CPP Embodiment” or “CPP”) is a term used in this disclosure to describe any collection of one or more storage media (also referred to as “media”) collectively included in one or more sets of storage devices, which collectively include machine-readable code corresponding to instructions and / or data for performing computer operations specified in a given CPP claim. A “storage device” is any tangible device capable of holding and storing instructions used by a computer processor. Without limitation, a computer-readable storage medium can be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these media include: magnetic disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanical encoding devices (such as punch cards or pits / platforms formed in the main surface of the disk), or any suitable combination of the foregoing. Computer-readable storage media, as used in this disclosure, should not be construed as storing transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides, optical pulses transmitted through fiber optic cables, or electrical signals transmitted through wires and / or other transmission media. As those skilled in the art will understand, data is typically moved at certain incidental points in time during the normal operation of the storage device, such as during access, defragmentation, or garbage collection; however, this does not make the storage device transient, because the data is not transient when it is stored.
[0083] The computing environment 800 includes examples of an environment for executing at least some of the computer code involved in executing the disclosed methods, such as the computer code in block 850 for classifiers, classifier and microservice combination and / or extractors. In addition to block 850, the computing environment 800 includes, for example, a computer 801, a wide area network (WAN) 802, an end-user equipment (EUD) 803, a remote server 804, a public cloud 805, and a private cloud 806. In this embodiment, the computer 801 includes a processor set 810 (including processing circuitry 820 and a cache 821), a communication structure 811, volatile memory 812, persistent storage device 813 (including an operating system 822 and block 850, as described above), a peripheral device set 814 (including a user interface (UI) device set 823, a storage device 824, and an Internet of Things (IoT) sensor set 825), and a network module 815. The remote server 804 includes a remote database 830. The public cloud 805 includes a gateway 840, a cloud coordination module 841, a set of physical hosts 842, a set of virtual machines 843, and a set of containers 844.
[0084] Computer 801 can take the form of a desktop computer, laptop computer, tablet computer, smartphone, smartwatch or other wearable computer, mainframe computer, quantum computer, or any other form of computer or mobile device now known or to be developed in the future capable of running programs, accessing networks, or querying databases such as remote database 830. As is well known in the field of computer technology, and depending on the technology, the performance of a computer-implemented method can be distributed across multiple computers and / or multiple locations. On the other hand, in this presentation of computing environment 800, the detailed discussion focuses on a single computer, specifically computer 801, to keep the presentation as simple as possible. Computer 801 can reside in the cloud, even... Figure 8 The document does not show that the computer is in the cloud; on the other hand, the computer 801 does not need to be in the cloud unless to the extent that can be definitively indicated.
[0085] Processor assembly 810 includes one or more computer processors of any type now known or to be developed in the future. Processing circuitry 820 may be distributed across multiple packages, such as multiple cooperating integrated circuit chips. Processing circuitry 820 may implement multiple processor threads and / or multiple processor cores. Cache 821 is memory located within the processor chip package and is typically used for data or code that should be readily accessible by the threads or cores running on processor assembly 810. Cache memory is typically organized into multiple levels based on its relative proximity to the processing circuitry. Alternatively, some or all of the caches in the processor assembly may be located “off-chip.” In some computing environments, processor assembly 810 may be designed to work with qubits and perform quantum computing.
[0086] Computer-readable program instructions are typically loaded onto computer 801 to cause a series of operational steps to be executed by processor assembly 810 of computer 801, thereby implementing a computer-implemented method, such that the instructions thus executed will instantiate the method specified in the flowchart and / or the narrative description of the computer-implemented method included in this document (collectively, the “disclosed method”). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cache 821 and other storage media discussed below. The computer-readable program instructions and associated data are accessed by processor assembly 810 to control and direct the execution of the disclosed method. In computing environment 800, at least some of the instructions for performing the disclosed method may be stored in block 850 of permanent storage device 813.
[0087] The communication structure 811 is a signal transmission path that allows the various components of the computer 801 to communicate with each other. Typically, this structure consists of switches and conductive paths, such as switches and conductive paths that form buses, bridges, physical input / output ports, etc. Other types of signal communication paths can be used, such as fiber optic communication paths and / or wireless communication paths.
[0088] Volatile memory 812 is any type of volatile memory now known or to be developed in the future. Examples include dynamic random access memory (RAM) or static RAM. Typically, volatile memory 812 is characterized by random access, but this is not necessary unless explicitly indicated. In computer 801, volatile memory 812 is located in a single package and is internal to computer 801; however, alternatively or additionally, volatile memory may be distributed across multiple packages and / or located externally relative to computer 801.
[0089] The persistent storage device 813 is any form of non-volatile memory known now or developed in the future for use in a computer. The non-volatility of this memory means that the stored data is retained regardless of whether power is supplied to the computer 801 and / or directly to the persistent storage device 813. The persistent storage device 813 may be a read-only memory (ROM), but typically at least a portion of the persistent memory allows data to be written, deleted, and rewritten. Some common forms of persistent memory include hard disks and solid-state storage devices. The operating system 822 may take several forms, such as various known proprietary operating systems or operating systems of the open-source portable operating system interface type employing a kernel. The code included in block 850 typically includes at least some of the computer code involved in performing the disclosed methods.
[0090] Peripheral device set 814 includes a set of peripheral devices for computer 801. Data communication connections between peripheral device 814 and other components of computer 801 can be implemented in various ways, such as Bluetooth connectivity, near field communication (NFC) connectivity, connections made by cables (such as Universal Serial Bus (USB) type cables), plug-in connections (e.g., secure digital (SD) cards), connections made through local area communication networks, and even connections made through wide area networks such as the Internet. In various embodiments, UI device set 823 may include components such as displays, speakers, microphones, wearable devices (such as goggles and smartwatches), keyboards, mice, printers, touchpads, game controllers, and haptic devices. Storage device 824 is an external storage device, such as an external hard drive, or a pluggable storage device, such as an SD card. Storage device 824 can be permanent and / or volatile. In some embodiments, storage device 824 may take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where computer 801 requires substantial storage (e.g., where computer 801 locally stores and manages a large database), this storage can be provided by peripheral storage devices designed to store very large amounts of data, such as a storage area network (SAN) shared by multiple geographically distributed computers. The IoT sensor set 825 consists of sensors that can be used in IoT applications. For example, one sensor could be a thermometer, while another could be a motion detector.
[0091] Network module 815 is a collection of computer software, hardware, and firmware that allows computer 801 to communicate with other computers via WAN 802. Network module 815 may include hardware such as a modem or Wi-Fi transceiver, software for packetizing and / or depacketizing data transmitted over the communication network, and / or web browser software for transmitting data over the Internet. In some embodiments, the network control and network forwarding functions of network module 815 are performed on the same physical hardware device. In other embodiments (e.g., embodiments utilizing Software-Defined Networking (SDN)), the control and forwarding functions of network module 815 are performed on physically separate devices, such that the control function manages several different network hardware devices. Computer-readable program instructions for performing the disclosed methods can typically be downloaded to computer 801 from an external computer or external storage device via a network adapter card or network interface included in network module 815.
[0092] A WAN (802) is any wide area network (e.g., the Internet) capable of transmitting computer data over non-local distances using any technology known now or developed in the future for transmitting computer data. In some embodiments, a WAN may be replaced by and / or supplemented by a local area network (LAN) designed to transmit data between devices located in a local area (e.g., a Wi-Fi network). WANs and / or LANs typically include computer hardware such as copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and edge servers.
[0093] End User Equipment (EUD) 803 is any computer system used and controlled by an end user (e.g., a customer of the enterprise operating computer 801) and can take any of the forms discussed above in conjunction with computer 801. EUD 803 typically receives useful and available data from the operation of computer 801. For example, assuming computer 801 is designed to provide recommendations to the end user, these recommendations are typically transmitted from network module 815 of computer 801 to EUD 803 via WAN 802. In this way, EUD 803 can display or otherwise present the recommendations to the end user. In some embodiments, EUD 803 can be client equipment, such as a thin client, heavy client, mainframe, desktop computer, etc.
[0094] Remote server 804 is any computer system that provides at least some data and / or functionality to computer 801. Remote server 804 can be controlled and used by the same entity operating computer 801. Remote server 804 represents a machine that collects and stores useful and available data used by other computers, such as computer 801. For example, where computer 801 is designed and programmed to provide recommendations based on historical data, that historical data can be provided to computer 801 from a remote database 830 of remote server 804.
[0095] Public cloud 805 is any computer system that can be used by multiple entities, providing on-demand availability of computer system resources and / or other computing capabilities (especially data storage (cloud storage) and computing power) without direct active management by the user. Cloud computing typically leverages resource sharing to achieve scalability consistency and economy. Direct and active management of the computing resources of public cloud 805 is performed by the computer hardware and / or software of cloud coordination module 841. The computing resources provided by public cloud 805 are typically implemented by virtual computing environments running on various computers constituting the host physical machine set 842, which is the entire domain of physical computers in and / or available to the public cloud 805. Virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine set 843 and / or containers from container set 844. It should be understood that these VCEs can be stored as images and can be transferred between various physical machine hosts as images or after instantiation of the VCEs. The cloud coordination module 841 manages the transfer and storage of images, deploys new instantiations of VCE, and manages active instantiations of VCE deployments. The gateway 840 is a collection of computer software, hardware, and firmware that allows the public cloud 805 to communicate via WAN 802.
[0096] Now, we will provide some further explanation of Virtualized Computing Environments (VCEs). A VCE can be stored as an "image." New active instances of a VCE can be instantiated from this image. Two common types of VCEs are virtual machines and containers. A container is a VCE that uses operating system-level virtualization. This refers to an operating system feature where the kernel allows multiple isolated user-space instances, called containers, to exist. From the perspective of the programs running within them, these isolated user-space instances typically appear as actual computers. Computer programs running on a regular operating system can utilize all the resources of that computer, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running within a container can only use the contents of the container and the devices allocated to the container; this is a characteristic known as containerization.
[0097] Private cloud 806 is similar to public cloud 805, except that computing resources are available only to a single enterprise. While private cloud 806 is depicted as communicating with WAN 802, in other embodiments, private cloud can be completely disconnected from the internet and accessed only via a local / private network. Hybrid cloud is a combination of multiple clouds of different types (e.g., private, community, or public cloud types) typically implemented by different vendors. Each of the multiple clouds remains an independent and discrete entity, but the larger hybrid cloud architecture is bound together by standardization or proprietary technology that enables coordination, management, and / or data / application portability across the multiple component clouds. In this embodiment, public cloud 805 and private cloud 806 are both part of a larger hybrid cloud.
[0098] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the various embodiments. As used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms “comprises,” “comprising,” “includes,” “including,” “has,” “having,” “contains,” “ontaining,” or any other variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, article, or apparatus that includes a list of elements is not necessarily limited to those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term “user” refers to an entity (e.g., a person, a computer, or an application running on a computer). It will also be understood that when the terms “includes” and / or “including” are used in this specification, they specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0099] As used herein, when referring to a project, “a set” means one or more projects. For example, a set of clouds is one or more different types of cloud environments. Similarly, “multiple” when used to refer to a project means one or more projects. Furthermore, when used to refer to a project, “a set” or “multiple” means two or more projects. Additionally, the term “at least one” when used with a list of projects means that different combinations of one or more of the listed projects may be used, and it may be necessary to have only one of each project in the list. In other words, “at least one” means any combination of projects, and any number of projects from the list may be used, but not all projects in the list are required. A project can be a specific object, thing, or category. For example, but not limited to, “at least one of project A, project B, or project C” could include project A, project A and project B, or project B; this example could also include project A, project B, and project C, or project B and project C. Of course, any combination of these projects can exist. In some illustrative examples, “at least one” could be, for example, but not limited to, two project A; one project B; and ten project C; four project B and seven project C; or other suitable combinations.
[0100] As used herein, the terms “example” and / or “exemplary” are used to indicate that something is used as an example, instance, or illustration. To avoid ambiguity, the subject matter described herein is not limited to these examples. Furthermore, any aspect or design described herein as “example” and / or “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects or designs, nor does it exclude equivalent exemplary structures and techniques known to those skilled in the art. Any advantages discussed in this disclosure are exemplary advantages, and embodiments of this disclosure may exist that implement all, some, or none of the discussed advantages while remaining within the spirit and scope of this disclosure.
[0101] In the preceding detailed description of various exemplary embodiments, reference has been made to the accompanying drawings (in which like reference numerals denote like elements), which form part of the invention, and which illustrate specific exemplary embodiments in which various embodiments may be practiced. These embodiments have been described in sufficient detail to enable those skilled in the art to practice them; however, other embodiments may be used, and logical, mechanical, electrical, and other changes may be made without departing from the scope of the various embodiments. Numerous specific details have been set forth in the foregoing description to provide a thorough understanding of the various embodiments. However, various embodiments may be practiced without these specific details. In other instances, well-known circuits, structures, and techniques have not been shown in detail so as not to obscure the embodiments.
[0102] Different instances of the term "embodiment" used in this specification do not necessarily refer to the same embodiment, but they may refer to the same embodiment. Any data and data structures shown or described herein are merely examples, and in other embodiments, different amounts of data, data types, the number and types of fields, field names, the number and types of rows, records, entries, or organization of data may be used. Furthermore, any data can be logically combined, thus eliminating the need for a separate data structure. Therefore, the foregoing detailed description should not be construed as limiting.
[0103] Although this disclosure has been described with reference to specific embodiments, changes and modifications thereto will be apparent to those skilled in the art. Therefore, the appended claims are intended to be construed as covering all such alterations and modifications that fall within the true spirit and scope of this disclosure. It should also be noted that numerous aspects or features are disclosed herein, and unless inconsistent, each disclosed aspect or feature may be combined with any other disclosed aspect or feature as required by the specific application of the disclosed concept.
[0104] For illustrative purposes, various aspects of the invention have been described, but are not exhaustive or limited to the disclosed methods. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described aspects. The terminology used herein has been chosen to best explain the principles, practical applications, or technical improvements found in the market of the described aspects, or to enable others skilled in the art to understand the methods disclosed herein.
Claims
1. A computer-implemented method, comprising: Generate a topic chain for a service request that spans a set of service nodes in a distributed service environment, wherein the topic chain indicates a sequence of topics for publishing the service request, so as to provide the service request to the set of service nodes via the topic sequence; and The service request and the topic chain are published in a message to a first topic indicated by the topic chain to provide the service request and the topic chain to a first service node in the group of service nodes, and the first service node is allowed to subsequently publish the message to a second topic indicated by the topic chain to provide the service request and the topic chain to a second service node in the group of service nodes.
2. The computer-implemented method according to claim 1, wherein, Generating the topic chain for the service request further includes: Identify a list of rules corresponding to the service request, wherein the list of rules defines the sequence of topics for publishing the service request to allow the group of service nodes to complete the service request; and Generate the topic chain to indicate the topic sequence defined by the rule list.
3. The computer-implemented method according to claim 1, wherein, Generating the topic chain for the service request further includes: Obtain the status information of the service nodes in the distributed service environment; Based on the status information, a single service node is selected to handle various aspects of the service request; Identify the topics subscribed to by the individual service nodes; and Generate the topic chain to indicate the topic.
4. The computer-implemented method according to claim 1, wherein, Generating the topic chain for the service request further includes: The topic chain is generated at the classifier node implemented in the distributed service environment to generate a topic chain for service requests, wherein the topics subscribed to by the service request through the classifier node are provided to the classifier node.
5. The computer-implemented method according to claim 1, wherein, Generating the topic chain for the service request further includes: The topic chain is generated at the service nodes included in the group of service nodes, wherein the service nodes are configured to act as both service nodes providing microservices and classifiers generating topic chains for service requests.
6. The computer-implemented method according to claim 1, wherein, Publishing the service request and the topic chain further includes: The topic chain is incorporated into the metadata of the message for use in publishing the service request to the group of service nodes.
7. The computer-implemented method according to claim 1, wherein, Publishing the service request and the topic chain further includes: The topic chain is incorporated as a key-value pair into the payload field of the message of the service request.
8. The computer-implemented method according to claim 1, further comprising: At each service node in this group of service nodes, the message including the service request and the topic chain is received; The aspect corresponding to the service node that executes the service request; Identify the next topic in the topic chain; as well as The message, which includes the service request and the topic chain, is published to the next topic.
9. The computer-implemented method according to claim 8, wherein, Identifying the next topic in the topic chain further includes: The service node modifies the topic chain to indicate the remaining topics in the topic chain to which the message has not yet been published.
10. The computer-implemented method according to claim 8, further comprising: The service node inserts tracking information into the message, wherein the tracking information tracks and records the activities of the service node related to the execution of the service request.
11. The computer-implemented method according to claim 10, further comprising: After at least a portion of the service request has been completed, the tracking information from the service request is extracted from the message at the extractor node; as well as The service request is recorded using the tracking information extracted from the message.
12. A system comprising: One or more computer-readable storage media storing program instructions and one or more processors, the one or more processors being configured to: Generate a topic chain for a service request that spans a set of service nodes in a distributed service environment, wherein the topic chain indicates a sequence of topics for publishing the service request, so as to provide the service request to the set of service nodes via the topic sequence; and The service request and the topic chain are published in a message to a first topic indicated by the topic chain to provide the service request and the topic chain to a first service node in the group of service nodes, and the first service node is allowed to subsequently publish the message to a second topic indicated by the topic chain to provide the service request and the topic chain to a second service node in the group of service nodes.
13. The system according to claim 12, wherein, The program instructions configured to cause the one or more processors to generate the topic chain for the service request are further configured to cause the one or more processors to: Obtain the status information of the service nodes in the distributed service environment; Based on the status information, a single service node is selected to handle various aspects of the service request; Identify the topics subscribed to by the individual service node; as well as Generate the topic chain to indicate the topic.
14. The system according to claim 12, wherein, The program instructions are further configured to cause the one or more processors to: At each service node in this group of service nodes, the message including the service request and the topic chain is received; The aspect corresponding to the service node that executes the service request; Modify the topic chain to indicate the remaining topics in the topic chain to which the message has not yet been published; as well as The message, which includes the service request and the topic chain, is published to the next topic in the topic chain.
15. The system according to claim 12, wherein, The program instructions are further configured to cause the one or more processors to: At each service node in this group of service nodes, the message including the service request and the topic chain is received; The aspect corresponding to the service node that executes the service request; The service node inserts tracking information into the message, wherein the tracking information tracks and records the activities of the service node related to the execution of the service request; as well as The message, which includes the tracking information, is published to the next topic in the topic chain.
16. The system according to claim 15, wherein, The program instructions are further configured to cause the one or more processors to: After at least part of the service request has been completed, the message including the tracking information is received at the extractor node; Extract the tracking information used for the service request from the message; as well as The service request is recorded using the tracking information extracted from the message.
17. A computer program product comprising: One or more computer-readable storage media, and program instructions commonly stored on the one or more computer-readable storage media, the program instructions being configured to cause one or more processors to: Generate a topic chain for a service request that spans a set of service nodes in a distributed service environment, wherein the topic chain indicates a sequence of topics for publishing the service request, so as to provide the service request to the set of service nodes via the topic sequence; and The service request and the topic chain are published in a message to a first topic indicated by the topic chain to provide the service request and the topic chain to a first service node in the group of service nodes, and the first service node is allowed to subsequently publish the message to a second topic indicated by the topic chain to provide the service request and the topic chain to a second service node in the group of service nodes.
18. The computer program product according to claim 17, wherein, The program instructions configured to cause the one or more processors to generate the topic chain for the service request are further configured to cause the one or more processors to: Obtain the status information of the service nodes in the distributed service environment; Based on the status information, a single service node is selected to handle various aspects of the service request; Identify the topics subscribed to by the individual service node; as well as Generate the topic chain to indicate the topic.
19. The computer program product according to claim 17, wherein, The program instructions are further configured to cause the one or more processors to: At each service node in this group of service nodes, the message including the service request and the topic chain is received; The aspect corresponding to the service node that executes the service request; Modify the topic chain to indicate the remaining topics in the topic chain to which the message has not yet been published; as well as The message, which includes the service request and the topic chain, is published to the next topic in the topic chain.
20. The computer program product according to claim 17, wherein, The program instructions are further configured to cause the one or more processors to: At each service node in this group of service nodes, the message including the service request and the topic chain is received; The aspect corresponding to the service node that executes the service request; The service node inserts tracing information into the message, wherein the tracing information tracks and records the activities of the service node related to the execution of the service request, so as to allow the extractor node to extract the tracing information for the service request from the message and use the tracing information to record the service request; as well as The message, which includes the tracking information, is published to the next topic in the topic chain.
