CN115396482B - Cross-machine-room single-point service calling method - Google Patents

Cross-machine-room single-point service calling method Download PDF

Info

Publication number
CN115396482B
CN115396482B CN202210973391.XA CN202210973391A CN115396482B CN 115396482 B CN115396482 B CN 115396482B CN 202210973391 A CN202210973391 A CN 202210973391A CN 115396482 B CN115396482 B CN 115396482B
Authority
CN
China
Prior art keywords
point service
program
address
agent
machine room
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
CN202210973391.XA
Other languages
Chinese (zh)
Other versions
CN115396482A (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.)
Focus Technology Co Ltd
Original Assignee
Focus 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 Focus Technology Co Ltd filed Critical Focus Technology Co Ltd
Priority to CN202210973391.XA priority Critical patent/CN115396482B/en
Publication of CN115396482A publication Critical patent/CN115396482A/en
Application granted granted Critical
Publication of CN115396482B publication Critical patent/CN115396482B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a cross-machine-room single-point service calling method, which is characterized by comprising the following steps of: configuring a service program, wherein the service program comprises an agent program and a management program; the agent program is deployed between the application program and the single-point service and is used for routing the service request of the application program to the single-point service; the management program manages the proxy program address and the single-point service address through control instructions; the application program requests to call the single-point service through the agent program; the single-point service returns a request result to the application program through the proxy program; after the single-point service processes the request, returning a result according to a request path; the management program controls and monitors the single point service address updating switching in the multiple machine rooms. The method reduces the complexity of single-point service modification in a multi-machine room environment, ensures the consistency of single-point service call in all machine rooms, and avoids the effect of simultaneous service of a plurality of single-point services.

Description

Cross-machine-room single-point service calling method
Technical Field
The invention belongs to the field of micro-service management, and particularly relates to a cross-machine-room single-point service calling method.
Background
Since sellers are in china and buyers are distributed in various countries around the world, in order to increase the access speed of website users, website operators construct a machine room in multiple cities around the world, so that overseas buyers can request services nearby. However, not all data can be requested nearby, such as price, inventory, etc., and strong consistent data needs to be collected in a single machine room for processing, so as to avoid inconvenience and even damage to benefits caused by data errors to websites and users. These processes, which require the execution of strongly consistent data concentrated in a single machine room, are defined as single point services. If a plurality of machine rooms process strong consistent data at the same time, serious problems such as repeated data processing, inconsistent data in the plurality of machine rooms and the like can occur;
In order to collect data with strong consistency requirements into one machine room to execute reading and writing, a domain name mode is generally adopted to access single-point service, a DNS server is used for resolving the domain name to obtain the address of the machine room where the single-point service is located, and an access request is forwarded to a designated machine room; if the machine room is required to be switched to other machine rooms due to the failure of the designated machine room, the DNS server needs to synchronously change the machine room address corresponding to the domain name, and because the machine room has effective aging delay of DNS change across countries, the address update of part of the servers is not timely, and further when single-point service is required, the single-point service in a plurality of machine rooms provides service, so that data errors or inconsistent data are caused.
Secondly, the internal service call protocol of a plurality of B2B e-commerce online transaction websites is based on the RPC protocol of TCP instead of the HTTP protocol, so that the application can only call the single-point service by configuring the single-point service address; if the single-point service address is temporarily changed, the application configuration needs to be changed correspondingly, and the application is excessively dependent on the single-point service call structure, so that the complexity of single-point service management and configuration is increased.
The patent 'single-point service processing device and single-point service processing method' (application number: 201110177646.3) proposes that in a server cluster, a server is selected according to a preset starting rule, and single-point service is started in the server, and although the uniqueness of single-point service starting in the cluster server can be ensured by prohibiting other servers from starting the single-point service, the patent only solves the problem of single-point service starting, and the single-point service which is not explicitly started is effective; secondly, after a new service is started when the single-point service is abnormal, a clearer solution is not provided for ensuring the data consistency of a plurality of single-point services when the single-point service is abnormal.
Therefore, a technical method for decoupling the application and the single-point service call structure is urgently needed, and the phenomenon of inconsistent data can be thoroughly eliminated.
Disclosure of Invention
In order to solve the problems, the invention provides a method for calling single-point service across machine rooms. The invention uses the proxy mechanism, uses the proxy program to accept the application request and the single-point service positioning and calling, uses the management program to control the proxy program to call the single-point service, and ensures the consistency of the single-point service address in all machine rooms; the application program in the invention only communicates with the agent program, the modification of the single-point service does not affect the adjustment and configuration of the application code, and the agent programs of all machine rooms are called by the management program to be switched to the new single-point service, so that the complexity of the single-point service modification in the multi-machine room environment is reduced, the consistency of the single-point service call in all machine rooms is ensured, and the condition that a plurality of single-point services are simultaneously served is avoided.
The technical scheme of the invention is to provide a cross-machine-room single-point service calling method, which is characterized by comprising the following specific steps:
Step 1: configuring a service program, wherein the service program comprises an agent program and a management program; the agent program is deployed between the application program and the single-point service and is used for routing the service request of the application program to the single-point service; the management program manages the proxy program address and the single-point service address through control instructions; the agent address is used for locating the agent; the single point service address locates single point service, and the agent address and the single point service address are both composed of corresponding deployment machine room and deployment address; the deployment machine room is represented by a machine room name; the deployment address is represented by a URL address; step 2: the application program requests to call the single-point service through the agent program; comprising: configuring a single point service address in an application program configuration file as an agent program address; the application program sends a single-point service calling request to the agent program according to the address in the configuration file; the agent program analyzes the service name in the call request; the single-point service address is deployed according to service name analysis; the agent program locates the single-point service according to the single-point service address and routes the call request to the single-point service;
step 3: the single-point service returns a request result to the application program through the proxy program; after the single-point service processes the request, returning a result according to the request path of the step2, specifically: the request result is returned to the agent program by the single-point service, and is fed back to the application program by the agent program;
Step 4: the management program controls and monitors the update and switching of single-point service addresses in the multiple machine rooms; the management program writes in a control instruction according to the acquired new single-point service address, calls a corresponding agent program through the deployment address of the agent program of each machine room and sends the control instruction, and the control agent program receives the new single-point service address to save and replace, and meanwhile, the management program judges whether the single-point service addresses in the agent programs of each machine room are consistent according to the address saving result and the address replacing result fed back by the agent programs of each machine room; if the feedback result of the agent program of any machine room is unsuccessful, the single-point service addresses in the agent programs of all machine rooms are inconsistent, and the agent programs of all machine rooms are controlled by the management program to modify the single-point service addresses into old addresses.
In the step 1, the configuration service program includes: creating 2 interfaces for external services for the agent program, wherein a first interface receives a single-point service call request of the application program, and a second interface receives a control instruction of the management program; the management program receives a user request and generates a control instruction through a visual interface.
In the step 1, the configuration agent specifically includes: in a multi-machine room environment, optionally one machine room deployment management program; deploying an agent program for each machine room; the single point service address is stored in the database of the agent in the form of key value pairs in the following format: service name: machine room name + URL address ].
The specific steps of the step 2 of requesting to call the single-point service include:
When a first interface of the agent program receives a single-point service call request, the agent program extracts a service name of the single-point service from the request parameter; according to the service names, screening corresponding single-point service addresses from a database; if the machine room name is consistent with the machine room name of the agent program, the agent program utilizes the URL address to locate the single point service in the current machine room, and routes the request to the single point service; if the machine room name is inconsistent with the machine room name of the agent program, the agent program and the called single-point service are different in one machine room, the machine room where the single-point service is deployed is taken as a target machine room, the agent program address of the target machine room is obtained according to the machine room name, the agent program of the current machine room forwards the call request to the agent program of the target machine room together with the agent program address and the URL address of the current machine room, the agent program of the target machine room locates the single-point service in the target machine room according to the URL address, and the call request is routed to the single-point service.
In the step 3, the specific flow of returning the result according to the request path in the step2 includes:
Step 3-1: the single-point service returns the request result to the agent program of the same machine room;
step 3-2: the agent program judges the sender of the call request; if the call request in the step 2 contains the agent address of the machine room, the sender is the agent, and the step 3-3 is executed; if the call request in the step 2 does not contain the agent address of the machine room, the sender is an application program, and the agent program returns the request result to the application program;
Step 3-3: and returning the request result to the agent programs of other machine rooms according to the agent program addresses of the machine rooms, and returning the agent programs to the application programs of the same machine room.
In the step 4, the control instruction includes an address storage instruction and an address switching instruction;
the step 4 specifically includes:
Step 4-1: when the management program stores the new single-point service address, the old single-point service old address is not deleted;
Step 4-2: the management program calls a second external service interface of the agent program according to the agent program address of each machine room, and sends an address storage instruction containing a new single-point service address; after the agent program receives the instruction, the new single-point service address is stored, information of successful receiving is fed back to the management program, and step 4-3 is executed; if any machine room agent program does not feed back the information of successful reception, the management program feeds back the failure of the address storage to the user;
Step 4-3, the management program sends an address switching instruction to the agent program of each machine room, after the agent program receives the instruction, the agent program modifies the corresponding single-point service address into a new address according to the service name, and feeds back the information of successful switching to the management program; if any machine room agent program does not feed back the successful switching information, executing the step 4-4;
Step 4-4: the manager calls a second external service interface of the agent program with successful feedback, and sends an address rollback instruction, wherein the rollback instruction comprises an old single-point service address, and the agent program rolls back the updated single-point service address to the old single-point service address after receiving the instruction.
The invention has the beneficial effects that:
1) The invention ensures the transmission of the service request to the single-point service in any machine room by configuring the agent program in the middle of the application and the single-point service, adapting the service request of the application by the agent program and configuring the single-point service address in the agent program, thereby not only eliminating the simple dependency relationship of the application program on the single-point service, decoupling the application and the single-point service calling structure, but also reducing the difficulty and complexity of positioning the single-point service in the multi-machine room environment.
2) The invention uniformly manages the agent programs of all machine rooms by configuring the management program, and the management program uniformly executes the switching and updating of the single-point service address in the agent programs, so that the single-point service address updating action can be synchronized in the multi-machine room environment at the same time, the consistency of the single-point service address updating result in the multi-machine room environment is ensured, the inconsistency caused by the timeliness problem is reduced, the plurality of single-point services in the multi-machine room environment are effective, and the strong consistency data processing error is further caused.
Drawings
FIG. 1 is a flow chart of a cross-machine-room single-point service calling method in an embodiment of the invention
FIG. 2 is a flow chart of proxy-based request invocation in an embodiment of the invention;
FIG. 3 is a flowchart illustrating a request result return process based on an agent in an embodiment of the present invention;
FIG. 4 is a flowchart of a hypervisor controlling single point service address switching in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a cross-machine-room single-point service calling system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart of a cross-machine-room single-point service calling method in an embodiment of the invention
Step 101: configuring a service program, wherein the service program comprises an agent program and a management program;
The agent program is deployed between the application program and the single-point service and is used for routing the service request of the application program to the single-point service; creating 2 interfaces for external services for the agent program, wherein a first interface receives a single-point service call request of the application program, and a second interface receives a control instruction of the management program; by configuring the agent program between the application and the single point service, all the service requests are submitted to the agent program for bearing;
The management program manages the proxy program address and the single-point service address through control instructions; the agent address is used for locating the agent; the single-point service customization positioning single-point service, wherein the agent program address and the single-point service address are composed of corresponding deployment machine rooms and deployment addresses; the deployment machine room is represented by a machine room name; the deployment address is represented by a URL address; the management program receives a user request and generates a control instruction through a visual interface. In a multi-machine room environment, optionally one machine room deployment management program; deploying an agent program for each machine room; the single point service address is stored in the database of the agent in the form of key value pairs in the following format: service name: machine room name + URL address ]
Step 102: the application program requests to call the single-point service through the agent program; FIG. 2 is a flow chart of proxy-based request invocation in an embodiment of the invention; the method specifically comprises the following steps:
Step 102-1: configuring a single point service address in an application program configuration file as an agent program address; the application program sends a single-point service calling request to the agent program according to the address in the configuration file;
step 102-2: acquiring a service name of a single-point service; when a first interface of the agent program receives a single-point service call request, the agent program extracts a service name of the single-point service from the request parameter;
Step 102-3: the agent program judges whether the single-point service for processing the request is configured in a local machine room or not; the agent program screens the corresponding single-point service address from the database according to the service name; judging whether the machine room name of the single-point service is consistent with the deployment machine room of the agent program, and if so, executing step 102-4; if not, executing step 102-5 in a machine room by the agent program and the called single-point service;
Step 102-4: the agent program routes the request to the single point service of the local machine room; the agent program uses the URL address to locate single point service in the current machine room and routes the request to the single point service;
Step 102-5: through request transfer among agent programs of different machine rooms, the request is routed to single-point service; and the machine room deploying the single-point service is taken as a target machine room, the agent program address of the target machine room is obtained according to the machine room name, the agent program of the current machine room forwards the call request, the agent program address of the current machine room and the URL address to the agent program of the target machine room, the agent program of the target machine room locates the single-point service in the target machine room according to the URL address, and the call request is routed to the single-point service.
By configuring the agent program between the application and the single-point service, the agent program receives the service request of the application, and by configuring the single-point service address in the agent program, the service request is ensured to be sent to the single-point service in any machine room, so that the simple dependency relationship of the application program on the single-point service is eliminated, the application and the single-point service calling structure are decoupled, and the difficulty and complexity of positioning the single-point service in a multi-machine room environment are reduced.
Step 103: the single-point service returns a request result to the application program through the proxy program; the request result is returned to the agent program by the single-point service, and is fed back to the application program by the agent program; fig. 3 is a schematic flow chart of a request result return based on an agent in an embodiment of the present invention, and specific steps include:
step 103-1: the single-point service returns the request result to the agent program of the same machine room;
Step 103-2: the agent program judges the sender of the call request; if the call request in the step 2 contains the agent address of the machine room, the sender is the agent, and the step 3-3 is executed; if the call request in the step 2 does not contain the agent address of the machine room, the sender is an application program, and the agent program returns the request result to the application program;
Step 103-3: and returning the request result to the agent programs of other machine rooms according to the agent program addresses of the machine rooms, and returning the agent programs to the application programs of the same machine room.
Step 104: the management program controls and monitors the update and switching of single-point service addresses in the multiple machine rooms;
The management program controls and monitors the update and switching of single-point service addresses in the multiple machine rooms; the management program writes in a control instruction according to the acquired new single-point service address, calls a corresponding agent program through the deployment address of the agent program of each machine room and sends the control instruction, and the control agent program receives the new single-point service address to save and replace, and meanwhile, the management program judges whether the single-point service addresses in the agent programs of each machine room are consistent according to the address saving result and the address replacing result fed back by the agent programs of each machine room; if the feedback result of the agent program of any machine room is unsuccessful, the single-point service addresses in the agent programs of all machine rooms are inconsistent, and the agent programs of all machine rooms are controlled by the management program to modify the single-point service addresses into old addresses;
The agent programs of all machine rooms are uniformly managed through the configuration management program, the management program uniformly executes the switching and updating of the single-point service address in the agent programs, the single-point service address updating action can be synchronous in the multi-machine-room environment at the same time, the consistency of the single-point service address updating result in the multi-machine-room environment is ensured, the inconsistency caused by the timeliness problem is reduced, the plurality of single-point services in the multi-machine-room environment are effective, and the strong consistency data processing error is further caused.
FIG. 4 is a flowchart of a hypervisor controlling single point service address switching according to an embodiment of the present invention, which specifically includes:
Step 104-1: when the management program stores the new address of the single-point service, the old address of the single-point service is not deleted;
Step 104-2: the management program sends a new address to the agent program of each machine room; the management program calls a second external service interface of the agent program according to the agent program address of each machine room, and sends an address storage instruction containing a single-point service new address; after the agent program receives the instruction and stores the new single-point service address, feeding back the information of successful reception to the management program, and executing step 104-3; if any machine room agent program does not feed back the information of successful reception, the management program feeds back the failure of the address storage to the user;
104-3, the management program controls each machine room agent program to update the new address of the single point service; the management program sends an address switching instruction to the agent program of each machine room, after the agent program receives the instruction, the agent program modifies the corresponding single-point service address into a new address according to the service name, and feeds back the successful switching information to the management program; if any machine room agent program does not feed back the successful switching information, executing step 104-4;
Step 104-4: the single-point service address in each machine room agent program is rolled back to be an old address; the manager calls a second external service interface of the agent program with successful feedback, and sends an address rollback instruction, wherein the rollback instruction comprises an old address of the single-point service, and after the agent program receives the instruction, the agent program modifies the updated single-point service address into the old address of the single-point service.
FIG. 5 is a schematic structural diagram of a cross-machine-room single-point service call system according to an embodiment of the present invention, specifically including an agent, a manager, an application, and a single-point service; in a multi-machine room environment, selecting any machine room deployment management program; deploying agent programs, application programs and single-point services in each machine room; different machine rooms deploy the same single-point service, and users request to access the single-point service nearby through application programs; in the embodiment of the invention, the machine room 1, the machine room 2 and the machine room 3 are all provided with application programs, agent programs and single-point service, and the management programs are arranged in the machine room 1; the address of the single point service of the processing request is configured in the management program, and the agent program of each machine room is notified by the management program.
The application program accesses the agent program of the same machine room nearby and sends a single-point service calling request; the agent program receives the single-point service call request of the application program, the agent program locates the machine room for processing the single-point service of the request, if the single-point service and the application program are in the same machine room, the agent program directly sends the call request to the single-point service in the same machine room; if the single-point service and the application program are not in the same machine room, the machine room where the single-point service is located is taken as a target machine room, the proxy program of the current machine room firstly sends a calling request to the proxy program of the target machine room, and then the proxy of the target machine room sends the calling request to the single-point service;
The single point service transmits the result of the request processing to the application program through the agent program; if the single-point service and the application program are in the same machine room, the single-point service sends the result to the agent program in the same machine room, and the agent program transmits the result to the application program;
If the single-point service and the application program are not in the same machine room, transmitting the request result to the application program through the sequential transmission of the agent programs of 2 machine rooms; the method specifically comprises the following steps: and the single-point service transmits the result to the agent program of the machine room, the agent program transmits the result to the agent program of the machine room where the application program is located, and the agent program of the machine room where the application program is located transmits the result to the application program.
The management program obtains a single-point service switching request input by a user from the outside through a visual interface, packages a new single-point service address as a control instruction, and sends the control instruction to agent programs of all machine rooms for storage and updating, so that synchronous updating and consistency of the single-point service addresses in multiple machine rooms are ensured.
The invention has the beneficial effects that:
1) The invention ensures the transmission of the service request to the single-point service in any machine room by configuring the agent program in the middle of the application and the single-point service, adapting the service request of the application by the agent program and configuring the single-point service address in the agent program, thereby not only eliminating the simple dependency relationship of the application program on the single-point service, decoupling the application and the single-point service calling structure, but also reducing the difficulty and complexity of positioning the single-point service in the multi-machine room environment.
2) The invention uniformly manages the agent programs of all machine rooms by configuring the management program, and the management program uniformly executes the switching and updating of the single-point service address in the agent programs, so that the single-point service address updating action can be synchronized in the multi-machine room environment at the same time, the consistency of the single-point service address updating result in the multi-machine room environment is ensured, the inconsistency caused by the timeliness problem is reduced, the plurality of single-point services in the multi-machine room environment are effective, and the strong consistency data processing error is further caused.
The above embodiments are not intended to limit the present invention in any way, and all other modifications and applications of the above embodiments which are equivalent to the above embodiments fall within the scope of the present invention.

Claims (6)

1. A cross-machine-room single-point service calling method is characterized by comprising the following specific steps:
Step 1: configuring a service program, wherein the service program comprises an agent program and a management program; the agent program is deployed between the application program and the single-point service and is used for routing the service request of the application program to the single-point service; the management program manages the proxy program address and the single-point service address through control instructions; the agent address is used for locating the agent; the single point service address locates single point service, and the agent address and the single point service address are both composed of corresponding deployment machine room and deployment address; the deployment machine room is represented by a machine room name; the deployment address is represented by a URL address; step 2: the application program requests to call the single-point service through the agent program; comprising: configuring a single point service address in an application program configuration file as an agent program address; the application program sends a single-point service calling request to the agent program according to the address in the configuration file; the agent program analyzes the service name in the call request; the single-point service address is deployed according to service name analysis; the agent program locates the single-point service according to the single-point service address and routes the call request to the single-point service;
step 3: the single-point service returns a request result to the application program through the proxy program; after the single-point service processes the request, returning a result according to the request path of the step2, specifically: the request result is returned to the agent program by the single-point service, and is fed back to the application program by the agent program;
Step 4: the management program controls and monitors the update and switching of single-point service addresses in the multiple machine rooms; the management program writes in a control instruction according to the acquired new single-point service address, calls a corresponding agent program through the deployment address of the agent program of each machine room and sends the control instruction, and the control agent program receives the new single-point service address to save and replace, and meanwhile, the management program judges whether the single-point service addresses in the agent programs of each machine room are consistent according to the address saving result and the address replacing result fed back by the agent programs of each machine room; if the feedback result of the agent program of any machine room is unsuccessful, the single-point service addresses in the agent programs of all machine rooms are inconsistent, and the agent programs of all machine rooms are controlled by the management program to modify the single-point service addresses into old addresses.
2. The cross-room single point service invocation method of claim 1, wherein in step 1, the configuration service program comprises: creating 2 interfaces for external services for the agent program, wherein a first interface receives a single-point service call request of the application program, and a second interface receives a control instruction of the management program; the management program receives a user request and generates a control instruction through a visual interface.
3. The method for calling single point service across machine rooms according to claim 2, wherein in the step 1, the configuration agent program specifically comprises: in a multi-machine room environment, optionally one machine room deployment management program; deploying an agent program for each machine room; the single point service address is stored in the database of the agent in the form of key value pairs in the following format: service name: machine room name + URL address ].
4. A method for calling a single point service across a machine room according to claim 3, wherein the specific step of requesting to call the single point service in step 2 comprises:
When a first interface of the agent program receives a single-point service call request, the agent program extracts a service name of the single-point service from the request parameter; according to the service names, screening corresponding single-point service addresses from a database; if the machine room name is consistent with the machine room name of the agent program, the agent program utilizes the URL address to locate the single point service in the current machine room, and routes the request to the single point service; if the machine room name is inconsistent with the machine room name of the agent program, the agent program and the called single-point service are different in one machine room, the machine room where the single-point service is deployed is taken as a target machine room, the agent program address of the target machine room is obtained according to the machine room name, the agent program of the current machine room forwards the call request to the agent program of the target machine room together with the agent program address and the URL address of the current machine room, the agent program of the target machine room locates the single-point service in the target machine room according to the URL address, and the call request is routed to the single-point service.
5. The method for calling single point service across machine room according to claim 4, wherein in step 3, the specific flow of returning the result according to the request path of step 2 comprises:
Step 3-1: the single-point service returns the request result to the agent program of the same machine room;
step 3-2: the agent program judges the sender of the call request; if the call request in the step 2 contains the agent address of the machine room, the sender is the agent, and the step 3-3 is executed; if the call request in the step 2 does not contain the agent address of the machine room, the sender is an application program, and the agent program returns the request result to the application program;
Step 3-3: and returning the request result to the agent programs of other machine rooms according to the agent program addresses of the machine rooms, and returning the agent programs to the application programs of the same machine room.
6. The cross-room single point service call method as claimed in claim 5, wherein in the step 4, the control instruction includes an address storage instruction and an address switching instruction;
the step 4 specifically includes:
Step 4-1: when the management program stores the new single-point service address, the old single-point service old address is not deleted;
Step 4-2: the management program calls a second external service interface of the agent program according to the agent program address of each machine room, and sends an address storage instruction containing a new single-point service address; after the agent program receives the instruction, the new single-point service address is stored, information of successful receiving is fed back to the management program, and step 4-3 is executed; if any machine room agent program does not feed back the information of successful reception, the management program feeds back the failure of the address storage to the user;
Step 4-3, the management program sends an address switching instruction to the agent program of each machine room, after the agent program receives the instruction, the agent program modifies the corresponding single-point service address into a new address according to the service name, and feeds back the information of successful switching to the management program; if any machine room agent program does not feed back the successful switching information, executing the step 4-4;
Step 4-4: the manager calls a second external service interface of the agent program with successful feedback, and sends an address rollback instruction, wherein the rollback instruction comprises an old single-point service address, and the agent program rolls back the updated single-point service address to the old single-point service address after receiving the instruction.
CN202210973391.XA 2022-08-15 2022-08-15 Cross-machine-room single-point service calling method Active CN115396482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210973391.XA CN115396482B (en) 2022-08-15 2022-08-15 Cross-machine-room single-point service calling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210973391.XA CN115396482B (en) 2022-08-15 2022-08-15 Cross-machine-room single-point service calling method

Publications (2)

Publication Number Publication Date
CN115396482A CN115396482A (en) 2022-11-25
CN115396482B true CN115396482B (en) 2024-05-28

Family

ID=84118886

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210973391.XA Active CN115396482B (en) 2022-08-15 2022-08-15 Cross-machine-room single-point service calling method

Country Status (1)

Country Link
CN (1) CN115396482B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019061720A1 (en) * 2017-09-29 2019-04-04 网宿科技股份有限公司 Data synchronization method and system
WO2019104975A1 (en) * 2017-11-30 2019-06-06 平安科技(深圳)有限公司 Dubbo framework–based remote invoking method, server, and storage medium
CN112052091A (en) * 2020-09-04 2020-12-08 掌阅科技股份有限公司 Processing method of service call request under multi-computer-room deployment and computing equipment
CN113542244A (en) * 2021-07-01 2021-10-22 京东科技控股股份有限公司 Method, device, server and system for calling micro-service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019061720A1 (en) * 2017-09-29 2019-04-04 网宿科技股份有限公司 Data synchronization method and system
WO2019104975A1 (en) * 2017-11-30 2019-06-06 平安科技(深圳)有限公司 Dubbo framework–based remote invoking method, server, and storage medium
CN112052091A (en) * 2020-09-04 2020-12-08 掌阅科技股份有限公司 Processing method of service call request under multi-computer-room deployment and computing equipment
CN113542244A (en) * 2021-07-01 2021-10-22 京东科技控股股份有限公司 Method, device, server and system for calling micro-service

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向军用微服务的服务网格架构研究与设计;丁乙;李荣宽;汪敏;贲婷婷;朱勇;;指挥信息系统与技术;20200228(01);全文 *

Also Published As

Publication number Publication date
CN115396482A (en) 2022-11-25

Similar Documents

Publication Publication Date Title
EP3813338B1 (en) Method and system for scheduling edge cdn node
US20220094761A1 (en) Server Invocation Method and Proxy Server
CN110351283B (en) Data transmission method, device, equipment and storage medium
US7325047B2 (en) Dynamic undeployment of services in a computing network
JP4698756B2 (en) Offline execution of web-based applications
US8966121B2 (en) Client-side management of domain name information
US6983318B2 (en) Cache management method and system for storing dynamic contents
US20120110159A1 (en) Managing cdn registration by a storage provider
US20110004676A1 (en) Virtual appliance deploying system
US20050108299A1 (en) Real-time Web sharing system
US10972564B2 (en) System and method for automating actions in distributed computing
CN115086330B (en) Cross-cluster load balancing system
JP5197351B2 (en) Information processing apparatus, information processing method, and program
US20080222164A1 (en) Method and apparatus to provide guaranteed deployment of applications to nodes in an enterprise
CN102510410A (en) On-line advertisement delivering method and system as well as advertisement control equipment
CN108632397A (en) To the control method and system of network connection
CN114125051B (en) Agent method and device for dynamic service discovery
CN115396482B (en) Cross-machine-room single-point service calling method
JP2006243985A (en) Message notification system and method, and server used therefor
CN111314221A (en) Service processing method, device, equipment and computer readable storage medium
CN112052091A (en) Processing method of service call request under multi-computer-room deployment and computing equipment
CN115103008B (en) Service request forwarding system
US20170195426A1 (en) Maintaining session across plural providing devices
CN113542409B (en) Management system and processing method for instances of RocktMQ message queues
CN113542319A (en) Service providing entity change notification method, device and system used in Dubbo framework

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