CN117573395B - Remote scheduling method and system between micro services - Google Patents

Remote scheduling method and system between micro services Download PDF

Info

Publication number
CN117573395B
CN117573395B CN202410049890.9A CN202410049890A CN117573395B CN 117573395 B CN117573395 B CN 117573395B CN 202410049890 A CN202410049890 A CN 202410049890A CN 117573395 B CN117573395 B CN 117573395B
Authority
CN
China
Prior art keywords
service
annotation
micro
class
called
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410049890.9A
Other languages
Chinese (zh)
Other versions
CN117573395A (en
Inventor
曹远东
柏壑
陈玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Jiejing Science And Technology Co ltd
Original Assignee
Hangzhou Jiejing Science And Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Jiejing Science And Technology Co ltd filed Critical Hangzhou Jiejing Science And Technology Co ltd
Priority to CN202410049890.9A priority Critical patent/CN117573395B/en
Publication of CN117573395A publication Critical patent/CN117573395A/en
Application granted granted Critical
Publication of CN117573395B publication Critical patent/CN117573395B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • 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/10Protocols in which an application is distributed across nodes in the network
    • 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/133Protocols for remote procedure calls [RPC]
    • 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/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method and a system for remote scheduling among micro services, comprising the following steps: configuring a first micro service and a second micro service, configuring a remote calling component for the first micro service, and configuring a first appointed annotation according to a method required to be called by the remote calling component for the first micro service; the first specified annotation comprises a first method name and a path in the second micro-service, and when the second micro-service method is called according to the first specified annotation, the first method name and the path configuration second specified annotation are obtained; acquiring a first method in the second micro-service according to the second designated annotation, and returning a calling result to the first micro-service according to the first method; and the called method class and method package of the first micro service obtain a first package object, all the methods and classes using the first package object in the first micro service are obtained and packaged to obtain a second package object, and a maintenance table of the dimension calling relation is constructed according to the first package object and the second package object.

Description

Remote scheduling method and system between micro services
Technical Field
The invention relates to the technical field of micro-service scheduling, in particular to a method and a system for remote scheduling among micro-services.
Background
The micro-service architecture is a software development model that breaks down a complex application into multiple independent, reusable, scalable, loosely coupled services, each of which is responsible for a single business function and interacts through lightweight communication protocols. The micro-service architecture has the advantages of high availability, high expandability, high maintainability and the like, and is suitable for large-scale, distributed and dynamically-changed application scenes. However, the existing scheduling method between micro services mainly has the following technical problems: because of the numerous micro services and the possible cross-language, cross-platform and cross-network calls, it is difficult to comprehensively, accurately and real-time monitor and analyze the dependency relationship between the micro services. The current calling method between micro services mainly comprises the following steps:
1. log analysis based method: and extracting calling relation information by collecting and analyzing log data generated by the micro-service, and displaying the calling relation information on a visual interface. The method has the advantages of simplicity and easiness in implementation, and no modification of the micro service code is needed; the disadvantage is that it depends on the integrity and accuracy of the log data and there is some delay and overhead.
2. Agent or interceptor based methods: each call is intercepted and recorded by inserting an agent or interceptor component between microservices and call relationship information is sent to a central server or database. The method has the advantages that the calling relation information can be obtained in real time and is independent of log data; the disadvantage is that modification of the micro-service code or configuration is required and may affect the performance and stability of the micro-service itself.
3. Annotation or metadata based methods: the functions and attributes of each service or method are identified by adding annotations or metadata in the micro-service code, and call relationship information is generated by scanning or parsing the annotations or metadata. The method has the advantages that more semantic information can be obtained, and the performance and stability of the micro-service are not affected; the disadvantage is that modification of the micro-service code is required and that there may be some redundancy and inconsistencies.
Disclosure of Invention
One of the preferred embodiments of the present invention is to provide a remote scheduling method and system between micro services, which uses a remote scheduling component and constructs a specified annotation based on the types of different micro services, each specified annotation has a fixed format, and the corresponding method is injected into the corresponding specified annotation, so that remote call between micro services does not need to modify micro service codes and configuration, the communication protocol of remote call between micro services can be effectively simplified, lengthy code protocols are reduced, the performance and efficiency of call between different micro services are improved, the code is more concise by the manner of specifying the annotations, and the calling methods and the readability and maintainability of different micro services are improved.
Another preferred embodiment of the present invention is to provide a method and a system for remote scheduling between micro services, where the method and the system scan for the method with the specified annotation after the micro services are started, encapsulate the corresponding method into a rpc object, further scan all methods and classes in the services by using the rpc object as the called object of the corresponding method, find the method and the type using the rpc object, encapsulate the method and the type using the rpc pair into an invoke object, and make invoking maintenance between different micro services by constructing a invoking relation list of the rpc object and the invoke object, so as to improve the invoking maintenance effect between different micro services.
Another preferred embodiment of the present invention is to provide a method and a system for remote scheduling between micro services, where a java reflection method is used by the method and the system, call relationship information between different micro services can be dynamically obtained by using the java reflection method, and after different call relationships are obtained, the call relationship list can be constructed in real time, and the call relationship list is visually displayed, so that intuitiveness and maintainability of call between micro services are improved.
In order to achieve at least one of the above objects, the present invention further provides a method for remote scheduling between micro services, the method comprising:
configuring a first micro-service and a second micro-service, configuring a remote calling component for the first micro-service, and configuring a first appointed annotation for a method required to be called for the first micro-service according to the remote calling component;
the first specified annotation comprises a first method name and a path in a second micro-service, the second specified annotation is configured for the second micro-service, the second specified annotation comprises a return class annotation, and when a corresponding method of the second micro-service is called according to the first specified annotation, the first method name and the path are acquired and the second specified annotation is configured;
acquiring a first method in the second micro-service according to the second specified annotation, and returning a calling result of the first method to the first micro-service according to the second specified annotation;
and packaging the called method class and method of the first micro service to obtain a first packaged object, simultaneously obtaining all the methods and classes using the first packaged object in the first micro service to obtain a second packaged object, and constructing a maintenance table of the dimension calling relation according to the first packaged object and the second packaged object.
According to one preferred embodiment of the present invention, the method comprises: defining a called service interface in the first micro service, wherein the service name of the called service interface is the second micro service name, defining the called first method in the called service interface of the first micro service, and adding a mapping annotation in a first designated annotation in the first method, wherein the calling method and the path are provided in the mapping annotation.
According to another preferred embodiment of the present invention, the method comprises: defining a first service control class in the first micro-service, configuring a first service control annotation in a first appointed annotation for the first service control class, generating related control instructions by using the first service control annotation, creating a first control method for the first service control class, creating a first query annotation for the first service control class, wherein the first query annotation comprises an appointed path of the first method, configuring an interface call annotation in the first appointed annotation in the first micro-service, wherein the interface call annotation comprises the called service interface, injecting the called service interface into the first service control class according to the interface call annotation, and querying to obtain a first method appointed by a second micro-service of the called service interface.
According to another preferred embodiment of the present invention, a second service control class is defined in the second micro-service, and a return control annotation of a second specified annotation is configured for the second service control class, the first method is created for the second service control class, the return control annotation is used for returning the first method, a second query annotation of the second specified annotation is created for the second service control class, the second query annotation is injected into the second service control class, and query acquisition for the first method is executed and returned to the first method queried by the first micro-service.
According to another preferred embodiment of the present invention, the first specified annotation and the second specified annotation each include: and the service name, the method name, the parameter type and the return type corresponding to the method belong to, and the first appointed annotation and the second appointed annotation are dynamically acquired through a Java reflection mechanism.
According to another preferred embodiment of the present invention, the method comprises: scanning a method and class containing a first specified annotation in the first micro-service, and encapsulating the method and class containing the first specified annotation into a rpc object, wherein the rpc object is the first encapsulated object, and the rpc object comprises information of the method and class of a called party and service objects of the method and class.
According to another preferred embodiment of the present invention, the method comprises: and traversing all the methods and classes in the first micro-service, acquiring the method and the class using the rpc object, and encapsulating the method and the class using the rpc object into an encapsulation object, wherein the encapsulation object is the second encapsulation object, and comprises the class name, the method name and the parameter value of the calling party.
According to another preferred embodiment of the present invention, after the rpc object and the invoke object are obtained, a call relation maintenance table of the micro service is constructed according to the rpc object and the invoke object, where the call relation maintenance table includes a caller service name, a caller class name, a caller method name, a callee service name, a callee method name, a parameter type, and a return type, and is used for building a visualization table call relation maintenance table.
In order to achieve at least one of the above objects, the present invention further provides a micro inter-service remote scheduling system that performs the above-described one micro inter-service remote scheduling method.
The present invention further provides a computer readable storage medium storing a computer program for execution by a processor to implement a micro inter-service remote scheduling method as described above.
Drawings
FIG. 1 is a flow chart of a remote scheduling method for micro services according to the present invention.
FIG. 2 shows call relationship maintenance representation intent of micro-service remote dispatch in the present invention.
Detailed Description
The following description is presented to enable one of ordinary skill in the art to make and use the invention. The preferred embodiments in the following description are by way of example only and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
It will be understood that the terms "a" and "an" should be interpreted as referring to "at least one" or "one or more," i.e., in one embodiment, the number of elements may be one, while in another embodiment, the number of elements may be plural, and the term "a" should not be interpreted as limiting the number.
Referring to fig. 1 and 2, the invention discloses a method and a system for remote scheduling between micro services, wherein the method mainly comprises the following steps: the method comprises the steps of adding specified notes to different micro-service codes, wherein the specified notes are used for normalizing method call among different micro-services, and through the specified notes, the modification and configuration quantity of communication protocol codes can be effectively reduced, and the call stability, code readability and maintainability among different micro-services are improved.
Specifically, the invention defines two micro services as a first micro service and a second micro service, respectively, wherein the first micro service is defined to call a first method in the second micro service. A first specified annotation is configured in the first micro-service and a second specified annotation is configured in the second micro-service. It should be noted that, in the present invention, the first specified annotation and the second specified annotation may include multiple types or numbers of annotations, that is, the first specified annotation and the second specified annotation may be at least one of the same or different types of annotation combinations, where the first specified annotation and the second specified annotation are configured according to the methods and types corresponding to the first micro-service and the second micro-service, and the methods and types of different micro-services are different, and the corresponding types and numbers of annotations are different. For example, if the method and the class of the micro service provide query service, the corresponding annotation type is query annotation, and if the method and the class of the micro service provide delete service, the corresponding annotation type can be delete annotation. Because the service types provided by different micro-services are different, when a specific service is realized, a method in the different micro-services may need to be remotely called to complete the corresponding service.
In the method, the first micro-service is used as a calling party, the second micro-service is used as a called party, the name of the first micro-service is defined, the name of the second micro-service and a corresponding first method path are defined, a remote calling component feign is used for generating a remote calling annotation @ feignclent, wherein the remote calling annotation @ feignclent belongs to a first designated annotation, an annotation which is required to be configured in a remote calling process is added in the first micro-service, and the name of the second micro-service is added as a remotely called object by the remote calling annotation @ feignclent. Further constructing a called service interface according to the name of the second micro service, wherein the name of the called service interface is the name of the second micro service; and injecting a mapping annotation in the called service interface of the first micro service, wherein the mapping annotation defines a specified path and an operation method of the calling interface.
Further, a first service control annotation is configured in the first micro-service, the first service control annotation belongs to the first appointed annotation, and a related control instruction is generated by using the first service control annotation; further, the method adds a query annotation in the first control class, wherein the query annotation is the first appointed annotation, adds an appointed path to the query annotation, configures an interface call annotation in the first control method, wherein the interface call annotation is the first appointed annotation, comprises a pre-constructed called service interface, and utilizes the interface call annotation to inject the called service interface into the first control method of the first service control class, and queries a first method of the called service interface in the second micro server through the query annotation.
Further, the present invention configures a second designated annotation in the second micro service, wherein the type of the second designated annotation includes a return control annotation and a query annotation, wherein a second service control class is pre-configured in the second micro service, the first method is pre-defined in the second service control class, the query annotation is configured in the second service control class, a query path of the first method is designated by the query annotation, file data required for realizing the first method is stored in the query path, when the first micro service passes a related method call request through the called interface, the related annotation and parameter in the second micro service acquisition request include a name, a type, a path, etc. of the called first method, so that the second micro service calls related query file data of the first method to the designated path in acquiring the name, the type, and the path of the first method passed in the called interface, and returns the first file data to the first micro service by the return control annotation, thereby realizing the first micro service to the first micro service.
In order to better illustrate the technical effects of the present invention, the present invention further provides the following exemplary embodiments for performing the detailed explanation of the above method:
defining that the micro-service order-service and the good-service are the first micro-service and the second micro-service respectively, wherein the first micro-service order-service is a method calling party, the second micro-service good-service is a method called party, and defining that the first micro-service order-service calls a getgood byId method provided in the second micro-service order-service to obtain commodity information. First, a remote call component feign is used to generate a remote call annotation @ feignclent, where the name of the remote call annotation @ feignclent is (name=good-service), and the current remote call of the second micro-service is indicated. And defining a called service interface public interface GoodsService in the first micro service, wherein the called service interface object is the name of the second micro service, which indicates that the called service interface and the second micro service establish communication connection for calling the related method in the second micro service. Wherein a first method getGoodsById for acquiring commodity id is defined in the called interface, and a designated path/goods/getGoodsById of a called party is predefined in the called service interface. The called service interface is configured with mapping annotation @ RequestMapping, the mapping mode of the mapping annotation is mapping appointed path/good/getGoodsById, and the mapping annotation method is implemented in RequestMethod. Wherein the first method comprises the following notes: (@ RequestParam ("id") Integer id), which is a parametrization annotation for transmitting the id of the corresponding good to the first microservice through the corresponding invoked interface.
In the invention, a first service control class OrderController is defined aiming at the first micro-service order-service, and a first service control annotation @ RestController is configured for the first service control class, wherein the first service control annotation is used for executing a corresponding calling method; and further creating a first service control method for the first service control class OrderController, configuring query annotation @ GetMapping in the first service control method, configuring a designated path/order/createOrder in the query annotation, further calling annotation @ Autowireless for a configuration interface in the first service control method, and injecting a corresponding GoodsService interface into the first service control method by using the interface calling annotation @ Autowireless. It should be noted that, the first service control annotation in the first service control method is used for executing the related method after annotation, and the first service control annotation is equivalent to a program controller. The invention does not improve how the controller realizes the control of the method, so the invention does not describe the realization mode of the controller. Because of the first service control annotation @ RestController and the corresponding GoodsService interface (@ RequestParam ("id") Integer id, @ RequestParam ("number") Integer number) configured in the first service control class, a call to a corresponding first method may be implemented in the first micro-service through the first service control class.
In the second micro service Goods-service, the invention configures a second service control class goodcontroller for the second micro service Goods-service, defines a return control annotation @ RestController for the second service control class goodcontroller, defines a first method of getgoodsById in the second service control class goodcontroller, and further defines a query annotation @ GetMapping in the second micro service Goods-service, utilizes the query annotation @ GetMapping to configure a designated path/goodsById, queries corresponding file parameter information through the designated path and returns (@ RequestParadam ("goodstid") inters Goods = goodsDaoddDaod = goodsdById (database); and queries commodity information from the database.
Further, in the first micro service, the method and class containing the first specified annotation in the first micro service are scanned, the method and class containing the first specified annotation is packaged into a rpc object, the rpc object is the first packaged object, the rpc object includes information of the method and class of the called party, and the service object of the method and class, for example, after the first micro service order-service is started, a GoodsService interface in the order-service is obtained through java reflection, and is packaged into a rpc object, where the object contains the following information: the called party service name is good-service, the called party method name is getgood byId, the parameter type is Intger, the return type is good, and the service object is order-service. Finding out the place using rpc object by traversing all classes and methods in order-service through java reflection, and encapsulating the place as an indication object, wherein the indication object is a second encapsulation object, and the object contains the following information: the calling party class is named OrderController, the calling party method is named createOrder, and the parameter values are id and number. Saving rpc objects and the notification objects in a database to form a call relationship record, wherein the record comprises the following fields: the calling party service is named order-service, the calling party class is named OrderController, the calling party method is named createOrder, the called party service is named good-service, the called party method is named getGoodsById, the parameter type is Integer, and the return type is good.
The processes described above with reference to flowcharts may be implemented as computer software programs in accordance with the disclosed embodiments of the invention. Embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. The above-described functions defined in the method of the present application are performed when the computer program is executed by a Central Processing Unit (CPU). It should be noted that the computer readable medium described in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wire segments, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. 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 involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It will be understood by those skilled in the art that the embodiments of the present invention described above and shown in the drawings are merely illustrative and not restrictive of the current invention, and that this invention has been shown and described with respect to the functional and structural principles thereof, without departing from such principles, and that any modifications or adaptations of the embodiments of the invention may be possible and practical.

Claims (7)

1. A method for remote scheduling between micro services, the method comprising:
configuring a first micro-service and a second micro-service, configuring a remote calling component for the first micro-service, and configuring a first appointed annotation for a method required to be called for the first micro-service according to the remote calling component;
the first appointed annotation comprises a first method name and a path in a second micro-service, the second appointed annotation is configured for the second micro-service, the second appointed annotation comprises a return class annotation, and when the corresponding method of the second micro-service is called according to the first appointed annotation, the first method name and the path are obtained and the second appointed annotation is configured;
acquiring a first method in the second micro-service according to the second specified annotation, and returning a calling result of the first method to the first micro-service according to the second specified annotation;
packaging the called method class and method of the first micro service to obtain a first packaged object, simultaneously obtaining all the methods and classes using the first packaged object in the first micro service to obtain a second packaged object, and constructing a calling relation maintenance table according to the first packaged object and the second packaged object;
scanning a method and a class containing a first specified annotation in the first micro-service, and packaging the method and the class containing the first specified annotation into a rpc object, wherein the rpc object is the first packaging object, and the rpc object comprises information of the method and the class of a called party and a service object of the called method and class;
further traversing all methods and classes in the first micro-service, acquiring the method and the class using the rpc object, and encapsulating the method and the class using the rpc object into an encapsulation object, wherein the encapsulation object is the second encapsulation object, and comprises a class name, a method name and a parameter value of a calling party;
after the rpc object and the indication object which are packaged are obtained, a calling relation maintenance table of the micro-service is constructed according to the rpc object and the indication object, wherein the calling relation maintenance table comprises a calling party service name, a calling party class name, a calling party method name, a called party service name, a called party method name, a parameter type and a return type, and is used for establishing a calling relation maintenance table of the visual table.
2. The method for remote scheduling between micro services according to claim 1, wherein the method comprises: defining a called service interface in the first micro service, wherein the service name of the called service interface is the second micro service name, defining the called first method in the called service interface of the first micro service, and adding a mapping annotation in a first designated annotation in the first method, wherein the calling method and the path are provided in the mapping annotation.
3. The method for remote scheduling between micro services according to claim 2, wherein the method comprises: defining a first service control class in the first micro-service, configuring a first service control annotation in a first appointed annotation for the first service control class, generating related control instructions by using the first service control annotation, creating a first control method for the first service control class, creating a first query annotation for the first service control class, wherein the first query annotation comprises an appointed path of the first method, configuring an interface call annotation in the first appointed annotation in the first micro-service, wherein the interface call annotation comprises the called service interface, injecting the called service interface into the first service control class according to the interface call annotation, and querying to obtain a first method appointed by a second micro-service of the called service interface.
4. A method of remote scheduling between microservices according to claim 1, characterized in that a second service control class is defined in the second microservice, and a return control annotation of a second specified annotation is configured for the second service control class, the first method is created for the second service control class, the return control annotation is used for returning the first method, a second query annotation of a second specified annotation is created for the second service control class, the second query annotation is injected into the second service control class, query acquisition for the first method is performed, and the return is returned to the first method queried by the first microservice.
5. The method of remote scheduling between micro services according to claim 1, wherein the first specified annotation and the second specified annotation each comprise: and the service name, the method name, the parameter type and the return type corresponding to the method belong to, and the first appointed annotation and the second appointed annotation are dynamically acquired through a Java reflection mechanism.
6. A micro-service remote scheduling system, characterized in that the system performs a micro-service remote scheduling method according to any of the preceding claims 1-5.
7. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which is executed by a processor to implement a micro inter-service remote scheduling method according to any of the preceding claims 1-5.
CN202410049890.9A 2024-01-13 2024-01-13 Remote scheduling method and system between micro services Active CN117573395B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410049890.9A CN117573395B (en) 2024-01-13 2024-01-13 Remote scheduling method and system between micro services

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410049890.9A CN117573395B (en) 2024-01-13 2024-01-13 Remote scheduling method and system between micro services

Publications (2)

Publication Number Publication Date
CN117573395A CN117573395A (en) 2024-02-20
CN117573395B true CN117573395B (en) 2024-04-02

Family

ID=89886510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410049890.9A Active CN117573395B (en) 2024-01-13 2024-01-13 Remote scheduling method and system between micro services

Country Status (1)

Country Link
CN (1) CN117573395B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137079A (en) * 2010-06-21 2011-07-27 华为技术有限公司 Method and device for developing service for RPC (Remote Procedure Call)
CN103116520A (en) * 2012-11-02 2013-05-22 深圳键桥通讯技术股份有限公司 Remote procedure call remote position control (RPC) method based on transmission control protocol (TCP)/user datagram protocol (UDP)
CN109729149A (en) * 2018-12-03 2019-05-07 国云科技股份有限公司 A kind of micro services framework implementation method based on note
CN112612595A (en) * 2020-12-29 2021-04-06 太平金融科技服务(上海)有限公司 Method and device for establishing micro-service calling relationship, computer equipment and storage medium
CN115442372A (en) * 2022-09-16 2022-12-06 平安付科技服务有限公司 Interface calling method and micro-service application system applying same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137079A (en) * 2010-06-21 2011-07-27 华为技术有限公司 Method and device for developing service for RPC (Remote Procedure Call)
CN103116520A (en) * 2012-11-02 2013-05-22 深圳键桥通讯技术股份有限公司 Remote procedure call remote position control (RPC) method based on transmission control protocol (TCP)/user datagram protocol (UDP)
CN109729149A (en) * 2018-12-03 2019-05-07 国云科技股份有限公司 A kind of micro services framework implementation method based on note
CN112612595A (en) * 2020-12-29 2021-04-06 太平金融科技服务(上海)有限公司 Method and device for establishing micro-service calling relationship, computer equipment and storage medium
CN115442372A (en) * 2022-09-16 2022-12-06 平安付科技服务有限公司 Interface calling method and micro-service application system applying same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于微服务架构的统一应用开发平台;李春阳;刘迪;崔蔚;李晓珍;李春岐;;计算机系统应用;20170415(第04期);全文 *

Also Published As

Publication number Publication date
CN117573395A (en) 2024-02-20

Similar Documents

Publication Publication Date Title
CN107451109B (en) Report generation method and system
CN107133267B (en) Method and device for querying elastic search cluster, electronic equipment and readable storage medium
CN112527528A (en) Data transmission method, device and storage medium based on message queue
EP3617961A1 (en) Intelligent adaptor service in unified automation platforms for robotic process automation
CN109871289A (en) A kind of remote procedure call service creation method and device
CN112507005B (en) Method and device for processing message
CN114490268A (en) Full link monitoring method, device, equipment, storage medium and program product
CN109343975B (en) Method and apparatus for inter-page asynchronous communication
US8027435B2 (en) Method and system for protocol embedded automated test control
CN111930531A (en) Data processing method, data production method, data consumption method, data production device, data consumption device and data consumption medium
CN114443905A (en) Interface document updating method and device, electronic equipment and readable storage medium
US20220245080A1 (en) Method for communication of a componentized application, computing device and computer storage medium
CN110764769B (en) Method and device for processing user request
CN114173355A (en) Dynamic execution method and system for network instruction with separated design operation state
CN117573395B (en) Remote scheduling method and system between micro services
CN112817539A (en) Industrial data storage method and system, electronic device and storage medium
CN112134900A (en) Data message processing method and device
CN111104122B (en) Method for mapping xml service logic to java service logic
CN113051202A (en) Interface adaptation method, device, electronic equipment and computer readable storage medium
CN114880321A (en) Service early warning method and device
WO2017084515A1 (en) Method and device for transmitting data code stream
CN110865973A (en) Data processing method and equipment and related device
CN113992644A (en) Internet of things gateway system based on non-service technology and data processing method thereof
CN113468041A (en) Interface comparison test method and device
CN113515285A (en) Method and device for generating real-time calculation logic data

Legal Events

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