WO2022193979A1 - Microservice development method and system, and computer device and medium - Google Patents

Microservice development method and system, and computer device and medium Download PDF

Info

Publication number
WO2022193979A1
WO2022193979A1 PCT/CN2022/079551 CN2022079551W WO2022193979A1 WO 2022193979 A1 WO2022193979 A1 WO 2022193979A1 CN 2022079551 W CN2022079551 W CN 2022079551W WO 2022193979 A1 WO2022193979 A1 WO 2022193979A1
Authority
WO
WIPO (PCT)
Prior art keywords
microservice
node
development
public
address
Prior art date
Application number
PCT/CN2022/079551
Other languages
French (fr)
Chinese (zh)
Inventor
施瑜
刘源
Original Assignee
易保网络技术(上海)有限公司
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 易保网络技术(上海)有限公司 filed Critical 易保网络技术(上海)有限公司
Publication of WO2022193979A1 publication Critical patent/WO2022193979A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/04Network management architectures or arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Definitions

  • the present invention relates to the field of computer technology, and in particular, to a microservice development method, system, and associated computer equipment and medium.
  • Microservice architecture is a new technology for deploying applications and services in the cloud. Microservices are split from the original single business system into multiple small applications that can be independently developed, involved, operated and maintained. Microservices is an architectural style, for example, an application needs to be composed of at least one microservice. Each microservice in the system can be deployed independently, and each microservice is loosely coupled. Each microservice, as a small application, is only focused on accomplishing one task and doing it well. Moreover, when technicians upgrade a microservice, they often test the microservice to ensure that the updated microservice can be used normally with other microservices in the software application.
  • a microservice development method applied to the development of microservice nodes includes: deploying a running instance of the microservice; converting the IP address of the development microservice node and the The microservice name of the deployed microservice is registered with the microservice registration server; and the test of the running instance of the microservice is initiated.
  • the IP address of the development microservice node is associated with the microservice name of the microservice on the microservice registration server.
  • the running instance of the microservice is privately accessed.
  • the development microservice node invokes the running instance of the microservice deployed on the public microservice node.
  • invoking the running instance of the microservice deployed on the public microservice node includes: the development microservice node querying the microservice registration server for the microservice called by the test the microservice name.
  • the development microservice node obtains an IP address associated with the microservice name from the microservice registration server, wherein the IP address includes the public microservice node IP address.
  • the development microservice node selects the IP address of the public microservice node for testing, so as to invoke the running instance of the microservice deployed on the public microservice node.
  • the development microservice node when the IP address also includes the IP address of the development microservice node, the development microservice node preferentially selects the IP address of the development microservice node to call the microservice. Run the example to test.
  • the development microservice node is a computing node composed of one or more entity computers.
  • the method runs under the Spring Cloud microservice framework.
  • a microservice development method applied to a public microservice node includes: deploying a running instance of the microservice, wherein the running instance of the microservice keeps run for other nodes to test; register the IP address of the public microservice node and the microservice name of the deployed microservice with the microservice registration server.
  • the IP address of the public microservice node is associated with the microservice name of the microservice on the microservice registration server.
  • the running instance of the microservice is publicly accessible.
  • the public microservice node obtains the IP address associated with the microservice name from the microservice registration server.
  • the public microservice node selects the obtained IP address to invoke the running instance of the microservice deployed on other nodes.
  • the public microservice node is a computing node composed of one or more entity computers.
  • the method runs under the Spring Cloud microservice framework.
  • a micro-service development system for developing micro-service nodes, wherein the system includes: a deployment module, the deployment module deploys a running instance of the micro-service; a registration module , the registration module registers the IP address of the development microservice node and the microservice name of the deployed microservice to the microservice registration server; and a test module, which initiates the operation of the microservice instance test.
  • the IP address of the development microservice node is associated with the microservice name of the microservice on the microservice registration server.
  • the running instance of the microservice is accessed privately.
  • test module when the test module initiates the test on the running instance of the microservice, invokes the test module of the microservice deployed on the public microservice node. Run the instance.
  • the test module invoking the running instance of the microservice deployed on the public microservice node includes: the registration module queries the microservice registration server for the test service The microservice name of the called microservice.
  • the microservice development system obtains the IP address associated with the microservice name, wherein the IP address includes the IP address of the public microservice node.
  • the test module selects the IP address of the public microservice node for testing, so as to invoke the running instance of the microservice deployed on the public microservice node.
  • the test module when the IP address also includes the IP address of the development microservice node, the test module preferentially selects the IP address of the development microservice node to call the microservice. Run the example to test.
  • the development microservice node is a computing node composed of one or more entity computers.
  • the system runs under the Spring Cloud microservice framework.
  • a microservice development system applied to a public microservice node includes: a deployment module, the deployment module deploys a running instance of the microservice, wherein the The running instance of the microservice keeps running for other nodes to test; the registration module registers the IP address of the public microservice node and the microservice name of the deployed microservice with the microservice registration server.
  • the IP address of the public microservice node is associated with the microservice name of the microservice on the microservice registration server.
  • the running instance of the microservice is publicly accessible.
  • the system obtains the IP address associated with the microservice name from the microservice registration server.
  • system further includes a calling module, the calling module selects the obtained IP address to call the running instance of the microservice deployed on other nodes.
  • the public microservice node is a computing node composed of one or more entity computers.
  • the system runs under the Spring Cloud microservice framework.
  • a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing a computer program according to the present invention when the processor executes the program The steps of the method of the aspect.
  • a recording medium having stored thereon a computer program executed by a computer to implement the steps of the method according to an aspect of the present invention.
  • single or multiple microservice nodes can be developed and debugged without simultaneously starting the entire microservice link or other microservice nodes unrelated to the single or multiple microservice nodes;
  • a microservice node can implement routing selection by calling other microservice nodes or development nodes, thereby saving microservice node resources.
  • Figure 1 shows a schematic diagram 100 of microservice development according to one embodiment of the present invention.
  • FIG. 2 shows a schematic diagram 200 of microservice development according to another embodiment of the present invention.
  • FIG. 3 shows a microservice development method 300 applied to develop a microservice node according to an embodiment of the present invention.
  • FIG. 4 shows a microservice development method 400 applied to a public microservice node according to an embodiment of the present invention.
  • FIG. 5 shows a microservice development system 500 applied to develop a microservice node according to an embodiment of the present invention.
  • FIG. 6 shows a microservice development system 600 applied to a public microservice node according to an embodiment of the present invention.
  • FIG. 7 is an example block diagram 700 of a computer device for the methods described herein, according to one embodiment of the present invention.
  • These computer program instructions may be stored in a computer readable memory, the instructions may instruct a computer or other programmable processor to perform functions in a particular manner, such that the instructions stored in the computer readable memory constitute the flowcharts and/or A manufactured product of the instruction components for the function/operation specified in one or more of the blocks of the block diagram.
  • the present disclosure proposes a microservice development method, system, and computer device and medium.
  • the method, device and computer medium involved in the present invention can be used for micro-service development between public micro-service nodes, micro-service registration servers and development micro-service nodes in a micro-service link. Nodes implement a limited number of microservice startups, and can be dev-tested against a single or several microservices.
  • FIG. 1 shows a schematic diagram 100 of microservice development according to one embodiment of the present invention.
  • the microservice development method according to the present invention may include three parties, namely a public microservice node 101 , a microservice registration server 102 and a development microservice node 103 .
  • the node server is not necessarily a single entity computer, but may be a computing node composed of one or more computers, servers or computing devices. All or part of the running instance of the microservice can be run on the computing node.
  • the public microservice node 101 is a public node on which multiple running instances of the microservices 110, 120 to N are deployed (depending on the computing capability of the public microservice node).
  • the running instance of the microservice running on the public microservice node 101 is public and can be invoked by any remote node.
  • the development microservice node 103 is a private node on which a running instance of the microservice 110 runs, and the running instance can only be accessed and debugged by the developer.
  • the microservice registration server is a public service registration server, on which the IP address of the microservice node and the microservice name of the microservice deployed on the microservice node can be registered, and the IP address of the microservice node can be deployed on the server.
  • the microservice name associated with the microservice can also obtain the IP address of the associated microservice node by parsing the microservice name of the microservice.
  • the present disclosure provides a brand-new microservice development method. Methods can run under the Spring Cloud microservices framework. As shown in FIG. 1 , the development microservice node 103 deploys only the running instance of the microservice 110 , while the public microservice node 101 may deploy multiple running instances of the microservice 120 to N depending on its computing capability. At the beginning of the method, the public microservice node 101 and the development microservice node 103 respectively register their IP addresses and the microservice name of the deployed microservice with the microservice registration server. When the running instance of the microservice is started, the microservice name of the microservice and the IP address of the node where the microservice is deployed will be registered on the microservice registration server and associated as a mapping relationship.
  • the IP address of the node and the microservice name of the microservice deployed on the node are associated.
  • the node can obtain the address of the node where the microservice associated with the microservice name is deployed by querying the microservice name. The specific method will be introduced below.
  • the development microservice node 103 may begin testing the running instance of the microservice 110 .
  • testing of a running instance of microservice 110 may involve invoking a running instance of microservice 120 .
  • the development microservice node 103 will query the microservice registration server 102 for the microservice name of the microservice 120.
  • the microservice registration server 102 parses the microservice name of the microservice 120 and finds the IP address associated with the microservice name on the microservice registration server 102, ie, the IP address of the public microservice node.
  • the development microservice node will periodically obtain the IP address of the node associated with the microservice name from the microservice registration server 102 .
  • the development microservice node 103 selects the obtained IP address of the public microservice node to call the running instance of the microservice 120 on the public microservice node 101 for testing, thereby avoiding deploying the running instance of the microservice 120 to the local development microservice node work.
  • remotely calling the running instance of the microservice on the public microservice development node can realize the joint development and invocation of the microservice by multiple private development microservice nodes. In parallel, the utilization efficiency of running instances of microservices is improved.
  • the public microservice node 103 can also call the running instance of the microservice on the development microservice node 101 when necessary.
  • the development microservice node 101 invokes the running instance of the microservice 120 of the public microservice node 103
  • the running instance of the microservice 120 may need information of the running instance of the microservice 110 . Therefore, the public microservice node 103 will query the microservice name of the microservice 110 on the microservice registration server 102 .
  • the public microservice node 103 obtains the IP address associated with the microservice name of the microservice 110 from the microservice registration server 102 , that is, the IP address of the development microservice node 101 . .
  • the public microservice node 103 selects the IP address to call the running instance of the microservice 110 deployed on the development microservice node, so as to satisfy the development microservice node 101's call to the running instance of the microservice 120 on the public microservice node 103.
  • This implementation develops the testing of the microservice by the microservice node.
  • FIG. 2 shows a schematic diagram 200 of microservice development according to another embodiment of the present invention.
  • the microservice development method described in FIG. 2 can further realize the optimal routing of the microservice by the development microservice node.
  • the public microservice node 201 in FIG. 2 is also deployed with a running instance of the microservice 210 , and other parts are the same as those in FIG. 1 .
  • the development microservice node 203 begins testing the running instance of the microservice 210, this may involve the running instance of the microservice 220. Therefore, when the running example of the microservice is started, the microservice name of the microservice is registered on the microservice registration server 202 .
  • the microservice registration server 202 resolves the microservice name and obtains the associated IP address (the IP address of the public microservice node 201).
  • the development microservice node 203 periodically obtains the associated IP address from the microservice registration server 202 .
  • the development microservice node 203 selects the IP address of the public microservice node 201 to call the running instance of the microservice 220 on the public microservice node 201 .
  • the running instance of microservice 220 is invoked, it may in turn involve the running instance of microservice 210 . Therefore, the development microservice node 203 queries the microservice registration server 202 for the microservice name of the microservice 210 .
  • the microservice registration server 202 resolves the microservice name of the microservice 210.
  • the microservice The service name is associated with the IP addresses of the two microservice nodes. Therefore, the development microservice node 203 will obtain the IP addresses of two or more microservice nodes. After obtaining multiple IP addresses (eg, two) associated with the microservice name of the microservice 210, the microservice node 203 will preferentially route to its own IP address (the IP address of the microservice node 203), thereby invoking the deployment.
  • the running instance of the microservice 210 on the local microservice node is developed, so that the local developer can call the running instance of the microservice 210 on the local development microservice node 203 .
  • FIG. 3 shows a microservice development method 300 applied to develop a microservice node according to an embodiment of the present invention.
  • the method includes three steps.
  • Step S301 deploys a running instance of the microservice;
  • step S302 registers the IP address of the development microservice node and the microservice name of the deployed microservice to the microservice registering a server; and
  • step S303 initiating a test on the running instance of the microservice.
  • step S301 the development microservice node deploys a running instance of the microservice thereon.
  • one or more running instances of the microservice to be tested can be deployed without deploying all the running instances of the related microservices on the development microservice node.
  • the running instance of the microservice on the development microservice node is private and accessible by the developer.
  • step S302 the development microservice node registers its IP address and the microservice name of the microservice deployed on it with the microservice registration server.
  • the microservice name of the microservice and the IP address of the node where the microservice is deployed will be registered on the microservice registration server and associated as a mapping relationship.
  • the development microservice node queries the microservice name on the microservice registration server, and then the microservice registration server can parse the microservice name and obtain the IP addresses on which the microservice to which the microservice name belongs is deployed.
  • step S303 the development microservice node will initiate a test on the running instance of the deployed microservice.
  • the testing of the running instance of the deployed microservice may involve a running instance of the microservice that is not deployed on the development microservice node.
  • the development microservice node will invoke the running instance of the microservice deployed on the public microservice node.
  • the invocation method specifically includes that the development microservice node registers the microservice name of the microservice called by the test with the microservice registration server.
  • the microservice registration server will resolve the microservice name and obtain the IP address associated with the microservice name, that is, the IP address of the public microservice node where the running instances of multiple microservices are deployed.
  • the development microservice node will periodically obtain the associated IP address (for example, the IP address of the public microservice node) from the microservice registration server, so the development microservice node selects the IP address of the public microservice node to call and deploy it on the public microservice node The running instance of the microservice on the server, so as to realize the test of the running example of the microservice.
  • the development microservice node when the microservice registration server parses the microservice name and finds that the microservice name is associated with multiple IP addresses, the development microservice node will obtain the multiple IP addresses. In the case where multiple IP addresses include the IP address of the development microservice node, the development microservice node will preferentially select the IP address of the development microservice node to call the running example of the microservice for testing.
  • FIG. 4 shows a microservice development method 400 applied to a public microservice node according to an embodiment of the present invention.
  • the method includes two steps, step S401 deploys a running instance of the microservice, wherein the running instance of the microservice keeps running for other nodes to test; step S402 deploys the public microservice node The IP address and the microservice name of the deployed microservice are registered with the microservice registration server.
  • the public microservice node deploys a plurality of running instances of the microservice thereon, and the specific deployment quantity may depend on the computing capability of the public microservice node.
  • the public microservice node becomes the running pool of the running examples of the public microservice.
  • Other nodes can invoke the required running instance of the microservice from the common pool, wherein the running instance of the microservice is publicly accessible.
  • step S402 the public microservice node registers its IP address and the microservice name of the microservice deployed on it with the microservice registration server.
  • the IP address of the public microservice node is associated with the microservice name of the microservice deployed thereon on the microservice registration server.
  • the running instance of the microservice on the public microservice node may involve running instances of other microservices.
  • public microservice nodes can call running instances of other microservices.
  • the specific calling method is similar to the calling method in method 300 .
  • FIG. 5 shows a microservice development system 500 applied to develop a microservice node according to an embodiment of the present invention.
  • the method includes three modules, a deployment module 501, which deploys a running instance of a microservice; a registration module 502, which registers the IP address of the development microservice node and the microservice name of the deployed microservice is registered with the microservice registration server; and a test module 503, the test module 503 initiates a test on the running instance of the microservice.
  • the deployment module 501 deploys a running instance of the microservice thereon.
  • one or more running instances of the microservice to be tested can be deployed without deploying all the running instances of the related microservices on the development microservice node.
  • the running instance of the microservice on the development microservice node is private and accessible by the developer.
  • the registration module 502 registers its IP address and the microservice name of the microservice deployed thereon with the microservice registration server. On the microservice registry server, the IP address will be associated with the microservice name.
  • the development microservice node queries the microservice name on the microservice registration server, and then the microservice registration server can parse the microservice name to obtain the IP addresses on which the microservice to which the microservice name belongs is deployed.
  • the testing module 503 will initiate testing of the running instance of the deployed microservice.
  • the testing of the running instance of the deployed microservice may involve a running instance of the microservice that is not deployed on the development microservice node.
  • the development microservice node will invoke the running instance of the microservice deployed on the public microservice node.
  • system 500 can also perform calls to microservices.
  • the calling method specifically includes that the registration module 502 registers the microservice name of the microservice called by the test with the microservice registration server.
  • the microservice registration server will resolve the microservice name and obtain the IP address associated with the microservice name, that is, the IP address of the public microservice node where the running instances of multiple microservices are deployed.
  • the system 500 obtains the associated IP address, that is, the IP address of the public microservice node, from the microservice registration server.
  • the testing module 503 selects the IP address of the public microservice node to call the running instance of the microservice deployed on the public microservice node, so as to test the running instance of the microservice.
  • the system 500 obtains the multiple IP addresses from the microservice registration server.
  • the testing module 503 will preferentially select the IP address of the development microservice node to call the running example of the microservice for testing.
  • FIG. 6 shows a microservice development system 600 applied to a public microservice node according to an embodiment of the present invention.
  • the method includes two modules, a deployment module 601, which deploys a running instance of a microservice, wherein the running instance of the microservice keeps running for other nodes to test; a registration module 602, the registration module 602 registers the IP address of the public microservice node and the microservice name of the deployed microservice with the microservice registration server.
  • the deployment module 601 deploys a plurality of running instances of microservices thereon, and the specific deployment quantity may depend on the computing capability of the public microservice nodes.
  • the public microservice node becomes the running pool of the running examples of the public microservice.
  • Other nodes can invoke the required running instance of the microservice from the common pool, wherein the running instance of the microservice is publicly accessible.
  • the registration module 602 registers its IP address and the microservice name of the microservice deployed thereon with the microservice registration server.
  • the IP address of the public microservice node is associated with the microservice name of the microservice deployed thereon on the microservice registration server.
  • the running instance of the microservice on the public microservice node may involve running instances of other microservices.
  • system 600 may invoke running instances of other microservices.
  • the system can obtain the IP address from the microservice registration server, so as to select the IP address for invocation. The specific manner is similar to that in the system 500 .
  • the present invention is not limited to these embodiments, and the present invention can also be implemented in the following manner: a computer device for executing the above method or a The form of a computer program for executing the above-described method, the form of a computer program for realizing the functions of the above-described apparatus, or the form of a computer-readable recording medium on which the computer program is recorded.
  • FIG. 7 shows a computer device for the above-mentioned data encryption and decryption method according to an embodiment of the present invention.
  • computer device 700 includes memory 701 and processor 702 .
  • computer device 700 also includes a computer program stored on memory 701 and executable on processor 702 .
  • the processor executes the program, the steps shown in FIG. 1 , FIG. 2 , FIG. 3 and FIG. 4 are simultaneously implemented.
  • the present invention can also be implemented as a recording medium in which a program for causing a computer to execute the data encryption/decryption method as described above is stored.
  • disks for example, magnetic disks, optical disks, etc.
  • cards for example, memory cards, optical cards, etc.
  • semiconductor memories for example, ROM, nonvolatile memory, etc.
  • tapes etc.
  • Types eg, magnetic tapes, cassette tapes, etc.
  • the above-mentioned recording medium is loaded on the computer, the computer program recorded in the recording medium is read out by the computer and stored in the memory, the processors (CPU: Central Processing Unit), MPU: Micro Processing Unit (microprocessing unit) reads the computer program from the memory and executes it, thereby executing the data masking and restoring method in the above-mentioned embodiment and realizing the functions of the device of the data masking and restoring method in the above-mentioned embodiment.
  • CPU Central Processing Unit
  • MPU Micro Processing Unit

Abstract

The present invention relates to a microservice development method and system, and an associated computer device and a medium. In particular, the present invention provides a microservice development method applied to a development microservice node, and is characterized in that the method comprises: deploying a running instance of a microservice; registering an IP address of the development microservice node and a microservice name of the deployed microservice with a microservice registration server; and initiating a test on the running instance of the microservice.

Description

一种微服务开发方法、系统以及计算机设备和介质A microservice development method, system, and computer equipment and medium 技术领域technical field
本发明涉及计算机技术领域,具体而言,涉及一种微服务开发方法、系统以及相关联的计算机设备和介质。The present invention relates to the field of computer technology, and in particular, to a microservice development method, system, and associated computer equipment and medium.
背景技术Background technique
随着信息技术的快速发展,应用软件架构发生了巨大变化,传统的整体式架构转变为新型的微服务架构。With the rapid development of information technology, the application software architecture has undergone tremendous changes, and the traditional monolithic architecture has been transformed into a new type of microservice architecture.
微服务架构是一项在云中部署应用和服务的新技术。微服务是由原有的单个业务系统被拆分为多个可以独立开发、涉及、运行以及维护的小应用。微服务是一种架构风格,例如,一个应用程序需要至少一个微服务组成。系统中的各个微服务可被独立部署,各个微服务之间是松耦合的。每个微服务作为一个小应用,仅关注于完成一件任务并很好地完成该任务。并且,当技术人员对微服务进行升级时,经常对该微服务进行测试,以保证更新的微服务能够与软件应用中其他的微服务正常配合使用。Microservice architecture is a new technology for deploying applications and services in the cloud. Microservices are split from the original single business system into multiple small applications that can be independently developed, involved, operated and maintained. Microservices is an architectural style, for example, an application needs to be composed of at least one microservice. Each microservice in the system can be deployed independently, and each microservice is loosely coupled. Each microservice, as a small application, is only focused on accomplishing one task and doing it well. Moreover, when technicians upgrade a microservice, they often test the microservice to ensure that the updated microservice can be used normally with other microservices in the software application.
但是,在现有技术中,对微服务进行开发时,需构建整体微服务链路的开发环境。由于各个微服务之间有较强的调用关系,所以需要有全量的微服务部署至开发环境中。如此将导致以下问题:构建微服务开发环境耗时长,如通常需要多日才能搭建;并且开发环境难以调试,如在测试过程中需花费大量时间定位是否是测试环境问题;同时开发环境不稳定,如常常因为一个微服务的问题导致测试受阻等问题。However, in the prior art, when developing microservices, it is necessary to build a development environment for the overall microservice link. Due to the strong calling relationship between each microservice, it is necessary to deploy a full amount of microservices to the development environment. This will lead to the following problems: it takes a long time to build a microservice development environment, such as it usually takes many days to build; and the development environment is difficult to debug, such as spending a lot of time in the testing process to determine whether it is a test environment problem; at the same time, the development environment is unstable, For example, the test is often blocked due to a problem with a microservice.
因此,需要一种新的微服务开发方法、系统以及计算机设备和介质,以微服务开发效率。Therefore, a new microservice development method, system, and computer equipment and medium are needed to develop microservices efficiently.
发明内容SUMMARY OF THE INVENTION
按照本发明的一个方面,提供了一种应用于开发微服务节点的微服务开发方法,其特征在于,所述方法包括:部署微服务的运行实例;将所述开发微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器;以及发起对所述微服务的所述运行实例的测试。According to one aspect of the present invention, a microservice development method applied to the development of microservice nodes is provided, wherein the method includes: deploying a running instance of the microservice; converting the IP address of the development microservice node and the The microservice name of the deployed microservice is registered with the microservice registration server; and the test of the running instance of the microservice is initiated.
进一步地,在根据本发明的一个方面中,所述开发微服务节点的IP地址在所述微服务注册服务器上与所述微服务的微服务名相关联。Further, according to an aspect of the present invention, the IP address of the development microservice node is associated with the microservice name of the microservice on the microservice registration server.
进一步地,在根据本发明的一个方面中,所述微服务的所述运行实例是私有访问的。Further, in an aspect according to the present invention, the running instance of the microservice is privately accessed.
进一步地,在根据本发明的一个方面中,当发起对所述微服务的所述运行实例的测试时,所述开发微服务节点调用部署在公共微服务节点上的微服务的运行实例。Further, according to an aspect of the present invention, when a test of the running instance of the microservice is initiated, the development microservice node invokes the running instance of the microservice deployed on the public microservice node.
进一步地,在根据本发明的一个方面中,调用部署在公共微服务节点上的微服务的运行实例包括:所述开发微服务节点向所述微服务注册服务器查询所述测试所调用的微服务的微服务名。Further, according to an aspect of the present invention, invoking the running instance of the microservice deployed on the public microservice node includes: the development microservice node querying the microservice registration server for the microservice called by the test the microservice name.
进一步地,在根据本发明的一个方面中,所述开发微服务节点从所述微服务注册服务器获取与所述微服务名相关联的IP地址,其中所述IP地址包括所述公共微服务节点的IP地址。Further, according to an aspect of the present invention, the development microservice node obtains an IP address associated with the microservice name from the microservice registration server, wherein the IP address includes the public microservice node IP address.
进一步地,在根据本发明的一个方面中,所述开发微服务节点选择所述公共微服务节点的IP地址进行测试,以调用部署在公共微服务节点上的微服务的运行实例。Further, according to an aspect of the present invention, the development microservice node selects the IP address of the public microservice node for testing, so as to invoke the running instance of the microservice deployed on the public microservice node.
进一步地,在根据本发明的一个方面中,当所述IP地址还包括开发微服务节点的IP地址时,所述开发微服务节点优先选择所述开发微服务节点的IP地址来调用微服务的运行示例,以进行测试。Further, according to an aspect of the present invention, when the IP address also includes the IP address of the development microservice node, the development microservice node preferentially selects the IP address of the development microservice node to call the microservice. Run the example to test.
进一步地,在根据本发明的一个方面中,所述开发微服务节点是由一个或多个实体计算机组成的运算节点。Further, in an aspect according to the present invention, the development microservice node is a computing node composed of one or more entity computers.
进一步地,在根据本发明的一个方面中,所述方法在Spring Cloud微服务框架下运行。Further, according to one aspect of the present invention, the method runs under the Spring Cloud microservice framework.
按照本发明的还有一个方面,提供了一种应用于公共微服务节点的微服务开发方法,其特征在于,所述方法包括:部署微服务的运行实例,其中所述微服务的运行实例保持运行,以供其他节点测试;将所述公共微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器。According to another aspect of the present invention, a microservice development method applied to a public microservice node is provided, wherein the method includes: deploying a running instance of the microservice, wherein the running instance of the microservice keeps run for other nodes to test; register the IP address of the public microservice node and the microservice name of the deployed microservice with the microservice registration server.
进一步地,在根据本发明的还有一个方面中,所述公共微服务节点的IP地址在所述微服务注册服务器上与所述微服务的微服务名相关联。Further, according to another aspect of the present invention, the IP address of the public microservice node is associated with the microservice name of the microservice on the microservice registration server.
进一步地,在根据本发明的还有一个方面中,所述微服务的所述运行实例是公共可访问的。Further, in yet another aspect according to the present invention, the running instance of the microservice is publicly accessible.
进一步地,在根据本发明的还有一个方面中,所述公共微服务节点从所述微服务注册服务器获取与微服务名相关联的IP地址。Further, according to another aspect of the present invention, the public microservice node obtains the IP address associated with the microservice name from the microservice registration server.
进一步地,在根据本发明的还有一个方面中,所述公共微服务节点选择所获取的IP地址调用部署在其他节点上的微服务的运行实例。Further, according to another aspect of the present invention, the public microservice node selects the obtained IP address to invoke the running instance of the microservice deployed on other nodes.
进一步地,在根据本发明的还有一个方面中,所述公共微服务节点是由一个或多个实体计算机组成的运算节点。Further, in another aspect according to the present invention, the public microservice node is a computing node composed of one or more entity computers.
进一步地,在根据本发明的还有一个方面中,所述方法在Spring Cloud微服务框架下运行。Further, in another aspect according to the present invention, the method runs under the Spring Cloud microservice framework.
按照本发明的仍有一个方面,提供了一种应用于开发微服务节点的微服务开发系统,其特征在于,所述系统包括:部署模块,所述部署模块部署微服务的运行实例;注册模块,所述注册模块将所述开发微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器;以及测试模块,所述测试模块发起对所述微服务的所述运行实例的测试。According to still another aspect of the present invention, a micro-service development system for developing micro-service nodes is provided, wherein the system includes: a deployment module, the deployment module deploys a running instance of the micro-service; a registration module , the registration module registers the IP address of the development microservice node and the microservice name of the deployed microservice to the microservice registration server; and a test module, which initiates the operation of the microservice instance test.
进一步地,在根据本发明的仍有一个方面中,所述开发微服务节点的IP地址在所述微服务注册服务器上与所述微服务的微服务名相关联。Further, in still another aspect of the present invention, the IP address of the development microservice node is associated with the microservice name of the microservice on the microservice registration server.
进一步地,在根据本发明的仍有一个方面中,所述微服务的所述运行实例是私有访问的。Further, in still another aspect according to the present invention, the running instance of the microservice is accessed privately.
进一步地,在根据本发明的仍有一个方面中,当所述测试模块发起对所述微服务的所述运行实例的测试时,所述测试模块调用部署在公共微服务节点上的微服务的运行实例。Further, according to still another aspect of the present invention, when the test module initiates the test on the running instance of the microservice, the test module invokes the test module of the microservice deployed on the public microservice node. Run the instance.
进一步地,在根据本发明的仍有一个方面中,所述测试模块调用部署在公共微服务节点上的微服务的运行实例包括:所述注册模块向所述微服务注册服务器查询所述测试所调用的微服务的微服务名。Further, according to still another aspect of the present invention, the test module invoking the running instance of the microservice deployed on the public microservice node includes: the registration module queries the microservice registration server for the test service The microservice name of the called microservice.
进一步地,在根据本发明的仍有一个方面中,微服务开发系统获取与所述微服务名相关联的IP地址,其中所述IP地址包括所述公共微服务节点的IP地址。Further, according to still another aspect of the present invention, the microservice development system obtains the IP address associated with the microservice name, wherein the IP address includes the IP address of the public microservice node.
进一步地,在根据本发明的仍有一个方面中,所述测试模块选择所述公共微服务节点的IP地址进行测试,以调用部署在公共微服务节点上的微服务的运行 实例。Further, according to still another aspect of the present invention, the test module selects the IP address of the public microservice node for testing, so as to invoke the running instance of the microservice deployed on the public microservice node.
进一步地,在根据本发明的仍有一个方面中,当所述IP地址还包括开发微服务节点的IP地址时,所述测试模块优先选择所述开发微服务节点的IP地址来调用微服务的运行示例,以进行测试。Further, according to still another aspect of the present invention, when the IP address also includes the IP address of the development microservice node, the test module preferentially selects the IP address of the development microservice node to call the microservice. Run the example to test.
进一步地,在根据本发明的仍有一个方面中,所述开发微服务节点是由一个或多个实体计算机组成的运算节点。Further, in still another aspect of the present invention, the development microservice node is a computing node composed of one or more entity computers.
进一步地,在根据本发明的仍有一个方面中,所述系统在Spring Cloud微服务框架下运行。Further, in still another aspect according to the present invention, the system runs under the Spring Cloud microservice framework.
按照本发明的另外一个方面,提供了一种应用于公共微服务节点的微服务开发系统,其特征在于,所述系统包括:部署模块,所述部署模块部署微服务的运行实例,其中所述微服务的运行实例保持运行,以供其他节点测试;注册模块,所述注册模块将所述公共微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器。According to another aspect of the present invention, a microservice development system applied to a public microservice node is provided, wherein the system includes: a deployment module, the deployment module deploys a running instance of the microservice, wherein the The running instance of the microservice keeps running for other nodes to test; the registration module registers the IP address of the public microservice node and the microservice name of the deployed microservice with the microservice registration server.
进一步地,在根据本发明的另外一个方面中,所述公共微服务节点的IP地址在所述微服务注册服务器上与所述微服务的微服务名相关联。Further, according to another aspect of the present invention, the IP address of the public microservice node is associated with the microservice name of the microservice on the microservice registration server.
进一步地,在根据本发明的另外一个方面中,所述微服务的所述运行实例是公共可访问的。Further, in another aspect according to the present invention, the running instance of the microservice is publicly accessible.
进一步地,在根据本发明的另外一个方面中,所述系统从所述微服务注册服务器获取与微服务名相关联的IP地址。Further, according to another aspect of the present invention, the system obtains the IP address associated with the microservice name from the microservice registration server.
进一步地,在根据本发明的另外一个方面中,所述系统还包括调用模块,所述调用模块选择所获取的IP地址调用部署在其他节点上的微服务的运行实例。Further, according to another aspect of the present invention, the system further includes a calling module, the calling module selects the obtained IP address to call the running instance of the microservice deployed on other nodes.
进一步地,在根据本发明的另外一个方面中,所述公共微服务节点是由一个或多个实体计算机组成的运算节点。Further, according to another aspect of the present invention, the public microservice node is a computing node composed of one or more entity computers.
进一步地,在根据本发明的另外一个方面中,所述系统在Spring Cloud微服务框架下运行。Further, according to another aspect of the present invention, the system runs under the Spring Cloud microservice framework.
按照本发明的又一个方面,提供一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现根据本发明的一个方面的方法的步骤。According to yet another aspect of the present invention, there is provided a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing a computer program according to the present invention when the processor executes the program The steps of the method of the aspect.
按照本发明的再一个方面,提供一种记录介质,其上存储有计算机程序, 该程序被计算机执行以实现根据本发明的一个方面的方法的步骤。According to still another aspect of the present invention, there is provided a recording medium having stored thereon a computer program executed by a computer to implement the steps of the method according to an aspect of the present invention.
根据本发明的一个或多个实施例,可以对单个或多个微服务节点进行开发和调试,而无需同时启动整个微服务链路或与单个或多个微服务节点无关的其他微服务节点;According to one or more embodiments of the present invention, single or multiple microservice nodes can be developed and debugged without simultaneously starting the entire microservice link or other microservice nodes unrelated to the single or multiple microservice nodes;
根据本发明的一个或多个实施例,微服务节点可以通过调用其他微服务节点或者开发节点来实现路由选择,从而节省微服务节点资源。According to one or more embodiments of the present invention, a microservice node can implement routing selection by calling other microservice nodes or development nodes, thereby saving microservice node resources.
附图说明Description of drawings
图1示出了根据本发明的一个实施例的微服务开发的示意图100。Figure 1 shows a schematic diagram 100 of microservice development according to one embodiment of the present invention.
图2示出了根据本发明的另一个实施例的微服务开发的示意图200。FIG. 2 shows a schematic diagram 200 of microservice development according to another embodiment of the present invention.
图3示出了根据本发明的一个实施例的应用于开发微服务节点的微服务开发方法300。FIG. 3 shows a microservice development method 300 applied to develop a microservice node according to an embodiment of the present invention.
图4示出了根据本发明的一个实施例的应用于公共微服务节点的微服务开发方法400。FIG. 4 shows a microservice development method 400 applied to a public microservice node according to an embodiment of the present invention.
图5示出了根据本发明的一个实施例的应用于开发微服务节点的微服务开发系统500。FIG. 5 shows a microservice development system 500 applied to develop a microservice node according to an embodiment of the present invention.
图6示出了根据本发明的一个实施例的应用于公共微服务节点的微服务开发系统600。FIG. 6 shows a microservice development system 600 applied to a public microservice node according to an embodiment of the present invention.
图7是根据本发明的一个实施例的本文所述方法的计算机设备的示例框图700。7 is an example block diagram 700 of a computer device for the methods described herein, according to one embodiment of the present invention.
具体实施方式Detailed ways
以下将结合附图对本发明涉及的数据加解密方法、设备以及计算机介质作进一步的详细描述。需要注意的是,以下的具体实施方式是示例性而非限制的,其旨在提供对本发明的基本了解,并不旨在确认本发明的关键或决定性的要素或限定所要保护的范围。The data encryption and decryption method, device and computer medium involved in the present invention will be further described in detail below with reference to the accompanying drawings. It should be noted that the following specific embodiments are exemplary rather than limiting, and are intended to provide a basic understanding of the present invention, and are not intended to identify key or critical elements of the present invention or limit the scope of protection to be protected.
下文参考本发明实施例的方法和装置的框图说明、框图和/或流程图来描述本发明。将理解这些流程图说明和/或框图的每个框、以及流程图说明和/或框图的组合可以由计算机程序指令来实现。可以将这些计算机程序指令提供给通用计算机、专用计算机或其它可编程数据处理设备的处理器以构成机器,以便由计算机或其它可编程数据处理设备的处理器执行的这些指令创建用于实施这些流程 图和/或框和/或一个或多个流程框图中指定的功能/操作的部件。The present invention is described below with reference to block illustrations, block diagrams, and/or flow diagrams of methods and apparatuses of embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing device to constitute a machine so that execution of the instructions by the processor of the computer or other programmable data processing device creates a process for carrying out the processes Elements of the functions/operations specified in the figures and/or blocks and/or one or more flowchart diagrams.
可以将这些计算机程序指令存储在计算机可读存储器中,这些指令可以指示计算机或其它可编程处理器以特定方式实现功能,以便存储在计算机可读存储器中的这些指令构成包含实施流程图和/或框图的一个或多个框中指定的功能/操作的指令部件的制作产品。These computer program instructions may be stored in a computer readable memory, the instructions may instruct a computer or other programmable processor to perform functions in a particular manner, such that the instructions stored in the computer readable memory constitute the flowcharts and/or A manufactured product of the instruction components for the function/operation specified in one or more of the blocks of the block diagram.
可以将这些计算机程序指令加载到计算机或其它可编程数据处理器上以使一系列的操作步骤在计算机或其它可编程处理器上执行,以便构成计算机实现的进程,以使计算机或其它可编程数据处理器上执行的这些指令提供用于实施此流程图和/或框图的一个或多个框中指定的功能或操作的步骤。还应该注意在一些备选实现中,框中所示的功能/操作可以不按流程图所示的次序来发生。例如,依次示出的两个框实际可以基本同时地执行或这些框有时可以按逆序执行,具体取决于所涉及的功能/操作。These computer program instructions can be loaded on a computer or other programmable data processor to cause a series of operational steps to be performed on the computer or other programmable processor to constitute a computer-implemented process for causing the computer or other programmable data The instructions executing on the processor provide steps for implementing the functions or operations specified in one or more blocks of this flowchart and/or block diagram. It should also be noted that in some alternative implementations, the functions/operations noted in the blocks may occur out of the order noted in the flowcharts. For example, two blocks shown in succession may in fact be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality/operations involved.
如背景技术所述的,在现有对微服务的开发中,需要部署所有的微服务在测试节点上或者开发针对所有微服务的单元测试来完成对涉及多个微服务的开发。然而常规方法中的开发方法带来巨大的资源消耗并且难以调试。为了解决这个问题,本公开提出了一种微服务开发方法、系统以及计算机设备和介质。本发明所涉及的方法、设备以及计算机介质可以用于微服务链路中的公共微服务节点、微服务注册服务器以及开发微服务节点之间的微服务开发,其中通过将微服务调用路由到开发节点实现了有限的微服务启动,并且可以针对单个或数个微服务进行开发测试。As described in the background art, in the existing development of microservices, it is necessary to deploy all microservices on test nodes or develop unit tests for all microservices to complete the development involving multiple microservices. However, the development method in the conventional method brings huge resource consumption and is difficult to debug. To solve this problem, the present disclosure proposes a microservice development method, system, and computer device and medium. The method, device and computer medium involved in the present invention can be used for micro-service development between public micro-service nodes, micro-service registration servers and development micro-service nodes in a micro-service link. Nodes implement a limited number of microservice startups, and can be dev-tested against a single or several microservices.
图1示出了根据本发明的一个实施例的微服务开发的示意图100。如图1中所示,根据本发明的微服务开发方法可包括三方,分别为公共微服务节点101、微服务注册服务器102以及开发微服务节点103。如本领域技术人员可以理解的,在本发明中,节点服务器不一定为单个实体计算机,其可以是由一个或多个计算机、服务器或计算设备组成的运算节点。在运算节点上可以运行微服务的全部或部分的运行实例。公共微服务节点101为公共节点,其上部署有多个微服务110、120至N的运行实例(取决于公共微服务节点的运算能力)。在公共微服务节点101上运行的微服务的运行示例时公共的并且可以由远端的任何节点进行调用。相对地,开发微服务节点103为私有节点,其上运行有微服务110的运行实例, 该运行示例仅能由开发人员访问,并且由开发人员进行调试。微服务注册服务器为公共的服务注册服务器,其上可以注册微服务节点的IP地址以及微服务节点上部署的微服务的微服务名,并且在服务器上可以将微服务节点的IP地址与其上部署的微服务的微服务名相关联。相应地,微服务注册服务器也可以通过解析微服务的微服务名获取与其相关联的微服务节点的IP地址。Figure 1 shows a schematic diagram 100 of microservice development according to one embodiment of the present invention. As shown in FIG. 1 , the microservice development method according to the present invention may include three parties, namely a public microservice node 101 , a microservice registration server 102 and a development microservice node 103 . As can be understood by those skilled in the art, in the present invention, the node server is not necessarily a single entity computer, but may be a computing node composed of one or more computers, servers or computing devices. All or part of the running instance of the microservice can be run on the computing node. The public microservice node 101 is a public node on which multiple running instances of the microservices 110, 120 to N are deployed (depending on the computing capability of the public microservice node). The running instance of the microservice running on the public microservice node 101 is public and can be invoked by any remote node. In contrast, the development microservice node 103 is a private node on which a running instance of the microservice 110 runs, and the running instance can only be accessed and debugged by the developer. The microservice registration server is a public service registration server, on which the IP address of the microservice node and the microservice name of the microservice deployed on the microservice node can be registered, and the IP address of the microservice node can be deployed on the server. The microservice name associated with the microservice. Correspondingly, the microservice registration server can also obtain the IP address of the associated microservice node by parsing the microservice name of the microservice.
如上所述,在现有技术中,私有节点进行微服务调试时,需要将所有相关联的微服务部署在私有节点,即,开发微服务节点103上。这加大了私有节点的运算并且不适应于现代迭代式的软件开发。As described above, in the prior art, when a private node performs microservice debugging, all associated microservices need to be deployed on the private node, that is, the development microservice node 103 . This increases the computation of private nodes and is not suitable for modern iterative software development.
本公开提供了一种全新的微服务开发方法。方法可以在Spring Cloud微服务框架下运行。如图1中所示,开发微服务节点103仅部署了微服务110的运行实例,而公共微服务节点101取决于其运算能力可以部署有多个微服务120至N的运行实例。在方法的开始,公共微服务节点101以及开发微服务节点103分别将其IP地址以及所部署的微服务的微服务名注册到微服务注册服务器。在微服务的运行实例启动时,微服务的微服务名与部署该微服务的节点的IP地址将在微服务注册服务器上被注册,并被相关联为映射关系。换言之,在微服务注册服务器上,节点的IP地址以及节点上部署的微服务的微服务名被相关联。节点通过查询该微服务名可以获取部署有微服务名相关联的微服务的节点的地址。具体方式将在下文中介绍。The present disclosure provides a brand-new microservice development method. Methods can run under the Spring Cloud microservices framework. As shown in FIG. 1 , the development microservice node 103 deploys only the running instance of the microservice 110 , while the public microservice node 101 may deploy multiple running instances of the microservice 120 to N depending on its computing capability. At the beginning of the method, the public microservice node 101 and the development microservice node 103 respectively register their IP addresses and the microservice name of the deployed microservice with the microservice registration server. When the running instance of the microservice is started, the microservice name of the microservice and the IP address of the node where the microservice is deployed will be registered on the microservice registration server and associated as a mapping relationship. In other words, on the microservice registration server, the IP address of the node and the microservice name of the microservice deployed on the node are associated. The node can obtain the address of the node where the microservice associated with the microservice name is deployed by querying the microservice name. The specific method will be introduced below.
开发微服务节点103可以开始对微服务110的运行实例的测试。以示例的方式,对微服务110的运行实例的测试可能涉及调用微服务120的运行实例。在这种情况下,开发微服务节点103将在微服务注册服务器102上查询微服务120的微服务名。微服务注册服务器102解析微服务120的微服务名并找到在微服务注册服务器102上与微服务名相关联的IP地址,即,公共微服务节点的IP地址。开发微服务节点将定期从微服务注册服务器102上获取与微服务名相关联的节点的IP地址。开发微服务节点103选择所获取的公共微服务节点的IP地址调用公共微服务节点101上的微服务120的运行实例进行测试,从而避免了将微服务120的运行实例部署到本地开发微服务节点的工作。另外,远程调用公共微服务开发节点上的微服务的运行实例,可以实现多个私有开发微服务节点对微服务的共同开发和调用。通过并行的方式,提升微服务的运行实例的利用效率。The development microservice node 103 may begin testing the running instance of the microservice 110 . By way of example, testing of a running instance of microservice 110 may involve invoking a running instance of microservice 120 . In this case, the development microservice node 103 will query the microservice registration server 102 for the microservice name of the microservice 120. The microservice registration server 102 parses the microservice name of the microservice 120 and finds the IP address associated with the microservice name on the microservice registration server 102, ie, the IP address of the public microservice node. The development microservice node will periodically obtain the IP address of the node associated with the microservice name from the microservice registration server 102 . The development microservice node 103 selects the obtained IP address of the public microservice node to call the running instance of the microservice 120 on the public microservice node 101 for testing, thereby avoiding deploying the running instance of the microservice 120 to the local development microservice node work. In addition, remotely calling the running instance of the microservice on the public microservice development node can realize the joint development and invocation of the microservice by multiple private development microservice nodes. In parallel, the utilization efficiency of running instances of microservices is improved.
另外的,公共微服务节点103在有需要时也可以调用开发微服务节点101上的微服务的运行实例。以示例的方式,当开发微服务节点101调用公共微服务节点103的微服务120的运行实例时,微服务120的运行实例可能需要微服务110的运行实例的信息。因此公共微服务节点103将在微服务注册服务器102上查询微服务110的微服务名。公共微服务节点103从微服务注册服务器102获取与微服务110的微服务名相关联的IP地址,即,开发微服务节点101的IP地址。。公共微服务节点103选择该IP地址调用部署在开发微服务节点上的微服务110的运行实例,从而满足开发微服务节点101对公共微服务节点103上的微服务120的运行实例的调用,由此实现开发微服务节点对微服务的测试。In addition, the public microservice node 103 can also call the running instance of the microservice on the development microservice node 101 when necessary. By way of example, when the development microservice node 101 invokes the running instance of the microservice 120 of the public microservice node 103 , the running instance of the microservice 120 may need information of the running instance of the microservice 110 . Therefore, the public microservice node 103 will query the microservice name of the microservice 110 on the microservice registration server 102 . The public microservice node 103 obtains the IP address associated with the microservice name of the microservice 110 from the microservice registration server 102 , that is, the IP address of the development microservice node 101 . . The public microservice node 103 selects the IP address to call the running instance of the microservice 110 deployed on the development microservice node, so as to satisfy the development microservice node 101's call to the running instance of the microservice 120 on the public microservice node 103. This implementation develops the testing of the microservice by the microservice node.
图2示出了根据本发明的另一个实施例的微服务开发的示意图200。图2所述的微服务开发方法还可以进一步实现开发微服务节点对微服务的优选路由。与图1不同的是,如图2中所示,图2中的公共微服务节点201还部署有微服务210的运行实例,其他部分与图1相同。如上所述,当开发微服务节点203开始对微服务210的运行实例进行测试时,这可能涉及微服务220的运行实例。由此,在微服务的运行示例启动时,所述微服务的微服务名被注册到微服务注册服务器202上。微服务注册服务器202解析该微服务名并获取相关联的IP地址(公共微服务节点201的IP地址)。开发微服务节点203定期从微服务注册服务器202获取相关联的IP地址。开发微服务节点203选择公共微服务节点201的IP地址调用公共微服务节点201上的微服务220的运行实例。在微服务220的运行实例被调用时,其可能转而又涉及微服务210的运行示例。因此,开发微服务节点203在微服务注册服务器202上查询微服务210的微服务名。微服务注册服务器202解析微服务210的微服务名,在这种情况下,由于微服务210的运行实例部署同时部署在公共微服务节点201以及开发微服务节点203上,所以微服务210的微服务名与两个微服务节点的IP地址相关联。因此开发微服务节点203将获取两个或多个微服务节点的IP地址。在获取与微服务210的微服务名相关联的多个IP地址(例如,两个)后,微服务节点203将优先路由选择己方的IP地址(微服务节点203的IP地址),从而调用部署在本地开发微服务节点上的微服务210的运行实例,从而使得本地开发人员能够在本地的开发微服务节点203上调用微服务210的运行实例。FIG. 2 shows a schematic diagram 200 of microservice development according to another embodiment of the present invention. The microservice development method described in FIG. 2 can further realize the optimal routing of the microservice by the development microservice node. Different from FIG. 1 , as shown in FIG. 2 , the public microservice node 201 in FIG. 2 is also deployed with a running instance of the microservice 210 , and other parts are the same as those in FIG. 1 . As described above, when the development microservice node 203 begins testing the running instance of the microservice 210, this may involve the running instance of the microservice 220. Therefore, when the running example of the microservice is started, the microservice name of the microservice is registered on the microservice registration server 202 . The microservice registration server 202 resolves the microservice name and obtains the associated IP address (the IP address of the public microservice node 201). The development microservice node 203 periodically obtains the associated IP address from the microservice registration server 202 . The development microservice node 203 selects the IP address of the public microservice node 201 to call the running instance of the microservice 220 on the public microservice node 201 . When the running instance of microservice 220 is invoked, it may in turn involve the running instance of microservice 210 . Therefore, the development microservice node 203 queries the microservice registration server 202 for the microservice name of the microservice 210 . The microservice registration server 202 resolves the microservice name of the microservice 210. In this case, since the running instance of the microservice 210 is deployed on the public microservice node 201 and the development microservice node 203 at the same time, the microservice The service name is associated with the IP addresses of the two microservice nodes. Therefore, the development microservice node 203 will obtain the IP addresses of two or more microservice nodes. After obtaining multiple IP addresses (eg, two) associated with the microservice name of the microservice 210, the microservice node 203 will preferentially route to its own IP address (the IP address of the microservice node 203), thereby invoking the deployment The running instance of the microservice 210 on the local microservice node is developed, so that the local developer can call the running instance of the microservice 210 on the local development microservice node 203 .
图3示出了根据本发明的一个实施例的应用于开发微服务节点的微服务开发方法300。如图3中所示,所述方法包括三个步骤,步骤S301部署微服务的运行实例;步骤S302将所述开发微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器;以及步骤S303发起对所述微服务的所述运行实例的测试。FIG. 3 shows a microservice development method 300 applied to develop a microservice node according to an embodiment of the present invention. As shown in FIG. 3 , the method includes three steps. Step S301 deploys a running instance of the microservice; step S302 registers the IP address of the development microservice node and the microservice name of the deployed microservice to the microservice registering a server; and step S303 initiating a test on the running instance of the microservice.
在步骤S301中,开发微服务节点在其上部署微服务的运行实例。在此,可以部署一个或多个待测的微服务的运行实例,而无需将所有相关的微服务的运行实例均部署在开发微服务节点上。在开发微服务节点上的微服务的运行示例是私有的,其由所开发人员访问。In step S301, the development microservice node deploys a running instance of the microservice thereon. Here, one or more running instances of the microservice to be tested can be deployed without deploying all the running instances of the related microservices on the development microservice node. The running instance of the microservice on the development microservice node is private and accessible by the developer.
在步骤S302中,开发微服务节点将其IP地址以及在其上所部署的微服务的微服务名注册到微服务注册服务器。在微服务的运行实例启动时,微服务的微服务名与部署该微服务的节点的IP地址将在微服务注册服务器上被注册,并被相关联为映射关系。开发微服务节点在微服务注册服务器上查询微服务名,然后微服务注册服务器可以解析该微服务名,获取该微服务名所属的微服务在哪些IP地址上得到了部署。In step S302, the development microservice node registers its IP address and the microservice name of the microservice deployed on it with the microservice registration server. When the running instance of the microservice is started, the microservice name of the microservice and the IP address of the node where the microservice is deployed will be registered on the microservice registration server and associated as a mapping relationship. The development microservice node queries the microservice name on the microservice registration server, and then the microservice registration server can parse the microservice name and obtain the IP addresses on which the microservice to which the microservice name belongs is deployed.
在步骤S303中,开发微服务节点将发起对所部署的微服务的所述运行实例的测试。对所部署的微服务的所述运行实例的测试可能涉及没有部署在开发微服务节点上的微服务的运行示例。在这种情况下,开发微服务节点将调用部署在公共微服务节点上的微服务的运行实例。In step S303, the development microservice node will initiate a test on the running instance of the deployed microservice. The testing of the running instance of the deployed microservice may involve a running instance of the microservice that is not deployed on the development microservice node. In this case, the development microservice node will invoke the running instance of the microservice deployed on the public microservice node.
调用方式具体包括,开发微服务节点将测试所调用的微服务的微服务名注册到微服务注册服务器。微服务注册服务器将解析该微服务名并获得与该微服务名相关联的IP地址,即部署有多个微服务的运行实例的公共微服务节点的IP地址。开发微服务节点将定期从微服务注册服务器获取相关联的IP地址(例如,公共微服务节点的IP地址),由此开发微服务节点选择公共微服务节点的IP地址调用部署在公共微服务节点上的微服务的运行实例,从而实现对微服务的运行示例的测试。The invocation method specifically includes that the development microservice node registers the microservice name of the microservice called by the test with the microservice registration server. The microservice registration server will resolve the microservice name and obtain the IP address associated with the microservice name, that is, the IP address of the public microservice node where the running instances of multiple microservices are deployed. The development microservice node will periodically obtain the associated IP address (for example, the IP address of the public microservice node) from the microservice registration server, so the development microservice node selects the IP address of the public microservice node to call and deploy it on the public microservice node The running instance of the microservice on the server, so as to realize the test of the running example of the microservice.
另外,当微服务注册服务器解析微服务名后发现微服务名关联有多个IP地址,则开发微服务节点将获取所述多个IP地址。在多个IP地址包括所述开发微服务节点的IP地址的情况下,所述开发微服务节点将优先选择所述开发微服务 节点的IP地址来调用微服务的运行示例,以进行测试。In addition, when the microservice registration server parses the microservice name and finds that the microservice name is associated with multiple IP addresses, the development microservice node will obtain the multiple IP addresses. In the case where multiple IP addresses include the IP address of the development microservice node, the development microservice node will preferentially select the IP address of the development microservice node to call the running example of the microservice for testing.
通过这种方式,不需要将所有微服务的运行示例均部署在开发微服务节点上,同时通过公共可访问的微服务的运行示例,可以实现多个开发微服务节点对微服务的运行示例的并行调用和开发。根据本发明的方法在Spring Cloud微服务框架下运行。In this way, it is not necessary to deploy all the running examples of microservices on the development microservice nodes, and at the same time, through the running examples of publicly accessible microservices, multiple development microservice nodes can realize the running examples of microservices. Invoke and develop in parallel. The method according to the present invention operates under the Spring Cloud microservice framework.
图4示出了根据本发明的一个实施例的应用于公共微服务节点的微服务开发方法400。如图4中所示,所述方法包括两个步骤,步骤S401部署微服务的运行实例,其中所述微服务的运行实例保持运行,以供其他节点测试;步骤S402将所述公共微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器。FIG. 4 shows a microservice development method 400 applied to a public microservice node according to an embodiment of the present invention. As shown in Figure 4, the method includes two steps, step S401 deploys a running instance of the microservice, wherein the running instance of the microservice keeps running for other nodes to test; step S402 deploys the public microservice node The IP address and the microservice name of the deployed microservice are registered with the microservice registration server.
在步骤S401中,公共微服务节点在其上部署多个微服务的运行实例,具体部署的数量可以取决于公共微服务节点的运算能力。由此,公共微服务节点成为公共的微服务的运行示例的运行池。其他节点可以从该公共的池中调用所需的微服务的运行示例,其中的微服务的所述运行实例是公共可访问的。In step S401, the public microservice node deploys a plurality of running instances of the microservice thereon, and the specific deployment quantity may depend on the computing capability of the public microservice node. Thus, the public microservice node becomes the running pool of the running examples of the public microservice. Other nodes can invoke the required running instance of the microservice from the common pool, wherein the running instance of the microservice is publicly accessible.
在步骤S402中,公共微服务节点将其IP地址以及在其上所部署的微服务的微服务名注册到微服务注册服务器。公共微服务节点的IP地址在所述微服务注册服务器上与在其上所部署的微服务的微服务名相关联。In step S402, the public microservice node registers its IP address and the microservice name of the microservice deployed on it with the microservice registration server. The IP address of the public microservice node is associated with the microservice name of the microservice deployed thereon on the microservice registration server.
在另外的微服务节点调用公共微服务节点上的微服务的运行实例时,公共微服务节点上的微服务的运行示例可能涉及其他微服务的运行实例。在这种情况下,公共微服务节点可以调用其他微服务的运行实例。具体的调用方式与方法300中的调用方式类似。When another microservice node invokes the running instance of the microservice on the public microservice node, the running instance of the microservice on the public microservice node may involve running instances of other microservices. In this case, public microservice nodes can call running instances of other microservices. The specific calling method is similar to the calling method in method 300 .
图5示出了根据本发明的一个实施例的应用于开发微服务节点的微服务开发系统500。如图5中所示,所述方法包括三个模块,部署模块501,所述部署模块501部署微服务的运行实例;注册模块502,所述注册模块502将所述开发微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器;以及测试模块503,所述测试模块503发起对所述微服务的所述运行实例的测试。FIG. 5 shows a microservice development system 500 applied to develop a microservice node according to an embodiment of the present invention. As shown in FIG. 5, the method includes three modules, a deployment module 501, which deploys a running instance of a microservice; a registration module 502, which registers the IP address of the development microservice node and the microservice name of the deployed microservice is registered with the microservice registration server; and a test module 503, the test module 503 initiates a test on the running instance of the microservice.
部署模块501在其上部署微服务的运行实例。在此,可以部署一个或多个待测的微服务的运行实例,而无需将所有相关的微服务的运行实例均部署在开发微服务节点上。在开发微服务节点上的微服务的运行示例是私有的,其由所开发 人员访问。The deployment module 501 deploys a running instance of the microservice thereon. Here, one or more running instances of the microservice to be tested can be deployed without deploying all the running instances of the related microservices on the development microservice node. The running instance of the microservice on the development microservice node is private and accessible by the developer.
注册模块502将其IP地址以及在其上所部署的微服务的微服务名注册到微服务注册服务器。在微服务注册服务器上,IP地址将与微服务名相关联。开发微服务节点在微服务注册服务器上查询微服务名,然后微服务注册服务器可以解析该微服务名,得到该微服务名所属的微服务在哪些IP地址上得到了部署。The registration module 502 registers its IP address and the microservice name of the microservice deployed thereon with the microservice registration server. On the microservice registry server, the IP address will be associated with the microservice name. The development microservice node queries the microservice name on the microservice registration server, and then the microservice registration server can parse the microservice name to obtain the IP addresses on which the microservice to which the microservice name belongs is deployed.
测试模块503将发起对所部署的微服务的所述运行实例的测试。对所部署的微服务的所述运行实例的测试可能涉及没有部署在开发微服务节点上的微服务的运行示例。在这种情况下,开发微服务节点将调用部署在公共微服务节点上的微服务的运行实例。The testing module 503 will initiate testing of the running instance of the deployed microservice. The testing of the running instance of the deployed microservice may involve a running instance of the microservice that is not deployed on the development microservice node. In this case, the development microservice node will invoke the running instance of the microservice deployed on the public microservice node.
可选地,系统500还可以执行对微服务的调用。调用方式具体包括,注册模块502将测试所调用的微服务的微服务名注册到微服务注册服务器。微服务注册服务器将解析该微服务名并获得与该微服务名相关联的IP地址,即部署有多个微服务的运行实例的公共微服务节点的IP地址。系统500从微服务注册服务器获取相关联的IP地址,即公共微服务节点的IP地址。测试模块503选择公共微服务节点的IP地址调用部署在公共微服务节点上的微服务的运行实例,从而实现对微服务的运行示例的测试。Optionally, system 500 can also perform calls to microservices. The calling method specifically includes that the registration module 502 registers the microservice name of the microservice called by the test with the microservice registration server. The microservice registration server will resolve the microservice name and obtain the IP address associated with the microservice name, that is, the IP address of the public microservice node where the running instances of multiple microservices are deployed. The system 500 obtains the associated IP address, that is, the IP address of the public microservice node, from the microservice registration server. The testing module 503 selects the IP address of the public microservice node to call the running instance of the microservice deployed on the public microservice node, so as to test the running instance of the microservice.
另外,当微服务注册服务器解析微服务名后发现微服务名关联有多个IP地址,则系统500从微服务注册服务器获取所述多个IP地址。在多个IP地址包括所述开发微服务节点的IP地址的情况下,测试模块503将优先选择所述开发微服务节点的IP地址来调用微服务的运行示例,以进行测试。In addition, when the microservice registration server parses the microservice name and finds that the microservice name is associated with multiple IP addresses, the system 500 obtains the multiple IP addresses from the microservice registration server. In the case where the multiple IP addresses include the IP address of the development microservice node, the testing module 503 will preferentially select the IP address of the development microservice node to call the running example of the microservice for testing.
通过这种方式,不需要将所有微服务的运行示例均部署在开发微服务节点上,同时通过公共可访问的微服务的运行示例,可以实现多个开发微服务节点对微服务的运行示例的并行调用和开发。根据本发明的方法在Spring Cloud微服务框架下运行。In this way, it is not necessary to deploy all the running examples of microservices on the development microservice nodes, and at the same time, through the running examples of publicly accessible microservices, multiple development microservice nodes can realize the running examples of microservices. Invoke and develop in parallel. The method according to the present invention operates under the Spring Cloud microservice framework.
图6示出了根据本发明的一个实施例的应用于公共微服务节点的微服务开发系统600。如图6中所示,所述方法包括两个模块,部署模块601,所述部署模块601部署微服务的运行实例,其中所述微服务的运行实例保持运行,以供其他节点测试;注册模块602,所述注册模块602将所述公共微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器。FIG. 6 shows a microservice development system 600 applied to a public microservice node according to an embodiment of the present invention. As shown in FIG. 6, the method includes two modules, a deployment module 601, which deploys a running instance of a microservice, wherein the running instance of the microservice keeps running for other nodes to test; a registration module 602, the registration module 602 registers the IP address of the public microservice node and the microservice name of the deployed microservice with the microservice registration server.
部署模块601在其上部署多个微服务的运行实例,具体部署的数量可以取决于公共微服务节点的运算能力。由此,公共微服务节点成为公共的微服务的运行示例的运行池。其他节点可以从该公共的池中调用所需的微服务的运行示例,其中的微服务的所述运行实例是公共可访问的。The deployment module 601 deploys a plurality of running instances of microservices thereon, and the specific deployment quantity may depend on the computing capability of the public microservice nodes. Thus, the public microservice node becomes the running pool of the running examples of the public microservice. Other nodes can invoke the required running instance of the microservice from the common pool, wherein the running instance of the microservice is publicly accessible.
注册模块602将其IP地址以及在其上所部署的微服务的微服务名注册到微服务注册服务器。公共微服务节点的IP地址在所述微服务注册服务器上与在其上所部署的微服务的微服务名相关联。The registration module 602 registers its IP address and the microservice name of the microservice deployed thereon with the microservice registration server. The IP address of the public microservice node is associated with the microservice name of the microservice deployed thereon on the microservice registration server.
在另外的微服务节点调用公共微服务节点上的微服务的运行实例时,公共微服务节点上的微服务的运行示例可能涉及其他微服务的运行实例。可选地,在这种情况下,系统600可以调用其他微服务的运行实例。具体而言,系统可以从微服务注册服务器获取IP地址,从而选择该IP地址进行调用。具体方式与系统500中的方式类似。When another microservice node invokes the running instance of the microservice on the public microservice node, the running instance of the microservice on the public microservice node may involve running instances of other microservices. Optionally, in this case, system 600 may invoke running instances of other microservices. Specifically, the system can obtain the IP address from the microservice registration server, so as to select the IP address for invocation. The specific manner is similar to that in the system 500 .
虽然在此之前对微服务开发的方法和系统的实施例进行了说明,但是本发明不限定于这些实施例,也可以将本发明实施为以下方式:用于执行上述方法的计算机设备或者用于执行上述方法的计算机程序的方式或者用于实现上述装置的功能的计算机程序的方式或者记录有该计算机程序的计算机可读取的记录介质的方式。Although the embodiments of the method and system for microservice development have been described above, the present invention is not limited to these embodiments, and the present invention can also be implemented in the following manner: a computer device for executing the above method or a The form of a computer program for executing the above-described method, the form of a computer program for realizing the functions of the above-described apparatus, or the form of a computer-readable recording medium on which the computer program is recorded.
在图7中示出了根据本发明的一个实施例的用于如上所述的一种数据加解密方法的计算机设备。如图7中所示,计算机设备700包括存储器701和处理器702。虽然未图示,但是计算机设备700还包括存储在存储器701上并可在处理器702上运行的计算机程序。所述处理器执行所述程序时同时实现图1、图2、图3和图4所示的步骤。FIG. 7 shows a computer device for the above-mentioned data encryption and decryption method according to an embodiment of the present invention. As shown in FIG. 7 , computer device 700 includes memory 701 and processor 702 . Although not shown, computer device 700 also includes a computer program stored on memory 701 and executable on processor 702 . When the processor executes the program, the steps shown in FIG. 1 , FIG. 2 , FIG. 3 and FIG. 4 are simultaneously implemented.
另外,如上所述,本发明也可以被实施为一种记录介质,在其中存储有用于使计算机执行如上所述的数据加解密方法的程序。In addition, as described above, the present invention can also be implemented as a recording medium in which a program for causing a computer to execute the data encryption/decryption method as described above is stored.
在此,作为记录介质,能采用盘类(例如,磁盘、光盘等)、卡类(例如,存储卡、光卡等)、半导体存储器类(例如,ROM、非易失性存储器等)、带类(例如,磁带、盒式磁带等)等各种方式的记录介质。Here, as the recording medium, disks (for example, magnetic disks, optical disks, etc.), cards (for example, memory cards, optical cards, etc.), semiconductor memories (for example, ROM, nonvolatile memory, etc.), tapes, etc., can be used. Types (eg, magnetic tapes, cassette tapes, etc.) and other recording media.
通过在这些记录介质中记录使计算机执行上述实施例中的数据加解密方法的计算机程序或使计算机实现上述实施例中的数据加解密方法的功能的计算 机程序并使其流通,从而能使成本的低廉化以及可携带性、通用性提高。By recording and distributing a computer program for causing a computer to execute the data encryption/decryption method in the above-described embodiment or a computer program for causing a computer to realize the function of the data encryption/decryption method in the above-described embodiment in these recording media, it is possible to reduce costs. Low cost and improved portability and versatility.
而且,在计算机上装载上述记录介质,由计算机读出在记录介质中记录的计算机程序并储存在存储器中,计算机所具备的处理器(CPU:Central Processing Unit(中央处理单元)、MPU:Micro Processing Unit(微处理单元))从存储器读出该计算机程序并执行,由此,能执行上述实施例中的数据遮掩、还原方法并能实现上述实施例中的数据遮掩、还原方法的装置的功能。Moreover, the above-mentioned recording medium is loaded on the computer, the computer program recorded in the recording medium is read out by the computer and stored in the memory, the processors (CPU: Central Processing Unit), MPU: Micro Processing Unit (microprocessing unit) reads the computer program from the memory and executes it, thereby executing the data masking and restoring method in the above-mentioned embodiment and realizing the functions of the device of the data masking and restoring method in the above-mentioned embodiment.
本领域普通技术人员应当了解,本发明不限定于上述的实施例,本发明可以在不偏离其主旨与范围内以许多其它的形式实施。因此,所展示的示例与实施例被视为示意性的而非限制性的,在不脱离如所附各权利要求所定义的本发明精神及范围的情况下,本发明可能涵盖各种的修改与替换。It should be understood by those skilled in the art that the present invention is not limited to the above-described embodiments, and the present invention may be embodied in many other forms without departing from the spirit and scope thereof. Accordingly, the examples and embodiments shown are to be regarded as illustrative rather than restrictive, and various modifications are possible within the present invention without departing from the spirit and scope of the invention as defined by the appended claims. with replacement.

Claims (36)

  1. 一种应用于开发微服务节点的微服务开发方法,其特征在于,所述方法包括:部署微服务的运行实例;A microservice development method applied to the development of microservice nodes, characterized in that the method comprises: deploying a running instance of the microservice;
    将所述开发微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器;以及registering the IP address of the development microservice node and the microservice name of the deployed microservice with the microservice registration server; and
    发起对所述微服务的所述运行实例的测试。A test of the running instance of the microservice is initiated.
  2. 根据权利要求1所述的用于开发微服务节点的微服务开发方法,其中所述开发微服务节点的IP地址在所述微服务注册服务器上与所述微服务的微服务名相关联。The microservice development method for developing a microservice node according to claim 1, wherein the IP address of the development microservice node is associated with the microservice name of the microservice on the microservice registration server.
  3. 根据权利要求2所述的用于开发微服务节点的微服务开发方法,其中所述微服务的所述运行实例是私有访问的。The microservice development method for developing a microservice node according to claim 2, wherein the running instance of the microservice is privately accessed.
  4. 根据权利要求3所述的用于开发微服务节点的微服务开发方法,其中当发起对所述微服务的所述运行实例的测试时,所述开发微服务节点调用部署在公共微服务节点上的微服务的运行实例。The microservice development method for developing a microservice node according to claim 3, wherein when a test of the running instance of the microservice is initiated, the development microservice node calls and deploys on a public microservice node A running instance of the microservice.
  5. 根据权利要求4所述的用于开发微服务节点的微服务开发方法,其中调用部署在公共微服务节点上的微服务的运行实例包括:所述开发微服务节点向所述微服务注册服务器查询所述测试所调用的微服务的微服务名。The microservice development method for developing a microservice node according to claim 4, wherein invoking the running instance of the microservice deployed on the public microservice node comprises: the development microservice node queries the microservice registration server The microservice name of the microservice called by the test.
  6. 根据权利要求5所述的用于开发微服务节点的微服务开发方法,其中所述开发微服务节点从所述微服务注册服务器获取与所述微服务名相关联的IP地址,其中所述IP地址包括所述公共微服务节点的IP地址。The microservice development method for developing a microservice node according to claim 5, wherein the development microservice node obtains an IP address associated with the microservice name from the microservice registration server, wherein the IP The address includes the IP address of the public microservice node.
  7. 根据权利要求6所述的用于开发微服务节点的微服务开发方法,其中所述开发微服务节点选择所述公共微服务节点的IP地址进行测试,以调用部署在公共微服务节点上的微服务的运行实例。The microservice development method for developing microservice nodes according to claim 6, wherein the development microservice node selects the IP address of the public microservice node for testing, so as to call the microservices deployed on the public microservice node A running instance of the service.
  8. 根据权利要求6所述的用于开发微服务节点的微服务开发方法,其中当所述IP地址还包括开发微服务节点的IP地址时,所述开发微服务节点优先选择所述开发微服务节点的IP地址来调用微服务的运行示例,以进行测试。The microservice development method for developing a microservice node according to claim 6, wherein when the IP address further includes the IP address of the development microservice node, the development microservice node preferentially selects the development microservice node The IP address to call the running example of the microservice for testing.
  9. 根据权利要求8所述的用于开发微服务节点的微服务开发方法,其中所述开发微服务节点是由一个或多个实体计算机组成的运算节点。The microservice development method for developing a microservice node according to claim 8, wherein the development microservice node is a computing node composed of one or more entity computers.
  10. 根据权利要求1-9中任一项所述的微服务开发方法,其中所述方法在Spring Cloud微服务框架下运行。The microservice development method according to any one of claims 1-9, wherein the method runs under the Spring Cloud microservice framework.
  11. 一种应用于公共微服务节点的微服务开发方法,其特征在于,所述方法包括:部署微服务的运行实例,其中所述微服务的运行实例保持运行,以供其他节点测试;A microservice development method applied to a public microservice node, characterized in that the method comprises: deploying a running instance of the microservice, wherein the running instance of the microservice keeps running for other nodes to test;
    将所述公共微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器。Register the IP address of the public microservice node and the microservice name of the deployed microservice with the microservice registration server.
  12. 根据权利要求11所述的用于公共微服务节点的微服务开发方法,其中所述公共微服务节点的IP地址在所述微服务注册服务器上与所述微服务的微服务名相关联。The microservice development method for a public microservice node according to claim 11, wherein the IP address of the public microservice node is associated with the microservice name of the microservice on the microservice registration server.
  13. 根据权利要求12所述的用于公共微服务节点的微服务开发方法,其中所述微服务的所述运行实例是公共可访问的。The microservice development method for a public microservice node according to claim 12, wherein the running instance of the microservice is publicly accessible.
  14. 根据权利要求13所述的用于公共微服务节点的微服务开发方法,其中所述公共微服务节点从所述微服务注册服务器获取与微服务名相关联的IP地址。The microservice development method for a public microservice node according to claim 13, wherein the public microservice node obtains the IP address associated with the microservice name from the microservice registration server.
  15. 根据权利要求14所述的用于公共微服务节点的微服务开发方法,其中所述公共微服务节点选择所获取的IP地址调用部署在其他节点上的微服务的运行实例。The microservice development method for a public microservice node according to claim 14, wherein the public microservice node selects the acquired IP address to invoke the running instance of the microservice deployed on other nodes.
  16. 根据权利要求15所述的用于公共微服务节点的微服务开发方法,其中所述公共微服务节点是由一个或多个实体计算机组成的运算节点。The microservice development method for a public microservice node according to claim 15, wherein the public microservice node is a computing node composed of one or more entity computers.
  17. 根据权利要求11-16中任一项所述的微服务开发方法,其中所述方法在Spring Cloud微服务框架下运行。The microservice development method according to any one of claims 11-16, wherein the method runs under the Spring Cloud microservice framework.
  18. 一种应用于开发微服务节点的微服务开发系统,其特征在于,所述系统包括:部署模块,所述部署模块部署微服务的运行实例;A micro-service development system applied to the development of micro-service nodes, characterized in that the system comprises: a deployment module, wherein the deployment module deploys a running instance of the micro-service;
    注册模块,所述注册模块将所述开发微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器;以及a registration module, which registers the IP address of the development microservice node and the microservice name of the deployed microservice to the microservice registration server; and
    测试模块,所述测试模块发起对所述微服务的所述运行实例的测试。A test module, the test module initiates a test of the running instance of the microservice.
  19. 根据权利要求18所述的用于开发微服务节点的微服务开发系统,其中所述开发微服务节点的IP地址在所述微服务注册服务器上与所述微服务的微服务名相 关联。The microservice development system for developing a microservice node according to claim 18, wherein the IP address of the development microservice node is associated with the microservice name of the microservice on the microservice registration server.
  20. 根据权利要求19所述的用于开发微服务节点的微服务开发系统,其中所述微服务的所述运行实例是私有访问的。The microservice development system for developing microservice nodes according to claim 19, wherein the running instance of the microservice is privately accessed.
  21. 根据权利要求20所述的用于开发微服务节点的微服务开发系统,其中当所述测试模块发起对所述微服务的所述运行实例的测试时,所述测试模块调用部署在公共微服务节点上的微服务的运行实例。The microservice development system for developing microservice nodes according to claim 20, wherein when the test module initiates a test on the running instance of the microservice, the test module invokes the deployment in the public microservice A running instance of the microservice on the node.
  22. 根据权利要求21所述的用于开发微服务节点的微服务开发系统,其中所述测试模块调用部署在公共微服务节点上的微服务的运行实例包括,所述注册模块向所述微服务注册服务器查询所述测试所调用的微服务的微服务名。The microservice development system for developing microservice nodes according to claim 21, wherein the test module invoking the running instance of the microservice deployed on the public microservice node comprises that the registration module registers with the microservice The server queries the microservice name of the microservice called by the test.
  23. 根据权利要求22所述的用于开发微服务节点的微服务开发系统,其中所述注册模块从所述微服务注册服务器获取与所述微服务名相关联的IP地址,其中所述IP地址包括所述公共微服务节点的IP地址。The microservice development system for developing microservice nodes according to claim 22, wherein the registration module obtains an IP address associated with the microservice name from the microservice registration server, wherein the IP address includes The IP address of the public microservice node.
  24. 根据权利要求23所述的用于开发微服务节点的微服务开发系统,其中所述测试模块选择所述公共微服务节点的IP地址进行测试,以调用部署在公共微服务节点上的微服务的运行实例。The microservice development system for developing microservice nodes according to claim 23, wherein the test module selects the IP address of the public microservice node for testing, so as to call the microservices deployed on the public microservice node. Run the instance.
  25. 根据权利要求23所述的用于开发微服务节点的微服务开发系统,其中当所述IP地址还包括开发微服务节点的IP地址时,所述测试模块优先选择所述开发微服务节点的IP地址来调用微服务的运行示例,以进行测试。The microservice development system for developing microservice nodes according to claim 23, wherein when the IP address further includes the IP address of the development microservice node, the test module preferentially selects the IP of the development microservice node address to call the running example of the microservice for testing.
  26. 根据权利要求25所述的用于开发微服务节点的微服务开发系统,其中所述开发微服务节点是由一个或多个实体计算机组成的运算节点。The microservice development system for developing microservice nodes according to claim 25, wherein the development microservice nodes are computing nodes composed of one or more entity computers.
  27. 根据权利要求18-26中任一项所述的微服务开发系统,其中所述系统在Spring Cloud微服务框架下运行。The microservice development system according to any one of claims 18-26, wherein the system runs under the Spring Cloud microservice framework.
  28. 一种应用于公共微服务节点的微服务开发系统,其特征在于,所述系统包括:部署模块,所述部署模块部署微服务的运行实例,其中所述微服务的运行实例保持运行,以供其他节点测试;A microservice development system applied to a public microservice node, characterized in that the system comprises: a deployment module, the deployment module deploys a running instance of the microservice, wherein the running instance of the microservice keeps running for the purpose of Other node tests;
    注册模块,所述注册模块将所述公共微服务节点的IP地址以及所部署的微服务的微服务名注册到微服务注册服务器。A registration module, which registers the IP address of the public microservice node and the microservice name of the deployed microservice with the microservice registration server.
  29. 根据权利要求28所述的用于公共微服务节点的微服务开发系统,其中所述公共微服务节点的IP地址在所述微服务注册服务器上与所述微服务的微服务名相 关联。The microservice development system for a public microservice node according to claim 28, wherein the IP address of the public microservice node is associated with the microservice name of the microservice on the microservice registration server.
  30. 根据权利要求29所述的用于公共微服务节点的微服务开发系统,其中所述微服务的所述运行实例是公共可访问的。The microservice development system for a public microservice node of claim 29, wherein the running instance of the microservice is publicly accessible.
  31. 根据权利要求30所述的用于公共微服务节点的微服务开发系统,其中所述注册模块从所述微服务注册服务器获取与微服务名相关联的IP地址。The microservice development system for a public microservice node according to claim 30, wherein the registration module obtains the IP address associated with the microservice name from the microservice registration server.
  32. 根据权利要求31所述的用于公共微服务节点的微服务开发系统,其中所述系统选择所获取的IP地址调用部署在其他节点上的微服务的运行实例。The microservice development system for a public microservice node according to claim 31, wherein the system selects the acquired IP address to invoke the running instance of the microservice deployed on other nodes.
  33. 根据权利要求32所述的用于公共微服务节点的微服务开发系统,其中所述公共微服务节点是由一个或多个实体计算机组成的运算节点。The microservice development system for a public microservice node according to claim 32, wherein the public microservice node is a computing node composed of one or more entity computers.
  34. 根据权利要求28-33中任一项所述的微服务开发系统,其中所述系统在Spring Cloud微服务框架下运行。The microservice development system of any one of claims 28-33, wherein the system runs under the Spring Cloud microservices framework.
  35. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现根据权利要求1至17中任一项所述的方法的步骤。A computer device, comprising a memory, a processor and a computer program stored in the memory and running on the processor, characterized in that, when the processor executes the program, any one of claims 1 to 17 is realized when the processor executes the program. the steps of the method.
  36. 一种记录介质,其上存储有计算机程序,其特征在于,该程序被计算机执行以实现根据权利要求1至17中任一项所述的方法的步骤。A recording medium on which a computer program is stored, characterized in that the program is executed by a computer to implement the steps of the method according to any one of claims 1 to 17.
PCT/CN2022/079551 2021-03-16 2022-03-07 Microservice development method and system, and computer device and medium WO2022193979A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110280004.XA CN115086412A (en) 2021-03-16 2021-03-16 Micro-service development method, system, computer equipment and medium
CN202110280004.X 2021-03-16

Publications (1)

Publication Number Publication Date
WO2022193979A1 true WO2022193979A1 (en) 2022-09-22

Family

ID=83246348

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/079551 WO2022193979A1 (en) 2021-03-16 2022-03-07 Microservice development method and system, and computer device and medium

Country Status (2)

Country Link
CN (1) CN115086412A (en)
WO (1) WO2022193979A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107979508A (en) * 2017-11-24 2018-05-01 深圳乐信软件技术有限公司 Micro services test method and device
US20180198845A1 (en) * 2017-01-09 2018-07-12 International Business Machines Corporation Local Microservice Development for Remote Deployment
CN110324209A (en) * 2019-08-02 2019-10-11 泰康保险集团股份有限公司 Micro services system monitoring method, apparatus, electronic equipment and computer-readable medium
CN111782520A (en) * 2020-06-29 2020-10-16 中国工商银行股份有限公司 Test method and device and electronic equipment
CN111782519A (en) * 2020-06-29 2020-10-16 中国工商银行股份有限公司 Test method and device and electronic equipment
CN111782518A (en) * 2020-06-29 2020-10-16 中国工商银行股份有限公司 Test method and device and electronic equipment
US20200401457A1 (en) * 2019-06-18 2020-12-24 Nutanix, Inc. Deploying microservices into virtualized computing systems

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102847A (en) * 2016-02-23 2017-08-29 中国水电工程顾问集团有限公司 Software development methodology, apparatus and system based on micro services
CN110636093B (en) * 2018-06-25 2022-04-26 中兴通讯股份有限公司 Microservice registration and discovery method, microservice registration and discovery device, storage medium and microservice system
CN111490890A (en) * 2019-01-28 2020-08-04 珠海格力电器股份有限公司 Hierarchical registration method, device, storage medium and equipment based on micro-service architecture
CN110134455A (en) * 2019-04-12 2019-08-16 平安医疗健康管理股份有限公司 A kind of application management system and method
CN110647469B (en) * 2019-09-24 2023-09-08 广州荔支网络技术有限公司 Micro-service testing method and device, computer equipment and storage medium
CN112463211A (en) * 2020-07-28 2021-03-09 上海汇招信息技术有限公司 System architecture transformation method compatible with multiple development architectures and system architecture

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180198845A1 (en) * 2017-01-09 2018-07-12 International Business Machines Corporation Local Microservice Development for Remote Deployment
CN107979508A (en) * 2017-11-24 2018-05-01 深圳乐信软件技术有限公司 Micro services test method and device
US20200401457A1 (en) * 2019-06-18 2020-12-24 Nutanix, Inc. Deploying microservices into virtualized computing systems
CN110324209A (en) * 2019-08-02 2019-10-11 泰康保险集团股份有限公司 Micro services system monitoring method, apparatus, electronic equipment and computer-readable medium
CN111782520A (en) * 2020-06-29 2020-10-16 中国工商银行股份有限公司 Test method and device and electronic equipment
CN111782519A (en) * 2020-06-29 2020-10-16 中国工商银行股份有限公司 Test method and device and electronic equipment
CN111782518A (en) * 2020-06-29 2020-10-16 中国工商银行股份有限公司 Test method and device and electronic equipment

Also Published As

Publication number Publication date
CN115086412A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
US10275258B2 (en) Systems and methods for enhancing the availability of multi-tier applications on cloud computing platforms
US8677327B2 (en) Service testing method and service testing system
WO2020062673A1 (en) Smart contract test method, storage medium, test terminal and test device
US20120047492A1 (en) Deployment of a tool for testing migrated applications
US20090070773A1 (en) Method for efficient thread usage for hierarchically structured tasks
CN110647469A (en) Method and device for testing microservice, computer equipment and storage medium
US10366228B2 (en) Detection and mitigation of malicious invocation of sensitive code
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
KR102262395B1 (en) Test apparatus to test interoperability of nfv system
US20230333960A1 (en) Dynamic distributed tracing instrumentation in a microservice architecture
US10579502B2 (en) Resuming applications using pass-through servers and trace data
US20230086377A1 (en) Dynamic automation of prerequisite component deployment in disconnected environments
US20110252403A1 (en) Component relinking in migrations
CN102662745B (en) Virtual machine management system and virtual machine management method
CN113434283B (en) Service scheduling method and device, server and computer readable storage medium
WO2022193979A1 (en) Microservice development method and system, and computer device and medium
US11474930B2 (en) Software bug reproduction
US11228492B2 (en) Debugging a network switch by replaying configuration
CN111949484A (en) Information processing method, information processing apparatus, electronic device, and medium
US11755665B2 (en) Identification of a computer processing unit
US10223238B1 (en) Multiple-stage crash reporting
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
CN113157607B (en) Equipment adaptation method, device, storage medium and computer equipment
EP3916540A1 (en) Compiling monoglot function compositions into a single entity
CN112134922A (en) Service calling method and device based on micro-service and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22770334

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22770334

Country of ref document: EP

Kind code of ref document: A1