CN111597061B - Method and device for remote procedure call by client or server - Google Patents

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

Info

Publication number
CN111597061B
CN111597061B CN202010448873.4A CN202010448873A CN111597061B CN 111597061 B CN111597061 B CN 111597061B CN 202010448873 A CN202010448873 A CN 202010448873A CN 111597061 B CN111597061 B CN 111597061B
Authority
CN
China
Prior art keywords
rpc interface
service
client
interface service
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.)
Active
Application number
CN202010448873.4A
Other languages
Chinese (zh)
Other versions
CN111597061A (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

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 remote procedure call by a client or a server, wherein the method comprises the following steps: determining RPC interface service and dynamic calling number of the server to be called; when the node number of the server is determined to be the same as the node number of the client and the process identified by the process number is the same as the process where the client is located, a corresponding callback function is called in a direct calling mode, so that the server provides RPC interface service for the client; otherwise, the corresponding callback function is called by creating the SOCKET connection, so that the server side provides RPC interface service for the client side. The method provided by the invention selects a proper communication mode through the position relation of the client and the RPC interface service of the server, the communication mechanism is reliable and efficient, the RPC interface function prototypes are unified, compared with the complex parameter processing flow under the general mechanism, the communication time consumption and the resource loss are reduced, and the method is suitable for various embedded application development scenes.

Description

Method and device for remote procedure call by client or server
Technical Field
The present invention relates to the field of distributed remote procedure call, and in particular, to a method and apparatus for performing remote procedure call by a client or a server.
Background
On embedded devices such as a switch and a router, a service party generally selects a multiprocess software architecture building device based on an RPC mechanism, RPC (Remote Procedure Call ) is a common synchronous communication mechanism, service of other processes can be conveniently called by a service process by using the mechanism in a function call mode, an interaction schematic diagram of a service end and the service end is shown in fig. 1, and the advantage of selecting the architecture is that the multiprocess architecture can meet the requirements of robustness, maintainability and fault location of software, and the requirements of cross-node and cross-process communication of machine frame type devices can be met by using the RPC mechanism.
Because of limited hardware resources, such as a CPU, a memory, a disk and the like, on the distributed embedded device, the RPC mechanism used on the distributed embedded device needs to further reduce occupied hardware resources and improve the ease of deployment and use, but the existing C-language synchronous communication frames, such as dors, sun RPC and the like, generally have the problem of complex frames, for example, the dors mechanism is based on file descriptors, performs synchronous communication by reading files in local nodes, is actually an IPC (Inter-Process CommunicationIPC, inter-process communication) mechanism, is only applicable to Solaris systems (special UNIX systems), and can only run in a cross-process rather than a cross-node; the Sun RPC is a heavyweight framework based on IP, the procedure is complex when defining the RPC interface, and because of the higher universality of the Sun RPC, multiple embedded languages can synchronously communicate under the Sun RPC framework, so that the exception handling and universalization process flow and processing files in the framework are numerous, the mechanism occupies a large amount of memory and disk resources, finally the communication duration is prolonged, the RPC mechanism is complex to use, occupies a large amount of CPU resources and is not suitable for the remote distributed communication scene of the embedded equipment, and therefore, the usability, resource occupation, communication efficiency and other aspects of the multi-process software architecture construction equipment for carrying out the RPC mechanism of the current C language synchronous communication framework are further improved under the remote distributed scene.
Disclosure of Invention
The invention provides a method and a device for remote procedure call by a client or a server, which are used for solving the problems: the existing RPC mechanism has the problems of complex use, large CPU resource occupation and inapplicability to remote distributed communication scenes of embedded equipment.
The first aspect of the present invention provides a method for remote procedure call RPC by a client, 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 of the service end, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
when the node number of the service end is determined to be the same as the node number of the client end, and the process identified by the process number is the same as the process of the client end, calling a callback function corresponding to the callback function number in a direct calling mode, so that the service end provides the RPC interface service for the client end;
otherwise, calling a callback function corresponding to the callback function number by creating a SOCKET connection mode, 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, where the method includes:
receiving a call initiated by a client to an RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
when the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
A third aspect of the present invention provides an apparatus for remote procedure call RPC by a client, the apparatus comprising:
a memory for storing instructions;
a processor for reading the instructions in the memory, performing the following process:
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 of the service end, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
when the node number of the service end is determined to be the same as the node number of the client end, and the process identified by the process number is the same as the process of the client end, calling a callback function corresponding to the callback function number in a direct calling mode, so that the service end provides the RPC interface service for the client end;
Otherwise, calling a callback function corresponding to the callback function number by creating a SOCKET connection mode, so that the server side provides the RPC interface service for the client side.
A fourth aspect of the present invention provides a device for a server to perform remote procedure call RPC, where the device includes:
a memory for storing instructions;
a processor for reading the instructions in the memory, performing the following process:
receiving a call initiated by a client to an RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
when the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
A fifth aspect of the present invention provides an apparatus for remote procedure call RPC by a client, where the apparatus includes:
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 of the service end, 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 node number of the service end is the same as the node number of the client, and when the process identified by the process number is the same as the process of the client, calling a callback function corresponding to the callback function number in a direct calling mode, so that the service end provides the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by creating a SOCKET connection mode, so that the server side provides the RPC interface service for the client side.
The sixth aspect of the present invention provides a device for performing remote procedure call RPC by a server, where the device includes the following modules:
the receiving indication module is used for receiving the call of the RPC interface service provided by the service end initiated by the client;
the connection module is used for responding to the call and providing the RPC interface service for the client;
when the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
A seventh aspect of the 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 invention or performs the method provided by the second aspect of the invention.
The method for Remote Procedure Call (RPC) by the client can enable the client to 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 communication time consumption and the resource loss are reduced, and the method is suitable for various embedded application development scenes.
Drawings
FIG. 1 is an interaction diagram of a server side and a service side;
FIG. 2 is a system for performing remote procedure calls, RPCs;
FIG. 3 is a flow chart of a method by which a client makes a remote procedure call, RPC;
FIG. 4 is a complete flow chart of a method for a complete client to make a remote procedure call, RPC;
FIG. 5 is a flow chart of a method for a server to make remote procedure calls RPC;
FIG. 6 is a schematic diagram of a device for Remote Procedure Call (RPC) performed by a client;
FIG. 7 is a schematic diagram of a device for performing Remote Procedure Call (RPC) at a server;
FIG. 8 is a block diagram of an apparatus for remote procedure call RPC by a client;
fig. 9 is a schematic block diagram of an apparatus for performing remote procedure call RPC at a server.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiments of the application are described in further detail below with reference to the drawings accompanying the specification. It is to be understood that the embodiments described herein are for illustration and explanation of the application only and are not intended to limit the application.
For convenience of understanding, the terms involved in the embodiments of the present application are explained below:
1) RPC, (Remote Procedure Call ) is a synchronous communication mechanism, which facilitates business processes to call services of other processes using function call.
2) Socks is an abstraction layer through which an application can send or receive data, and can perform operations such as opening, reading, writing, and closing like a file. Sockets allow applications to insert 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, as shown in fig. 2, where the system includes: the client 201 and the server 202 determine a specific way of establishing connection by comparing a dynamic call number corresponding to the RPC interface service provided by the server 202 to be called with a node number and a process number of the client 201. Wherein, the node can be a piece of communication equipment, and different nodes are different communication equipment; or the node is a board card in the frame equipment, and different board cards are inserted into different slots of the frame equipment. A plurality of processes are deployed on each node, wherein each process in turn comprises a plurality of threads. The client 201 and the server 202 may be distributed on two independent threads of the same process of the same node (cross-threads), may be distributed on two different processes of the same node (cross-threads), and may also be distributed on different nodes (cross-nodes). In the above-mentioned cross-thread situation, there may be both the client 201 and the server 202 in one process, where one thread in the process runs the client 201 service as the client 201, and another thread provides the RPC interface service as the server 202. The RPC interface service can be realized through a callback function.
The dynamic call number determined by the client 201 includes: callback function number of RPC interface service provided by the service end 202 to be called, and process number and node number where the callback 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 where the client 201 is located, it is indicated that the client 201 and the server 202 are in the same process, and the server 202 uses a function direct call mode to provide the RPC interface service for the client 201. Otherwise, the callback function corresponding to the callback function number is called and the RPC interface service is called in a mode of creating the SOCKET connection, and after the server side 202 receives the call request instruction, a response instruction of the RPC interface service of the server side 202 to be called is returned to the client side 201.
The client 201 has a buffer capability of storing the socks connection, so that the socks connection establishment and release buffering are avoided from being executed every time a call is made.
The technical solution provided in the following embodiment is applicable to a scenario in which the RPC interface service provided by the service end is called by the client to serve as the client business under the system architecture including the at least one node.
Example 1
The embodiment of the invention provides a method for Remote Procedure Call (RPC) by a client, as shown in FIG. 3, comprising the following steps:
step S301, an RPC interface service provided by a service end to be called and a corresponding dynamic call number are determined, wherein the dynamic call number comprises a static call number and a node number of the service end, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
the method comprises the steps that a client side firstly determines RPC interface service provided by a service side to be called, the RPC interface service further determines a dynamic calling number corresponding to the RPC interface service in a certain process of a certain node of a system architecture, the dynamic calling number comprises a static calling number and a node number where the service side is located, and the static calling number comprises a process number and a callback 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 service end providing the interface service is located.
Specifically, the static call number of the service end RPC interface service to be called can be read from a global file shared by all nodes of the pre-created system architecture, wherein a developer defines a callback function name and a process where each service end RPC interface service is provided in the global file, and generally, the static call number includes a process number corresponding to a process where 2 bytes of identification RPC interface service is located and a callback function number corresponding to a callback function of 2 bytes of identification RPC interface service.
Because an RPC interface service corresponds to a service thread, when RPC interface services with the same function are deployed on different nodes, a plurality of processes have the same static call number, and at this time, a client cannot know which service process is initiated to connect to so as to not complete RPC interface call.
Step S302, when the node number of the server is determined to be 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 creating a SOCKET connection mode, so that the server side provides the RPC interface service for the client side.
After the dynamic calling number corresponding to the RPC interface service provided by the server to be called is obtained, whether the node number of the server is identical to the node number of the client is determined, whether the process identified by the static calling number in the dynamic calling number is identical to the process of the client is determined, and when the process identified by the static calling number in the dynamic calling number is identical to the process of the client, the fact that the client and the server are in the same process of the same node is indicated, so that a direct calling mode can be used for calling a callback function corresponding to the RPC interface of the server, and the server can provide the RPC interface service for the client.
Otherwise, when it is determined that the client and the server are not in the same process of the same node, the RPC interface service is invoked by creating a SOCKET connection.
As an optional implementation manner, when it is determined that the node number at which the server is located is different from the node number at which the client is located, or it is determined that the node number at which the server is located is the same as the node number at which the client is located, the process identified by the static call number is different from the process at which the client is located, and the socks connection corresponding to the dynamic call number is queried.
Specifically, when it is determined that the node number of the server is different from the node of the client or the process identified by the process number is different from the process of the client, the dynamic call number is used as a key to query the SOCKET connection hash table, and whether a corresponding created corresponding SOCKET connection exists is judged.
And if the corresponding SOCKET connection is inquired, 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, otherwise, creating the corresponding SOCKET connection, and calling the callback function corresponding to the callback function number through the created SOCKET connection, so that the server side provides the RPC interface service for the client side.
The method includes the steps of searching a SOCKET connection hash table with a dynamic call number key, if the SOCKET connection is found, completing RPC interface service call by using the connection, otherwise, creating the SOCKET connection, completing RPC interface service call by using the newly created SOCKET connection, and inserting the SOCKET connection into the SOCKET connection hash table with the dynamic call number key for next searching.
As an alternative embodiment, creating a corresponding SOCKET connection includes the following connection creation methods:
If the node number of the service end is different from the node number of the client end, creating a corresponding preset TIPC SOCKET connection suitable for the cross node;
if the node number of the service end is the same as the node number of the client end, a corresponding preset UNIX SOCKET connection suitable for cross-process is created according to the dynamic call number.
In this embodiment, the client selects a communication mode suitable for the position relationship according to the relative position relationship between the client and the RPC interface of the server, and specifically:
the client and the server are in the same process (cross-thread), the SOCKET mode is not used, the local callback function is utilized to directly complete the call of the RPC interface service of the server to be called, and the call flow is simplified;
the client and the server are connected at the same node (cross-process) by using UNIX SOCKET, so that the method has the advantages of high efficiency and reliability;
the client and the server are connected at different nodes (cross nodes) by using TIPC SOCKET, and the capability of sensing the change of the slot position of the server and automatically uploading the slot position is achieved.
As an alternative embodiment, the creating a corresponding SOCKET connection includes: and taking the dynamic calling number as a SOCKET monitoring port number, and creating SOCKET connection with the RPC interface service provided by the service end to be called. In this embodiment, one RPC interface service provided by the server side monopolizes one thread, and each RPC interface service uses its own dynamic call number as a SOCKET monitoring port number to create a SOCKET, waiting for the client to connect.
As another alternative embodiment, creating a corresponding SOCKET connection includes:
the dynamic calling number is used as a SOCKET monitoring port number, and SOCKET connection with RPC interface service provided by a service end to be called is established;
if the SOCKET connection is failed to be established, the public SOCKET monitoring port number of the server is utilized to establish the SOCKET connection with the RPC interface service provided by the server to be called.
In the above alternative embodiment, when the thread allocation of the server side is tense, the thread allocation of the RPC interface service is further optimized, so that part of the RPC interface service of the server side shares one thread, and part of the RPC interface service monopolizes one thread, so that the use of a thread stack is effectively reduced under the condition of limited resources, and the requirement that the RPC interface service is processed in parallel can be met. That is, the thread allocation result of each RPC interface service is exclusive to one thread (i.e., exclusive to a thread), or shares one thread with other RPC interface services provided by the server (i.e., common to a thread). When the 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 the shared threads by the server, the server uses the public monitoring port of the shared threads to provide RPC interface service connection for the client. Accordingly, the client can detectably attempt to create a SOCKET connection of the RPC interface service corresponding to the server, first defaults to create a connection by using the dynamic call number as a SOCKET monitoring port number, and then uses the public SOCKET monitoring port number to create a connection when the connection fails.
As yet another alternative implementation manner, the method provided by this embodiment further includes: and acquiring a thread allocation result of the RPC interface service, which is notified by the server side in a mode of the service quality level of the RPC interface service, wherein the thread allocation result is exclusive thread allocation or shared thread allocation. Thus, the thread allocation situation of each RPC interface service on the server is known to the client, so the client can select the matched SOCKET listening port number according to the thread allocation situation, and create connection in a directed way. Specifically, creating a corresponding socks connection may include:
when the service quality level of the RPC interface service is the corresponding first service quality level allocated to the exclusive thread, the dynamic calling 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 created;
when the service quality level of the RPC interface service distributes a corresponding second service quality level for the shared thread, the public SOCKET monitoring port number of the service end is utilized to establish SOCKET connection with the RPC interface service provided by the service end to be called.
In still another embodiment, the server informs each client of each node in the system of the thread allocation result in the manner of the 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 can directly use a suitable SOCKET monitoring port number to create a UNIX SOCKET connection or a TIPC SOCKET connection with the RPC interface service of the server to be invoked.
As an optional implementation manner, the obtaining the thread allocation result of the RPC interface service notified by the service end in the manner of the service quality level of the RPC interface service includes:
receiving the service quality grade of the RPC interface service sent by the service end; the service quality grade is used as the identification information of the thread allocation result of the RPC interface service, and is determined by the service end according to the historical call condition statistical information of the RPC interface service.
The historical call condition statistical information comprises at least one of the following information of the RPC interface service: call crash times, average call time duration, call stack depth, and call times.
Specifically, when the initialization is completed or periodically, the server obtains historical call condition statistical information of each RPC interface service of the server, where the statistical information includes: call crash times, average call time duration, call stack depth, and call times.
Wherein: calling the number of crashes: the number of times of RPC interface service trigger program errors, memory out-of-range and other RPC interface service exit errors is used for representing stability, and the calling collapse times can be recorded by the anomaly monitoring module when the RPC interface service exit.
Average call time duration: recording the time-consuming duration of each call of the callback function of the RPC interface service, and calculating the obtained average value, wherein the parameter has the significance of judging the influence of the RPC interface service on the use of other RPC interface services, specifically, when a plurality of RPC interface services share one service thread, the processing of the RPC interface request is sequentially completed, and if the average time-consuming processing of a certain RPC interface service request is longer, the response of the subsequent other RPC interface service requests can be deferred.
Call stack depth: the call back function call for the RPC interface service can form a stack structure, and the deeper the call level is, the higher the call stack depth is, the deeper the call stack depth is used for representing complexity, and the higher the complexity is.
Number of calls: the number of times the RPC interface service provides service or is called is used for representing the service frequency, and the more the number of times the RPC interface service provides service, the more frequent the call is.
After the historical call condition statistical information is obtained, the service end calculates the service quality value of each RPC interface service of the service end by adopting 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 call condition statistical information to obtain corresponding parameters, and then carrying out weighted summation on the parameters. Typically, the quality of service value=crash parameter×0.5+time-consuming parameter×0.3+call stack parameter×0.1+call number parameter×0.1 for the RPC interface service. The 4 types of statistical information, including the calling crash times, the average calling time-consuming time duration, the calling stack depth and the calling times, can be divided into a plurality of intervals respectively, and different intervals correspond to different normalized parameter values of the type of statistical information. Illustratively, 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-consuming time length is more than 500ms, the time-consuming parameter is 1, otherwise, the time-consuming parameter is 0; call stack parameters: if the depth of the call stack is greater than 10 layers, the call stack parameter is 1, otherwise, the call stack parameter is 0; calling a number of times parameter: and if the calling times are more than 500 times, the calling times parameter is 1, otherwise, the calling times parameter 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 empirically by a person skilled in the art in combination with an actual application scene.
And then, determining the service quality grade to which the service quality value belongs according to the size of the service quality value, wherein different service quality grades correspond to thread allocation results of different RPC interface services. For example, for an RPC interface service whose quality of service value belongs to the first quality of service class, the corresponding thread allocation result is exclusive one thread, i.e., exclusive thread allocation; for the RPC interface service with the service quality value belonging to the second service quality class, the corresponding thread allocation result is shared one thread, namely shared thread allocation.
As an alternative implementation, the service quality value of the RPC interface service is used to determine whether the RPC interface service shares a common thread or monopolizes a thread, and the larger the service quality value is, the higher the priority is, which indicates that in this case, the more an exclusive thread needs to be allocated to the RPC interface service separately. Specifically, the service end may sort the calculated service quality values of the service of each RPC interface of the service end according to the size, where the service quality value of the previous N meets a preset condition, corresponds to a first service quality class, the RPC interface service of the service end exclusively uses one thread, and other service quality values do not meet the preset condition, corresponds to a second service quality class, and the RPC interface service of the service end shares a common thread. The N is a positive integer greater than or equal to 1, and can be determined by a person 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 service end. The preset condition is used as a reference for determining whether the RPC interface service monopolizes threads, or may be other forms, where an exclusive thread is allocated to the RPC interface service with a service quality value higher than a preset service quality value threshold, and other RPC interface services allocate a common thread.
As another alternative, the thread allocation result of the RPC interface service notified by the server according to the preset quality of service level of the RPC interface service is obtained.
In a global file which is created in advance and is shared by all nodes in a system architecture, a developer statically designates callback functions and static call numbers of each service end RPC interface service providing each RPC interface service, and simultaneously, the service quality level of the RPC interface service is preset, 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 the first service quality level of the service end, a common thread is created for all RPC interface services belonging to the second service quality level, and all the independent threads and the common threads form a thread pool of the RPC interface service.
More preferably, in combination with the two modes, 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 a developer modification right, the developer can also modify the service quality level, create own independent threads for each RPC interface service of the service end belonging to the first service quality level, create a common thread for all RPC interface services belonging to the second service quality level, and all the independent threads and the common threads form a thread pool of the RPC interface service.
When the method is implemented, after the process initialization of the server is completed, respective independent threads are respectively established for each RPC interface service of the server, an RPC interface service thread pool of the server is formed, namely, a plurality of independent threads exist for the RPC interface service, all independent threads of all the RPC interface services of which the service quality value does not meet the preset condition in the RPC interface service thread pool are subsequently deleted in real time according to the determined service quality value, a common thread is established, and all the RPC interface services which do not meet the preset condition are provided. Of course, after the process initialization of the server is completed, a common thread is created for each RPC interface service of the server, so as to form an RPC interface service thread pool of the server, that is, all RPC interface services share one thread, and then all RPC interface services in the RPC interface service thread pool with the service quality value meeting the preset condition are respectively built into independent threads according to the determined service quality value in real time.
In the above embodiment, the RPC service thread pool is created entirely after the service end is initialized, and then is dynamically adjusted locally according to the service quality level, so that the service quality level of the RPC interface service operation can be adjusted according to the actual historical call condition statistics information.
As an optional implementation manner, before the step of determining the RPC interface service provided by the service end to be invoked, the method further includes:
determining the on-line/off-line state of the RPC interface service provided by the service end according to the multicast information of each service end providing the RPC interface service;
when the RPC interface service provided by the service end needs to be called, the RPC interface service in an online state is selected to be called.
Specifically, the server side notifies the client side of online and offline events of the RPC interface service. Illustratively, by creating a multicast message of the TIPC protocol, each node is made to join the multicast, and the node multicasts the online and offline states of the respective RPC interface services through heartbeat messages. So that the client only invokes the RPC interface service online.
As an alternative implementation manner, the server side considers that when the dynamic call number is used as the monitoring port number of the RPC interface service, there may be a problem that the monitoring port conflicts (the same as the ports monitored by other applications may cause service unavailability), and when the RPC call number is 32 bits and the ports monitored by the TCP are 16 bits, the requirements are not met, so that a monitoring port space which is 32 bits and independent from the operating system can be created by using the TIPC protocol, so that the conflicts between the ports are avoided.
As an optional implementation manner, in an application scenario that the system frame is a distributed embedded system frame (for example, a machine frame device), the technical scheme provided by the embodiment of the invention is implemented by adopting a C language, so as to solve the problem of heavy load of the existing RPC interface service in the embedded device.
Correspondingly, the client determines the RPC interface service provided by the service end to be called and determines the dynamic calling number corresponding to the RPC interface service, which comprises the following steps:
determining a static call number of an RPC interface service provided by a server to be called by using a C language header file, wherein the C language header file predefines the static call number of each RPC interface service and a callback function name corresponding to a callback function number in the static call number;
and determining the dynamic calling number corresponding to the RPC interface service according to the static calling 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 pre-created system architecture is defined in a header file of C language, where the header file of C language may be rpc.h. Each stated RPC interface service comprises a static calling number and callback function related information of the service. Preferably, the callback function of the RPC interface service uses weak symbols to make declaration. The method can ensure that no matter whether homonym function definition exists in the C file, RPC interface service can be successfully compiled and operated, and a C language weak symbol mechanism is used, so that the possible link error of the RPC interface service in the compiling process can be solved, and the function registration flow of the traditional RPC interface service is simplified through the weak symbol mechanism, so that the RPC interface service does not need to be displayed and registered by a user, and the error introduced by the registration flow and the deregistration flow of the RPC interface service is avoided.
When the client process compiles the link, the statement of the RPC interface service in the header file can be used for defining and referencing a callback function of the RPC interface service and can be used for inquiring the callback function of the RPC interface service and a static call number of the callback function.
When the server process compiles the link, the declaration of the RPC interface service in the header file can be regarded as a callback function definition of the RPC interface service. In the linking process, if the linker finds that the C file has the definition of the homonym function, the linker binds the static calling number 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 smooth compiling, passing and running no matter whether the callback function of the RPC interface service is realized or not.
By way of example, the definition of the RPC interface service in the header file of the C language may be represented by a data structure,
typedef int (char buf, int buflen, int datalen, int node)/RPC interface service callback function header file%
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 calls back the function name.
FIG. 4 is a flow chart corresponding to a method for remote procedure call RPC by a complete client;
step S401, obtaining the multicast information of each service end of the RPC interface service provided by the service end, obtaining the thread allocation result of the RPC interface service notified by the service end according to the service quality grade of the RPC interface service, and determining the RPC interface service in an online state according to the obtained result;
step S402, determining RPC interface service provided by a server to be called in an online state and a corresponding dynamic call number;
step S403, judging whether the node number of the service end is the same as the node number of the client end and the process number are the same, 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 queried, executing step S406 when the query 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 node number of the service end is different from the node number of the client end, 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;
step S409, creating a corresponding UNIX SOCKET connection, and calling the RPC interface service based on the connection.
The processes in the steps S404, S405, S408, and S409 may be summarized as that the client sends, to the server, request data of the RPC interface service provided by the server to be invoked, and the client receives response data of the RPC interface service provided by the server to be invoked. And in the steps S408 and S409, if the corresponding SOCKET connection is created successfully, the successful connection information is stored in the hash table with the determined dynamic call number KEY value for the next query.
The method provided by the invention can enable the client to select the 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 communication time consumption and the resource consumption are reduced, and the method is suitable for various embedded application development scenes.
Example 2
The embodiment of the invention provides a method for Remote Procedure Call (RPC) by a server, which can be matched with a client in the first embodiment to finish remote procedure call of RPC interface service. As shown in fig. 5, the method comprises the steps of:
step S501, receiving an invocation of RPC interface service provided by a service end initiated by a client;
the method comprises the steps that a client firstly determines RPC interface service provided by a to-be-called server, the RPC interface service further determines a dynamic calling number corresponding to the RPC interface service in a certain process of a certain node of a system architecture, the dynamic calling number comprises a static calling number and a node number of the server, and the static calling number comprises a process number and a callback function number corresponding to the RPC interface service.
Step S502, responding to the call and providing the RPC interface service for the client.
When the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
After the client determines the dynamic calling number corresponding to the RPC interface service provided by the service end to be called, determining whether the node number in the dynamic calling number is the same as the node where the client is located, determining whether the process identified by the static calling number in the dynamic calling number is the same as the process where the client is located, and when determining that the node number and the process are the same, indicating that the client and the service end 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 service end in a direct calling mode to provide the RPC interface service for the client to complete calling. Otherwise, when the fact that the client and the server are not in the same process of the same node is determined, calling a callback function corresponding to the callback function number by means of creating a SOCKET connection, and calling the RPC interface service for the client to complete calling.
As an optional implementation manner, before receiving the call initiated by the client to the RPC interface service provided by the service end, the method provided by this embodiment further includes:
acquiring a static calling number of an RPC interface service provided by a service end and a node number for uniquely identifying a node where the service end is located, wherein the static calling number comprises a process number and a callback function number corresponding to the RPC interface service;
Combining the obtained static calling number and node number of the RPC interface service to generate a dynamic calling number of the RPC interface service;
and determining a SOCKET monitoring port number of the RPC interface service, creating a preset TIPC SOCKET which is suitable for the cross-node and UNIX SOCKET which is suitable for the cross-process under the monitoring port number, and waiting for the connection of the client.
Correspondingly, receiving the call initiated by the client through the mode of creating the 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 under a SOCKET monitoring port number initiated by a client;
and establishing 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 the RPC interface service for the client comprises: receiving call request data which is sent by a client and contains the dynamic call number of RPC interface service provided by a service end to be called; and feeding back response data obtained by calling a callback function of the RPC interface service according to the call 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 calling number of the RPC interface service as the SOCKET monitoring port number of the RPC interface service;
when the thread allocation result of the RPC interface service is a shared thread, the preset SOCKET public monitoring port number of the service end is used as the SOCKET monitoring port number of the RPC interface service.
As an alternative embodiment, the method further comprises:
thread allocation is carried out on all RPC interface services provided by a service end according to the service quality of the RPC interface services;
specifically, a dynamic call number is determined according to the static call number of the RPC interface service and the node number where the server is located, and an exclusive listening port of an exclusive thread of the RPC interface service or a common listening port of a common thread of the RPC interface service is provided to the client by using the dynamic call number, and a manner in which the server determines the exclusive thread or the common thread of the RPC interface service is described in embodiment 1, which is not repeated herein.
As an optional implementation manner, thread allocation is performed for all RPC interface services provided by the service end according to service quality of the RPC interface services, including:
Calculating the service quality value of the RPC interface service according to the historical call condition statistical information of the RPC interface service;
determining the service quality grade to which the service quality value belongs;
distributing thread distribution results corresponding to the service quality grades for the RPC interface service;
the historical call condition statistical information comprises at least one of the following information: call crash times, average call time duration, call stack depth, and call times.
Specifically, a service quality value is determined according to historical call condition statistical information of the RPC interface service, a service quality class to which the service quality value belongs is determined according to the service quality value, and a thread allocation result of the RPC interface service is determined according to the service quality class, wherein the historical call condition statistical information comprises call collapse times, average call time-consuming time duration, call stack depth and call times, and a calculation mode of the specific service quality value is based on the same conception as that provided by the embodiment, and is not repeated herein; or (b)
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 the RPC interface service provided by the service end initiated by the client, the method further includes:
The on-line/off-line state of the different RPC interface services is multicast through multicast information, so that the client determines the on-line/off-line state of the RPC interface services.
As an alternative implementation manner, the server side considers that when the dynamic call number is used as the monitoring port number of the RPC interface service, there may be a problem that the monitoring port conflicts (the same as the ports monitored by other applications may cause service unavailability), and when the RPC call number is 32 bits and the ports monitored by the TCP are 16 bits, the requirements are not satisfied, so that a monitoring port space which is 32 bits and independent from the operating system can be created by using the TIPC protocol, so that the conflicts between the ports are avoided.
As an optional implementation manner, obtaining a static call number of an RPC interface service provided by a service end includes:
determining a static call number of the RPC interface service provided by a server side by using a C language header file, wherein the C language header file predefines 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 adopts weak symbol description.
As an optional implementation manner, responding 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 calling number and the callback function name of the RPC interface service;
and if the corresponding callback function is queried, 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 performing remote procedure call RPC by the server is the same as the method for performing remote procedure call RPC by the client provided in embodiment 1, and will not be described herein.
The method provided by the invention can enable the client to select the communication mode suitable for the position relation according to the relative position relation between the client and the RPC interface service of the server, has reliable and efficient communication mechanism and unified RPC interface function prototype, reduces the communication time consumption and the resource loss compared with the complex parameter processing flow under the general mechanism, and is suitable for various embedded application development scenes.
An embodiment of the present invention provides an apparatus for remote procedure call RPC by a client, where the apparatus 600 may generate a relatively large difference due to different configurations or performances, as shown in fig. 6, and may include one or more processors (in english full name: central processing units, english abbreviated: CPU) 601 (for example, one or more processors) and a memory 602, and one or more storage media 603 (for example, one or more mass storage devices) storing application programs 604 or data 606. Wherein the memory 602 and storage medium 603 may be transitory or persistent storage. The program stored in the storage medium 603 may include one or more modules (not shown), each of which may include a series of instruction operations in the information processing apparatus. Still further, the processor 601 may be arranged to communicate with a storage medium 603 and execute a series of instruction operations in the storage medium 603 on the apparatus 600.
The apparatus 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.
The processor is used for reading the instructions 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 of the service end, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
when the node number of the service end is determined to be the same as the node number of the client end, and the process identified by the process number is the same as the process of the client end, calling a callback function corresponding to the callback function number in a direct calling mode, so that the service end provides the RPC interface service for the client end;
otherwise, calling the callback function corresponding to the callback function number by creating a SOCKET connection mode, so that the server side provides the RPC interface service for the client side.
Optionally, the processor is further configured to call a callback function corresponding to the callback function number by creating a SOCKET connection, so that the server side provides the RPC interface service for the client side, and the method includes:
determining that the node number of the service end is different from the node number of the client end, or determining that the node number of the service end is the same as the node number of the client end, determining that the process identified by the process number is different from the process of the client end, and inquiring the SOCKET connection corresponding to the dynamic call number;
and if the corresponding SOCKET connection is inquired, 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, otherwise, creating the corresponding SOCKET connection, and calling the callback function corresponding to the callback function number through the created SOCKET connection, so that the server side provides 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 service end is different from the node number of the client end, creating a corresponding preset TIPC SOCKET connection suitable for the cross node;
If the node number of the server is the same as the node number of the client, a corresponding preset UNIX SOCKET connection suitable for cross-process is created.
Optionally, the processor is further configured to create a corresponding SOCKET connection, including:
and taking the dynamic calling number as a SOCKET monitoring port number, and creating SOCKET connection with the RPC interface service provided by the 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, the public SOCKET monitoring port number of the server is utilized 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 the server side in a mode of the 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 comprises the following steps:
when the service quality level of the RPC interface service is the corresponding first service quality level allocated to the exclusive thread, the dynamic calling 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 created;
When the service quality level of the RPC interface service distributes a corresponding second service quality level for the shared thread, the public SOCKET monitoring port number of the service end is utilized to establish SOCKET connection with the RPC interface service provided by the service end to be called.
Optionally, before the step of determining the RPC interface service provided by the service end to be invoked, the processor further includes:
determining the on-line/off-line state of the RPC interface service provided by the service end according to the multicast information of each service end providing the RPC interface service;
when the RPC interface service provided by the service end needs 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 calling number corresponding to the RPC interface service, including:
determining a static call number of an RPC interface service provided by a server to be called by using a C language header file, wherein the C language header file predefines the static call number of each RPC interface service and a callback function name corresponding to a callback function number in the static call number;
and determining the dynamic calling number corresponding to the RPC interface service according to the static calling number of the RPC interface service and the node where the service end 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:
a call request is sent to a server, the server determines a dynamic call number according to the static call number of the RPC interface service and the server node number of the server, and a corresponding callback function is queried 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 side calls the RPC interface service provided by the callback function, otherwise, the RPC interface service provided by the server side 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 vary considerably in configuration or performance and may include one or more processors (acronym: central processing units, acronym: CPU) 701 (e.g., one or more processors) and memory 702, one or more storage media 703 (e.g., one or more mass storage devices) storing applications 704 or data 706. Wherein the memory 702 and the storage medium 703 may be transitory or persistent storage. The program stored in the storage medium 703 may include one or more modules (not shown), each of which may include a series of instruction operations in the information processing apparatus. Still further, the processor 701 may be arranged to communicate with a storage medium 703 and 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 configured to read the instructions in the memory, and perform the following procedures:
receiving a call initiated by a client to an RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
when the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
Optionally, before receiving the call initiated by the client to the RPC interface service provided by the service end, the processor further includes:
acquiring a static call number of an RPC interface service provided by a service end and a node number for uniquely identifying a node where the service end 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 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 which is suitable for cross nodes and a preset UNIX SOCKET which is suitable for cross processes under the monitoring port number, and waiting for the connection of a client;
the receiving the call initiated by the client through the mode of creating the SOCKET connection, responding to the call, and providing RPC interface service for the client, comprising:
receiving a TIPC SOCKET or UNIX SOCKET connection request initiated by the client under the SOCKET monitoring port number;
establishing 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 the RPC interface service for the client comprises: receiving call request data which is sent by a client and contains the dynamic call number of RPC interface service provided by a service end to be called; and feeding back response data obtained by calling a callback function of the RPC interface service according to the call 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 calling number of the RPC interface service as the SOCKET monitoring port number of the RPC interface service;
when the thread allocation result of the RPC interface service is a shared thread, the preset SOCKET public monitoring port number of the service end is used as the SOCKET monitoring port number of the RPC interface service.
Optionally, the processor is further configured to:
and performing thread allocation for all the RPC interface services provided by the service end according to the service quality of the RPC interface services.
Optionally, the processor is configured to perform thread allocation for all RPC interface services provided by the service end according to service quality of the RPC interface service, including:
calculating the service quality value of the RPC interface service according to the historical call condition statistical information of the RPC interface service;
determining the service quality grade to which the service quality value belongs;
distributing thread distribution results corresponding to the service quality grades for the RPC interface service;
the historical call condition statistical information comprises at least one of the following information: call crash times, average call time duration, call stack depth, and call times.
Optionally, the processor is configured to obtain a static call number of an RPC interface service provided by the service end, and includes:
Determining a static call number of the RPC interface service provided by a server side by using a C language header file, wherein the C language header file predefines 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 adopts weak symbol description. Optionally, the processor is configured to provide the RPC interface service for the client in response to the call, including:
inquiring a corresponding callback function in a C language file according to the dynamic calling number and the callback function name of the RPC interface service;
and if the corresponding callback function is queried, 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 the RPC interface service provided by the service end initiated by the client, the processor further includes:
the on-line/off-line state of the different RPC interface services is multicast through multicast information, so that the client determines the on-line/off-line state of the RPC interface services.
The embodiment of the invention provides a device for Remote Procedure Call (RPC) by a client, wherein a schematic diagram of the device is shown in fig. 8, and the device comprises the following modules:
The comparison module 801 is configured to determine an RPC interface service provided by a service end to be invoked and a corresponding dynamic invocation number, where the dynamic invocation number includes a static invocation number and a node number where the service end is located, and the static invocation 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, when 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, call a callback function corresponding to the callback function number by a direct call 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 creating a SOCKET connection mode, so that the server side provides the RPC interface 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 by creating a SOCKET connection mode, so that the server side provides the RPC interface service for the client side, and the method includes:
determining that the node number of the service end is different from the node number of the client end, or determining that the node number of the service end is the same as the node number of the client end, determining that the process identified by the process number is different from the process of the client end, and inquiring the SOCKET connection corresponding to the dynamic call number;
And if the corresponding SOCKET connection is inquired, 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, otherwise, creating the corresponding SOCKET connection, and calling the callback function corresponding to the callback function number through the created SOCKET connection, so that the server side provides 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 service end is different from the node number of the client end, creating a corresponding preset TIPC SOCKET connection suitable for the cross node;
if the node number of the server is the same as the node number of the client, a corresponding preset UNIX SOCKET connection suitable for cross-process is created.
The connection mode determining module 802 is further configured to create a corresponding SOCKET connection, including:
and taking the dynamic calling number as a SOCKET monitoring port number, and creating SOCKET connection with the RPC interface service provided by the 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, the public SOCKET monitoring port number of the server is utilized 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 the server side in a mode of the 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 comprises the following steps:
when the service quality level of the RPC interface service is the corresponding first service quality level allocated to the exclusive thread, the dynamic calling 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 created;
when the service quality level of the RPC interface service distributes a corresponding second service quality level for the shared thread, the public SOCKET monitoring port number of the service end is utilized to establish SOCKET connection with the RPC interface service provided by the service end to be called.
The multicast message module 803 is further configured to, before determining the RPC interface service step provided by the service end to be invoked, further include:
determining the on-line/off-line state of the RPC interface service provided by the service end according to the multicast information of each service end providing the RPC interface service;
when the RPC interface service provided by the service end needs 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 service end to be called, and determine a dynamic call number corresponding to the RPC interface service, where the determining module includes:
determining a static call number of an RPC interface service provided by a server to be called by using a C language header file, wherein the C language header file predefines the static call number of each RPC interface service and a callback function name corresponding to a callback function number in the static call number;
and determining the dynamic calling number corresponding to the RPC interface service according to the static calling number of the RPC interface service and the node where the service end is located.
The connection mode determining module 802 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, where the method includes:
a call request is sent to a server, the server determines a dynamic call number according to the static call number of the RPC interface service and the server node number of the server, and a corresponding callback function is queried 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 side calls the RPC interface service provided by the callback function, otherwise, the RPC interface service provided by the server side to be called is determined again.
The embodiment of the invention provides a device for Remote Procedure Call (RPC) by a server, as shown in fig. 9, comprising the following modules:
the receiving indication module 901 is used for receiving a call initiated by a client to an RPC interface service provided by a service end;
a connection establishment module 902, configured to provide the RPC interface service for the client in response to the call;
when the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
The connection establishment module 902 is configured to, before receiving a call initiated by a client to an RPC interface service provided by a service end, further include:
acquiring a static call number of an RPC interface service provided by a service end and a node number for uniquely identifying a node where the service end 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 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 which is suitable for cross nodes and a preset UNIX SOCKET which is suitable for cross processes under the monitoring port number, and waiting for the connection of a client;
the receiving the call initiated by the client through the mode of creating the SOCKET connection, responding to the call, and providing RPC interface service for the client, comprising:
receiving a TIPC SOCKET or UNIX SOCKET connection request initiated by the client under the SOCKET monitoring port number;
establishing 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 the RPC interface service for the client comprises: receiving call request data which is sent by a client and contains the dynamic call number of RPC interface service provided by a service end to be called; and feeding back response data obtained by calling a callback function of the RPC interface service according to the call request data to the client.
Establishing a connection module 902, determining 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 calling number of the RPC interface service as the SOCKET monitoring port number of the RPC interface service;
When the thread allocation result of the RPC interface service is a shared thread, the preset SOCKET public monitoring port number of the service end is used as the SOCKET monitoring port number of the RPC interface service.
The thread allocation result determining module 904 is further configured to:
and performing thread allocation for all the RPC interface services provided by the service end according to the service quality of the RPC interface services.
The thread allocation result determining module 904 is further configured to perform thread allocation for all RPC interface services provided by the service end according to service quality of the RPC interface services, including:
calculating the service quality value of the RPC interface service according to the historical call condition statistical information of the RPC interface service;
determining the service quality grade to which the service quality value belongs;
distributing thread distribution results corresponding to the service quality grades for the RPC interface service;
the historical call condition statistical information comprises at least one of the following information: call crash times, average call time duration, call stack depth, and call times.
The connection module 902 is configured to obtain a static call number of an RPC interface service provided by a service end, where the static call number includes:
determining a static call number of the RPC interface service provided by a server side by using a C language header file, wherein the C language header file predefines 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 adopts weak symbol description.
The connection establishment module 902 is configured to provide the RPC interface service for the client in response to the call, and includes:
inquiring a corresponding callback function in a C language file according to the dynamic calling number and the callback function name of the RPC interface service;
and if the corresponding callback function is queried, 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, before the step of receiving the RPC interface service provided by the service end initiated by the client, further includes:
the on-line/off-line state of the different RPC interface services is multicast through multicast information, so that the client determines the on-line/off-line state of the RPC interface services.
An embodiment of a seventh aspect of the present application provides a computer storage medium having stored thereon a computer program which, when executed by a processor, performs any of the methods provided in embodiment 1 of the present application, or performs any of the methods provided in embodiment 2 of the present application.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (19)

1. A method for remote procedure call, RPC, performed by a client, the method comprising:
determining the on-line/off-line state of the RPC interface service provided by the service end according to the multicast information of each service end providing the RPC interface service;
when the RPC interface service provided by the service end is determined to be required to be called, selecting to call the RPC interface service in an online state;
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 of the service end, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
When the node number of the service end is determined to be the same as the node number of the client end, and the process identified by the process number is the same as the process of the client end, calling a callback function corresponding to the callback function number in a direct calling mode, so that the service end provides the RPC interface service for the client end;
otherwise, calling a callback function corresponding to the callback function number by creating a SOCKET connection mode, 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 includes:
determining that the node number of the service end is different from the node number of the client end, or determining that the node number of the service end is the same as the node number of the client end, determining that the process identified by the process number is different from the process of the client end, and inquiring the SOCKET connection corresponding to the dynamic call number;
and if the corresponding SOCKET connection is inquired, 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, otherwise, creating the corresponding SOCKET connection, and calling the callback function corresponding to the callback function number through the created SOCKET connection, so that the server side provides 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 service end is different from the node number of the client end, creating a corresponding preset TIPC SOCKET connection suitable for the cross node;
if the node number of the server is the same as the node number of the client, a corresponding preset UNIX SOCKET connection suitable for cross-process is created.
4. The method of claim 2, wherein the creating the corresponding SOCKET connection comprises:
and taking the dynamic calling number as a SOCKET monitoring port number, and creating SOCKET connection with the RPC interface service provided by the service end to be called.
5. The method according to claim 4, wherein the method further comprises:
and after the corresponding SOCKET connection is failed to be established according to the dynamic call number, the public SOCKET monitoring port number of the server is utilized to establish the SOCKET connection with the RPC interface service provided by the server to be called.
6. The method according to claim 2, wherein the method further comprises: obtaining a thread allocation result of the RPC interface service notified by the server side in a mode of the 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 comprises the following steps:
When the service quality level of the RPC interface service is the corresponding first service quality level allocated to the exclusive thread, the dynamic calling 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 created;
when the service quality level of the RPC interface service distributes a corresponding second service quality level for the shared thread, the public SOCKET monitoring port number of the service end is utilized to establish SOCKET connection with the RPC interface service provided by the service end to be called.
7. The method of claim 1, wherein the determining the RPC interface service provided by the service to be invoked and determining the dynamic invocation number corresponding to the RPC interface service comprise:
determining a static call number of an RPC interface service provided by a server to be called by using a C language header file, wherein the C language header file predefines the static call number of each RPC interface service and a callback function name corresponding to a callback function number in the static call number;
and determining the dynamic calling number corresponding to the RPC interface service according to the static calling number of the RPC interface service and the node where the service end is located.
8. A method for a server to make remote procedure call RPC, the method comprising:
Multicasting the on-line/off-line states of different RPC interface services through multicast messages so that the client determines the on-line/off-line states of the RPC interface services;
receiving a call initiated by a client to an RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
when the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
9. The method of claim 8, further comprising, prior to receiving the client initiated call to the RPC interface service provided by the service:
acquiring a static call number of an RPC interface service provided by a service end and a node number for uniquely identifying a node where the service end 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 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 which is suitable for cross nodes and a preset UNIX SOCKET which is suitable for cross processes under the monitoring port number, and waiting for the connection of a client;
The receiving the call initiated by the client through the mode of creating the SOCKET connection, responding to the call, and providing RPC interface service for the client, comprising:
receiving a TIPC SOCKET or UNIX SOCKET connection request initiated by the client under the SOCKET monitoring port number;
establishing 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 the RPC interface service for the client comprises: receiving call request data which is sent by a client and contains the dynamic call number of RPC interface service provided by a service end to be called; and feeding back response data obtained by calling a callback function of the RPC interface service according to the call request data to the client.
10. The method of claim 9, wherein determining the socks 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 calling number of the RPC interface service as the SOCKET monitoring port number of the RPC interface service;
when the thread allocation result of the RPC interface service is a shared thread, the preset SOCKET public monitoring port number of the service end is used as the SOCKET monitoring port number of the RPC interface service.
11. The method according to claim 10, wherein the method further comprises:
and performing thread allocation for all the RPC interface services provided by the service end according to the service quality of the RPC interface services.
12. The method of claim 11, wherein the thread allocation for all RPC interface services provided by the service end according to the service quality of the RPC interface services comprises:
calculating the service quality value of the RPC interface service according to the historical call condition statistical information of the RPC interface service;
determining the service quality grade to which the service quality value belongs;
distributing thread distribution results corresponding to the service quality grades for the RPC interface service;
the historical call condition statistical information comprises at least one of the following information: call crash times, average call time duration, call stack depth, and call times.
13. The method of claim 9, wherein obtaining the static call number of the RPC interface service provided by the service side comprises:
determining a static call number of the RPC interface service provided by a server side by using a C language header file, wherein the C language header file predefines 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 adopts weak symbol description.
14. The method of claim 13, wherein providing the RPC interface service to the client in response to the call comprises:
inquiring a corresponding callback function in a C language file according to the dynamic calling number and the callback function name of the RPC interface service;
and if the corresponding callback function is queried, 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.
15. An apparatus for remote procedure call RPC by a client, the apparatus comprising:
a memory for storing instructions;
a processor for reading the instructions in the memory, performing the following process:
determining the on-line/off-line state of the RPC interface service provided by the service end according to the multicast information of each service end providing the RPC interface service;
when the RPC interface service provided by the service end is determined to be required to be called, selecting to call the RPC interface service in an online state;
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 of the service end, and the static call number comprises a process number and a callback function number corresponding to the RPC interface service;
When the node number of the service end is determined to be the same as the node number of the client end, and the process identified by the process number is the same as the process of the client end, calling a callback function corresponding to the callback function number in a direct calling mode, so that the service end provides the RPC interface service for the client end;
otherwise, calling a callback function corresponding to the callback function number by creating a SOCKET connection mode, so that the server side provides the RPC interface service for the client side.
16. An apparatus for a server to make a remote procedure call RPC, the apparatus comprising:
a memory for storing instructions;
a processor for reading the instructions in the memory, performing the following process:
multicasting the on-line/off-line states of different RPC interface services through multicast messages so that the client determines the on-line/off-line states of the RPC interface services;
receiving a call initiated by a client to an RPC interface service provided by a server;
responding to the call, and providing the RPC interface service for the client;
when the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
17. An apparatus for remote procedure call RPC by a client, the apparatus comprising:
the state determining module is used for determining the online/offline state of the RPC interface service provided by the service end according to the multicast information of each service end providing the RPC interface service;
when the RPC interface service provided by the service end is determined to be required to be called, selecting to call the RPC interface service in an online state;
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 of the service end, 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 node number of the service end is the same as the node number of the client, and when the process identified by the process number is the same as the process of the client, calling a callback function corresponding to the callback function number in a direct calling mode, so that the service end provides the RPC interface service for the client;
otherwise, calling the callback function corresponding to the callback function number by creating a SOCKET connection mode, so that the server side provides the RPC interface service for the client side.
18. The device for Remote Procedure Call (RPC) by the server side is characterized by comprising the following modules:
the sending module is used for 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 receiving indication module is used for receiving the call of the RPC interface service provided by the service end initiated by the client;
the connection module is used for responding to the call and providing the RPC interface service for the client;
when the node number of the service end is the same as the node number of the client end, and the process corresponding to the RPC interface service provided by the service end is the same as the process of the client end, the initiated call is in a direct call mode, otherwise, in a mode of creating SOCKET connection.
19. A computer storage medium having stored thereon a computer program, which when executed by a processor performs the method according to any of claims 1-7 or performs the method according to any of claims 8-14.
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 CN111597061A (en) 2020-08-28
CN111597061B true 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)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084046B (en) * 2020-09-12 2021-12-21 深圳市艾可思信息技术有限公司 Method and device for calling generalization interface in distributed computing
CN112799787B (en) * 2021-02-07 2023-10-03 北京华如科技股份有限公司 Improved parallel behavior execution conflict resolution method in simulation operation and storage medium thereof
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
CN113190292B (en) * 2021-05-26 2023-09-26 的卢技术有限公司 Method and device for remotely executing functions on multiple servers
CN113360525B (en) * 2021-08-10 2021-12-07 支付宝(杭州)信息技术有限公司 Query request processing method, device and equipment and key value query system
CN114816792B (en) * 2022-04-20 2024-04-09 北京计算机技术及应用研究所 Remote function calling method based on special channel

Citations (3)

* 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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8266639B2 (en) * 2009-12-04 2012-09-11 International Business Machines Corporation Remote procedure call (RPC) bind service with physical interface query and selection
US9021510B2 (en) * 2009-12-04 2015-04-28 International Business Machines Corporation Remote procedure call (RPC) bind service with physical interface query and selection

Patent Citations (3)

* 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
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

Also Published As

Publication number Publication date
CN111597061A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN111597061B (en) Method and device for remote procedure call by client or server
US9544362B2 (en) System and method for processing information via networked computers including request handlers, process handlers, and task handlers
CN112905305B (en) VPP-based cluster type virtualized data forwarding method, device and system
CN115328663A (en) Method, device, equipment and storage medium for scheduling resources based on PaaS platform
CN1338171A (en) Internet protocol handler for telecommunications platform with processor cluster
CN112583797B (en) Multi-protocol data processing method, device, equipment and computer readable storage medium
CN113326155A (en) Information processing method, device, system and storage medium
US20110131288A1 (en) Load-Balancing In Replication Engine of Directory Server
CN110780973A (en) Virtual machine migration device, method, equipment and readable storage medium
US10313450B2 (en) Method for transparently connecting augmented network socket operations
Doan et al. Reusing sub-chains of network functions to support mec services
CN114979286A (en) Access control method, device and equipment for container service and computer storage medium
CN113419818B (en) Basic component deployment method, device, server and storage medium
CN112261125B (en) Centralized unit cloud deployment method, device and system
US20240118935A1 (en) Pod deployment method and apparatus
CN112565390B (en) Service distribution method, device, electronic equipment and storage medium
EP3672203A1 (en) Distribution method for distributed data computing, device, server and storage medium
CN110708209B (en) Virtual machine flow acquisition method and device, electronic equipment and storage medium
CN115391058A (en) SDN-based resource event processing method, resource creating method and system
CN114745377A (en) Edge cloud cluster service system and implementation method
CN111431951B (en) Data processing method, node equipment, system and storage medium
CN111858079A (en) Distributed lock migration method and device, electronic equipment and storage medium
CN113703930A (en) Task scheduling method, device and system and computer readable storage medium
CN111427634A (en) Atomic service scheduling method and device
US20230393916A1 (en) Network adapter, computing device, and data acquisition method

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