CN113709085A - Remote procedure call processing method, device and equipment - Google Patents

Remote procedure call processing method, device and equipment Download PDF

Info

Publication number
CN113709085A
CN113709085A CN202010439494.9A CN202010439494A CN113709085A CN 113709085 A CN113709085 A CN 113709085A CN 202010439494 A CN202010439494 A CN 202010439494A CN 113709085 A CN113709085 A CN 113709085A
Authority
CN
China
Prior art keywords
stream object
result
service request
calling
parameter
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.)
Pending
Application number
CN202010439494.9A
Other languages
Chinese (zh)
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.)
TD Tech Chengdu Co Ltd
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202010439494.9A priority Critical patent/CN113709085A/en
Publication of CN113709085A publication Critical patent/CN113709085A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the application provides a remote procedure call processing method, a device and equipment, a client transmits a service request to a server through a parameter stream object so that the server obtains the service request from the parameter stream object, then, the remote service is called according to the service request, and a call result is returned through a result stream object, so that the client obtains the call result from the result stream object, namely, the client transmits contents in an RPC call in a stream object mode without distributing a large memory to the object, and only one RPC call is generated in the whole data transmission process, a plurality of objects do not need to be defined, multiple RPC calls do not need to be carried out, the use is convenient, the call processing time is reduced, and the method is suitable for application.

Description

Remote procedure call processing method, device and equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method, a device and equipment for processing remote procedure call.
Background
Remote Procedure Call (RPC) is a technique that uses the RPC protocol to request services from a Remote computer program over a network without knowledge of the underlying network technology. The RPC protocol assumes the existence of some transport protocol, such as TCP or UDP, for carrying information data between communication procedures. In the OSI network communication model, RPC spans the transport and application layers. RPC makes it easier to develop applications including network distributed multiprogrammers.
In general, RPC uses a client/server mode, the requesting program can be the client, and the service providing program can be the server. The requesting program can call the server in an open platform mode through a corresponding interface. At present, in most practical service application scenarios, the client/server mode generally adopts a transmission mode using an object as content, that is, the client sends a request object and receives a result object returned after processing by the server.
However, the above transmission method has a great limitation in transmitting large data. Because of memory concerns, an object is generally not allowed to place fields that occupy a large amount of memory. Therefore, when large data is transmitted, a plurality of objects are often defined, and transmission can be completed only by performing RPC calls for many times, so that the use is inconvenient, and the call processing time is increased.
Disclosure of Invention
The embodiment of the application provides a remote procedure call processing method, a remote procedure call processing device and remote procedure call processing equipment, and aims to solve the problems that the existing RPC adopts a transmission mode taking an object as content, is inconvenient to use when big data is transmitted, and increases call processing time.
In a first aspect, an embodiment of the present application provides a remote procedure call processing method, including:
transmitting a service request to a server through a parameter stream object, wherein the parameter stream object is used for indicating the server to obtain the service request from the parameter stream object, calling a remote service according to the service request, and returning a calling result through a result stream object;
and acquiring the calling result from the result stream object.
In one possible design, the transmitting the service request to the server through the parameter stream object includes:
calling a writing interface of the parameter stream object, and writing the service request into the parameter stream object;
and transmitting the service request to the server through the parameter stream object.
In one possible design, the obtaining the call result from the result stream object includes:
and calling a reading interface of the result stream object, and reading the calling result from the result stream object.
In one possible design, before the transmitting the service request to the server by the parameter stream object, the method further includes:
a connection is created with the server based on the remote access address.
In a second aspect, an embodiment of the present application provides a remote procedure call processing method, including:
receiving a parameter stream object transmitted by a client, wherein the parameter stream object carries a service request;
acquiring the service request from the parameter stream object;
and calling remote service according to the service request, and returning a calling result through a result stream object, wherein the result stream object is used for indicating the client to obtain the calling result from the result stream object.
In one possible design, the obtaining the service request from the parameter stream object includes:
and calling a reading interface of the parameter stream object, and reading the service request from the parameter stream object.
In one possible design, the returning the call result through the result stream object includes:
calling a writing interface of the result stream object, and writing the calling result into the result stream object;
and returning the calling result to the client through the result stream object.
In a third aspect, an embodiment of the present application provides a remote procedure call processing apparatus, including:
the transmission module is used for transmitting a service request to a server through a parameter stream object, wherein the parameter stream object is used for indicating the server to obtain the service request from the parameter stream object, calling a remote service according to the service request and returning a calling result through a result stream object;
and the first acquisition module is used for acquiring the calling result from the result stream object.
In one possible design, the transmission module is specifically configured to:
calling a writing interface of the parameter stream object, and writing the service request into the parameter stream object;
and transmitting the service request to the server through the parameter stream object.
In one possible design, the first obtaining module is specifically configured to:
and calling a reading interface of the result stream object, and reading the calling result from the result stream object.
In a possible design, the apparatus further includes a creating module configured to create a connection with the server according to a remote access address before the transmitting module transmits the service request to the server through the parameter stream object.
In a fourth aspect, an embodiment of the present application provides a remote procedure call processing apparatus, including:
the receiving module is used for receiving a parameter stream object transmitted by a client, wherein the parameter stream object carries a service request;
a second obtaining module, configured to obtain the service request from the parameter stream object;
and the return module is used for calling the remote service according to the service request and returning a calling result through a result stream object, and the result stream object is used for indicating the client to obtain the calling result from the result stream object.
In a possible design, the second obtaining module is specifically configured to:
and calling a reading interface of the parameter stream object, and reading the service request from the parameter stream object.
In one possible design, the returning module returns the call result through the result stream object, including: calling a writing interface of the result stream object, and writing the calling result into the result stream object;
and returning the calling result to the client through the result stream object.
In a fifth aspect, an embodiment of the present application provides a remote procedure call processing device, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the remote procedure call processing method as set forth in the first aspect above and in various possible designs of the first aspect.
In a sixth aspect, an embodiment of the present application provides another remote procedure call processing device, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the memory-stored computer-executable instructions to cause the at least one processor to perform the remote procedure call processing method as set forth in the second aspect above and in various possible designs of the second aspect.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the remote procedure call processing method according to the first aspect and various possible designs of the first aspect is implemented.
In an eighth aspect, embodiments of the present application provide a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the remote procedure call processing method according to the second aspect and various possible designs of the second aspect is implemented.
According to the method, the client transmits the service request to the server through the parameter stream object, so that the server obtains the service request from the parameter stream object, then the remote service is called according to the service request, and the calling result is returned through the result stream object, so that the client obtains the calling result from the result stream object.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a diagram illustrating an architecture of a remote procedure call processing system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a remote procedure call processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another remote procedure call processing method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a further remote procedure call processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a remote procedure call processing apparatus according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of another remote procedure call processing apparatus according to an embodiment of the present application;
FIG. 7A is a diagram illustrating a basic hardware architecture of a remote procedure call processing device according to the present application;
fig. 7B is a schematic diagram of a basic hardware architecture of another remote procedure call processing device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, RPC adopts a client/server mode, a request program may serve as a client, and a service providing program may serve as a server. The requesting program can call the server in an open platform mode through a corresponding interface. At present, in most practical service application scenarios, the client/server mode generally adopts a transmission mode using an object as content, that is, the client sends a request object and receives a result object returned after processing by the server.
However, the above transmission method has a great limitation in transmitting large data. Because of memory concerns, an object is generally not allowed to place fields that occupy a large amount of memory. Therefore, when large data is transmitted, a plurality of objects are often defined, and transmission can be completed only by performing RPC calls for many times, so that the use is inconvenient, and the call processing time is increased.
Therefore, in view of the above problems, the present application provides a remote procedure call processing method, in which content is transmitted in an RPC call by a stream object mode without allocating a large memory to an object, and in the whole data transmission process, only one RPC call occurs without defining a plurality of objects and performing multiple RPC calls, so that the remote procedure call processing method is convenient to use, reduces call processing time, and is suitable for application.
Optionally, the remote procedure call processing method provided by the embodiment of the present application may be applied to an application scenario as shown in fig. 1. Fig. 1 only describes, by way of example, one possible application scenario of the remote procedure call processing method provided in the embodiment of the present application, and the application scenario of the remote procedure call processing method provided in the embodiment of the present application is not limited to the application scenario shown in fig. 1.
FIG. 1 is a diagram of a remote procedure call processing system architecture. In fig. 1, the architecture includes a client 11, a server 12, and a stream interface, where the stream interface is divided into a parameter stream and a result stream, and is a common interface for the client 11 and the server 12. Wherein, a parameter stream object and a result stream object are created on the parameter stream and the result stream.
It is understood that the illustrated structure of the embodiments of the present application does not constitute a specific limitation on the architecture of the balanced distribution of data samples. In other possible embodiments of the present application, the foregoing architecture may include more or less components than those shown in the drawings, or combine some components, or split some components, or arrange different components, which may be determined according to practical application scenarios, and is not limited herein. The components shown in fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
In a specific implementation process, the client 11 transmits a service request to the server 12 through the parameter stream object, and obtains a return result of the server 12 through the result stream object.
The server 12 obtains the service request transmitted by the client 11 through the parameter stream object, and returns the result to the client 11 through the result stream object.
In addition, the stream interface includes a read interface and a write interface, the client 11 can implement a read-write interface for the parameter stream in the parameter stream object, and implement a read-write interface for the result stream in the result stream object, and similarly, the server 12 can also implement a read-write interface for the parameter stream in the parameter stream object, and implement a read-write interface for the result stream in the result stream object.
Illustratively, the client 11 calls a write interface of the parameter stream object, transmits the service request to the server 12, and calls a read interface of the result stream object, and obtains the return result of the server 12.
The server 12 calls the read interface of the parameter stream object, acquires the service request, calls the remote service, calls the write interface of the result stream object, and returns the result to the client 11.
The content is transmitted in the RPC calling mode through the stream object, a large memory does not need to be allocated to the object, only one RPC calling is performed in the whole data transmission process, a plurality of objects do not need to be defined, multiple RPC calling is not needed, the use is convenient, the calling processing time is shortened, and the method and the device are suitable for application.
It should be understood that the network architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application, and as a person having ordinary skill in the art knows that along with the evolution of the network architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart illustrating a remote procedure call processing method according to an embodiment of the present application, where an execution subject according to the embodiment of the present application may be the client 11 in the embodiment of fig. 1. As shown in fig. 2, the method may include:
s201: and transmitting a service request to the server through the parameter stream object, wherein the parameter stream object is used for indicating the server to obtain the service request from the parameter stream object, calling the remote service according to the service request, and returning a calling result through the result stream object.
Here, the client 11 may implement a read/write interface for the parameter stream in the parameter stream object and a read/write interface for the result stream in the result stream object.
Illustratively, the transmitting the service request to the server by the parameter stream object includes:
calling a writing interface of the parameter stream object, and writing the service request into the parameter stream object;
and transmitting the service request to a server through the parameter stream object.
The invoking the writing interface of the parameter stream object to write the service request into the parameter stream object may include:
and reading the file name, and calling the writing interface to write the parameter stream object. And reading the size of the file, and calling the writing interface to write the parameter stream object. And reading preset-size data from the file every time, calling the writing interface to write the parameter stream object until the reading is finished. The preset size data may be determined according to actual conditions, and this is not particularly limited in the embodiment of the present application.
In this embodiment, before the transmitting the service request to the server through the parameter stream object, the method further includes:
a connection is created with the server based on the remote access address.
Here, the client may create a connection with the server based on a remote access address provided by the client, create a transport stream based on the connection, set the transport stream into the parameter stream object and the result stream object, call a write interface of the parameter stream object to write the content into the transport stream, and transmit the content to the server by the transport stream.
In addition, the service request includes a remote method name, and the server may invoke the remote service according to the remote method name.
S202: and acquiring the calling result from the result stream object.
In a possible implementation manner, the obtaining the call result from the result stream object includes:
and calling a reading interface of the result stream object, and reading the calling result from the result stream object.
The reading interface for calling the result stream object reads the calling result from the result stream object, and may include:
and reading the file name from the result stream object and creating a file. The file size is read from the result stream object. And reading preset-size data from the result stream object each time, and writing the preset-size data into the file. And stopping reading after the reading size is equal to the file size, and closing the file. The preset size data may be determined according to actual conditions, and this is not particularly limited in the embodiment of the present application.
For example, the RPC calling mode is as follows, and here, specific examples are only listed, and the actual implementation form is not limited thereto, and may be not only called synchronously, but also called asynchronously.
RPC calling mode: call (remote access address, remote method name, parameter stream object, result stream object).
After a user calls a call, the RPC frame transmits a remote access address and a remote method name to the server at the client, then calls the parameter stream object to transmit file content, and calls the result stream object to wait for the server to return a result after the parameter stream object is called.
As can be seen from the above description, in the embodiment of the present application, the client transmits the service request to the server through the parameter stream object, so that the server obtains the service request from the parameter stream object, and then invokes the remote service according to the service request, and returns the invocation result through the result stream object, so that the client obtains the invocation result from the result stream object.
In addition, the embodiment of the present application further provides another remote procedure call processing method, and an execution main body of the embodiment of the present application may be the server 12 in the embodiment of fig. 1. As shown in fig. 3, the method may include:
s301: and receiving a parameter stream object transmitted by the client, wherein the parameter stream object carries a service request.
Here, before receiving the parameter stream object transmitted by the client, the method may further include:
the server monitors the remote access address, creates a transport stream according to the monitored remote access address, and sets the transport stream into the parameter stream object and the result stream object.
S302: and acquiring the service request from the parameter stream object.
Illustratively, the obtaining the service request from the parameter stream object includes:
and calling a reading interface of the parameter stream object, and reading the service request from the parameter stream object.
The invoking the read interface of the parameter stream object to read the service request from the parameter stream object may include:
and reading the file name from the parameter stream object to create a file. The file size is read from the parameter stream object. And reading data with preset size from the parameter stream object every time, and writing the data into the file. And stopping reading after the reading size is equal to the file size, and closing the file. The preset size data may be determined according to actual conditions, and this is not particularly limited in the embodiment of the present application.
S303: and calling the remote service according to the service request, and returning a calling result through a result stream object, wherein the result stream object is used for indicating the client to obtain the calling result from the result stream object.
Here, the service request includes a remote method name according to which the server can call the remote service.
In a possible implementation manner, the returning a call result through the result stream object includes:
calling a writing interface of the result stream object, and writing the calling result into the result stream object;
and returning the calling result to the client through the result stream object.
The writing interface for calling the result stream object and writing the calling result into the result stream object may include:
and reading the file name, and calling the writing interface to write the result stream object. And reading the size of the file, and calling the writing interface to write the result stream object. And reading preset-size data from the file every time, calling the writing interface to write the result stream object until the reading is finished. The preset size data may be determined according to actual conditions, and this is not particularly limited in the embodiment of the present application.
Illustratively, the RPC call method described above is also used: call (remote access address, remote method name, parameter stream object, result stream object) is taken as an example.
After a user calls a call, the RPC frame transmits a remote access address and a remote method name to the server at the client, then calls the parameter stream object to transmit file content, and calls the result stream object to wait for the server to return a result after the parameter stream object is called.
And after the server receives the name of the remote method, the RPC framework reads the parameter stream object, calls the remote method and then returns the result stream object to the client.
According to the method and the device, the server receives the parameter stream object transmitted by the client, the parameter stream object carries the service request, the service request is obtained from the parameter stream object, the remote service is called according to the service request, and the calling result is returned through the result stream object, so that the client obtains the calling result from the result stream object.
In addition, an embodiment of the present application further provides another remote procedure call processing method, which is described in an interaction between a client and a server, and as shown in fig. 4, the method may include:
s401: the client transmits the service request to the server through the parameter stream object.
Here, the client may call a write interface of the parameter stream object, write the service request into the parameter stream object, and transmit the service request to the server through the parameter stream object.
S402: the server receives the parameter stream object transmitted by the client.
S403: the server obtains the service request from the parameter stream object and calls remote service according to the service request.
Illustratively, the server calls a read interface of the parameter stream object to read the service request from the parameter stream object.
S404: and the server returns a calling result through the result stream object.
Optionally, the server may call a write interface of the result stream object, write the call result into the result stream object, and then return the call result to the client through the result stream object.
S405: and the client acquires the calling result from the result stream object.
In this embodiment, the client may call a read interface of the result stream object, and read the call result from the result stream object.
As can be seen from the above description, in the RPC call, content is transmitted in a manner of streaming an object without allocating a large memory to the object, and in the whole data transmission process, only one RPC call is generated without defining a plurality of objects and without performing multiple RPC calls.
Fig. 5 is a schematic structural diagram of a remote procedure call processing apparatus according to an embodiment of the present application, corresponding to the remote procedure call processing method according to the foregoing embodiment. For convenience of explanation, only portions related to the embodiments of the present application are shown. Fig. 5 is a schematic structural diagram of a remote procedure call processing apparatus according to an embodiment of the present application. As shown in fig. 5, the remote procedure call processing apparatus 50 includes: a transmission module 501 and a first acquisition module 502. The remote procedure call processing device may be the client itself, or a chip or an integrated circuit that implements the functions of the client. It should be noted here that the division of the first obtaining module of the transmission module is only a division of a logic function, and the two may be integrated or independent physically.
The transmission module 501 is configured to transmit a service request to a server through a parameter stream object, where the parameter stream object is used to instruct the server to obtain the service request from the parameter stream object, call a remote service according to the service request, and return a call result through a result stream object.
A first obtaining module 502, configured to obtain the call result from the result stream object.
In one possible design, the transmission module 501 is specifically configured to:
calling a writing interface of the parameter stream object, and writing the service request into the parameter stream object;
and transmitting the service request to the server through the parameter stream object.
In a possible design, the first obtaining module 502 is specifically configured to:
and calling a reading interface of the result stream object, and reading the calling result from the result stream object.
In a possible design, the apparatus further includes a creating module 503, configured to create a connection with the server according to the remote access address before the transmitting module transmits the service request to the server through the parameter stream object.
The apparatus provided in the embodiment of the present application may be used to implement the technical solution of the method embodiment in fig. 2, which has similar implementation principles and technical effects, and is not described herein again in the embodiment of the present application.
Fig. 6 is a schematic structural diagram of another remote procedure call processing apparatus according to an embodiment of the present application. As shown in fig. 6, the remote procedure call processing device 60 includes: a receiving module 601, a second obtaining module 602 and a returning module 603. The remote procedure call processing means here may be the above-mentioned server itself, or a chip or an integrated circuit that implements the functions of the server. It should be noted here that the division of the receiving module, the second obtaining module, and the returning module is only a division of logical functions, and the two may be integrated or independent physically.
The receiving module 601 is configured to receive a parameter stream object transmitted by a client, where the parameter stream object carries a service request.
A second obtaining module 602, configured to obtain the service request from the parameter stream object.
A returning module 603, configured to invoke the remote service according to the service request, and return a call result through a result stream object, where the result stream object is used to instruct the client to obtain the call result from the result stream object.
In a possible design, the second obtaining module 602 is specifically configured to:
and calling a reading interface of the parameter stream object, and reading the service request from the parameter stream object.
In one possible design, the returning module 603 returns the call result through the result stream object, including:
calling a writing interface of the result stream object, and writing the calling result into the result stream object;
and returning the calling result to the client through the result stream object.
The apparatus provided in the embodiment of the present application may be used to implement the technical solution of the method embodiment in fig. 3, which has similar implementation principles and technical effects, and is not described herein again in the embodiment of the present application.
Alternatively, fig. 7A and 7B schematically provide one possible basic hardware architecture of a remote procedure call processing device as described herein.
Referring to fig. 7A and 7B, a remote procedure call processing device 700 includes at least one processor 701 and a communication interface 703. Further optionally, a memory 702 and a bus 704 may also be included.
The remote procedure call processing device 700 may be a client or a server, and the present application is not limited thereto. In the remote procedure call processing device 700, the number of the processors 701 may be one or more, and fig. 7A and 7B illustrate only one of the processors 701. Alternatively, the processor 701 may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), or a Digital Signal Processor (DSP). If the remote procedure call processing device 700 has multiple processors 701, the types of the multiple processors 701 may be different, or may be the same. Alternatively, the plurality of processors 701 of the remote procedure call processing device 700 may also be integrated as a multicore processor.
Memory 702 stores computer instructions and data; the memory 702 may store computer instructions and data required to implement the remote procedure call processing methods provided herein, e.g., the memory 702 stores instructions for implementing the steps of the remote procedure call processing methods described above. Memory 702 can be any one or any combination of the following storage media: nonvolatile memory (e.g., Read Only Memory (ROM), Solid State Disk (SSD), hard disk (HDD), optical disk), volatile memory.
The communication interface 703 may provide information input/output for the at least one processor. Any one or any combination of the following devices may also be included: a network interface (e.g., an ethernet interface), a wireless network card, etc. having a network access function.
Optionally, the communication interface 703 may also be used for data communication between the remote procedure call processing device 700 and other computing devices or terminals.
Further alternatively, fig. 7A and 7B show the bus 704 by a thick line. The bus 704 may connect the processor 701 with the memory 702 and the communication interface 703. Thus, via bus 704, processor 701 may access memory 702 and may also interact with other computing devices or terminals using communication interface 703.
In the present application, the remote procedure call processing device 700 executes computer instructions in the memory 702, so that the remote procedure call processing device 700 implements the remote procedure call processing method provided in the present application, or so that the remote procedure call processing device 700 deploys the remote procedure call processing device.
From the viewpoint of logical functional division, exemplarily, as shown in fig. 7A, a transmission module 501, a first obtaining module 502, and a creating module 503 may be included in the memory 702. The inclusion herein merely refers to that the instructions stored in the memory may, when executed, implement the functions of the transmitting module, the first obtaining module, and the creating module, respectively, without limitation to physical structures.
The transmission module 501 is configured to transmit a service request to a server through a parameter stream object, where the parameter stream object is used to instruct the server to obtain the service request from the parameter stream object, call a remote service according to the service request, and return a call result through a result stream object.
A first obtaining module 502, configured to obtain the call result from the result stream object.
In one possible design, the transmission module 501 is specifically configured to:
calling a writing interface of the parameter stream object, and writing the service request into the parameter stream object;
and transmitting the service request to the server through the parameter stream object.
In a possible design, the first obtaining module 502 is specifically configured to:
and calling a reading interface of the result stream object, and reading the calling result from the result stream object.
In a possible design, the apparatus further includes a creating module 503, configured to create a connection with the server according to the remote access address before the transmitting module transmits the service request to the server through the parameter stream object.
In one possible design, as shown in fig. 7B, the memory 702 may include a receiving module 601, a second obtaining module 602, and a returning module 603. The inclusion herein merely refers to that the instructions stored in the memory may, when executed, implement the functionality of the receiving module, the second obtaining module and the returning module, respectively, and is not limited to a physical structure.
The receiving module 601 is configured to receive a parameter stream object transmitted by a client, where the parameter stream object carries a service request.
A second obtaining module 602, configured to obtain the service request from the parameter stream object.
A returning module 603, configured to invoke the remote service according to the service request, and return a call result through a result stream object, where the result stream object is used to instruct the client to obtain the call result from the result stream object.
In a possible design, the second obtaining module 602 is specifically configured to:
and calling a reading interface of the parameter stream object, and reading the service request from the parameter stream object.
In one possible design, the returning module 603 returns the call result through the result stream object, including:
calling a writing interface of the result stream object, and writing the calling result into the result stream object;
and returning the calling result to the client through the result stream object.
In addition, the remote procedure call processing device may be implemented by software as shown in fig. 7A and 7B, or may be implemented by hardware as a hardware module or as a circuit unit.
The present application provides a computer-readable storage medium, the computer program product comprising computer instructions that instruct a computing device to perform the above-mentioned remote procedure call processing method provided herein.
The present application provides a chip comprising at least one processor and a communication interface providing information input and/or output for the at least one processor. Further, the chip may also include at least one memory for storing computer instructions. The at least one processor is used for calling and executing the computer instructions to execute the remote procedure call processing method provided by the application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.

Claims (11)

1. A remote procedure call processing method, comprising:
transmitting a service request to a server through a parameter stream object, wherein the parameter stream object is used for indicating the server to obtain the service request from the parameter stream object, calling a remote service according to the service request, and returning a calling result through a result stream object;
and acquiring the calling result from the result stream object.
2. The method of claim 1, wherein transmitting the service request to the server via the parameter stream object comprises:
calling a writing interface of the parameter stream object, and writing the service request into the parameter stream object;
and transmitting the service request to the server through the parameter stream object.
3. The method of claim 1, wherein said obtaining the call result from the result stream object comprises:
and calling a reading interface of the result stream object, and reading the calling result from the result stream object.
4. The method according to any of claims 1 to 3, further comprising, before said transmitting a service request to a server by a parameter stream object:
a connection is created with the server based on the remote access address.
5. A remote procedure call processing method, comprising:
receiving a parameter stream object transmitted by a client, wherein the parameter stream object carries a service request;
acquiring the service request from the parameter stream object;
and calling remote service according to the service request, and returning a calling result through a result stream object, wherein the result stream object is used for indicating the client to obtain the calling result from the result stream object.
6. The method of claim 5, wherein the obtaining the service request from the parameter stream object comprises:
and calling a reading interface of the parameter stream object, and reading the service request from the parameter stream object.
7. The method of claim 5, wherein returning the call result through the result stream object comprises:
calling a writing interface of the result stream object, and writing the calling result into the result stream object;
and returning the calling result to the client through the result stream object.
8. A remote procedure call processing apparatus, comprising:
the transmission module is used for transmitting a service request to a server through a parameter stream object, wherein the parameter stream object is used for indicating the server to obtain the service request from the parameter stream object, calling a remote service according to the service request and returning a calling result through a result stream object;
and the first acquisition module is used for acquiring the calling result from the result stream object.
9. A remote procedure call processing apparatus, comprising:
the receiving module is used for receiving a parameter stream object transmitted by a client, wherein the parameter stream object carries a service request;
a second obtaining module, configured to obtain the service request from the parameter stream object;
and the return module is used for calling the remote service according to the service request and returning a calling result through a result stream object, and the result stream object is used for indicating the client to obtain the calling result from the result stream object.
10. A remote procedure call processing device, the device comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the memory-stored computer-executable instructions cause the at least one processor to perform the remote procedure call processing method of any of claims 1 to 7.
11. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the remote procedure call processing method of any one of claims 1 to 7.
CN202010439494.9A 2020-05-22 2020-05-22 Remote procedure call processing method, device and equipment Pending CN113709085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010439494.9A CN113709085A (en) 2020-05-22 2020-05-22 Remote procedure call processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010439494.9A CN113709085A (en) 2020-05-22 2020-05-22 Remote procedure call processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN113709085A true CN113709085A (en) 2021-11-26

Family

ID=78646425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010439494.9A Pending CN113709085A (en) 2020-05-22 2020-05-22 Remote procedure call processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN113709085A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697139A (en) * 2009-11-06 2010-04-21 金蝶软件(中国)有限公司 Method, device and registry for remote procedure call
US20120124219A1 (en) * 2010-11-08 2012-05-17 Google Inc. Full-Duplex Bi-Directional Communication Over a Remote Procedure Call Based Communications Protocol, and Applications Thereof
US20140359146A1 (en) * 2013-05-31 2014-12-04 International Business Machines Corporation Remote procedure call with call-by-reference semantics using remote direct memory access
CN107733922A (en) * 2017-11-20 2018-02-23 百度在线网络技术(北京)有限公司 Method and apparatus for calling service
CN109756461A (en) * 2017-11-06 2019-05-14 北京航天长峰科技工业集团有限公司 A kind of remote procedure calling (PRC) method based on NETTY
CN110457142A (en) * 2019-07-10 2019-11-15 阿里巴巴集团控股有限公司 Method for processing business, system, computer room, framework and electronic equipment
CN110633162A (en) * 2019-09-23 2019-12-31 苏州达家迎信息技术有限公司 Remote call implementation method and device, computer equipment and storage medium
CN110808948A (en) * 2019-09-23 2020-02-18 中移(杭州)信息技术有限公司 Remote procedure calling method, device and system
CN111049854A (en) * 2019-12-25 2020-04-21 微民保险代理有限公司 Service request transmission method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697139A (en) * 2009-11-06 2010-04-21 金蝶软件(中国)有限公司 Method, device and registry for remote procedure call
US20120124219A1 (en) * 2010-11-08 2012-05-17 Google Inc. Full-Duplex Bi-Directional Communication Over a Remote Procedure Call Based Communications Protocol, and Applications Thereof
CN103339910A (en) * 2010-11-08 2013-10-02 谷歌公司 Full-duplex bi-directional communication over a remote procedure call based communications protocol, and applications thereof
US20140359146A1 (en) * 2013-05-31 2014-12-04 International Business Machines Corporation Remote procedure call with call-by-reference semantics using remote direct memory access
CN109756461A (en) * 2017-11-06 2019-05-14 北京航天长峰科技工业集团有限公司 A kind of remote procedure calling (PRC) method based on NETTY
CN107733922A (en) * 2017-11-20 2018-02-23 百度在线网络技术(北京)有限公司 Method and apparatus for calling service
CN110457142A (en) * 2019-07-10 2019-11-15 阿里巴巴集团控股有限公司 Method for processing business, system, computer room, framework and electronic equipment
CN110633162A (en) * 2019-09-23 2019-12-31 苏州达家迎信息技术有限公司 Remote call implementation method and device, computer equipment and storage medium
CN110808948A (en) * 2019-09-23 2020-02-18 中移(杭州)信息技术有限公司 Remote procedure calling method, device and system
CN111049854A (en) * 2019-12-25 2020-04-21 微民保险代理有限公司 Service request transmission method and device

Similar Documents

Publication Publication Date Title
CN108563517B (en) Calling method and device of system interface
CN101697139B (en) Method, device and registry for remote procedure call
CN110489323B (en) Visual RPC API debugging method, device, medium and equipment
US11853767B2 (en) Inter-core data processing method, system on chip and electronic device
JP3882917B2 (en) Information processing system, information processing apparatus, and program
CN113032166B (en) Inter-core communication method, processor, inter-core communication system, and computer-readable storage medium
CN108829529A (en) Virutal machine memory sharing method, device, computer equipment and storage medium
CN113867979A (en) Data communication method, device, equipment and medium for heterogeneous multi-core processor
CN115562887A (en) Inter-core data communication method, system, device and medium based on data package
CN110083466B (en) Data transmission method and device for small program
CN109725887B (en) Data interaction method and device based on message research and development framework and terminal equipment
CN113886019B (en) Virtual machine creation method, device, system, medium and equipment
WO2017166997A1 (en) Inic-side exception handling method and device
CN111274044A (en) GPU (graphics processing unit) virtualized resource limit processing method and device
CN112612460A (en) Interface packaging and calling method, electronic device and storage medium
CN111324395A (en) Calling method, calling device and computer-readable storage medium
CN113709085A (en) Remote procedure call processing method, device and equipment
CN106453250A (en) Processing method of big data RPC (Remote Procedure Call Protocol)
CN112306718B (en) Communication method, system and related device between local equipment and heterogeneous equipment
CN115629809A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN114928556A (en) Interface service test method and related equipment
CN112073505B (en) Method for unloading on cloud server, control device and storage medium
CN109669793B (en) Object calling method in middleware process
CN113760262A (en) Task processing method, device, computer system and computer readable storage medium
CN113722110B (en) Computer system, memory access method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211126

RJ01 Rejection of invention patent application after publication