CN115756511A - Micro-service management and control method, computer and storage medium - Google Patents

Micro-service management and control method, computer and storage medium Download PDF

Info

Publication number
CN115756511A
CN115756511A CN202211341077.6A CN202211341077A CN115756511A CN 115756511 A CN115756511 A CN 115756511A CN 202211341077 A CN202211341077 A CN 202211341077A CN 115756511 A CN115756511 A CN 115756511A
Authority
CN
China
Prior art keywords
service
micro
microservice
business
management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211341077.6A
Other languages
Chinese (zh)
Inventor
孙剑雄
戴文慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanguang Software Co Ltd
Original Assignee
Yuanguang Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuanguang Software Co Ltd filed Critical Yuanguang Software Co Ltd
Priority to CN202211341077.6A priority Critical patent/CN115756511A/en
Publication of CN115756511A publication Critical patent/CN115756511A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a micro-service management and control method, a computer and a storage medium, and belongs to the technical field of micro-services. The invention relates to application components on line through the micro-service, and considers that the installation and updating frequencies of the general application components and the specific application components are obviously different, constructs the general application components quoted by all the business micro-services into a general service package, and places the specific application components quoted by the individual business micro-services outside the basic service package; the method dynamically introduces the specific application component into the micro-service in the process of starting the micro-service, thereby achieving the purpose of uniformly updating the corresponding micro-service component, being capable of taking effect in time, improving the efficiency and reducing the workload. In addition, although the general service package is generally pre-stored in each business microservice and the updating frequency is low, the invention also provides an updating and loading scheme of the general service package.

Description

Micro-service management and control method, computer and storage medium
Technical Field
The invention belongs to the technical field of micro-services, and particularly relates to a micro-service management and control method, a computer and a storage medium.
Background
With the rise of the micro service architecture, the traditional single architecture is gradually abandoned, and the development of micro service application technology by Spring boot/group is more and more extensive in the industry. Although the micro-service can implement local service update by reasonably dividing service boundaries, part of the basic application components and the service application components have multiplexing scenes and are referred by all micro-services within a certain range.
If local service updating is to be performed, according to the conventional method: the method has the advantages that the micro-service is required to modify the component reference version, build compilation, obtain a deployment package, update the micro-service mirror image or redeploy, and for a large-scale system, the defect updating or repairing period is long, the influence range is wide, and the workload is large; the method is mainly characterized by comprising the following steps: 1. all the microservices referring to the component need to be counted, and the time consumption is counted offline. 2. The common component does not know which microservices to quote, and the test coverage is not complete. 3. All microservices may have to negotiate for simultaneous updates, otherwise there may be risk issues with requiring more cooperating personnel.
Disclosure of Invention
The invention provides a micro-service management and control method, a computer and a storage medium, aiming at optimizing the management and control of a service micro-service and a cited application component and facilitating the quick online of a specific application function.
In a first aspect, the present invention provides a micro-service management and control method, including:
(1) Constructing a management micro-service and a plurality of business micro-services, and uploading or updating application components in the management micro-service;
(2) Entering identification information of the application component in the management microservice; inputting identification information of the business microservice in the management microservice, and associating the business microservice with the quoted application component;
(3) Constructing general application components referenced by all business microservices into a general service package, and dispersing specific application components referenced by individual business microservices outside the basic service package;
(4) The business microservice is started and the components are loaded, and the specific application components quoted by the business microservice are loaded from the management microservice;
(5) And the loaded specific application component is referred to the starting context of the business microservice, and the business microservice is started and finished.
Preferably, step (1) further comprises: and verifying the compliance of the uploaded or updated application component, and prompting to re-upload or update the application component if the verification fails.
Preferably, the general application components and the specific application components are distinguished by setting a reference level identification.
Specifically, the identification information of the application component comprises a component name, a component version and a component publisher; the identification information of the business micro-service comprises a micro-service name, a micro-service version, a micro-service publisher and micro-service deployment environment information; and the management micro-service displays the identification information of the application component, the identification information of the business micro-service and the incidence relation between the business micro-service and the quoted application component through a visual display module.
Specifically, the step (2) of associating the business microservice with the referenced application component specifically includes: the business microservice specifies the component name and component version of the referenced application component.
Preferably, step (5) further comprises: writing back reference information to the management microservice regardless of success or failure of the business microservice initiation, the reference information comprising:
A. a micro-service name;
B. the name of the referenced component;
C. a referenced component version;
D. micro-service deployment environment information;
E. a reference time;
F. information whether the service microservice startup was successful.
Preferably, if the business microservice fails to start, the management microservice displays through a visual display module, and performs version rollback on the corresponding application component.
Preferably, the step (4) further comprises: the business micro-service is started, components are loaded, and the general service package is loaded from the management micro-service; the step (5) further comprises: analyzing the loaded general service package, and quoting all general application components in the general service package into the starting context of the business microservice one by one, wherein the starting of the business microservice is finished.
In a second aspect, the present invention provides a computer comprising a processor and a memory, wherein the memory is configured to store a computer program comprising program instructions, and the processor is configured to call the program instructions to perform the method described above.
In a third aspect, the present invention provides a storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method described above.
The invention has the beneficial effects that: the invention relates to application components on line through the micro-service, and considers that the installation and updating frequencies of the general application components and the specific application components are obviously different, constructs the general application components quoted by all the business micro-services into a general service package, and places the specific application components quoted by the individual business micro-services outside the basic service package; the method dynamically introduces the specific application component into the micro service in the process of starting the micro service, thereby achieving the purpose of uniformly updating the corresponding micro service components, being capable of taking effect in time, improving the efficiency and reducing the workload. In addition, although the general service package is generally pre-stored in each business microservice and the updating frequency is low, the invention also provides an updating and loading scheme of the general service package.
Drawings
Fig. 1 is a main flowchart of a micro service management method according to an embodiment of the present invention.
Fig. 2 is a functional block diagram of management microservices and business microservices in the microservice management and control method according to the embodiment of the present invention.
Detailed Description
The application component in the invention is a component capable of forming a complete application program, and the complete application program can provide the business function of the corresponding microservice. Generally, the application components include application components referenced by all business microservices, and are referred to as general application components in the invention; the application components also include application components referenced by individual business microservices, referred to herein as application-specific components. The invention aims to subscribe related application components on line through the micro-service, classify and manage the general application components and the specific application components, and dynamically introduce the specific application components into the micro-service in the starting process, thereby achieving the purpose of installing or updating the business micro-service components.
Referring to fig. 1, the method for managing and controlling micro services provided in this embodiment includes five steps, which are respectively described as follows:
(1) And constructing a management micro-service and a plurality of business micro-services, and uploading or updating the application components in the management micro-service.
Referring to fig. 2, the management microservice includes a component management module, an information entry module, a reference association module, and a visual display module. A plurality of business microservices such as a business microservice A, a business microservice A and a business microservice A; taking the service microservice a as an example, the service microservice includes a microservice starting module, a component loading module, a starting context management module and a reference information write-back module.
The component management module is used for uploading or updating application components in the management microservice; the uploaded or updated application components include common application components referenced by all business microservices, as well as specific application components referenced by individual business microservices.
In addition, the compliance of the uploaded or updated application component is verified in the step (1), and if the verification is not passed, the application component is prompted to be uploaded or updated again. For example, verifying the integrity of an application component: the method comprises the steps of md5 verifying the integrity of a file, whether a component package uses a compression format (such as zip, 7z, rar and the like) and verifying whether component composition is tampered.
(2) The identification information of each application component is input into the management micro-service through an information input module; meanwhile, the identification information of each business microservice is input into the management microservice through the information input module, the business microservice is associated with the quoted application component, and specifically, the component name and the component version of the quoted application component are appointed for the business microservice through the quote association module.
The identification information of the application component comprises a component name, a component version and a component publisher; the identification information of the business micro-service comprises a micro-service name, a micro-service version, a micro-service publisher and micro-service deployment environment information. In addition, the management micro-service displays the identification information of the application components, the identification information of the business micro-service and the incidence relation between the business micro-service and the quoted application components through the visual display module.
(3) And constructing the general application components referenced by all the business microservices into a general service package, and dispersing the specific application components referenced by the individual business microservices outside the basic service package. Wherein, the general application components and the specific application components are distinguished by setting the reference level identifiers. For example, when maven is used for building, a reference level (scop) of a specific application component can be defined as provider, and reference is carried out when compiling, but the built service package does not contain the specific application component, so that normal compiling can be ensured when a subsequent business microservice loads the specific application component.
(4) When the business micro service is started through the micro service starting module, the component loading module is used for loading the components, and the specific application components quoted by the business micro service are mainly loaded from the management micro service. Component loading as described herein includes loading when a particular application component is first installed, as well as loading when a particular application component is updated.
(5) And the business microservice quotes the loaded specific application component to the starting context of the business microservice through the starting context management module and the quote information write-back module, and the starting of the business microservice is finished.
Generally, the number of times of reinstallation or update of a general application component is relatively small, and therefore the above method is mainly directed to the installation or update of a specific application component. However, if necessary, if the service microserver needs to reinstall or update the basic service package, the step (4) further includes: starting the service micro-service, loading components, and loading the general service package from the management micro-service; correspondingly, the step (5) further comprises the following steps: and analyzing the loaded general service package, and quoting all general application components in the general service package into the starting context of the business microservice one by one, wherein the business microservice is started up and ended.
Further, the step (5) further includes: after the business micro service is started, whether the business micro service is started successfully or fails, reference information is written back to the management micro service through a reference information writing-back module, wherein the reference information comprises:
A. a micro-service name;
B. the name of the referenced component;
C. a referenced component version;
D. microservice deployment environment information (ip, port, machine name, etc.);
E. a reference time;
F. information whether the service microservice startup is successful.
And if the service micro service fails to be started, the management micro service is displayed through the visual display module, and the version of the corresponding application component is rolled back.
The invention also provides a computer comprising a processor and a memory, wherein the memory is used for storing a computer program comprising program instructions, and the processor is used for calling the program instructions and executing the method.
The invention also provides a computer, a storage medium storing a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the method as described above.
The above embodiments are merely for full disclosure and not for limitation of the present invention, and any replacement of equivalent technical features, which can be obtained without inventive work based on the gist of the present invention, should be considered as the scope of the present invention disclosed.

Claims (10)

1. A micro-service management method, comprising:
(1) Constructing a management micro-service and a plurality of business micro-services, and uploading or updating application components in the management micro-service;
(2) Entering identification information of the application component in the management microservice; inputting identification information of the business microservice in the management microservice, and associating the business microservice with the quoted application component;
(3) Constructing general application components referenced by all business microservices into a general service package, and dispersing specific application components referenced by individual business microservices outside the basic service package;
(4) The business microservice is started and the components are loaded, and the specific application components quoted by the business microservice are loaded from the management microservice;
(5) And the loaded specific application component is referred to the starting context of the business microservice, and the business microservice is started and finished.
2. The microservice management and control method according to claim 1, wherein the step (1) further comprises: and verifying the compliance of the uploaded or updated application component, and prompting to re-upload or update the application component if the verification fails.
3. The microservice management method of claim 1, wherein the generic application component and the specific application component are distinguished by setting a reference level identification.
4. The microservice management and control method of claim 1, wherein the identification information of the application component comprises a component name, a component version, and a component publisher; the identification information of the business micro-service comprises a micro-service name, a micro-service version, a micro-service publisher and micro-service deployment environment information; and the management micro-service displays the identification information of the application component, the identification information of the business micro-service and the incidence relation between the business micro-service and the quoted application component through a visual display module.
5. The microservice management and control method according to claim 4, wherein in step (2) the business microservices are associated with the referenced application components, in particular: the business microservice specifies a component name and a component version for the referenced application component.
6. The microservice management and control method of claim 5, wherein step (5) further comprises: writing reference information back to the management microservice no matter the business microservice is successfully or unsuccessfully started, wherein the reference information comprises: a micro-service name; the name of the referenced component; a referenced component version; micro-service deployment environment information; a reference time; information whether the service microservice startup was successful.
7. The microservice management and control method according to claim 6, wherein if the business microservice fails to start, the management microservice is displayed by a visual display module and the corresponding application component is version-rolled back.
8. The microservice management and control method of claim 1, wherein the step (4) further comprises: the service micro-service is started and the components are loaded, and the general service package is loaded from the management micro-service; the step (5) further comprises: and analyzing the loaded general service package, and quoting all general application components in the general service package into the starting context of the business microservice one by one, wherein the business microservice is started up and ended.
9. A computer comprising a processor and a memory, the memory being adapted to store a computer program comprising program instructions, wherein the processor is adapted to invoke the program instructions to perform the method of any of claims 1 to 8.
10. A storage medium storing a computer program comprising program instructions; wherein the program instructions, when executed by a processor, cause the processor to perform the method of any of claims 1-8.
CN202211341077.6A 2022-10-30 2022-10-30 Micro-service management and control method, computer and storage medium Pending CN115756511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211341077.6A CN115756511A (en) 2022-10-30 2022-10-30 Micro-service management and control method, computer and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211341077.6A CN115756511A (en) 2022-10-30 2022-10-30 Micro-service management and control method, computer and storage medium

Publications (1)

Publication Number Publication Date
CN115756511A true CN115756511A (en) 2023-03-07

Family

ID=85354298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211341077.6A Pending CN115756511A (en) 2022-10-30 2022-10-30 Micro-service management and control method, computer and storage medium

Country Status (1)

Country Link
CN (1) CN115756511A (en)

Similar Documents

Publication Publication Date Title
US8589909B2 (en) Techniques for reducing down time in updating applications with metadata
US8171465B2 (en) Applicable patch selection device and applicable patch selection method
US9600264B2 (en) Generating a customized set of tasks for migration of a deployed software solution
CN101411123B (en) Method, system and computer program for the centralized system management on endpoints of a distributed data processing system
CN110908859B (en) Application service processing method, device, terminal and storage medium
US20080244563A1 (en) Dynamic configuration environment for setup
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN105183520B (en) Computer software remote automation Method of Adjustment and system
CN110727575B (en) Information processing method, system, device and storage medium
CN109840105A (en) A kind of hot update method that do not withdraw
JP2007082078A (en) Data relay device
CN115630835A (en) Activity-based workflow general parameter configuration method and system
US20090024424A1 (en) System and method for dynamic linking of business processes
US9207928B2 (en) Computer-readable medium, apparatus, and methods of automatic capability installation
CN110007946B (en) Method, device, equipment and medium for updating algorithm model
CN115756511A (en) Micro-service management and control method, computer and storage medium
US8707307B2 (en) Creating jobs by replacing execution attributes within job definition when a job activation request is received with execution attributes based on predetermined conditions being satisfied
CN113656088B (en) Self-service management method, device and storage medium for internet data center server
CN115309457A (en) Application instance restarting method and device, electronic equipment and readable storage medium
CN114237634A (en) Application release risk identification method, device, equipment, medium and program product
CN114489704A (en) Version compiling and deploying method and device based on strategy
CN114840248A (en) System gray level publishing method based on enterprise level distributed application service
CN107766072A (en) Video card refreshes BIOS method under a kind of linux system
US20130024540A1 (en) Proactive caching of remote actions
CN111949278B (en) Method, system, terminal and storage medium for automatically installing MCS system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination