Compatible with new and old framework service calling methods and related devices
The method allows seamless communication between new and old frameworks by registering services in registration centers and using a proxy system, addressing high resource consumption and inefficiency in framework migration, thereby simplifying the system and reducing costs.
Patent Information
- Application Number
- CN202111436842.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2041-11-30
AI Technical Summary
The migration of two service frameworks results in high resource consumption, complex system architecture, and inefficient load balancing due to duplicate code and increased maintenance costs when deployed separately.
A method and device that enable seamless communication between new and old frameworks by registering services in respective registration centers (zookeeper and Eureka) and using a proxy system to disguise services, allowing frameworks to call each other without the business layer's awareness, thus simplifying the system and reducing resource consumption.
This approach reduces system resource consumption and improves efficiency by enabling smooth migration and communication between frameworks, simplifying the system structure and lowering maintenance costs.
Smart Images

Figure CN114090075B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computers, and in particular, relates to a calling method and related devices that are compatible with new and old framework services. Background Art
[0002] With the development of computer technology, the application environment of software is becoming more and more complex, and more and more service frameworks are being created. If there are two sets of service frameworks at the same time, the two service framework systems need to be migrated smoothly during migration. In the process of migration evolution, it is inevitable that there will be mutual calls.
[0003] If the two frameworks are deployed separately, more system resources will be consumed, and more manpower and material resources will be needed to maintain the existing system, which will result in a relatively high cost of use. When calling across service frameworks, in order to achieve high-availability load balancing, more duplicate code needs to be written, and the system will become more complex, resulting in lower efficiency. Summary of the invention
[0004] The purpose of this application is to provide a calling method and related devices that are compatible with new and old framework services, aiming to solve the technical problems of complex system and low efficiency during framework migration in the prior art.
[0005] The first aspect of the present application provides a calling method for services compatible with new and old frameworks, and a calling method for services compatible with new and old frameworks, which is applied to the proxy system in a migration system composed of a first framework, a proxy system and a second framework, and includes:
[0006] Acquire service information in the first frame and the second frame;
[0007] Determining in the service information a second service of the second framework that needs to be migrated to the first framework;
[0008] Determining in the service information a third service of the first framework that needs to be migrated to the second framework;
[0009] Register the second service with the registration center in the first framework, and register the third service with the registration center in the second framework, so that the first framework can call the second service in the second framework, and the second framework can call the third service in the first framework.
[0010] Optionally, the registration center corresponding to the first framework is a zookeeper registration center, and the registration center corresponding to the second framework is a Eureka registration center. Before obtaining the service information in the first framework and the second framework, the method further includes:
[0011] Register to the zookeeper registration center;
[0012] Register with the Eureka registry.
[0013] Optionally, the first framework includes a first service and a third service, the second framework includes a second service, and the first service, the second service and the third service form a call chain;
[0014] The step of registering the second service with a registration center in the first framework includes:
[0015] Disguised as the second service under the second framework to obtain a disguised second service;
[0016] Registering the disguised second service to an instance of a second service in a registration center in the first framework;
[0017] The second service is obtained through the Eureka registration center, and the disguised second service is associated with the second service.
[0018] Optionally, registering the third service with a registration center in the second framework includes:
[0019] Disguised as the third service under the first framework to obtain the disguised third service;
[0020] Registering the disguised third service to an instance of the third service in the registration center of the second framework;
[0021] The third service is obtained through the zookeeper registration center, and the disguised third service is associated with the third service.
[0022] A second aspect of the present application provides a calling method compatible with new and old framework services, which is applied to the first framework in a migration system composed of a first framework, an agent system and a second framework, and includes:
[0023] Complete the registration of the proxy system through the zookeeper registration center;
[0024] Send service information to the proxy system, the service information including: a third service that needs to be migrated to the second framework, so that the proxy system forms a disguised third service according to the third service, and registers the disguised third service to the instance of the third service of the Eureka registration center corresponding to the second framework, the disguised third service is associated with the third service, so that the second framework can call the third service through the disguised third service.
[0025] Optionally, the method further comprises:
[0026] Accept the embodiment of the second service in which the proxy system registers a disguised second service to the zookeeper registration center so that the second service can be called through the disguised second service, and the disguised second service is formed by the proxy system according to the second service of the second framework.
[0027] A third aspect of the present application provides a calling method compatible with new and old framework services, which is applied to the second framework in a migration system composed of a first framework, an agent system and a second framework, and includes:
[0028] Complete the registration of the proxy system through the Eureka registration center;
[0029] Send service information to the proxy system, the service information including: a second service that needs to be migrated to the first framework, so that the proxy system forms a disguised second service based on the second service, and registers the disguised second service to the instance of the second service of the zookeeper registration center corresponding to the first framework, the disguised second service is associated with the second service, so that the first framework can call the second service through the disguised second service.
[0030] Optionally, the method further comprises:
[0031] Accept the embodiment of the third service in which the proxy system registers a disguised third service with the Eureka registration center so that the third service can be called through the disguised third service, and the disguised third service is formed by the proxy system according to the third service of the first framework.
[0032] A fourth aspect of the present application provides an agent system, including:
[0033] An acquiring unit, configured to acquire service information in the first frame and the second frame;
[0034] A first determining unit, configured to determine, from the service information, a second service of the second framework that needs to be migrated to the first framework;
[0035] A second determining unit, configured to determine, from the service information, a third service of the first framework that needs to be migrated to the second framework;
[0036] A registration unit, used to register the second service with a registration center in the first framework, and to register the third service with a registration center in the second framework, so that the first framework can call the second service in the second framework, and the second framework can call the third service in the first framework.
[0037] The fifth aspect of the present application provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the calling method compatible with the new and old framework services as described above.
[0038] When the calling method for compatible new and old framework services provided in the present application is applied to the proxy system in a migration system composed of a first framework, a proxy system and a second framework, the service information in the first framework and the second framework is first obtained; the second service that the second framework needs to migrate to the first framework is determined in the service information; the third service that the first framework needs to migrate to the second framework is determined in the service information; the second service is registered with the registration center in the first framework, and the third service is registered with the registration center in the second framework, so that the first framework can call the second service in the second framework, and the second framework can call the third service in the first framework, so that the service information between different frameworks can call each other, and the business layer is unaware, which reduces the consumption of system resources and improves the efficiency of information processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flowchart of an embodiment of the present invention in which the calling method for compatible new and old framework services is applied to a proxy system;
[0040] Figure 2 This is a flowchart of another embodiment of the present invention in which the calling method compatible with new and old framework services is applied to a proxy system;
[0041] Figure 3 This is a flowchart of another embodiment of the present invention in which the calling method compatible with new and old framework services is applied to a proxy system;
[0042] Figure 4 This is a flowchart of an embodiment of the calling method of the present application that is compatible with new and old framework services and is applied to the first framework;
[0043] Figure 5 This is a flowchart of an embodiment of the present application of a calling method for compatible new and old framework services applied to a second framework;
[0044] Figure 6 This is a flowchart of an embodiment of the present application's method for calling services compatible with both new and old frameworks in the first framework, the proxy system, and the second framework;
[0045] Figure 7 This is a flowchart of an embodiment of the registration and discovery of services compatible with new and old frameworks provided by the embodiment of the present application;
[0046] Figure 8 It is a schematic diagram of the structure of a device for registration and discovery of services compatible with new and old frameworks provided in an embodiment of the present application;
[0047] Fig. 9 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0048] Fig.10 It is a schematic diagram of the structure of the server provided in the embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0051] As will be appreciated by those skilled in the art, the term "device" as used herein includes both wireless signal receiver devices, which are devices that only have a transmitting signal receiver without transmitting capability, and transmitting and receiving hardware devices, which are devices that have receiving and transmitting hardware capable of performing two-way communications over a two-way communications link. Such devices may include: cellular or other communications devices, which have a single line display or a multi-line display or a cellular or other communications device without a multi-line display; a PCS (Personal Communications Service), which may combine voice, data processing, fax and / or data communications capabilities; a PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar and / or a GPS (Global Positioning System) receiver; a conventional palmtop computer or other device, which has and / or includes a conventional laptop and / or palmtop computer or other device with and / or including a radio frequency receiver.
[0052] The new and old frameworks described in the embodiment of the present application are two sets of service frameworks that exist at the same time. During the migration of the two service framework systems, smooth migration is required. During the migration evolution process, the two sets of frameworks that call each other, the new and old frameworks can refer to the first framework and the second framework respectively, and there is no limitation here.
[0053] like Figure 1 As shown, a calling method for compatible new and old framework services provided in an embodiment of the present application is applied to the proxy system in a migration system composed of a first framework, a proxy system and a second framework, including:
[0054] S1000: Acquire service information in the first framework and the second framework;
[0055] In this embodiment, the proxy system first obtains the service information in the first frame and the second frame, wherein the first frame and the second frame each contain multiple service information, and there is no limit on the number of service information. In this embodiment, the first frame contains the first service and the third service, and the second frame contains the second service.
[0056] S2000: Determine in the service information the second service that the second framework needs to migrate to the first framework;
[0057] S3000: Determine, in the service information, a third service of the first framework that needs to be migrated to the second framework;
[0058] During the migration and calling process, not all service information in the first framework or the second framework is migrated and called. Instead, the service information to be migrated is determined according to actual needs, and then the service information to be migrated in the first framework and the second framework is called.
[0059] In this embodiment, the second service that needs to be migrated from the second framework to the first framework is the second service, and the third service that needs to be migrated from the first framework to the second framework is the third service.
[0060] S4000. Register the second service with the registration center in the first framework, and register the third service with the registration center in the second framework, so that the first framework can call the second service in the second framework, and the second framework can call the third service in the first framework.
[0061] The proxy system registers the service information in the first framework to the registration center corresponding to the second framework, where the service information is the second service that needs to be migrated in step S3000. At the same time, the proxy system registers the third service in the second framework to the registration center corresponding to the first framework.
[0062] After the proxy system registers the third in the first framework with the registration center corresponding to the second framework and registers the second service in the second framework with the registration center corresponding to the first framework, it periodically sends heartbeat information to the registration center corresponding to the first framework and the registration center corresponding to the second framework, thereby realizing information connection between the proxy system and the registration center corresponding to the first framework and the registration center corresponding to the second framework, and further realizing the call between the service information in the first framework and the service information in the second framework.
[0063] In the embodiment of the present application, the service information in the first framework is registered with the registration center corresponding to the second framework, and the service information in the second framework is registered with the registration center corresponding to the first framework, and heartbeat information is periodically sent to the registration center corresponding to the first framework and the registration center corresponding to the second framework, so that the service information between different frameworks can be called by each other without the business layer being aware of it, thereby reducing the consumption of system resources and improving the efficiency of information processing.
[0064] The registration center corresponding to the first framework is the zookeeper registration center, and the registration center corresponding to the second framework is the Eureka registration center. Before obtaining the service information in the first framework and the second framework, the method further includes:
[0065] Register to the zookeeper registration center;
[0066] Register with the Eureka registry.
[0067] In this embodiment, before obtaining the service information in the first framework and the second framework, the service information in the first framework and the second framework is first registered with the corresponding registration center, that is, multiple service information in the first framework is registered with the corresponding registration center Zookeeper registration center, and multiple service information in the second framework is registered with the corresponding registration center Eureka registration center.
[0068] The zookeeper registration center and the Eureka registration center can both realize the registration of the service information, the discovery of the service information, the governance of the service information, and the load balancing of the service information.
[0069] like Figure 2 , Figure 6 and Figure 7As shown, this is a calling method compatible with new and old framework services in an embodiment of the present application. In this embodiment, the first framework includes a first service and a third service, the second framework includes a second service, and the first service, the second service and the third service form a calling chain;
[0070] The step of registering the second service with a registration center in the first framework includes:
[0071] S4001, disguising as the second service under the second framework to obtain a disguised second service;
[0072] S4002, registering the disguised second service to an instance of a second service in a registration center in the first framework;
[0073] S4003. Obtain the second service through the Eureka registration center, and associate the disguised second service with the second service.
[0074] In an embodiment of the present application, if the first service needs to call the second service, the proxy system first disguises itself as the second service under the second framework to obtain a disguised second service. The proxy system registers the disguised second service to the instance of the second service in the zookeeper registration center in the first framework, so that the first service can perceive the second service. Furthermore, the proxy system searches for the real second service through the Eureka registration center corresponding to the second framework, and associates the disguised second service with the second service, thereby initiating a call from the first service in the first framework to the second service in the second framework.
[0075] The embodiments provided in the present application can implement the calling of service information between different frameworks through a proxy system without the business layer being aware of it, thereby effectively simplifying the system structure, reducing the cost of system maintenance, and improving the efficiency of information calling.
[0076] like Figure 3 As shown, this is a calling method for the application that is compatible with the new and old framework services, and the third service is registered with the registration center in the second framework, including:
[0077] S4004, disguising as the third service under the first framework to obtain a disguised third service;
[0078] S4005, registering the disguised third service to the instance of the third service of the registration center in the second framework;
[0079] S4006. Obtain the third service through the zookeeper registration center, and associate the disguised third service with the third service.
[0080] In this embodiment, if the second service in the second framework wants to call the third service in the first framework, the proxy system first disguises itself as the third service under the first framework to obtain a disguised third service, and registers the disguised third service to the instance of the third service of the Eureka registration center corresponding to the second framework, and obtains the traffic of the third service, so that the second service can perceive the third service. Furthermore, the proxy system searches for the real third service through the zookeeper registration center corresponding to the first framework, and associates the disguised third service with the third service, thereby initiating a call from the second service in the second framework to the third service in the first framework.
[0081] like Figure 4 As shown, the calling method of the present application compatible with the new and old framework services is applied to the first framework in the migration system composed of the first framework, the proxy system and the second framework, including:
[0082] S4100, completing registration of the proxy system through the zookeeper registration center;
[0083] In this embodiment, the first framework first completes the registration of the proxy system through the zookeeper registration center.
[0084] S4200. Send service information to the proxy system, where the service information includes: a third service that needs to be migrated to the second framework, so that the proxy system forms a disguised third service based on the third service, and registers the disguised third service to the instance of the third service of the Eureka registration center corresponding to the second framework. The disguised third service is associated with the third service, so that the second framework can call the third service through the disguised third service.
[0085] In this embodiment, the first framework sends service information to the proxy system, where the service information includes: a third service that needs to be migrated to the second framework, so that the proxy system forms a disguised third service based on the third service.
[0086] After the proxy system forms a disguised third service, it registers the disguised third service to the instance of the third service of the Eureka registration center corresponding to the second framework. The disguised third service and the third service are associated with each other, thereby realizing the call of the third service in the first framework by the second framework.
[0087] S4300, accepting the embodiment of the second service in which the proxy system registers the disguised second service to the zookeeper registration center, so that the second service can be called through the disguised second service, and the disguised second service is formed by the proxy system according to the second service of the second framework.
[0088] In this embodiment, the first framework accepts the embodiment of the proxy system registering the disguised second service to the second service of the zookeeper registration center, so that the second service in the second framework can be called through the disguised second service.
[0089] The first framework periodically pulls registry information from the registration center, updates the cache of the local registry, obtains the service information in the second framework, and thus initiates a call from the first framework to the service information in the second framework.
[0090] In this embodiment, the first framework monitors the zookeeper registration center in real time, establishes a connection between the first framework and the zookeeper registration center, so that the service information in the first framework can discover the updated service information in the zookeeper registration center and further initiate a call.
[0091] like Figure 5 As shown, the calling method of the present application compatible with the new and old framework services is applied to the second framework in the migration system composed of the first framework, the proxy system and the second framework, including:
[0092] S5100, completing registration of the proxy system through the Eureka registration center;
[0093] S5200. Send service information to the proxy system, where the service information includes: a second service that needs to be migrated to the first framework, so that the proxy system forms a disguised second service based on the second service, and registers the disguised second service to the instance of the second service of the zookeeper registration center corresponding to the first framework. The disguised second service is associated with the second service, so that the first framework can call the second service through the disguised second service.
[0094] S5300. Accept the embodiment of the third service in which the proxy system registers the disguised third service to the Eureka registration center, so that the third service can be called through the disguised third service. The disguised third service is formed by the proxy system according to the third service of the first framework.
[0095] In this embodiment, the second framework accepts the embodiment of the proxy system registering the disguised third service with the third service of the Eureka registration center, so that the third service in the first framework can be called through the disguised third service.
[0096] The second framework periodically pulls registry information from the registration center, updates the cache of the local registry, obtains the service information in the first framework, and thus initiates a call in the second framework to the service information in the first framework.
[0097] This embodiment establishes a connection between the second framework and the Eureka registry center by real-time monitoring of the Eureka registry center by the second framework, so that the service information in the second framework can discover the updated service information in the Eureka registry center and further initiate a call.
[0098] like Figure 6 and Figure 7 As shown, if there is a call chain consisting of a first service A, a second service B and a third service C, wherein the first service A and the third service C exist in the first framework, and the second service B exists in the second framework. The first service A and the third service C are registered with the zookeeper registration center corresponding to the first framework, and the second service is registered with the Eureka registration center corresponding to the second framework.
[0099] First, the first service A calls the second service B: the proxy system proxy disguises itself as the second service B to obtain a disguised second service, and registers it to the zookeeper registration center, associates the disguised second service with the second service B, the first service A monitors the zookeeper registration center, and finds the instance list of the second service B. Further, the proxy system proxy searches for the second service B through the Eureka registration center, thereby realizing the call of the first service A to the second service B.
[0100] Furthermore, for the call of the third service C by the second service B: the proxy system proxy disguises itself as the third service C to obtain a disguised third service, and registers it with the Eureka registration center, associates the disguised third service with the third service C, and the second service B monitors the Eureka registration center and finds the instance list of the third service C. Further, the proxy system proxy searches for the third service C through the zookeeper registration center, thereby realizing the call of the third service C by the second service B.
[0101] It should be noted here that the calling process of the service information of the zookeeper registration center and the Eureka registration center is not consistent, and the registration principles of the two registration centers are also inconsistent, which is not within the scope of discussion of this application.
[0102] The proxy system in the embodiment of the present application connects the service information in the first frame and the second frame to realize free calling between different frames. The service information in the first frame calls the service information in the second frame in the same way as the service information in the first frame, that is, the business layer cannot perceive that the service information called is in the second frame, making the switching between different frames smoother and effectively improving the efficiency of information processing.
[0103] like Figure 8 As shown, the present application also provides a device for registration and discovery of new and old framework services, including:
[0104] The acquisition unit 1000 is used to acquire service information in the first frame and the second frame;
[0105] A first determining unit 2000 is configured to determine, in the service information, a second service of the second framework that needs to be migrated to the first framework;
[0106] The second determining unit 3000 is configured to determine, from the service information, a third service of the first framework that needs to be migrated to the second framework;
[0107] The registration unit 4000 is used to register the second service with the registration center in the first framework, and register the third service with the registration center in the second framework, so that the first framework can call the second service in the second framework, and the second framework can call the third service in the first framework.
[0108] Since the above-mentioned device compatible with the new and old framework services registration discovery is a device that corresponds one-to-one to the calling method of the compatible new and old framework services, its implementation principle is the same as the calling method of the compatible new and old framework services, and will not be repeated here.
[0109] In this embodiment, please refer to Fig. 9 , provides a basic structural block diagram of computer equipment.
[0110] The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. The non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement a calling method that is compatible with both new and old framework services. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute a calling method that is compatible with both new and old framework services. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will appreciate that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0111] The processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0112] The present application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to execute the calling method for compatible new and old framework services described in any of the above embodiments.
[0113] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory is used to store at least one instruction, which is used to be executed by the processor to implement the calling method of the method embodiment of the present application that is compatible with the new and old framework services.
[0114] like Fig.10 The schematic diagram of the structure of a server provided in one embodiment of the present application is shown. The server is used to implement the calling method of the compatible new and old framework services provided in the above embodiment. Specifically:
[0115] The server includes a central processing unit (CPU), a system memory including a random access memory (RAM) and a read-only memory (ROM), and a system bus connecting the system memory and the central processing unit. The server also includes a basic input / output system (I / O system) that helps transfer information between various components in the computer, and a large-capacity storage device for storing an operating system, application programs, and other program modules.
[0116] The basic input / output system includes a display for displaying information and an input device such as a mouse and a keyboard for a user to input information. The display and the input device are connected to the central processing unit through an input / output controller connected to the system bus. The basic input / output system may also include an input / output controller for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus.
[0117] The mass storage device is connected to the central processing unit via a mass storage controller (not shown) connected to the system bus. The mass storage device and its associated computer readable medium provide non-volatile storage for the server. That is, the mass storage device may include a computer readable medium (not shown) such as a hard disk or a CD-ROM drive.
[0118] Without loss of generality, the computer readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the above. The above-mentioned system memory and mass storage devices may be collectively referred to as memory.
[0119] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0120] The embodiments of the present invention are each process and / or box in the flowchart and / or block diagram of the method, terminal device (system) and computer program product according to the embodiments of the present invention, and the combination of the processes and / or boxes in the flowchart and / or block diagram. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the process. Figure 1 A device that specifies the functions in a block or multiple blocks in a process or multiple processes and / or a block diagram.
[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified by a box or boxes.
[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0123] In addition, each functional device in each embodiment of the present invention may be integrated into the same data processing device, or each device may exist physically separately, or two or more devices may be integrated into the same device.
[0124] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other devices or steps, and the singular does not exclude the plural. Multiple devices or computer devices stated in the computer device claim can also be implemented by the same computer device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0125] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A calling method compatible with new and old framework services, characterized in that: The proxy system applied to the migration system composed of the first framework, the proxy system and the second framework includes: Acquire service information in the first frame and the second frame; Determining in the service information a second service of the second framework that needs to be migrated to the first framework; Determining in the service information a third service of the first framework that needs to be migrated to the second framework; Register the second service with the registration center in the first framework, and register the third service with the registration center in the second framework, so that the first framework can call the second service in the second framework, and the second framework can call the third service in the first framework.
2. The calling method for compatible new and old framework services as claimed in claim 1, characterized in that: The registration center corresponding to the first framework is the zookeeper registration center, and the registration center corresponding to the second framework is the Eureka registration center. Before obtaining the service information in the first framework and the second framework, the method further includes: Register to the zookeeper registration center; Register with the Eureka registry.
3. The calling method for compatible new and old framework services as claimed in claim 2, characterized in that: The first framework includes the first service and the third service, the second framework includes the second service, and the first service, the second service and the third service form a call chain; The step of registering the second service with a registration center in the first framework includes: Disguised as the second service under the second framework to obtain a disguised second service; Registering the disguised second service to an instance of a second service in a registration center in the first framework; The second service is obtained through the Eureka registration center, and the disguised second service is associated with the second service.
4. The calling method for compatible new and old framework services as claimed in claim 3, characterized in that: The step of registering the third service with a registration center in the second framework includes: Disguised as the third service under the first framework to obtain the disguised third service; Registering the disguised third service to an instance of the third service in the registration center of the second framework; The third service is obtained through the zookeeper registration center, and the disguised third service is associated with the third service.
5. A calling method compatible with new and old framework services, characterized in that: The first framework applied to the migration system consisting of the first framework, the proxy system and the second framework includes: The proxy system is registered through the zookeeper registration center, where the zookeeper registration center is the registration center corresponding to the first framework; Send service information to the proxy system, the service information including: a third service that needs to be migrated to the second framework, so that the proxy system forms a disguised third service according to the third service, and registers the disguised third service to the instance of the third service of the Eureka registration center corresponding to the second framework, the disguised third service is associated with the third service, so that the second framework can call the third service through the disguised third service.
6. The calling method for compatible new and old framework services as claimed in claim 5, characterized in that: The method further comprises: The proxy system is accepted to register the fake second service to the instance of the second service in the registration center of the first framework, so that the second service can be called through the fake second service. The fake second service is formed by the proxy system according to the second service of the second framework.
7. A calling method compatible with new and old framework services, characterized in that: The second framework applied to the migration system consisting of the first framework, the proxy system and the second framework includes: Complete the registration of the proxy system through the Eureka registration center, where the Eureka registration center is the registration center corresponding to the second framework; Send service information to the proxy system, the service information including: a second service that needs to be migrated to the first framework, so that the proxy system forms a disguised second service based on the second service, and registers the disguised second service to the instance of the second service of the zookeeper registration center corresponding to the first framework, the disguised second service is associated with the second service, so that the first framework can call the second service through the disguised second service.
8. The calling method for compatible new and old framework services as claimed in claim 7, characterized in that: The method further comprises: The proxy system is accepted to register the disguised third service to the instance of the third service of the registration center in the second framework, so that the third service can be called through the disguised third service. The disguised third service is formed by the proxy system according to the third service of the first framework.
9. An agent system, characterized in that: include: An acquisition unit, used to acquire service information in the first frame and the second frame; A first determining unit, configured to determine, from the service information, a second service of the second framework that needs to be migrated to the first framework; A second determining unit, configured to determine, from the service information, a third service of the first framework that needs to be migrated to the second framework; A registration unit, used to register the second service with a registration center in the first framework, and to register the third service with a registration center in the second framework, so that the first framework can call the second service in the second framework, and the second framework can call the third service in the first framework.
10. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the calling method for compatible new and old framework services as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Database migration evaluation method and device, storage medium and computer equipment
CN111258989A
Framework migration method and device
CN111443920A
