Call method and device for background service in micro-service architecture
A background service and service call technology, applied in the computer field, can solve the problems of resource investment cost and maintenance complexity, which cannot be accepted by development and testing personnel, and achieve the effect of reducing complexity
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0025] image 3 It is a schematic flowchart of a method for invoking background services in a microservice architecture provided by an embodiment of the present invention. The method can be executed by a device for invoking background services in a microservice architecture. The device can be implemented by software and / or hardware, and generally can be It is integrated into the server used to complete the call function of the background service in the microservice architecture. like image 3 As shown, the method includes:
[0026] S101. Obtain a microservice invocation request of a microservice caller.
[0027] In this embodiment, the microservice architecture includes two roles: a microservice caller and a microservice callee, where the microservice callee is also called a microservice provider. Each microservice in the microservice architecture can be either a microservice caller or a microservice callee. Exemplarily, microservices A, B, and C are included in a certain ...
Embodiment 2
[0036] Figure 4 It is a schematic flowchart of a background service calling method in a microservice architecture provided by Embodiment 2 of the present invention. This embodiment is optimized on the basis of the above embodiments, adding a step: when the service address information of the service provider corresponding to the state identifier search of the microservice architecture is not found, obtain the service provider corresponding to the public identifier The provider's service address information; calling the background service in the microservice architecture corresponding to the service address information of the corresponding service provider with the public identifier. Correspondingly, the method in this embodiment specifically includes:
[0037] S201. Obtain a microservice invocation request of a microservice caller.
[0038] S202. If the running state of the microservice architecture corresponding to the microservice call request is a test state, search for s...
Embodiment 3
[0048] Figure 5 It is a schematic flowchart of a method for invoking a background service in a microservice architecture provided by Embodiment 3 of the present invention. This embodiment is optimized on the basis of the above embodiments. In this embodiment, before searching for the service address information of the corresponding service provider according to the status identifier of the microservice architecture, a step is added: judging the service call request Whether the state identifier is included in the service call request; when the service call request contains the state identifier, extract the state identifier from the service call request; when the service call request does not contain the state When an identifier is used, the state identifier is extracted from the configuration file of the microservice architecture. Correspondingly, the method in this embodiment specifically includes:
[0049] S301. Obtain a microservice invocation request of a microservice ca...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com