Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for calling remote procedure in synchronous mode

A remote procedure call and remote procedure technology, applied in the field of remote procedure call in a synchronous manner, can solve the problems of waste of system resources, reduce program performance, etc., and achieve the effect of reducing waste of system resources

Active Publication Date: 2017-12-05
WUHAN DOUYU NETWORK TECH CO LTD
View PDF3 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The embodiment of the present application provides a method and device for performing remote procedure calls in a synchronous manner, which solves the technical problems of wasting system resources and reducing program performance in the prior art when performing remote procedure calls, and realizes remote procedure calls. When the procedure is called, it can reduce the waste of system resources and ensure the technical effect of program performance

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for calling remote procedure in synchronous mode
  • Method and device for calling remote procedure in synchronous mode
  • Method and device for calling remote procedure in synchronous mode

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0060] Such as figure 1 As shown, this embodiment provides a method for performing remote procedure calls in a synchronous manner, including:

[0061] Step S101: When calling a remote procedure, create a signal event corresponding to the remote procedure, the initial state of the signal event is no signal state.

[0062] As an optional implementation manner, step S101 includes:

[0063] Call the CreateEvent function to create a signal event corresponding to the remote process; assign a unique identifier to the signal event, and store the signal event and the unique identifier in a dictionary Dict, and the unique identifier is the same as the Signal event correspondence.

[0064] In a specific implementation process, the caller can call one or more remote procedures at the same time, specifically by calling the RpcCallProcedure function to call the remote procedure. When calling a remote procedure, the CreateEvent function can be called to create a signal event (Event) corre...

Embodiment 2

[0093] Based on the same inventive concept, this embodiment provides an apparatus 200 for performing remote procedure calls in a synchronous manner, such as figure 2 shown, including:

[0094] The creating unit 201 is configured to create a signal event corresponding to the remote process when the remote process is called, and the initial state of the signal event is a no-signal state;

[0095] a sending unit 202, configured to send a calling request required for calling the remote procedure to the called end of the remote procedure;

[0096] The calling unit 203 is used to call a preset function to suspend the thread corresponding to the remote process, and wait for the request result returned by the called end;

[0097] The changing unit 204 is configured to change the state of the signal event to a signaled state when the request result is received, so that the preset function wakes up the thread corresponding to the remote process.

[0098]As an optional implementation ...

Embodiment 3

[0115] Based on the same inventive idea, such as image 3 As shown, the present embodiment provides a device 300 for performing remote procedure calls in a synchronous manner, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and operable on the processor 320, and the processor 320 The following steps are implemented when the computer program 311 is executed:

[0116] When the remote procedure is called, a signal event corresponding to the remote procedure is created, and the initial state of the signal event is a no-signal state;

[0117] Sending an invocation request required for invoking the remote procedure to the called end of the remote procedure;

[0118] calling a preset function to suspend the thread corresponding to the remote process, and waiting for the request result returned by the called end;

[0119] When the request result is received, the state of the signal event is changed to a signaled state, so that the preset ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for calling a remote procedure in a synchronous mode. The method for calling the remote procedure includes the steps of during calling of the remote procedure, creating a signal event corresponding to the remote procedure, wherein the initial state of the signal event is a non-signaled state, sending a calling request required by calling of the remote procedure to a called terminal of the remote procedure, calling a preset function so as to suspend a thread corresponding to the remote procedure, waiting for a request result returned by the called terminal, changing the state of the signal event to a signal state when the request result is received so as to rouse the thread corresponding to the remote procedure through the preset function. According to the method for calling the remote procedure, when calling of the remote procedure is performed, waste of resources of a system is reduced, and the performance of a program is ensured; meanwhile, the invention discloses a device for calling the remote procedure in a synchronous mode.

Description

technical field [0001] The invention relates to the technical field of webcasting, in particular to a method and device for synchronously calling remote procedures. Background technique [0002] With the advancement of network communication technology and the speed up of broadband network, webcasting has been more and more developed and applied. During webcasting, remote procedure calls are often made. [0003] The so-called remote procedure call means that a process calls a method provided by another process, but from the perspective of the caller, it is still consistent with the function calling this process. In the remote procedure call, serialize all the parameters to be provided to the callee process into a network message, and then send it to the callee process through network transmission. After the callee completes the corresponding service, the result is also serialized into a network message and sent to the caller process. In this process, when the caller calls ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/54
CPCG06F9/547G06F2209/549
Inventor 杨亮张文明陈少杰
Owner WUHAN DOUYU NETWORK TECH CO LTD