CN111597061A - Method and device for remote procedure call of client or server - Google Patents

Method and device for remote procedure call of client or server Download PDF

Info

Publication number
CN111597061A
CN111597061A CN202010448873.4A CN202010448873A CN111597061A CN 111597061 A CN111597061 A CN 111597061A CN 202010448873 A CN202010448873 A CN 202010448873A CN 111597061 A CN111597061 A CN 111597061A
Authority
CN
China
Prior art keywords
rpc interface
interface service
client
server
call
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
CN202010448873.4A
Other languages
Chinese (zh)
Other versions
CN111597061B (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.)
Raisecom Technology Co Ltd
Original Assignee
Raisecom 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 Raisecom Technology Co Ltd filed Critical Raisecom Technology Co Ltd
Priority to CN202010448873.4A priority Critical patent/CN111597061B/en
Publication of CN111597061A publication Critical patent/CN111597061A/en
Application granted granted Critical
Publication of CN111597061B publication Critical patent/CN111597061B/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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/549Remote execution
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and a device for a client or a server to carry out remote process calling, wherein the method comprises the following steps: determining RPC interface service and a dynamic calling number of a server to be called; determining that the node number of the server is the same as the node number of the client and the process of the process number identifier is the same as the process of the client, and calling a corresponding callback function in a direct calling mode to enable the server to provide RPC interface service for the client; otherwise, calling the corresponding callback function by creating a SOCKET connection mode, so that the server side provides RPC interface service for the client side. By utilizing the method provided by the invention, a proper communication mode is selected through the position relation of the client and the RPC interface service of the server, the communication mechanism is reliable and efficient, the function prototypes of the RPC interface are unified, compared with the complex parameter processing flow under the general mechanism, the time consumption and the resource consumption of communication are reduced, and the method is suitable for various embedded application development scenes.

Description

Method and device for remote procedure call of client or server
Technical Field
The invention relates to the field of distributed remote procedure call, in particular to a method and a device for carrying out remote procedure call by a client or a server.
Background
On embedded devices such as switches and routers, a service side generally selects a multi-process software architecture construction device based on an RPC mechanism, RPC (Remote Procedure Call) is a common synchronous communication mechanism, the service process can conveniently Call services of other processes by using a function Call mode by using the mechanism, an interaction schematic diagram of a service end and a service end is shown in fig. 1, and the advantage of selecting the architecture is that the multi-process architecture can meet requirements of software on robustness, maintainability and fault location, and the RPC mechanism can meet requirements of cross-node and cross-process communication of a machine frame type device.
Because hardware resources of a CPU, a memory, a disk, and the like on the distributed embedded device are limited, an RPC mechanism used on the distributed embedded device needs to further reduce occupied hardware resources and improve ease of deployment and use, but an existing C language synchronous communication framework, such as Doors, Sun RPC, and the like, generally has a problem of complex framework, for example, the Doors mechanism is based on a file descriptor, specifically performs synchronous communication by reading a file in a local node, is actually an IPC (Inter-Process communication IPC) mechanism, is only applicable to a Solaris system (special x system), and can only operate at unitrans-processes instead of trans-nodes; the Sun RPC is a heavy-weight frame based on IP, the flow is complex when an RPC interface is defined, and because the universality of the Sun RPC is higher, multiple embedded languages can perform synchronous communication under the Sun RPC frame, so that the exception processing and the generalized processing flow and the processing files in the frame are numerous, the mechanism occupies a large amount of memory and disk resources, and finally the communication duration is prolonged.
Disclosure of Invention
The invention provides a method and a device for a client or a server to carry out remote procedure call, which are used for solving the problems that: the existing RPC mechanism is complex to use, occupies more CPU resources and is not suitable for the remote distributed communication scene of the embedded equipment.
The first aspect of the invention provides a method for a client to perform Remote Procedure Call (RPC), which comprises the following steps:
determining RPC interface service provided by a service end to be called and a corresponding dynamic call number, wherein the dynamic call number comprises a static call number and a node number where the service end is located, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
determining that the number of the node where the server is located is the same as the number of the node where the client is located, and the process identified by the process number is the same as the process where the client is located, calling a callback function corresponding to the callback function number in a direct calling mode, so that the server provides the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface service for the client side.
The second aspect of the present invention provides a method for a server to perform Remote Procedure Call (RPC), wherein the method comprises:
receiving a call initiated by a client to RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
and if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
The third aspect of the present invention provides an apparatus for a client to perform Remote Procedure Call (RPC), the apparatus comprising:
a memory to store instructions;
a processor for reading the instructions in the memory, performing the following processes:
determining RPC interface service provided by a service end to be called and a corresponding dynamic call number, wherein the dynamic call number comprises a static call number and a node number where the service end is located, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
determining that the number of the node where the server is located is the same as the number of the node where the client is located, and the process identified by the process number is the same as the process where the client is located, calling a callback function corresponding to the callback function number in a direct calling mode, so that the server provides the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface service for the client side.
The fourth aspect of the present invention provides a device for a server to perform Remote Procedure Call (RPC), where the device includes:
a memory to store instructions;
a processor for reading the instructions in the memory, performing the following processes:
receiving a call initiated by a client to RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
and if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
The fifth aspect of the present invention provides a device for a client to perform Remote Procedure Call (RPC), which includes the following modules:
the comparison module is used for determining RPC interface service provided by a service end to be called and a corresponding dynamic call number, wherein the dynamic call number comprises a static call number and a node number where the service end is located, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
the connection mode determining module is used for determining that the number of the node where the server is located is the same as the number of the node where the client is located, and the process identified by the process number is the same as the process where the client is located, and calling a callback function corresponding to the callback function number in a direct calling mode to enable the server to provide the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface calling service for the client side.
The sixth aspect of the present invention provides a device for a server to perform Remote Procedure Call (RPC), which includes the following modules:
the receiving indication module is used for receiving the call of the RPC interface service provided by the server initiated by the client;
a connection establishing module for responding to the call and providing the RPC interface service for the client;
and if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
A seventh aspect of the present invention provides a computer storage medium having stored thereon a computer program which, when executed by a processor, performs the method provided by the first aspect of the present invention, or performs the method provided by the second aspect of the present invention.
By utilizing the method for the client to carry out Remote Procedure Call (RPC), which is provided by the invention, the client can select a communication mode suitable for the position relation according to the relative position relation between the client and the RPC interface service of the server, the communication mechanism is reliable and efficient, the callback function forms of the RPC interface service are uniform, compared with the complex parameter processing flow under the general mechanism, the time consumption and the resource consumption of communication are reduced, and the method is suitable for various embedded application development scenes.
Drawings
Fig. 1 is an interaction diagram of a service end and a service end;
FIG. 2 is a system for performing remote procedure calls RPC;
FIG. 3 is a flow chart of a method for a client to perform Remote Procedure Call (RPC);
FIG. 4 is a complete flow chart of a method for a complete client to perform remote procedure call RPC;
FIG. 5 is a flow chart of a method for a server to perform Remote Procedure Call (RPC);
FIG. 6 is a schematic diagram of a device for remote procedure call RPC at a client;
FIG. 7 is a schematic diagram of an apparatus for a server to perform remote procedure call RPC;
FIG. 8 is a block diagram of an apparatus for remote procedure call RPC at a client;
FIG. 9 is a block diagram of an apparatus for remote procedure call RPC by a server.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
The embodiments of the application are described in further detail below with reference to the drawings of the specification. It is to be understood that the embodiments described herein are merely illustrative and explanatory of the application and are not restrictive thereof.
For convenience of understanding, terms referred to in the embodiments of the present invention are explained below:
1) RPC (Remote Procedure Call) is a synchronous communication mechanism, and facilitates a service process to Call services of other processes in a function Call manner.
2) SOCKET is an abstraction layer through which an application can send or receive data, and can perform operations such as opening, reading, writing, and closing on the application like a file. Sockets allow applications to plug I/O into the network and communicate with other applications in the network.
An embodiment of the present invention provides a system for performing Remote Procedure Call (RPC), and as shown in fig. 2, the system includes: the client 201 and the server 202, the client 201 determines a specific connection establishing mode by comparing a dynamic call number corresponding to the RPC interface service provided by the server 202 to be called, a node number where the client 201 is located, and a process number. The node can be one communication device, and different nodes are different communication devices; or, the node is a board card in the machine frame equipment, and different board cards are inserted into different slot positions of the machine frame equipment. A plurality of processes are deployed on each node, wherein each process comprises a plurality of threads. The client 201 and the server 202 may be distributed on two independent threads of the same process on the same node (cross-thread), may be distributed on two different processes on the same node (cross-process), and may be distributed on different nodes (cross-node). Under the cross-thread condition, one process can have the client 201 and the server 202, one thread in the process is used as the client 201 to run the client 201 service, and the other thread is used as the server 202 to provide RPC interface service. The RPC interface service can be realized through a callback function.
The dynamic call number determined by the client 201 includes: the call-back function number of the RPC interface service provided by the service side 202 to be called, and the process number and the node number where the call-back function number is located. When the client 201 calls the determined dynamic call number to provide the RPC interface service, if the node number and the process number included in the dynamic call number are the same as the node number and the process number of the process in which the client 201 is located, it indicates that the client 201 and the server 202 are in the same process, and the server 202 provides the RPC interface service for the client 201 by using a direct function call mode. Otherwise, calling the callback function corresponding to the callback function number by creating a SOCKET connection mode, calling the RPC interface service, and returning a response instruction of the RPC interface service of the server 202 to be called to the client 201 after the server 202 receives the call request instruction.
The client 201 has a cache capability of storing SOCKET connections, and avoids that SOCKET connection establishment and cache release are executed every time calling is performed.
The technical scheme provided by the following embodiment is applicable to a scene that the client calls the RPC interface service provided by the server to serve the client business under the system architecture containing at least one node.
Example 1
The embodiment of the invention provides a method for a client to perform Remote Procedure Call (RPC), which comprises the following steps as shown in figure 3:
step S301, determining an RPC interface service provided by a service end to be called and a corresponding dynamic call number, wherein the dynamic call number comprises a static call number and a node number where the service end is located, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
the client side firstly determines RPC interface service provided by a server side to be called, the RPC interface service further determines a dynamic call number corresponding to the RPC interface service in a certain process of a certain node of a system architecture, the dynamic call number comprises a static call number and a node number where the server side is located, and the static call number comprises a process number and a call-back function number corresponding to the RPC interface service. The process number corresponding to the RPC interface service is the number of the process where the server side providing the interface service is located.
Specifically, a static call number of the service-side RPC interface service to be called may be read from a global file shared by all nodes of a system architecture created in advance, where a developer defines a call-back function name and a process where the call-back function name provides each service-side RPC interface service in the global file, and generally, the static call number includes a process number corresponding to a process where the 2-byte identification RPC interface service is located and a call-back function number corresponding to a call-back function where the 2-byte identification RPC interface service is located.
Because an RPC interface service corresponds to a service thread, when the RPC interface services with the same function are deployed on different nodes, a plurality of processes have the same static call number, and at the moment, a client does not know which server process is initiated for connection, so that RPC interface call cannot be completed.
Step S302, determining that the node number of the server is the same as the node number of the client, and the process identified by the process number is the same as the process of the client, calling the callback function number to call the corresponding callback function in a direct calling mode, so that the server provides the RPC interface service for the client;
otherwise, calling a callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface service for the client side.
After a dynamic call number corresponding to RPC interface service provided by a server to be called is acquired, whether a node number where the server is located is the same as a node number where a client is located is determined, whether a process identified by a static call number in the dynamic call number is the same as a process where the client is located is determined, and when the two are determined to be the same, the client and the server are indicated to be located in the same process of the same node, so that a call-back function corresponding to the RPC interface of the server can be called by using a direct call mode, and the server is enabled to provide the RPC interface service for the client.
Otherwise, when the client and the server are determined not to be in the same process of the same node, the RPC interface service is called in a mode of creating SOCKET connection.
As an optional implementation manner, when it is determined that the node number of the server is different from the node number of the client, or that the node number of the server is the same as the node number of the client, the process identified by the static call number is different from the process identified by the client, the socks connection corresponding to the dynamic call number is queried.
Specifically, when the number of the node where the server is located is determined to be different from the node where the client is located, or when the process identified by the process number is determined to be different from the process where the client is located, the dynamic call number is used as a key to query the SOCKET connection hash table, and whether the corresponding created SOCKET connection exists is judged.
If the corresponding SOCKET connection is inquired, calling the callback function corresponding to the callback function number through the SOCKET connection to enable the server side to provide the RPC interface service for the client side, otherwise, creating the corresponding SOCKET connection, calling the callback function corresponding to the callback function number through the created SOCKET connection to enable the server side to provide the RPC interface service for the client side.
Illustratively, the SOCKET connection hash table is queried by taking the dynamic call number as a key, if SOCKET connection is found, the RPC interface service call is completed by using the connection, otherwise, SOCKET connection is created, RPC interface service call is completed by using newly created SOCKET connection, and the SOCKET connection is inserted into the SOCKET connection hash table by taking the dynamic call number as a key for the next query.
As an optional implementation, creating a corresponding SOCKET connection includes the following connection creation modes:
if the node number of the server side is different from the node number of the client side, establishing a corresponding preset TIPC SOCKET connection suitable for the cross node;
and if the node number of the server side is the same as the node number of the client side, creating a corresponding preset UNIX SOCKET connection suitable for the cross-process according to the dynamic calling number.
In this embodiment, the client selects a communication mode suitable for the position relationship according to the relative position relationship between itself and the RPC interface of the server, specifically:
if the client and the server are in the same process (cross-thread), the call of the RPC interface service of the server to be called is directly completed by using a local callback function without using a SOCKET mode, so that the call flow is simplified;
the client and the server are in the same node (cross process) and are connected by using UNIX SOCKET, so that the method has the advantages of high efficiency and reliability;
the client and the server are connected by TIPC SOCKET at different nodes (cross nodes), and the method has the capability of sensing the slot position change of the server and automatically realizing online.
As an optional implementation, the creating a corresponding SOCKET connection includes: and taking the dynamic call number as a SOCKET monitoring port number, and establishing SOCKET connection with RPC interface service provided by a service end to be called. In the embodiment, one RPC interface service provided by the server exclusively occupies one thread, and each RPC interface service creates a SOCKET by using its own dynamic call number as a SOCKET monitoring port number, and waits for the connection of the client.
As another optional implementation, creating a corresponding SOCKET connection includes:
taking the dynamic calling number as a SOCKET monitoring port number, and establishing SOCKET connection with RPC interface service provided by a service end to be called;
and if the SOCKET connection is failed to be established, utilizing the public SOCKET monitoring port number of the server to establish the SOCKET connection with the RPC interface service provided by the server to be called.
In another optional embodiment, when the thread allocation is tense, the server further optimizes the thread allocation of the RPC interface service, so that part of the RPC interface services of the server share one thread and part of the RPC interface services monopolize one thread, thereby effectively reducing the use of a thread stack under the condition of resource limitation and meeting the requirement that the RPC interface services are processed in parallel. That is, the thread allocation result of each RPC interface service is exclusive to one thread (i.e. exclusive thread), or shared with other RPC interface services provided by the server (i.e. shared thread). When RPC interface service corresponding to the dynamic call number selected by the client is divided into exclusive threads by the server, the server uses an exclusive SOCKET monitoring port of the exclusive threads to provide RPC interface service connection for the client; when the RPC interface service corresponding to the dynamic call number selected by the client is divided into common threads by the server, the server uses the common monitoring port of the common threads to provide RPC interface service connection for the client. Correspondingly, the client side can detectably try to establish the SOCKET connection of the RPC interface service corresponding to the server side, firstly defaults to establish the connection by taking the dynamic call number as a SOCKET monitoring port number, and then establishes the connection by using the public SOCKET monitoring port number when the connection fails.
As still another optional implementation manner, the method provided in this embodiment further includes: and acquiring a thread allocation result of the RPC interface service notified by the server in a mode of the service quality grade of the RPC interface service, wherein the thread allocation result is exclusive thread allocation or shared thread allocation. Therefore, the thread allocation condition of each RPC interface service on the server is known to the client, so that the client can select the matched SOCKET monitoring port number according to the thread allocation condition to directionally establish connection. Specifically, creating the corresponding SOCKET connection may include:
when the service quality level of the RPC interface service is a first service quality level corresponding to the exclusive thread allocation, the dynamic call number is used as a SOCKET monitoring port number, and SOCKET connection with the RPC interface service provided by the service end to be called is established;
and when the service quality level of the RPC interface service is a second corresponding service quality level allocated to the common thread, using the public SOCKET monitoring port number of the server to establish SOCKET connection with the RPC interface service provided by the server to be called.
In yet another alternative embodiment, the server notifies the thread allocation result to each client of each node in the system in a manner of service quality level of the RPC interface service, so that each client knows the thread allocation result of each RPC interface service of the server, and the server can directly use a suitable SOCKET monitoring port number to create UNIX SOCKET connection or TIPC SOCKET connection with the RPC interface service of the server to be called.
As an optional implementation manner, the obtaining a thread allocation result of the RPC interface service, which is notified by the server in a manner of a quality of service level of the RPC interface service, includes:
receiving the service quality grade of RPC interface service sent by a server; the service quality grade is used as identification information of a thread allocation result of the RPC interface service, and is determined by the server according to historical calling condition statistical information of the RPC interface service.
The historical calling condition statistical information comprises at least one of the following information of RPC interface service: number of times of call collapse, average call time duration, call stack depth and number of calls.
Specifically, the server acquires historical call condition statistical information of each RPC interface service of the server when initialization is completed or periodically, where the statistical information includes: number of times of call collapse, average call time duration, call stack depth and number of calls.
Wherein: number of call crashes: the RPC interface service triggers the times of the process exit errors of the RPC interface service such as program errors, memory boundary crossing and the like, and is used for representing the stability, and the call crash times can be recorded by the abnormity monitoring module when the process of the RPC interface service exits.
Average call time duration: the method comprises the steps of recording the time-consuming duration of each call of a callback function of the RPC interface service, and calculating an obtained average value, wherein the significance of the parameter lies in judging the influence of the RPC interface service on the use of other RPC interface services.
Calling stack depth: a stack structure can be formed for the call-back function call of the RPC interface service, the deeper the call level is, the higher the call stack depth is, the complexity is expressed, and the deeper the call stack depth is, the higher the complexity is.
Calling times are as follows: the RPC interface service provides services or called times, which are used for representing the frequency of the services, and the more the RPC interface service provides the services, the more frequent the calling is.
After obtaining the historical call condition statistical information, the server calculates the service quality value of each RPC interface service of the server by using the historical call condition statistical information according to a preset measurement algorithm, for example, the preset measurement algorithm may be: and normalizing various information in the historical calling condition statistical information to obtain corresponding parameters, and then carrying out weighted summation on the parameters. Typically, the service quality value of the RPC interface service is ═ crash parameter 0.5+ time-consuming parameter 0.3+ call stack parameter 0.1+ call times parameter 0.1. The 4 types of statistical information including the number of times of call collapse, the average call time duration, the call stack depth and the number of times of call can be divided into a plurality of intervals respectively, and different intervals correspond to different normalization parameter values of the type of statistical information. Exemplary, crash parameters: if the number of times of calling the crash is more than 1, the crash parameter is 1, otherwise, the crash parameter is 0; time-consuming parameters: if the average calling time duration is more than 500ms, the time-consuming parameter is 1, otherwise, the time-consuming parameter is 0; calling stack parameters: if the call stack depth is greater than 10 layers, the call stack parameter is 1, otherwise the call stack parameter is 0; calling times parameter: if the calling times are more than 500, the parameter of the calling times is 1, otherwise, the parameter of the calling times is 0. More than two intervals can be divided according to 4 types of different statistical information, and the division of the intervals can be determined by a person skilled in the art according to experience by combining with an actual application scene.
And then, determining the service quality level to which the service quality value belongs according to the size of the service quality value, wherein different service quality levels correspond to different thread allocation results of RPC interface services. For example, for an RPC interface service whose quality of service value belongs to a first quality of service level, the corresponding thread allocation result is allocation of an exclusive thread, i.e., an exclusive thread; and for the RPC interface service with the service quality value belonging to the second service quality level, the corresponding thread allocation result is allocated to a shared thread, namely a shared thread.
As an optional implementation mode, whether the RPC interface service shares a common thread or monopolizes a thread is determined by the service quality value of the RPC interface service, and the higher the service quality value is, the higher the priority is, which indicates that the RPC interface service needs to be singly allocated with an monopolized thread under the condition. Specifically, the service end can sort the service quality values of all RPC interface services of the service end obtained through calculation according to the sizes, wherein the service quality value of the top N meets a preset condition, the first service quality level corresponds to a first service quality level, the RPC interface services of the service end occupy one thread exclusively, the other service quality values do not meet the preset condition, the second service quality level corresponds to a second service quality level, and the RPC interface services of the service end share a common thread. The N is a positive integer greater than or equal to 1, and can be determined by those skilled in the art in combination with an actual application scenario. Preferably, the preset condition value is 50% of the total number of the RPC interface services of the server. The preset condition is used as a reference for determining whether the RPC interface service monopolizes the thread, and may also be in other forms, where an exclusive thread is separately allocated to an RPC interface service whose service quality value is higher than a preset threshold of service quality value, and other RPC interface services allocate a shared thread, which is not specifically limited in this embodiment.
As another optional mode, a thread allocation result of the RPC interface service notified by the server according to a preset quality of service level of the RPC interface service is obtained.
In a pre-created global file shared by all nodes in a system architecture, a developer presets a service quality grade of RPC interface service while statically appointing a callback function and a static call number of each RPC interface service of each service end providing each RPC interface service, when the process initialization of the service end is completed, an independent thread of the developer is created for each RPC interface service belonging to a first service quality grade of the service end, a shared thread is created for all RPC interface services belonging to a second service quality grade, and all the independent threads and the shared thread form a thread pool of the RPC interface service.
Preferably, by combining the two methods, the service end adaptively modifies the service quality level of the RPC interface service of the corresponding service end in the global file according to whether the calculated service quality value meets a preset condition, and when the global file opens the modification right of a developer, the developer can also modify the service quality level, an independent thread is created for each RPC interface service of the service end, which belongs to the first service quality level, a common thread is created for all the RPC interface services belonging to the second service quality level, and all the independent threads and the common thread form a thread pool of the RPC interface services.
During specific implementation, after the process initialization of the server is completed, respective independent threads are respectively created for each RPC interface service of the server, an RPC interface service thread pool of the server is formed, namely, how many independent threads exist in the plurality of RPC interface services, all independent threads of all RPC interface services with the service quality values which do not meet preset conditions in the RPC interface service thread pool are deleted in real time subsequently according to the determined service quality values, a shared thread is created, and all RPC interface services which do not meet the preset conditions are provided. Of course, after the process initialization of the server is completed, a common thread may be created for each RPC interface service of the server to form an RPC interface service thread pool of the server, that is, all RPC interface services share one thread, and then, according to the determined service quality value, independent threads are respectively created for all RPC interface services whose service quality value meets the preset condition in the RPC interface service thread pool in real time.
In the above specific embodiment, the RPC service thread pool is completely created after the server is initialized, and then, local dynamic adjustment is performed according to the service quality level, and the service quality level of the service operation of the RPC interface can be adjusted according to the actual historical call condition statistical information.
As an optional implementation manner, before the step of determining the RPC interface service provided by the server to be called, the method further includes:
determining the online/offline state of the RPC interface service provided by the server according to the multicast message of each server providing the RPC interface service;
and when the RPC interface service provided by the server side is determined to be required to be called, the RPC interface service in an online state is selected to be called.
Specifically, the server notifies the client of online and offline events of the RPC interface service. Illustratively, each node joins multicast by creating multicast messages of the TIPC protocol, and the nodes multicast the online and offline states of their RPC interface services via heartbeat messages. So that the client only calls the online RPC interface service.
As an alternative embodiment, the server considers that when the dynamic call number is used as a listening port number of an RPC interface service, there may be a listening port collision (which may cause a service unavailability as a port listened by other applications), and when the RPC call number is 32 bits and the port listened by TCP is 16 bits, the requirement may not be met, so that a 32-bit listening port space independent from the operating system may be created by using the TIPC protocol, and a collision between ports may be avoided.
As an optional implementation manner, in an application scenario where the system framework is a distributed embedded system framework (e.g., a machine frame device), the technical solution provided by the embodiment of the present invention is implemented by using a C language, so as to solve the problem of overloading of the embedded device by the existing RPC interface service.
Correspondingly, the client determines the RPC interface service provided by the server to be called, and determines the dynamic calling number corresponding to the RPC interface service, including:
determining a static call number of an RPC interface service provided by a service end to be called by utilizing a C language header file, wherein the C language header file defines the static call number of each RPC interface service and a call-back function name corresponding to a call-back function number in the static call number in advance;
and determining a dynamic call number corresponding to the RPC interface service according to the static call number of the RPC interface service and the node where the RPC interface service is located.
Specifically, a global file shared by all nodes of the system architecture created in advance is defined in a header file of the C language, and the header file of the C language may be rpc.h. And each RPC interface service on all nodes of the system architecture is declared in the global file, and each declared RPC interface service comprises a static call number of the service and callback function related information. Preferably, the callback function of the RPC interface service is declared using a weak symbol. The method can ensure that the RPC interface service can be successfully compiled and run to finish the RPC interface service no matter whether the C file has the same-name function definition or not, can solve the link error possibly encountered in the compiling process of the RPC interface service by using a C language weak symbol mechanism, and simplifies the function registration flow of the traditional RPC interface service by using the weak symbol mechanism, so that the RPC interface service does not need to display registration by a user, and the errors introduced by the registration flow and the de-registration flow of the RPC interface service are avoided.
When the client process compiles the link, the statement of the RPC interface service in the header file can be used for a callback function definition reference of the RPC interface service and for inquiring a callback function of the RPC interface service and a static call number of the callback function.
When the server process compiles the link, the statement of the RPC interface service in the header file can be regarded as the callback function definition of the RPC interface service. In the linking process, if the linker finds that the C file has the same-name function definition, the static calling number is bound with the actual callback function address, otherwise, the linker binds the static calling number with the address of the weak symbol. The operation can ensure that the call-back function of the RPC interface service can be successfully compiled, passed and run no matter whether the call-back function is realized or not.
Illustratively, the RPC interface service definition in the header file of the C language can be represented by the following data structure,
typedef int (. sup.) -callback (char. buf, int buflen, int × node)/. sup. sup
Figure BDA0002506795170000151
Wherein callno: the RPC static call number refers to the RPC interface service, and the dynamic call number is obtained by using the RPC static call number at the client to complete remote procedure call;
func: the RPC interface service recalls the function name.
FIG. 4 shows a flow chart corresponding to a method for a complete client to perform Remote Procedure Call (RPC);
step S401, obtaining multicast messages of each server of RPC interface services provided by the server, obtaining thread allocation results of the RPC interface services notified by the server according to the service quality grades of the RPC interface services, and determining the RPC interface services in an online state according to the obtained results;
step S402, determining RPC interface service provided by a to-be-called server side in an online state and a corresponding dynamic calling number;
step S403, judging whether the node number of the server is the same as the node number of the client and the process number, if so, executing step S404, otherwise, executing step S405;
step S404, calling a callback function corresponding to the RPC interface service in a direct calling mode, so that a server side provides the RPC interface service for a client side;
step S405, judging whether the SOCKET connection corresponding to the dynamic call number is inquired, executing step S406 when the inquiry is determined, otherwise executing step S407;
step S406, calling a callback function corresponding to the callback function number through the SOCKET connection, so that the server side provides the RPC interface service for the client side;
step S407, judging whether the number of the node where the server is located is different from the number of the node where the client is located, if not, executing step S408, otherwise, executing step S409;
step S408, creating a corresponding TIPC SOCKET connection, and calling the RPC interface service based on the connection;
and step S409, creating a corresponding UNIX SOCKET connection, and calling the RPC interface service based on the connection.
The process in the above steps S404, S405, S408, S409 can be summarized as that the client sends to the server the request data of the RPC interface service provided by the server to be called, the client receives the response data of the RPC interface service provided by the server to be called, and when the SOCKET connection mode is adopted, the request data at least needs to include the dynamic call number corresponding to the RPC interface service provided by the server to be called. In the above steps S408 and S409, if the creating of the corresponding SOCKET connection is successful, the successful connection information is stored in the hash table with the determined dynamic call number as the KEY value for the next query.
By utilizing the method provided by the invention, the client can select a communication mode suitable for the position relation according to the relative position relation between the client and the RPC interface service of the server, the communication mechanism is reliable and efficient, the callback function form of the RPC interface service is uniform, compared with the complex parameter processing flow under the general mechanism, the communication time consumption and resource loss are reduced, and the method is suitable for various embedded application development scenes.
Example 2
The embodiment of the invention provides a method for a server to perform Remote Procedure Call (RPC), which can be used in cooperation with a client in the first embodiment to complete remote procedure call of RPC interface service. As shown in fig. 5, the method comprises the steps of:
step S501, receiving a call initiated by a client to RPC interface service provided by a server;
the method comprises the steps that an RPC interface service provided by a server to be called is firstly determined by a client, the RPC interface service further determines a dynamic call number corresponding to the RPC interface service in a certain process of a certain node of a system architecture, the dynamic call number comprises a static call number and a node number where the server is located, and the static call number comprises a process number and a call-back function number corresponding to the RPC interface service.
And step S502, responding to the call, and providing the RPC interface service for the client.
And if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
After a client determines a dynamic call number corresponding to RPC interface service provided by a server to be called, whether a node number in the dynamic call number is the same as a node where the client is located is determined, whether a process identified by a static call number in the dynamic call number is the same as the process where the client is located is determined, and when the node number and the process are determined to be the same, the client and the server are in the same process of the same node, so that the client can call a callback function corresponding to the RPC interface of the server in a direct calling mode to provide the RPC interface service for the client to finish calling. Otherwise, when the client and the server are determined not to be in the same process of the same node, calling the callback function corresponding to the callback function number in a SOCKET connection creating mode, and calling the RPC interface service for the client to complete calling.
As an optional implementation manner, before receiving a call initiated by a client to an RPC interface service provided by a server, the method provided in this embodiment further includes:
the method comprises the steps of obtaining a static call number of RPC interface service provided by a server and a node number used for uniquely identifying a node where the server is located, wherein the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
combining the obtained static calling number and the obtained node number of the RPC interface service to generate a dynamic calling number of the RPC interface service;
determining a SOCKET monitoring port number of RPC interface service, creating a preset TIPC SOCKET suitable for cross-node and a UNIX SOCKET suitable for cross-process under the monitoring port number, and waiting for connection of a client.
Correspondingly, receiving the call initiated by the client in a mode of creating SOCKET connection, responding to the call, and providing RPC interface service for the client, wherein the method comprises the following steps:
receiving a TIPC SOCKET or UNIX SOCKET connection request initiated by a client under a SOCKET monitoring port number;
and establishing a SOCKET connection corresponding to the connection request with the client, and providing RPC interface service for the client based on the SOCKET connection.
Wherein, providing RPC interface service for the client comprises: receiving call request data which are sent by a client and contain the dynamic call number and are used for RPC interface service provided by a server to be called; and feeding back response data obtained by calling the callback function of the RPC interface service according to the calling request data to the client.
As an optional implementation manner, determining a SOCKET listening port number of the RPC interface service includes:
when the thread allocation result of the RPC interface service is an exclusive thread, taking the dynamic call number of the RPC interface service as the SOCKET monitoring port number of the RPC interface service;
and when the thread allocation result of the RPC interface service is a common thread, taking the preset SOCKET common monitoring port number of the server as the SOCKET monitoring port number of the RPC interface service.
As an optional implementation, the method further comprises:
according to the service quality of the RPC interface service, thread allocation is carried out on all RPC interface services provided by the server;
specifically, according to the static call number of RPC interface service with the dynamic call number is confirmed to server side place node number, and utilizes dynamic call number provides the client the exclusive listening port of the exclusive thread of RPC interface service, or provides the public listening port of the common thread of RPC interface service, confirm by the server the mode of the exclusive thread or the common thread of RPC interface service refers to the description in embodiment 1, and it is no longer repeated here.
As an optional implementation manner, according to the service quality of the RPC interface service, thread allocation is performed on all RPC interface services provided by the server, including:
calculating the service quality value of the RPC interface service according to the historical calling condition statistical information of the RPC interface service;
determining the service quality level to which the service quality value belongs;
allocating a thread allocation result corresponding to the service quality grade for the RPC interface service;
wherein the historical calling condition statistical information comprises at least one of the following information: number of times of call collapse, average call time duration, call stack depth and number of calls.
Specifically, the service quality value is determined according to the historical call condition statistical information of the RPC interface service, the service quality level to which the service quality value belongs is determined according to the size of the service quality value, the thread allocation result of the RPC interface service is determined according to the service quality level, the historical call condition statistical information comprises call collapse times, average call time duration, call stack depth and call times, and the specific service quality value calculation mode and the mode provided by the embodiment are based on the same concept and are not repeated herein; or
And determining a thread allocation result of the RPC interface service according to the preset service quality level of the RPC interface service.
As an optional implementation manner, before the step of receiving a call initiated by a client to an RPC interface service provided by a server, the method further includes:
and multicasting the online/offline states of different RPC interface services through multicast messages so that the client determines the online/offline states of the RPC interface services.
As an alternative embodiment, the service side may adopt the TIPC protocol to create 32-bit listening port space independent from the operating system to avoid collision between ports, considering that when the dynamic call number is used as the listening port number of the RPC interface service, there may be a listening port collision (the same port that other applications listen to may cause unavailability of the service) problem, and when the RPC call number is 32 bits and the port that TCP listens is 16 bits, the requirement may not be met.
As an optional implementation manner, obtaining a static call number of an RPC interface service provided by a server includes:
determining a static call number of RPC interface service provided by a server by using a C language header file, wherein the C language header file is predefined with the static call number of each RPC interface service and a callback function name corresponding to the callback function number of the static call number;
wherein, the callback function name is described by weak symbols.
As an optional implementation manner, in response to the call, providing the RPC interface service for the client includes:
inquiring a corresponding callback function in a C language file according to the static call number and the callback function name of the RPC interface service;
and if the corresponding callback function is inquired, providing RPC interface service for the client according to the callback function, otherwise, providing response indication information that the callback function is empty for the client.
The method for the server to perform the remote procedure call RPC has the same concept as that of the method for the client to perform the remote procedure call RPC provided in embodiment 1, and is not described herein again.
By utilizing the method provided by the invention, the client can select a communication mode suitable for the position relation according to the relative position relation between the client and the RPC interface service of the server, the communication mechanism is reliable and efficient, the function prototypes of the RPC interface are unified, compared with the complex parameter processing flow under the general mechanism, the time consumption and the resource consumption of communication are reduced, and the method is suitable for various embedded application development scenes.
The apparatus 600 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 601 (e.g., one or more processors) and a memory 602, and one or more storage media 603 (e.g., one or more mass storage devices) for storing applications 604 or data 606. Wherein the memory 602 and storage medium 603 may be transient or persistent storage. The program stored in the storage medium 603 may include one or more modules (not shown), and each module may include a series of instruction operations in the information processing apparatus. Further, the processor 601 may be configured to communicate with the storage medium 603 and execute a series of instruction operations in the storage medium 603 on the apparatus 600.
The device 600 may also include one or more power supplies 609, one or more wired or wireless network interfaces 607, one or more input-output interfaces 608, and/or one or more operating systems 605, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
Wherein, the processor is used for reading the instruction in the memory and executing the following processes:
determining RPC interface service provided by a service end to be called and a corresponding dynamic call number, wherein the dynamic call number comprises a static call number and a node number where the service end is located, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
determining that the number of the node where the server is located is the same as the number of the node where the client is located, and the process identified by the process number is the same as the process where the client is located, calling a callback function corresponding to the callback function number in a direct calling mode, so that the server provides the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface calling service for the client side.
Optionally, the processor is further configured to call a callback function corresponding to the callback function number in a manner of creating SOCKET connection, so that the server provides the RPC interface service for the client, including:
determining that the number of the node where the server is located is different from the number of the node where the client is located, or determining that the number of the node where the server is located is the same as the number of the node where the client is located, and inquiring the SOCKET connection corresponding to the dynamic call number, wherein the process of the process number identification is different from the process where the client is located;
if the corresponding SOCKET connection is inquired, calling the callback function corresponding to the callback function number through the SOCKET connection to enable the server side to provide the RPC interface service for the client side, otherwise, creating the corresponding SOCKET connection, calling the callback function corresponding to the callback function number through the created SOCKET connection to enable the server side to provide the RPC interface service for the client side.
Optionally, the processor is further configured to create a corresponding SOCKET connection, including:
if the node number of the server side is different from the node number of the client side, establishing a corresponding preset TIPC SOCKET connection suitable for the cross node;
and if the number of the node where the server side is located is the same as that of the node where the client side is located, establishing a corresponding preset UNIX SOCKET connection suitable for cross-process.
Optionally, the processor is further configured to create a corresponding SOCKET connection, including:
and taking the dynamic call number as a SOCKET monitoring port number, and establishing SOCKET connection with RPC interface service provided by a service end to be called.
Optionally, the processor is further configured to:
and after the corresponding SOCKET connection is failed to be established according to the dynamic call number, utilizing the public SOCKET monitoring port number of the server to establish the SOCKET connection with the RPC interface service provided by the server to be called.
Optionally, the processor is further configured to: obtaining a thread allocation result of the RPC interface service notified by a server in a mode of service quality level of the RPC interface service, wherein the thread allocation result is exclusive thread allocation or shared thread allocation, and creating a corresponding SOCKET connection, including:
when the service quality level of the RPC interface service is a first service quality level corresponding to the exclusive thread allocation, the dynamic call number is used as a SOCKET monitoring port number, and SOCKET connection with the RPC interface service provided by the service end to be called is established;
and when the service quality level of the RPC interface service is a second corresponding service quality level allocated to the common thread, using the public SOCKET monitoring port number of the server to establish SOCKET connection with the RPC interface service provided by the server to be called.
Optionally, before the step of determining the RPC interface service provided by the service end to be called, the processor is further configured to:
determining the online/offline state of the RPC interface service provided by the server according to the multicast message of each server providing the RPC interface service;
and when the RPC interface service provided by the server side is determined to be required to be called, the RPC interface service in an online state is selected to be called.
Optionally, the processor is further configured to determine an RPC interface service provided by a service end to be called, and determine a dynamic call number corresponding to the RPC interface service, including:
determining a static call number of an RPC interface service provided by a service end to be called by utilizing a C language header file, wherein the C language header file pre-defines the static call number of each RPC interface service and a call-back function name corresponding to a call-back function number in the static call number;
and determining a dynamic call number corresponding to the RPC interface service according to the static call number of the RPC interface service and the node where the server side is located.
Optionally, the processor is further configured to call a corresponding callback function according to the callback function number to provide the RPC interface service or call the RPC interface service by creating a SOCKET connection, including:
sending a call request to a server, receiving a dynamic call number determined by the server according to the static call number of the RPC interface service and the server node number of the server, and querying a corresponding callback function in a C language file according to the callback function name by using the dynamic call number;
and when the corresponding callback function is determined to be inquired, the receiving server calls the RPC interface service provided by the callback function, otherwise, the RPC interface service provided by the server to be called is determined again.
The embodiment of the invention provides a device for a server to perform Remote Procedure Call (RPC), which is shown in FIG. 7:
the apparatus 700 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPU) 701 (e.g., one or more processors) and a memory 702, one or more storage media 703 (e.g., one or more mass storage devices) storing an application 704 or data 706. Memory 702 and storage medium 703 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 703 may include one or more modules (not shown), and each module may include a series of instructions operating on the information processing apparatus. Further, the processor 701 may be configured to communicate with the storage medium 703 to execute a series of instruction operations in the storage medium 703 on the apparatus 700.
The apparatus 700 may also include one or more power supplies 709, one or more wired or wireless network interfaces 707, one or more input-output interfaces 708, and/or one or more operating systems 705, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
The processor is used for reading the instructions in the memory and executing the following processes:
receiving a call initiated by a client to RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
and if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
Optionally, the processor is configured to, before receiving a call initiated by a client to a RPC interface service provided by a server, further include:
the method comprises the steps of obtaining a static call number of RPC interface service provided by a server and a node number used for uniquely identifying a node where the server is located, wherein the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
combining the obtained static calling number and the obtained node number of the RPC interface service to generate a dynamic calling number of the RPC interface service;
determining a SOCKET monitoring port number of the RPC interface service, creating a preset TIPC SOCKET suitable for cross-node and a UNIX SOCKET suitable for cross-process under the monitoring port number, and waiting for connection of a client;
the receiving client side responds to the call initiated by the mode of creating SOCKET connection and provides RPC interface service for the client side, and the method comprises the following steps:
receiving a TIPC SOCKET or UNIX SOCKET connection request initiated by a client under the SOCKET monitoring port number;
establishing a SOCKET connection corresponding to the connection request with the client, and providing RPC interface service for the client based on the SOCKET connection;
wherein, providing RPC interface service for the client comprises: receiving call request data which are sent by a client and contain the dynamic call number and are used for RPC interface service provided by a server to be called; and feeding back response data obtained by calling the callback function of the RPC interface service according to the calling request data to the client.
Optionally, the processor is configured to determine a SOCKET listening port number of the RPC interface service, including:
when the thread allocation result of the RPC interface service is an exclusive thread, taking the dynamic call number of the RPC interface service as the SOCKET monitoring port number of the RPC interface service;
and when the thread allocation result of the RPC interface service is a common thread, taking the preset SOCKET common monitoring port number of the server as the SOCKET monitoring port number of the RPC interface service.
Optionally, the processor is further configured to:
and according to the service quality of the RPC interface service, performing thread allocation on all RPC interface services provided by the server.
Optionally, the processor is configured to perform thread allocation for all RPC interface services provided by the server according to the quality of service of the RPC interface service, including:
calculating the service quality value of the RPC interface service according to the historical calling condition statistical information of the RPC interface service;
determining the service quality level to which the service quality value belongs;
allocating a thread allocation result corresponding to the service quality grade for the RPC interface service;
wherein the historical calling condition statistical information comprises at least one of the following information: number of times of call collapse, average call time duration, call stack depth and number of calls.
Optionally, the processor is configured to obtain a static call number of an RPC interface service provided by the server, and includes:
determining a static call number of RPC interface service provided by a server by using a C language header file, wherein the C language header file is predefined with the static call number of each RPC interface service and a callback function name corresponding to the callback function number of the static call number;
wherein, the callback function name is described by weak symbols. Optionally, the processor is configured to respond to the call and provide the RPC interface service to a client, including:
inquiring a corresponding callback function in a C language file according to the dynamic call number and the callback function name of the RPC interface service;
and if the corresponding callback function is inquired, providing RPC interface service for the client according to the callback function, otherwise, providing response indication information that the callback function is empty for the client.
Optionally, before the step of receiving a call initiated by the client to the RPC interface service provided by the server, the processor further includes:
and multicasting the online/offline states of different RPC interface services through multicast messages so that the client determines the online/offline states of the RPC interface services.
The embodiment of the invention provides a device for a client to perform Remote Procedure Call (RPC), a schematic diagram of the device is shown in FIG. 8, and the device comprises the following modules:
a comparison module 801, configured to determine an RPC interface service provided by a server to be called and a corresponding dynamic call number, where the dynamic call number includes a static call number and a node number where the server is located, and the static call number includes a process number and a callback function number corresponding to the RPC interface service;
a connection mode determining module 802, configured to determine that a node number of the server is the same as a node number of the client, and a process identified by the process number is the same as a process of the client, and call, in a direct call mode, a callback function corresponding to the callback function number, so that the server provides the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface calling service for the client side.
The connection mode determining module 802 is further configured to call a callback function corresponding to the callback function number in a mode of creating SOCKET connection, so that the server provides the RPC interface service for the client, including:
determining that the number of the node where the server is located is different from the number of the node where the client is located, or determining that the number of the node where the server is located is the same as the number of the node where the client is located, and inquiring the SOCKET connection corresponding to the dynamic call number, wherein the process of the process number identification is different from the process where the client is located;
if the corresponding SOCKET connection is inquired, calling the callback function corresponding to the callback function number through the SOCKET connection to enable the server side to provide the RPC interface service for the client side, otherwise, creating the corresponding SOCKET connection, calling the callback function corresponding to the callback function number through the created SOCKET connection to enable the server side to provide the RPC interface service for the client side.
The connection mode determining module 802 is further configured to create a corresponding SOCKET connection, including:
if the node number of the server side is different from the node number of the client side, establishing a corresponding preset TIPC SOCKET connection suitable for the cross node;
and if the number of the node where the server side is located is the same as that of the node where the client side is located, establishing a corresponding preset UNIX SOCKET connection suitable for cross-process.
The connection mode determining module 802 is further configured to create a corresponding SOCKET connection, including:
and taking the dynamic call number as a SOCKET monitoring port number, and establishing SOCKET connection with RPC interface service provided by a service end to be called.
The connection mode determining module 802 is further configured to:
and after the corresponding SOCKET connection is failed to be established according to the dynamic call number, utilizing the public SOCKET monitoring port number of the server to establish the SOCKET connection with the RPC interface service provided by the server to be called.
The thread allocation result determining module 804 is further configured to: obtaining a thread allocation result of the RPC interface service notified by a server in a mode of service quality level of the RPC interface service, wherein the thread allocation result is exclusive thread allocation or shared thread allocation, and creating a corresponding SOCKET connection, including:
when the service quality level of the RPC interface service is a first service quality level corresponding to the exclusive thread allocation, the dynamic call number is used as a SOCKET monitoring port number, and SOCKET connection with the RPC interface service provided by the service end to be called is established;
and when the service quality level of the RPC interface service is a second corresponding service quality level allocated to the common thread, using the public SOCKET monitoring port number of the server to establish SOCKET connection with the RPC interface service provided by the server to be called.
The multicast message module 803 is further configured to, before determining the step of RPC interface service provided by the server to be invoked, further include:
determining the online/offline state of the RPC interface service provided by the server according to the multicast message of each server providing the RPC interface service;
and when the RPC interface service provided by the server side is determined to be required to be called, the RPC interface service in an online state is selected to be called.
The thread allocation result determining module 804 is further configured to determine an RPC interface service provided by a server to be called, and determine a dynamic call number corresponding to the RPC interface service, including:
determining a static call number of an RPC interface service provided by a service end to be called by utilizing a C language header file, wherein the C language header file pre-defines the static call number of each RPC interface service and a call-back function name corresponding to a call-back function number in the static call number;
and determining a dynamic call number corresponding to the RPC interface service according to the static call number of the RPC interface service and the node where the server side is located.
The connection mode determining module 802 is further configured to call the corresponding callback function according to the callback function number to provide the RPC interface service or call the RPC interface service by creating a SOCKET connection, including:
sending a call request to a server, receiving a dynamic call number determined by the server according to the static call number of the RPC interface service and the server node number of the server, and querying a corresponding callback function in a C language file according to the callback function name by using the dynamic call number;
and when the corresponding callback function is determined to be inquired, the receiving server calls the RPC interface service provided by the callback function, otherwise, the RPC interface service provided by the server to be called is determined again.
The embodiment of the invention provides a device for a server to perform Remote Procedure Call (RPC), which comprises the following modules as shown in FIG. 9:
a receiving indication module 901, configured to receive a call initiated by a client to an RPC interface service provided by a server;
a connection establishing module 902, configured to respond to the call and provide the RPC interface service to the client;
and if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
The connection establishing module 902 is configured to, before receiving a call initiated by a client to an RPC interface service provided by a server, further include:
the method comprises the steps of obtaining a static call number of RPC interface service provided by a server and a node number used for uniquely identifying a node where the server is located, wherein the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
combining the obtained static calling number and the obtained node number of the RPC interface service to generate a dynamic calling number of the RPC interface service;
determining a SOCKET monitoring port number of the RPC interface service, creating a preset TIPC SOCKET suitable for cross-node and a UNIX SOCKET suitable for cross-process under the monitoring port number, and waiting for connection of a client;
the receiving client side responds to the call initiated by the mode of creating SOCKET connection and provides RPC interface service for the client side, and the method comprises the following steps:
receiving a TIPC SOCKET or UNIX SOCKET connection request initiated by a client under the SOCKET monitoring port number;
establishing a SOCKET connection corresponding to the connection request with the client, and providing RPC interface service for the client based on the SOCKET connection;
wherein, providing RPC interface service for the client comprises: receiving call request data which are sent by a client and contain the dynamic call number and are used for RPC interface service provided by a server to be called; and feeding back response data obtained by calling the callback function of the RPC interface service according to the calling request data to the client.
The establishing connection module 902 determines a SOCKET monitoring port number of the RPC interface service, including:
when the thread allocation result of the RPC interface service is an exclusive thread, taking the dynamic call number of the RPC interface service as the SOCKET monitoring port number of the RPC interface service;
and when the thread allocation result of the RPC interface service is a common thread, taking the preset SOCKET common monitoring port number of the server as the SOCKET monitoring port number of the RPC interface service.
The thread assignment result determining module 904 is further configured to:
and according to the service quality of the RPC interface service, performing thread allocation on all RPC interface services provided by the server.
The thread allocation result determining module 904 is further configured to perform thread allocation for all RPC interface services provided by the server according to the quality of service of the RPC interface service, including:
calculating the service quality value of the RPC interface service according to the historical calling condition statistical information of the RPC interface service;
determining the service quality level to which the service quality value belongs;
allocating a thread allocation result corresponding to the service quality grade for the RPC interface service;
wherein the historical calling condition statistical information comprises at least one of the following information: number of times of call collapse, average call time duration, call stack depth and number of calls.
The connection establishing module 902 is configured to obtain a static call number of an RPC interface service provided by a server, and includes:
determining a static call number of RPC interface service provided by a server by using a C language header file, wherein the C language header file is predefined with the static call number of each RPC interface service and a callback function name corresponding to the callback function number of the static call number;
wherein, the callback function name is described by weak symbols.
The establish connection module 902 is used for responding to the call and providing the RPC interface service for the client, including:
inquiring a corresponding callback function in a C language file according to the dynamic call number and the callback function name of the RPC interface service;
and if the corresponding callback function is inquired, providing RPC interface service for the client according to the callback function, otherwise, providing response indication information that the callback function is empty for the client.
The multicast message module 903 is configured to, before the step of receiving a call initiated by the client to the RPC interface service provided by the server, further include:
and multicasting the online/offline states of different RPC interface services through multicast messages so that the client determines the online/offline states of the RPC interface services.
A seventh embodiment of the present invention provides a computer storage medium, on which a computer program is stored, which, when executed by a processor, implements any of the methods provided in embodiment 1 of the present invention, or implements any of the methods provided in embodiment 2 of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (21)

1. A method for a client to perform Remote Procedure Call (RPC), the method comprising:
determining RPC interface service provided by a service end to be called and a corresponding dynamic call number, wherein the dynamic call number comprises a static call number and a node number where the service end is located, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
determining that the number of the node where the server is located is the same as the number of the node where the client is located, and the process identified by the process number is the same as the process where the client is located, calling a callback function corresponding to the callback function number in a direct calling mode, so that the server provides the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface service for the client side.
2. The method of claim 1, wherein the calling the callback function corresponding to the callback function number by creating a SOCKET connection to enable the server to provide the RPC interface service for the client comprises:
determining that the number of the node where the server is located is different from the number of the node where the client is located, or determining that the number of the node where the server is located is the same as the number of the node where the client is located, and inquiring the SOCKET connection corresponding to the dynamic call number, wherein the process of the process number identification is different from the process where the client is located;
if the corresponding SOCKET connection is inquired, calling the callback function corresponding to the callback function number through the SOCKET connection to enable the server side to provide the RPC interface service for the client side, otherwise, creating the corresponding SOCKET connection, calling the callback function corresponding to the callback function number through the created SOCKET connection to enable the server side to provide the RPC interface service for the client side.
3. The method of claim 2, wherein the creating the corresponding SOCKET connection comprises:
if the node number of the server side is different from the node number of the client side, establishing a corresponding preset TIPC SOCKET connection suitable for the cross node;
and if the number of the node where the server side is located is the same as that of the node where the client side is located, establishing a corresponding preset UNIX SOCKET connection suitable for cross-process.
4. The method of claim 2, wherein the creating the corresponding SOCKET connection comprises:
and taking the dynamic call number as a SOCKET monitoring port number, and establishing SOCKET connection with RPC interface service provided by a service end to be called.
5. The method of claim 4, further comprising:
and after the corresponding SOCKET connection is failed to be established according to the dynamic call number, utilizing the public SOCKET monitoring port number of the server to establish the SOCKET connection with the RPC interface service provided by the server to be called.
6. The method of claim 2, further comprising: obtaining a thread allocation result of the RPC interface service notified by a server in a mode of service quality level of the RPC interface service, wherein the thread allocation result is exclusive thread allocation or shared thread allocation, and creating a corresponding SOCKET connection, including:
when the service quality level of the RPC interface service is a first service quality level corresponding to the exclusive thread allocation, the dynamic call number is used as a SOCKET monitoring port number, and SOCKET connection with the RPC interface service provided by the service end to be called is established;
and when the service quality level of the RPC interface service is a second corresponding service quality level allocated to the common thread, using the public SOCKET monitoring port number of the server to establish SOCKET connection with the RPC interface service provided by the server to be called.
7. The method of claim 1, wherein before the step of determining the RPC interface service provided by the server to be called, the method further comprises:
determining the online/offline state of the RPC interface service provided by the server according to the multicast message of each server providing the RPC interface service;
and when the RPC interface service provided by the server side is determined to be required to be called, the RPC interface service in an online state is selected to be called.
8. The method of claim 1, wherein the determining the RPC interface service provided by the server to be called and the dynamic call number corresponding to the RPC interface service comprises:
determining a static call number of an RPC interface service provided by a service end to be called by utilizing a C language header file, wherein the C language header file pre-defines the static call number of each RPC interface service and a call-back function name corresponding to a call-back function number in the static call number;
and determining a dynamic call number corresponding to the RPC interface service according to the static call number of the RPC interface service and the node where the server side is located.
9. A method for a server side to perform Remote Procedure Call (RPC), the method comprising:
receiving a call initiated by a client to RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
and if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
10. The method of claim 9, prior to receiving a client-initiated call to a service-provided RPC interface service, further comprising:
the method comprises the steps of obtaining a static call number of RPC interface service provided by a server and a node number used for uniquely identifying a node where the server is located, wherein the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
combining the obtained static calling number and the obtained node number of the RPC interface service to generate a dynamic calling number of the RPC interface service;
determining a SOCKET monitoring port number of the RPC interface service, creating a preset TIPC SOCKET suitable for cross-node and a UNIX SOCKET suitable for cross-process under the monitoring port number, and waiting for connection of a client;
the receiving client side responds to the call initiated by the mode of creating SOCKET connection and provides RPC interface service for the client side, and the method comprises the following steps:
receiving a TIPC SOCKET or UNIX SOCKET connection request initiated by a client under the SOCKET monitoring port number;
establishing a SOCKET connection corresponding to the connection request with the client, and providing RPC interface service for the client based on the SOCKET connection;
wherein, providing RPC interface service for the client comprises: receiving call request data which are sent by a client and contain the dynamic call number and are used for RPC interface service provided by a server to be called; and feeding back response data obtained by calling the callback function of the RPC interface service according to the calling request data to the client.
11. The method of claim 10, wherein determining the SOCKET listening port number of the RPC interface service comprises:
when the thread allocation result of the RPC interface service is an exclusive thread, taking the dynamic call number of the RPC interface service as the SOCKET monitoring port number of the RPC interface service;
and when the thread allocation result of the RPC interface service is a common thread, taking the preset SOCKET common monitoring port number of the server as the SOCKET monitoring port number of the RPC interface service.
12. The method of claim 11, further comprising:
and according to the service quality of the RPC interface service, performing thread allocation on all RPC interface services provided by the server.
13. The method of claim 12, wherein the step of performing thread allocation for all RPC interface services provided by the server according to the quality of service of the RPC interface services comprises:
calculating the service quality value of the RPC interface service according to the historical calling condition statistical information of the RPC interface service;
determining the service quality level to which the service quality value belongs;
allocating a thread allocation result corresponding to the service quality grade for the RPC interface service;
wherein the historical calling condition statistical information comprises at least one of the following information: number of times of call collapse, average call time duration, call stack depth and number of calls.
14. The method of claim 10, wherein obtaining the static call number of the service-side-provided RPC interface service comprises:
determining a static call number of RPC interface service provided by a server by using a C language header file, wherein the C language header file is predefined with the static call number of each RPC interface service and a callback function name corresponding to the callback function number of the static call number;
wherein, the callback function name is described by weak symbols.
15. The method of claim 14, wherein providing the RPC interface service to a client in response to the call comprises:
inquiring a corresponding callback function in a C language file according to the dynamic call number and the callback function name of the RPC interface service;
and if the corresponding callback function is inquired, providing RPC interface service for the client according to the callback function, otherwise, providing response indication information that the callback function is empty for the client.
16. The method of claim 9, wherein the step of receiving a client-initiated call to a server-provided RPC interface service is preceded by the step of:
and multicasting the online/offline states of different RPC interface services through multicast messages so that the client determines the online/offline states of the RPC interface services.
17. An apparatus for a client to perform Remote Procedure Call (RPC), the apparatus comprising:
a memory to store instructions;
a processor for reading the instructions in the memory, performing the following processes:
determining RPC interface service provided by a service end to be called and a corresponding dynamic call number, wherein the dynamic call number comprises a static call number and a node number where the service end is located, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
determining that the number of the node where the server is located is the same as the number of the node where the client is located, and the process identified by the process number is the same as the process where the client is located, calling a callback function corresponding to the callback function number in a direct calling mode, so that the server provides the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface service for the client side.
18. An apparatus for a server to perform Remote Procedure Call (RPC), the apparatus comprising:
a memory to store instructions;
a processor for reading the instructions in the memory, performing the following processes:
receiving a call initiated by a client to RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
and if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
19. An apparatus for a client to perform Remote Procedure Call (RPC), the apparatus comprising:
the comparison module is used for determining RPC interface service provided by a service end to be called and a corresponding dynamic call number, wherein the dynamic call number comprises a static call number and a node number where the service end is located, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
the connection mode determining module is used for determining that the number of the node where the server is located is the same as the number of the node where the client is located, and the process identified by the process number is the same as the process where the client is located, and calling a callback function corresponding to the callback function number in a direct calling mode to enable the server to provide the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by a mode of creating SOCKET connection, so that the server side provides the RPC interface calling service for the client side.
20. An apparatus for a server to perform Remote Procedure Call (RPC), the apparatus comprising the following modules:
the receiving indication module is used for receiving the call of the RPC interface service provided by the server initiated by the client;
a connection establishing module for responding to the call and providing the RPC interface service for the client;
and if the node number of the server is the same as the node number of the client, and the process corresponding to the RPC interface service provided by the server is the same as the process of the client, initiating the call in a direct call mode, otherwise, establishing SOCKET connection.
21. A computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1-8, or performs the method of any of claims 9-16.
CN202010448873.4A 2020-05-25 2020-05-25 Method and device for remote procedure call by client or server Active CN111597061B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010448873.4A CN111597061B (en) 2020-05-25 2020-05-25 Method and device for remote procedure call by client or server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010448873.4A CN111597061B (en) 2020-05-25 2020-05-25 Method and device for remote procedure call by client or server

Publications (2)

Publication Number Publication Date
CN111597061A true CN111597061A (en) 2020-08-28
CN111597061B CN111597061B (en) 2023-11-17

Family

ID=72186236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010448873.4A Active CN111597061B (en) 2020-05-25 2020-05-25 Method and device for remote procedure call by client or server

Country Status (1)

Country Link
CN (1) CN111597061B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084046A (en) * 2020-09-12 2020-12-15 朱领军 Dubbo generalization interface calling method and device
CN112799787A (en) * 2021-02-07 2021-05-14 北京华如科技股份有限公司 Improved parallel behavior execution conflict resolution method in simulation operation and storage medium thereof
CN112965832A (en) * 2021-02-18 2021-06-15 腾讯科技(深圳)有限公司 Remote Procedure Call (RPC) service calling method and related device
CN113010333A (en) * 2021-03-24 2021-06-22 北京中电兴发科技有限公司 Multi-scene inter-process communication method suitable for Linux server cluster
CN113190292A (en) * 2021-05-26 2021-07-30 的卢技术有限公司 Method and device for remotely executing functions on multiple servers
CN113360525A (en) * 2021-08-10 2021-09-07 支付宝(杭州)信息技术有限公司 Query request processing method, device and equipment and key value query system
CN114816792A (en) * 2022-04-20 2022-07-29 北京计算机技术及应用研究所 Remote function calling method based on special channel

Citations (5)

* 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
US20110138404A1 (en) * 2009-12-04 2011-06-09 International Business Machines Corporation Remote procedure call (rpc) bind service with physical interface query and selection
US20120324483A1 (en) * 2009-12-04 2012-12-20 International Business Machines Corporation Remote procedure call (rpc) bind service with physical interface query and selection
CN103023906A (en) * 2012-12-20 2013-04-03 北京奇虎科技有限公司 Method and system aiming at remote procedure calling conventions to perform status tracking
CN107920075A (en) * 2017-11-17 2018-04-17 北京锐安科技有限公司 A kind of system of data processing

Patent Citations (5)

* 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
US20110138404A1 (en) * 2009-12-04 2011-06-09 International Business Machines Corporation Remote procedure call (rpc) bind service with physical interface query and selection
US20120324483A1 (en) * 2009-12-04 2012-12-20 International Business Machines Corporation Remote procedure call (rpc) bind service with physical interface query and selection
CN103023906A (en) * 2012-12-20 2013-04-03 北京奇虎科技有限公司 Method and system aiming at remote procedure calling conventions to perform status tracking
CN107920075A (en) * 2017-11-17 2018-04-17 北京锐安科技有限公司 A kind of system of data processing

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084046A (en) * 2020-09-12 2020-12-15 朱领军 Dubbo generalization interface calling method and device
CN112799787A (en) * 2021-02-07 2021-05-14 北京华如科技股份有限公司 Improved parallel behavior execution conflict resolution method in simulation operation and storage medium thereof
CN112799787B (en) * 2021-02-07 2023-10-03 北京华如科技股份有限公司 Improved parallel behavior execution conflict resolution method in simulation operation and storage medium thereof
CN112965832A (en) * 2021-02-18 2021-06-15 腾讯科技(深圳)有限公司 Remote Procedure Call (RPC) service calling method and related device
CN112965832B (en) * 2021-02-18 2023-09-26 腾讯科技(深圳)有限公司 Remote Procedure Call (RPC) service calling method and related device
CN113010333B (en) * 2021-03-24 2021-10-15 北京中电兴发科技有限公司 Multi-scene inter-process communication method suitable for Linux server cluster
CN113010333A (en) * 2021-03-24 2021-06-22 北京中电兴发科技有限公司 Multi-scene inter-process communication method suitable for Linux server cluster
CN113190292B (en) * 2021-05-26 2023-09-26 的卢技术有限公司 Method and device for remotely executing functions on multiple servers
CN113190292A (en) * 2021-05-26 2021-07-30 的卢技术有限公司 Method and device for remotely executing functions on multiple servers
CN113360525A (en) * 2021-08-10 2021-09-07 支付宝(杭州)信息技术有限公司 Query request processing method, device and equipment and key value query system
CN113360525B (en) * 2021-08-10 2021-12-07 支付宝(杭州)信息技术有限公司 Query request processing method, device and equipment and key value query system
CN114816792A (en) * 2022-04-20 2022-07-29 北京计算机技术及应用研究所 Remote function calling method based on special channel
CN114816792B (en) * 2022-04-20 2024-04-09 北京计算机技术及应用研究所 Remote function calling method based on special channel

Also Published As

Publication number Publication date
CN111597061B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN111597061A (en) Method and device for remote procedure call of client or server
CN107087019B (en) Task scheduling method and device based on end cloud cooperative computing architecture
CN1135800C (en) Internet protocol handler for telecommunications platform with processor cluster
WO2019019400A1 (en) Task distributed processing method, device, storage medium and server
CN111880902A (en) Pod creation method, device, equipment and readable storage medium
CN112564994B (en) Flow monitoring method and device, cloud server and storage medium
CN109819023B (en) Distributed transaction processing method and related product
CN112929225B (en) Session exception handling method and device, computer equipment and storage medium
US8458702B1 (en) Method for implementing user space up-calls on java virtual machine before/after garbage collection
CN114979286B (en) Access control method, device, equipment and computer storage medium for container service
CN112698838A (en) Multi-cloud container deployment system and container deployment method thereof
CN113886058A (en) Cross-cluster resource scheduling method and device
CN110780973A (en) Virtual machine migration device, method, equipment and readable storage medium
CN113067739B (en) High-density container network deployment method and system
US20240118935A1 (en) Pod deployment method and apparatus
EP3672203A1 (en) Distribution method for distributed data computing, device, server and storage medium
CN112261125B (en) Centralized unit cloud deployment method, device and system
CN113672336A (en) K8S container cluster deployment method, device, equipment and readable storage medium
CN113360386A (en) Switching chip drive test method, device, electronic equipment and storage medium
CN113268254A (en) Cluster system installation method and device, electronic equipment and storage medium
CN114513419A (en) Security policy configuration method and system
CN114745377B (en) Edge cloud cluster service system and implementation method
CN111858079B (en) Distributed lock migration method and device, electronic equipment and storage medium
EP4083795A1 (en) Method for deploying virtual machine, and related apparatus
CN111431951B (en) Data processing method, node equipment, system and storage medium

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