CN110392114B - Service call processing system and method across multiple registration centers - Google Patents

Service call processing system and method across multiple registration centers Download PDF

Info

Publication number
CN110392114B
CN110392114B CN201910680531.2A CN201910680531A CN110392114B CN 110392114 B CN110392114 B CN 110392114B CN 201910680531 A CN201910680531 A CN 201910680531A CN 110392114 B CN110392114 B CN 110392114B
Authority
CN
China
Prior art keywords
service
registry
adaptation module
registration
application
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
CN201910680531.2A
Other languages
Chinese (zh)
Other versions
CN110392114A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201910680531.2A priority Critical patent/CN110392114B/en
Publication of CN110392114A publication Critical patent/CN110392114A/en
Application granted granted Critical
Publication of CN110392114B publication Critical patent/CN110392114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a service call processing system and method across multiple registration centers. The system comprises: the first registration center adaptation module receives a service call instruction which is transmitted by a first application and crosses a registration center, carries out protocol conversion on the service call instruction, and transmits the converted service call instruction to the second registration center adaptation module through the route forwarding module; the second registration center adaptation module calls a corresponding service in the second application according to the received service calling instruction to obtain a service calling result, and the service calling result is sent to the first registration center adaptation module through the route forwarding module; and the first registry adaptation module returns the received service calling result to the first application. The invention realizes the service calling across multiple registration centers, reduces the modification cost of application calling of heterogeneous registration centers, improves the centralized deployment efficiency and expands the application service functions while solving the problem that the direct calling cannot be realized among applications due to different types of the registration centers.

Description

Service call processing system and method across multiple registration centers
Technical Field
The invention relates to the technical field of service call of registration centers, in particular to a service call processing system and method for a cross-multi-registration center.
Background
With the development of modern computer technology, a distributed system provides a service concept, and various registration centers are in the same place at present. The mainstream registry includes eureka, zookeeper, and the like. Each registry provides a secure and reliable registration service for computer system applications. At present, applications adopting the eureka and zookeeper registration centers are isolated from each other, and the service cannot be called among different applications. That is, services on the eureka cannot be provided for zookeeper, and services on the zookeeper cannot be provided for eureka.
Disclosure of Invention
In order to solve the above problem, an embodiment of the present invention provides a service call processing system across multiple registries, where the system is connected to corresponding applications through each registry, and the system includes: the system comprises a first registration center adaptation module, a second registration center adaptation module and a route forwarding module;
the first registration center adaptation module receives a service call instruction which is transmitted by a first application and crosses a registration center, carries out protocol conversion on the service call instruction, and transmits the converted service call instruction to the second registration center adaptation module through the route forwarding module;
the second registration center adaptation module calls a corresponding service in a second application according to the received service calling instruction to obtain a service calling result, and the service calling result is sent to the first registration center adaptation module through the route forwarding module;
and the first registry adaptation module returns the received service calling result to the first application.
Optionally, in an embodiment of the present invention, the first registry adaptation module includes a calling unit, and the calling unit is configured to call a service in the first application.
Optionally, in an embodiment of the present invention, the first registry adaptation module further includes a reading unit, and the reading unit is configured to read service instance information registered in the first registry.
Optionally, in an embodiment of the present invention, the service instance information includes: service instance name, service instance id, and service instance status.
Optionally, in an embodiment of the present invention, the first registry adaptation module further includes a protocol conversion unit, and the protocol conversion unit is configured to perform protocol conversion on the service invocation instruction and the service instance information.
Optionally, in an embodiment of the present invention, the first registry adaptation module further includes a writing unit, where the writing unit is configured to register the service instance information after the protocol conversion in the first registry.
Optionally, in an embodiment of the present invention, the first registry adaptation module further includes a heartbeat monitoring unit, and the heartbeat monitoring unit is used for updating the service information in the first registry in real time.
Optionally, in an embodiment of the present invention, the updating of the service information in real time includes: reading service registration information, updating service state and writing service into the registration center.
Optionally, in an embodiment of the present invention, the second registry adaptation module includes the same unit as the first registry adaptation module.
The embodiment of the invention also provides a service call processing method across multiple registration centers, which utilizes the service call processing system across multiple registration centers to carry out service call processing across multiple registration centers.
The invention realizes service calling across multiple registration centers, improves the expansion capability of service discovery while solving the problem that the service cannot be directly called due to different types of the registration centers among applications, does not need to modify the service of a source service provider, reduces the modification cost of application calling of heterogeneous registration centers, improves the centralized deployment efficiency and expands the application service functions.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive labor.
FIG. 1 is a diagram illustrating a service invocation in the prior art;
FIG. 2 is a schematic diagram of the system of the present invention connected to a registry;
FIG. 3 is a schematic diagram of a service invocation using the system of the present invention;
FIG. 4 is a schematic structural diagram of a service call processing system across multiple registration centers according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating cross-registry service invocation in an embodiment of the present invention;
FIG. 6 is a flowchart illustrating an implementation of a cross-eureka registry and zookeeper registry call in an embodiment of the present invention;
FIG. 7 is a flowchart illustrating system boot-up according to an embodiment of the present invention;
fig. 8 is a flow chart of heartbeat monitoring according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a system and a method for processing service call of a cross-multi-registration center.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, before the system of the present invention is used, the registry 1 and the registry 2 … … are not connected to each other, the application 1 can only access the service of the registry 1, the application 2 can only access the service of the registry 2 where it is located, and so on. As shown in FIG. 2, the system of the present invention is located between multiple registries, linking multiple registries.
As shown in fig. 3, after the system of the present invention is used, each registry has various services of each application, and the application 1 can call not only the service 1 to the service n of the application 1, but also the service 1 to the service n of the application 2, and can call all the services of the application n.
Fig. 4 is a schematic structural diagram of a service call processing system across multiple registration centers according to an embodiment of the present invention, where the system shown in the drawing includes: a first registry adaptation module M001 (registry 1 adaptation module), a second registry adaptation module (registry 2 adaptation module) and a route forwarding module M007;
the first registration center adaptation module receives a service call instruction which is transmitted by a first application and crosses a registration center, carries out protocol conversion on the service call instruction, and transmits the converted service call instruction to the second registration center adaptation module through the route forwarding module;
the second registration center adaptation module calls a corresponding service in a second application according to the received service calling instruction to obtain a service calling result, and the service calling result is sent to the first registration center adaptation module through the route forwarding module;
and the first registry adaptation module returns the received service calling result to the first application.
As an embodiment of the present invention, the first registry adaptation module comprises a calling unit M005 for calling a service in the first application.
In this embodiment, the first registry adaptation module further includes a reading unit M002, where the reading unit is configured to read the service instance information registered in the first registry.
Wherein the service instance information includes: service instance name, service instance id, and service instance status.
In this embodiment, the first registry adaptation module further includes a protocol conversion unit M006, where the protocol conversion unit is configured to perform protocol conversion on the service invocation instruction and the service instance information.
In this embodiment, the first registry adaptation module further includes a writing unit M004, where the writing unit is configured to register the service instance information after the protocol conversion into the first registry.
In this embodiment, the first registry adaptation module further includes a heartbeat monitoring unit M003, where the heartbeat monitoring unit is used for updating the service information in the first registry in real time.
Wherein, the real-time update of the service information comprises the following steps: reading service registration information, updating service state and writing service into the registration center.
In this embodiment, the second registry adaptation module comprises the same elements as the first registry adaptation module. The system of the invention is provided with a plurality of registration center adaptation modules which are in one-to-one correspondence with the registration centers, and the structures of the registration center adaptation modules are the same. When a certain registry adaptation module is a called service party, the registry adaptation module can be used as the first registry adaptation module, and when a certain registry adaptation module is a called service party, the registry adaptation module can be used as the second registry adaptation module.
In a specific embodiment of the present invention, as shown in fig. 5, an implementation scenario of the present invention is shown, which implements service invocation processing across an eureka registry and a zookeeper registry. Correspondingly, as shown in fig. 6, which is a flowchart for implementing the call between the eureka registry and the zookeeper registry, the application a (which is connected and registered with the eureka registry) calls the service S1 provided by the application B (which is connected and registered with the zookeeper registry).
To illustrate, the service of application a is registered with the eureka registry, and the service of application B is registered with the zookeeper registry.
After the system is started, the system is respectively connected to an eureka registry and a zookeeper registry. And realizing mutual registration of services of the two registries.
Step 200: application a initiates a service S1 that invokes application B.
Step 201: application a sends an initiate call instruction to the eureka registry.
Step 202: the service of application B is read through the connected eureka registry S1.
Step 203: the system of the invention converts the calling instruction through a protocol and forwards the calling instruction to the zookeeper registration center according to the regular route.
Step 204: service S1 of application B is called at zookeeper.
Step 205: zookeeper returns the result of invoking application B service S1 to eureka through the route forwarding module.
Step 206: application a receives the results of application B service S1 invocation from the eureka registry.
Step 207: application a initiates the completion of the service S1 procedure that invokes application B.
In this embodiment, the system start-up operation steps of the present invention are shown in fig. 7. Mutual registration of the cross-eureka registration center and the zookeeper registration center is realized, and a system environment is provided for subsequent cross-registration center calling.
Step 100: the system of the invention is started.
Step 101: connect eureka registry, connect zookeeper registry.
Step 102: the service instance registered on eureka is read by the reading unit M002 of the eureka registry adaptation module M001.
And reading service instance information, including service instance name, id, state and the like.
The service instance registered on the zookeeper is read by the reading unit M009 of the zookeeper registry adaptation module M008.
And reading service instance information, including service instance name, id, state and the like.
Step 103: the service instance information (including service instance name, id, state, etc.) of the zookeeper is forwarded to the eureka registry adaptation module M001 through the protocol conversion unit M013 and the route forwarding module M007.
The protocol conversion unit M006 converts the information into a format required by the eureka, and the service information is registered to the eureka registry through the writing unit M004.
Step 104: the service instance information (including service instance name, id, status, etc.) of the eureka is forwarded to the zookeeper registry adaptation module M008 through the protocol conversion unit M006 and the route forwarding module M007.
The protocol conversion unit M013 converts the information into a format required by the zookeeper, and registers the service information in the zookeeper registration center through the writing unit M011.
Step 105: the system of the present invention is started and completed.
In addition, the zookeeper registry adaptation module further includes a heartbeat monitoring unit M010 and a calling unit M012.
In this embodiment, as shown in fig. 8, a schematic flow chart of the heartbeat monitoring cycle of the present invention is shown. And the heartbeat monitoring unit is used for realizing the timely updating of the service information of the multiple registration centers (including reading the service registration information, updating the state, writing into the registration centers, receiving the service call of the cross-registration centers and the like).
The invention can realize the mutual calling between the eureka registration center and the zookeeper registration center service instance, and has the following specific advantages: 1. the mutual registration of the services of the multiple registration centers is realized through the service reading unit, the registration writing unit, the service calling unit, the protocol conversion unit and the route forwarding module. 2. In one of the registries, the service instances of a plurality of different types of registries can be accessed, and the expansion capability of service discovery is improved. 3. The service call processing system across multiple registration centers provides various registration center service call functions and solves the problem that the direct call cannot be performed among applications due to different types of the registration centers. 4. Service transformation is not needed for a source service provider, transformation cost of application calling of the heterogeneous registration center is reduced, centralized deployment efficiency is improved, and application service functions are expanded.
The invention realizes service calling across multiple registration centers, improves the expansion capability of service discovery while solving the problem that the service cannot be directly called due to different types of the registration centers among applications, does not need to modify the service of a source service provider, reduces the modification cost of application calling of heterogeneous registration centers, improves the centralized deployment efficiency and expands the application service functions.
The embodiment of the invention also provides a service call processing method across multiple registration centers, which utilizes the service call processing system across multiple registration centers to carry out service call processing across multiple registration centers.
Based on the same application concept as the service call processing system across multiple registration centers, the invention also provides a service call processing method across multiple registration centers. Because the principle of solving the problem of the service call processing method across multiple registration centers is similar to that of a service call processing system across multiple registration centers, the implementation of the service call processing method across multiple registration centers can refer to the implementation of the service call processing system across multiple registration centers, and repeated parts are not described again.
The invention realizes service calling across multiple registration centers, improves the expansion capability of service discovery while solving the problem that the service cannot be directly called due to different types of the registration centers among applications, does not need to modify the service of a source service provider, reduces the modification cost of application calling of heterogeneous registration centers, improves the centralized deployment efficiency and expands the application service functions.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by relevant hardware instructed by a program, and the program may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. A system for processing service calls across multiple registries, the system being connected to a corresponding application through each registry, the system comprising: the system comprises a first registration center adaptation module, a second registration center adaptation module and a route forwarding module;
the first registration center adaptation module receives a service call instruction which is transmitted by a first application and crosses a registration center, carries out protocol conversion on the service call instruction, and transmits the converted service call instruction to the second registration center adaptation module through the route forwarding module;
the second registration center adaptation module calls a corresponding service in a second application according to the received service calling instruction to obtain a service calling result, and the service calling result is sent to the first registration center adaptation module through the route forwarding module;
the first registration center adaptation module returns the received service calling result to the first application;
the first registry adaptation module comprises a calling unit, wherein the calling unit is used for calling a service in a first application;
the first registry adaptation module further comprises a reading unit, and the reading unit is used for reading the service instance information registered in the first registry.
2. The system of claim 1, wherein the service instance information comprises: service instance name, service instance id, and service instance status.
3. The system according to claim 1, wherein the first registry adaptation module further comprises a protocol conversion unit, and the protocol conversion unit is configured to perform protocol conversion on the service call instruction and the service instance information.
4. The system of claim 3, wherein the first registry adaptation module further comprises a writing unit, and the writing unit is configured to register the protocol-converted service instance information in the first registry.
5. The system of claim 4, wherein the first registry adaptation module further comprises a heartbeat monitoring unit, and the heartbeat monitoring unit is used for real-time update of service information in the first registry.
6. The system of claim 5, wherein the real-time update of the service information comprises: reading service registration information, updating service state and writing service into the registration center.
7. The system of claim 6, wherein the second registry adaptation module comprises the same elements as the first registry adaptation module.
8. A method for processing service call across multiple registration centers, which is characterized in that the method utilizes the system for processing service call across multiple registration centers of any claim 1-7 to perform processing service call across multiple registration centers.
CN201910680531.2A 2019-07-26 2019-07-26 Service call processing system and method across multiple registration centers Active CN110392114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910680531.2A CN110392114B (en) 2019-07-26 2019-07-26 Service call processing system and method across multiple registration centers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910680531.2A CN110392114B (en) 2019-07-26 2019-07-26 Service call processing system and method across multiple registration centers

Publications (2)

Publication Number Publication Date
CN110392114A CN110392114A (en) 2019-10-29
CN110392114B true CN110392114B (en) 2022-02-08

Family

ID=68287393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910680531.2A Active CN110392114B (en) 2019-07-26 2019-07-26 Service call processing system and method across multiple registration centers

Country Status (1)

Country Link
CN (1) CN110392114B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112738060B (en) * 2020-12-24 2022-11-18 平安科技(深圳)有限公司 Method and device for processing micro-service data, micro-service processing platform and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162835A (en) * 2015-07-29 2015-12-16 国电南瑞科技股份有限公司 Service registration framework and method of power grid dispatching automation system
CN108989372A (en) * 2017-06-02 2018-12-11 华为技术有限公司 Method, registration center and the equipment of service discovery
CN109618005A (en) * 2019-01-18 2019-04-12 华为终端有限公司 Method for calling server and proxy server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105162835A (en) * 2015-07-29 2015-12-16 国电南瑞科技股份有限公司 Service registration framework and method of power grid dispatching automation system
CN108989372A (en) * 2017-06-02 2018-12-11 华为技术有限公司 Method, registration center and the equipment of service discovery
CN109618005A (en) * 2019-01-18 2019-04-12 华为终端有限公司 Method for calling server and proxy server

Also Published As

Publication number Publication date
CN110392114A (en) 2019-10-29

Similar Documents

Publication Publication Date Title
CN113301166B (en) Service calling method and device, storage medium and electronic device
CN110955534B (en) Middleware-based business process automation system and method
WO2021129008A1 (en) Service invocation method, apparatus and device, and medium
US20030009539A1 (en) Distributed object middleware connection method
CN101674255B (en) Method, server and system for forwarding messages of enterprise service bus
CN101141742B (en) Application communication method of terminal
US20170048359A1 (en) Method and device for transmitting a message in a vehicle
CN113746928B (en) Cross-cloud service calling method, device and system
CN107809332A (en) Compound interface configures and compound interface call method, device
CN110392114B (en) Service call processing system and method across multiple registration centers
CN111770122A (en) Service communication agent SCP registration method, service calling method and network equipment
CN114244654B (en) URL forwarding method, device, equipment and computer storage medium
CN112217845B (en) Data transmission method based on Netconf protocol and related equipment
CN101499931B (en) Function expansion method and system based on distributed environment
US7403606B1 (en) General protocol for service control point
US8874798B2 (en) Aspect oriented application of a mediator in an enterprise service bus (ESB) of a service oriented architected data processing system
CN112181681A (en) Remote calling method and device, computer equipment and storage medium
CN111866157B (en) Cloud service gateway and cloud service internal and external request format conversion method
CN102137079B (en) Method and device for developing service for RPC (Remote Procedure Call)
CN101246421A (en) Universal frame work based on workflow engine
CN114006884A (en) Session control method, device and system under network address conversion scene
CN109298851B (en) Expansion mechanism adaptation method of OSGi heterogeneous software framework
CN102262533A (en) Terminal, triggering method and communication method of application programs between terminals
CN114726911B (en) Routing parameter transfer method for distributed industrial robot online service arrangement
CN109426573B (en) Communication method, device, equipment and gateway adapter between incompatible objects

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