CN113190292A - Method and device for remotely executing functions on multiple servers - Google Patents

Method and device for remotely executing functions on multiple servers Download PDF

Info

Publication number
CN113190292A
CN113190292A CN202110579042.5A CN202110579042A CN113190292A CN 113190292 A CN113190292 A CN 113190292A CN 202110579042 A CN202110579042 A CN 202110579042A CN 113190292 A CN113190292 A CN 113190292A
Authority
CN
China
Prior art keywords
rpc
server
module
servers
function
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.)
Granted
Application number
CN202110579042.5A
Other languages
Chinese (zh)
Other versions
CN113190292B (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.)
Dilu Technology Co Ltd
Original Assignee
Dilu 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 Dilu Technology Co Ltd filed Critical Dilu Technology Co Ltd
Priority to CN202110579042.5A priority Critical patent/CN113190292B/en
Publication of CN113190292A publication Critical patent/CN113190292A/en
Application granted granted Critical
Publication of CN113190292B publication Critical patent/CN113190292B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation

Abstract

The invention discloses a method and a device for remotely executing functions on a plurality of servers, wherein an RPC client module is deployed on a server for realizing a control function, and an RPC server module is deployed on a server for realizing a service function; for each RPC server module, the RPC server module binds the IP and the port of the server where the RPC server module is located, exposes the IP and the port bound by the RPC server module, and exposes the function of the server where the RPC server module is located, and the RPC server module circularly waits for the parameter instruction transmitted by the RPC client module and executes the corresponding function after receiving the parameter instruction; for each RPC client module, binding the IP and the port of the server to be controlled by the RPC client module, transmitting a parameter instruction to the RPC server module corresponding to the server to be controlled, and controlling the RPC server module corresponding to the server to be controlled to execute the function exposed by the RPC server module; therefore, the remote control of the server only deploying the RPC client module to all other servers is realized.

Description

Method and device for remotely executing functions on multiple servers
Technical Field
The invention relates to a method and a device for remotely executing functions on a plurality of servers, belonging to the technical field of remote control.
Background
At present, a plurality of graphical remote tools are available in the market, and can remotely execute commands on other servers, and the practical scene of the tool is that manual control is carried out on a certain server, a plurality of servers cannot be controlled in batch, and even automatic control cannot be carried out. Remote control tools on the market at present are not highly customizable, and if a plurality of servers are required to jointly test such a scene, no proper tool can be used, and RPC is an abbreviation form of Remote Procedure Call (Remote Procedure Call). The RPC client program calls a function defined in the RPC server through an interface, the server can obtain a command of the client to execute the function and parameters transmitted by the client, and finally executes the function and returns a return value to the client. Therefore, a method for realizing that one client host controls a plurality of servers can be developed based on the RPC technology.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method and the device for remotely executing the functions on the plurality of servers can realize the control of one host computer to the plurality of server hosts through the RPC technology in a customized manner, and can simultaneously execute the functions on the plurality of servers.
The invention adopts the following technical scheme for solving the technical problems:
a method for remotely executing functions on a plurality of servers is specifically as follows:
all servers are linked through the same local area network;
for all servers, according to the sequence of function starting, deploying RPC client modules on the servers which only realize the control function, deploying RPC server modules on the servers which only realize the service function, and deploying the RPC client modules and the RPC server modules on the servers which realize both the control function and the service function;
for each RPC server module, the RPC server module binds the IP and the port of the server where the RPC server module is located, exposes the IP and the port bound by the RPC server module, and exposes the function of the server where the RPC server module is located, and the RPC server module circularly waits for the parameter instruction transmitted by the RPC client module and executes the corresponding function after receiving the parameter instruction;
for each RPC client module, binding the IP and the port of the server to be controlled by the RPC client module, transmitting a parameter instruction to the RPC server module corresponding to the server to be controlled, and controlling the RPC server module corresponding to the server to be controlled to execute the function exposed by the RPC server module;
therefore, the remote control of the server only deploying the RPC client module to all other servers is realized.
A device for remotely executing functions on a plurality of servers comprises an RPC client module and an RPC server module, wherein the RPC client module is deployed on a server for realizing a control function, and the RPC server module is deployed on the server for realizing a service function;
for each RPC server module, the RPC server module binds the IP and the port of the server where the RPC server module is located, exposes the IP and the port bound by the RPC server module, and exposes the function of the server where the RPC server module is located, and the RPC server module circularly waits for the parameter instruction transmitted by the RPC client module and executes the corresponding function after receiving the parameter instruction;
for each RPC client module, binding the IP and the port of the server to be controlled by the RPC client module, transmitting a parameter instruction to the RPC server module corresponding to the server to be controlled, and controlling the RPC server module corresponding to the server to be controlled to execute the function exposed by the RPC server module;
therefore, the remote control of the server only deploying the RPC client module to all other servers is realized.
A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of remotely executing functions on a plurality of servers when executing the computer program.
A computer-readable storage medium, storing a computer program which, when executed by a processor, implements the steps of the method of remotely executing functions on a plurality of servers.
Compared with the prior art, the invention adopting the technical scheme has the following technical effects:
1. aiming at the problem that only one server can be remotely controlled at the same time and communication between the servers cannot be realized, the invention realizes the control of one host computer to a plurality of server host computers through the RPC technology in a customized manner and can simultaneously execute functions on the plurality of servers.
2. The invention can be used for a multi-service combined test scene which does not belong to a plurality of services, and a plurality of hosts are operated and controlled on one host.
Drawings
FIG. 1 is an architecture diagram of an embodiment of a method of remotely executing functions on multiple servers in accordance with the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
The invention introduces a method and a device for simultaneously controlling a plurality of servers and sending instructions based on an RPC technology.
The invention relates to a device for remotely executing functions on a plurality of servers, which mainly comprises the following two modules: an RPC Server module (RPC Server module) and an RPC Client module (RPC Client module);
the RPC Server module is an RPC Server started on the controlled Server, all RPC Server modules on the Server to be controlled need to bind the IP and the port of the Server, the RPC Server exposes the bound IP, the port and the function, waits for the parameter transmitted from the RPC client module in a circulating mode, and executes the corresponding function after receiving the parameter instruction of the RPC client module.
The RPC Client module is a Client to be executed on a host controlling other servers, and also needs to bind the IP and the port of the Server to be controlled, after the RPC Client module binds the IP and the port of the RPC Server to be controlled, the RPC Client module can transmit reference to the RPC Server module, the RPC Server module is controlled to execute an exposed function, and the control Server starts corresponding services according to different parameters.
The invention discloses a method for remotely executing functions on a plurality of servers, which specifically realizes the following ideas:
all PC hosts in the system are linked through the same local area network, and mutual communication is guaranteed. The controlled host is used as an RPC service end, RPC service is started at a designated IP and a designated port, the RPC service designates a specific method, the method is exposed at the designated port, the method receives a character string parameter, and different commands are executed according to the content of the parameter.
The control host acts as an RPC client, creates an RPC link, links to the service of the RPC server host using IP and ports, and the RPC client object can execute the method exposed by the RPC server, and control the server host by importing parameters by executing the method.
The remote control of the multiple hosts by one host needs to deploy RPC service ends on the multiple controlled hosts, the control host deploys RPC client sides, and the client sides are linked with the multiple RPC service ends and execute corresponding methods to send instructions so as to control the multiple hosts, so that commands can be remotely executed on the multiple servers.
Fig. 1 shows an architecture diagram of an embodiment of the present invention. There are five hosts and the test requires that the responding commands be executed on 5 hosts separately to initiate the service.
Then, the invention can be used to start the PRC client service on the pc1, the PRC service end and the PRC client service on the pc2, pc3 and pc4, and the PRC service end service on the pc5, so that the invention can simultaneously control multiple hosts in series and perform online tests of multiple servers.
There are five hosts, host pc1 for the operator to perform the test work. Four services server1, server2, server3 and server4 on which test work depends are respectively deployed on pc2, pc3, pc4 and pc 5. pc2, pc3, pc4, pc5 all initiate the RPC service of the present invention. pc1, pc2, pc3, pc4 can all start the RPC client in the present invention. The pc1 indirectly controls the management of all services through the control of the pc 2.
When the RPC services of pc2 and pc3 are started, pc1 sends a command to pc2 to let pc2 start server1 and server 2. Pc2 will start its own server1 and send command to Pc3 to make Pc3 start server2, and Pc3 starts server2 after receiving command. Control of all services can be accomplished similarly. Therefore, all services deployed on other multiple hosts are started through one instruction.
The above embodiments are only for illustrating the technical idea of the present invention, and the protection scope of the present invention is not limited thereby, and any modifications made on the basis of the technical scheme according to the technical idea of the present invention fall within the protection scope of the present invention.

Claims (4)

1. A method for remotely executing functions on a plurality of servers is characterized by comprising the following steps:
all servers are linked through the same local area network;
for all servers, according to the sequence of function starting, deploying RPC client modules on the servers which only realize the control function, deploying RPC server modules on the servers which only realize the service function, and deploying the RPC client modules and the RPC server modules on the servers which realize both the control function and the service function;
for each RPC server module, the RPC server module binds the IP and the port of the server where the RPC server module is located, exposes the IP and the port bound by the RPC server module, and exposes the function of the server where the RPC server module is located, and the RPC server module circularly waits for the parameter instruction transmitted by the RPC client module and executes the corresponding function after receiving the parameter instruction;
for each RPC client module, binding the IP and the port of the server to be controlled by the RPC client module, transmitting a parameter instruction to the RPC server module corresponding to the server to be controlled, and controlling the RPC server module corresponding to the server to be controlled to execute the function exposed by the RPC server module;
therefore, the remote control of the server only deploying the RPC client module to all other servers is realized.
2. A device for remotely executing functions on a plurality of servers is characterized by comprising an RPC client module and an RPC server module, wherein the RPC client module is deployed on a server for realizing a control function, and the RPC server module is deployed on the server for realizing a service function;
for each RPC server module, the RPC server module binds the IP and the port of the server where the RPC server module is located, exposes the IP and the port bound by the RPC server module, and exposes the function of the server where the RPC server module is located, and the RPC server module circularly waits for the parameter instruction transmitted by the RPC client module and executes the corresponding function after receiving the parameter instruction;
for each RPC client module, binding the IP and the port of the server to be controlled by the RPC client module, transmitting a parameter instruction to the RPC server module corresponding to the server to be controlled, and controlling the RPC server module corresponding to the server to be controlled to execute the function exposed by the RPC server module;
therefore, the remote control of the server only deploying the RPC client module to all other servers is realized.
3. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program performs the steps of the method of remotely executing functions on a plurality of servers as recited in claim 1.
4. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for remotely executing functions on a plurality of servers as claimed in claim 1.
CN202110579042.5A 2021-05-26 2021-05-26 Method and device for remotely executing functions on multiple servers Active CN113190292B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110579042.5A CN113190292B (en) 2021-05-26 2021-05-26 Method and device for remotely executing functions on multiple servers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110579042.5A CN113190292B (en) 2021-05-26 2021-05-26 Method and device for remotely executing functions on multiple servers

Publications (2)

Publication Number Publication Date
CN113190292A true CN113190292A (en) 2021-07-30
CN113190292B CN113190292B (en) 2023-09-26

Family

ID=76985326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110579042.5A Active CN113190292B (en) 2021-05-26 2021-05-26 Method and device for remotely executing functions on multiple servers

Country Status (1)

Country Link
CN (1) CN113190292B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003084992A (en) * 2001-09-07 2003-03-20 Fujitsu Ltd Rpc connection program between client server
US6728788B1 (en) * 1999-12-16 2004-04-27 International Business Machines Corporation Method and system for converting a remote procedure call to a local procedure call when the service is on the same device as the calling client
CN1852209A (en) * 2006-05-31 2006-10-25 北京和利时系统工程股份有限公司 Remote process transfering method and system in distribution type control system
US20140040924A1 (en) * 2011-07-13 2014-02-06 Adobe Systems Incorporated Invocation of additional processing using remote procedure calls
CN104219329A (en) * 2014-09-28 2014-12-17 浪潮软件集团有限公司 Method for deploying service through content distribution in cluster server
CN108965312A (en) * 2018-07-30 2018-12-07 深圳高新兴物联科技有限公司 Remote invocation method, device, system and storage medium
CN111597061A (en) * 2020-05-25 2020-08-28 瑞斯康达科技发展股份有限公司 Method and device for remote procedure call of client or server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6728788B1 (en) * 1999-12-16 2004-04-27 International Business Machines Corporation Method and system for converting a remote procedure call to a local procedure call when the service is on the same device as the calling client
JP2003084992A (en) * 2001-09-07 2003-03-20 Fujitsu Ltd Rpc connection program between client server
CN1852209A (en) * 2006-05-31 2006-10-25 北京和利时系统工程股份有限公司 Remote process transfering method and system in distribution type control system
US20140040924A1 (en) * 2011-07-13 2014-02-06 Adobe Systems Incorporated Invocation of additional processing using remote procedure calls
CN104219329A (en) * 2014-09-28 2014-12-17 浪潮软件集团有限公司 Method for deploying service through content distribution in cluster server
CN108965312A (en) * 2018-07-30 2018-12-07 深圳高新兴物联科技有限公司 Remote invocation method, device, system and storage medium
CN111597061A (en) * 2020-05-25 2020-08-28 瑞斯康达科技发展股份有限公司 Method and device for remote procedure call of client or server

Also Published As

Publication number Publication date
CN113190292B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
CN108713309B (en) SD-WAN system, use method of SD-WAN system and related device
JP4664977B2 (en) Device management method for device management system
CN101350817B (en) Intelligent load balancing and failover of network traffic
RU2533638C2 (en) Data configuration method and device
CN101350818B (en) Intelligent load balancing and failover of network traffic
CN101394400A (en) Intelligent load balancing and failover of network traffic
CN105024895A (en) Intelligent household wireless ad-hoc network communication system, networking method and working method
CN107040531B (en) communication assembly
CN101185070B (en) Device management system and method for setting configuration-value therein
CN102647465B (en) File transfer protocol (FTP) data transmission method and device applied in stack system
CN106571992A (en) Virtual Private Line (VPL) establishing method and device
JP2007526561A (en) Method of configuring automation components of an automation system and corresponding automation system
CN113190292A (en) Method and device for remotely executing functions on multiple servers
CN108153561B (en) Ethernet loading method and signal processing system for DSP and FPGA
CN103138961B (en) server control method, controlled server and central control server
CN112217680A (en) Controller capability benchmark test method and device based on software-defined wide area network
CN116634100A (en) Information interaction method and system based on IPC
CN101470611A (en) Network card supporting remote start and method thereof
CN108319515A (en) A kind of monitoring system communication of marine electromagnetic deck and multi-source data transmission method
JP6438378B2 (en) Control system, control device, control method, and control program
CN115001886A (en) Equipment control method and device and electronic equipment
Großmann et al. Cloudless computing-a vision to become reality
CN106657219B (en) File based on smart machine uploads and method for down loading
CN111343010A (en) Method and equipment for configuring storage IP network port
CN109871288A (en) Execute method, apparatus, equipment and the medium of android system order

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