CN103051728A - Remote-procedure calling method - Google Patents

Remote-procedure calling method Download PDF

Info

Publication number
CN103051728A
CN103051728A CN2013100094447A CN201310009444A CN103051728A CN 103051728 A CN103051728 A CN 103051728A CN 2013100094447 A CN2013100094447 A CN 2013100094447A CN 201310009444 A CN201310009444 A CN 201310009444A CN 103051728 A CN103051728 A CN 103051728A
Authority
CN
China
Prior art keywords
remote process
remote
function
call
analyze
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013100094447A
Other languages
Chinese (zh)
Other versions
CN103051728B (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.)
Taicang T&W Electronics Co Ltd
Original Assignee
Taicang T&W Electronics 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 Taicang T&W Electronics Co Ltd filed Critical Taicang T&W Electronics Co Ltd
Priority to CN201310009444.7A priority Critical patent/CN103051728B/en
Publication of CN103051728A publication Critical patent/CN103051728A/en
Application granted granted Critical
Publication of CN103051728B publication Critical patent/CN103051728B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a communication system and particularly relates to a remote-procedure calling method, which comprises the following steps of: analyzing the parameter of a remote procedure by using an analyzing script, and generating a corresponding input-parameter structural body, a corresponding return-information structural body and a corresponding remote-procedure ID (Identity) according to parameter information; and according to the definition of the remote procedure, generating the calling function of a remote-procedure client terminal through the analyzing script, and the like. According to invention, message packing and message unpacking in the calling process of the remote procedure can be simply realized through the analyzing script, and developers only need to pay close attention to the realization of remote-procedure functions without paying attention to complicated communication flows among the procedures, so that the workload of coding is reduced in the development of projects, and the development efficiency is improved.

Description

A kind of remote procedure calling (PRC) method
Technical field
The present invention relates to a kind of communication system, relate in particular to a kind of remote procedure calling (PRC) method.
Background technology
In software systems, along with the day by day increase of functional requirement, the realization module of system is also more and more, and the interactive communication between the module (process) also comes more.In most cases, the implementation of the communication of intermodule all is, define a structure and a message numbering, the Information encapsulation that then will need to communicate by letter sends in this structure again, server end also needs to write corresponding code process Decoding Analysis and realizes communication, the work very complicated of this part and makeing mistakes easily, the developer need to spend the plenty of time and write code and debugging code, and is absorbed in the functional development behind the message communicating.
Summary of the invention
The object of the present invention is to provide a kind of remote procedure calling (PRC) method, the problem that has solved intermodule communication mode scaling complexity and made mistakes easily.
For addressing the above problem, the technical solution used in the present invention is:
A kind of remote procedure calling (PRC) method may further comprise the steps:
Use the parameter of analyzing the script remote process, generate corresponding input parameter structure, return information structure and remote process ID according to parameter information;
According to the definition of remote process, analyze the call function that script generates the remote process client;
According to the definition of remote process, analyze the call function that script generates the remote process server end;
According to the definition of remote process, analyze the remote process ID of script generation server end and the call function mapping table that script generates the remote process server end;
Analyze the setup code that script generates the remote process server end, monitor and receive the message that client is sent, take out the remote process ID that carries in the message, obtain corresponding function according to remote process ID and call function mapping table, the input parameter structure that carries in the message as function parameter and call and obtain corresponding function according to remote process ID and call function mapping table and obtain Output rusults, is sent it back client process with Output rusults;
Behind the remote server process initiation, call and analyze the setup code that script generates the remote process server end;
When client process need to be called remote process, call and analyze the call function that script generates the remote process client.
Further technical scheme is the definition according to remote process, analyzes the call function that script generates the remote process client, and the method for code is as follows:
The input parameter content of function is copied to one by one the memory headroom of input parameter structure application;
Then this partial content is added that remote process ID sends to remote process;
Wait for that remote process returns response;
After receiving long-range response, the result is copied in the return value;
Function returns.
Further technical scheme is the definition according to remote process, analyzes the call function that script generates the remote process server end, and the method for code is as follows:
The message content of receiving client is resolved and copied in the function parameter variable according to the input parameter structure;
Call the remote process function;
Return results is copied in the memory headroom of return information structure;
Function returns.
The beneficial effect that adopts technique scheme to produce is: can simply realize that by analyzing script message encapsulation and message in the remote procedure call process unpack, the developer only need to pay close attention to the realization of remote process function and need not communication process loaded down with trivial details between the care process, in the exploitation of project, reduce the workload that code is write, improve development efficiency.
Description of drawings
Fig. 1 is the schematic flow sheet of an embodiment of a kind of remote procedure calling (PRC) method of the present invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
Fig. 1 shows an embodiment of a kind of remote procedure calling (PRC) method of the present invention: a kind of remote procedure calling (PRC) method may further comprise the steps:
Use the parameter of analyzing the script remote process, generate corresponding input parameter structure, return information structure and remote process ID according to parameter information;
According to the definition of remote process, analyze the call function that script generates the remote process client;
According to the definition of remote process, analyze the call function that script generates the remote process server end;
According to the definition of remote process, analyze the remote process ID of script generation server end and the call function mapping table that script generates the remote process server end;
Analyze the setup code that script generates the remote process server end, monitor and receive the message that client is sent, take out the remote process ID that carries in the message, obtain corresponding function according to remote process ID and call function mapping table, the input parameter structure that carries in the message as function parameter and call and obtain corresponding function according to remote process ID and call function mapping table and obtain Output rusults, is sent it back client process with Output rusults;
Behind the remote server process initiation, call and analyze the setup code that script generates the remote process server end;
When client process need to be called remote process, call and analyze the call function that script generates the remote process client.
Have more another embodiment of this a kind of remote procedure calling (PRC) method of the present invention: according to the definition of remote process, analyze the call function that script generates the remote process client, the method for code is as follows:
The input parameter content of function is copied to one by one the memory headroom of input parameter structure application;
Then this partial content is added that remote process ID sends to remote process;
Wait for that remote process returns response;
After receiving long-range response, the result is copied in the return value;
Function returns.
Have more another embodiment of this a kind of remote procedure calling (PRC) method of the present invention: according to the definition of remote process, analyze the call function that script generates the remote process server end, the method for code is as follows:
The message content of receiving client is resolved and copied in the function parameter variable according to the input parameter structure;
Call the remote process function;
Return results is copied in the memory headroom of return information structure;
Function returns.
Although invention has been described with reference to a plurality of explanatory embodiment of the present invention here, but, should be appreciated that those skilled in the art can design a lot of other modification and execution modes, these are revised and execution mode will drop within the disclosed principle scope and spirit of the application.More particularly, in the scope of, accompanying drawing open in the application and claim, can carry out multiple modification and improvement to building block and/or the layout of subject combination layout.Except modification that building block and/or layout are carried out with improving, to those skilled in the art, other purposes also will be obvious.

Claims (3)

1. remote procedure calling (PRC) method is characterized in that may further comprise the steps:
Use the parameter of analyzing the script remote process, generate corresponding input parameter structure, return information structure and remote process ID according to parameter information;
According to the definition of remote process, analyze the call function that script generates the remote process client;
According to the definition of remote process, analyze the call function that script generates the remote process server end;
According to the definition of remote process, analyze the remote process ID of script generation server end and the call function mapping table that script generates the remote process server end;
Analyze the setup code that script generates the remote process server end, monitor and receive the message that client is sent, take out the remote process ID that carries in the message, obtain corresponding function according to remote process ID and call function mapping table, the input parameter structure that carries in the message as function parameter and call and obtain corresponding function according to remote process ID and call function mapping table and obtain Output rusults, is sent it back client process with Output rusults;
Behind the remote server process initiation, call and analyze the setup code that script generates the remote process server end;
When client process need to be called remote process, call and analyze the call function that script generates the remote process client.
2. a kind of remote procedure calling (PRC) method according to claim 1 is characterized in that: according to the definition of remote process, analyze the call function that script generates the remote process client, the method for code is as follows:
The input parameter content of function is copied to one by one the memory headroom of input parameter structure application;
Then this partial content is added that remote process ID sends to remote process;
Wait for that remote process returns response;
After receiving long-range response, the result is copied in the return value;
Function returns.
3. a kind of remote procedure calling (PRC) method according to claim 1 is characterized in that: according to the definition of remote process, analyze the call function that script generates the remote process server end, the method for code is as follows:
The message content of receiving client is resolved and copied in the function parameter variable according to the input parameter structure;
Call the remote process function;
Return results is copied in the memory headroom of return information structure;
Function returns.
CN201310009444.7A 2013-01-10 2013-01-10 Remote-procedure calling method Active CN103051728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310009444.7A CN103051728B (en) 2013-01-10 2013-01-10 Remote-procedure calling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310009444.7A CN103051728B (en) 2013-01-10 2013-01-10 Remote-procedure calling method

Publications (2)

Publication Number Publication Date
CN103051728A true CN103051728A (en) 2013-04-17
CN103051728B CN103051728B (en) 2015-07-08

Family

ID=48064222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310009444.7A Active CN103051728B (en) 2013-01-10 2013-01-10 Remote-procedure calling method

Country Status (1)

Country Link
CN (1) CN103051728B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648928A (en) * 2016-11-29 2017-05-10 成都广达新网科技股份有限公司 Method and device for inter-process communication
CN108200080A (en) * 2018-01-19 2018-06-22 深圳神州数码云科数据技术有限公司 A kind of remote service communication means
WO2019000791A1 (en) * 2017-06-30 2019-01-03 武汉斗鱼网络科技有限公司 Method and apparatus for remote process calling using asynchronous mode
CN109857507A (en) * 2019-02-21 2019-06-07 成都安恒信息技术有限公司 A kind of method that automation remote executes Windows program
CN113448655A (en) * 2021-07-09 2021-09-28 赞同科技股份有限公司 C standard dynamic library calling method and device

Citations (3)

* 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
CN101719902A (en) * 2009-12-04 2010-06-02 深圳创维数字技术股份有限公司 Remote procedure calling (PRC) method and system
CN101854371A (en) * 2009-03-31 2010-10-06 华为技术有限公司 Method and device for calling and processing JavaScript object

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101854371A (en) * 2009-03-31 2010-10-06 华为技术有限公司 Method and device for calling and processing JavaScript object
CN101697139A (en) * 2009-11-06 2010-04-21 金蝶软件(中国)有限公司 Method, device and registry for remote procedure call
CN101719902A (en) * 2009-12-04 2010-06-02 深圳创维数字技术股份有限公司 Remote procedure calling (PRC) method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
韩京勋: ""面向信息系统的Ajax框架的设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 2, 15 December 2011 (2011-12-15) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648928A (en) * 2016-11-29 2017-05-10 成都广达新网科技股份有限公司 Method and device for inter-process communication
WO2019000791A1 (en) * 2017-06-30 2019-01-03 武汉斗鱼网络科技有限公司 Method and apparatus for remote process calling using asynchronous mode
CN108200080A (en) * 2018-01-19 2018-06-22 深圳神州数码云科数据技术有限公司 A kind of remote service communication means
CN109857507A (en) * 2019-02-21 2019-06-07 成都安恒信息技术有限公司 A kind of method that automation remote executes Windows program
CN109857507B (en) * 2019-02-21 2022-03-08 成都安恒信息技术有限公司 Method for automatically and remotely executing Windows program
CN113448655A (en) * 2021-07-09 2021-09-28 赞同科技股份有限公司 C standard dynamic library calling method and device

Also Published As

Publication number Publication date
CN103051728B (en) 2015-07-08

Similar Documents

Publication Publication Date Title
CN109002362B (en) Service method, device and system and electronic equipment
CN111176626B (en) Cross-programming-language code calling method and device, medium and equipment
CN103051728B (en) Remote-procedure calling method
CN102591961B (en) Method and system for making data charts
CN105912339A (en) development and integration method and system
CN105589909A (en) Data visualization realization system and method
JP2015534688A (en) Application development, compilation, and debugging method and apparatus
CN112988499A (en) Data processing method and device, electronic equipment and storage medium
CN107643889B (en) Page rendering method and device based on template engine
CN107483412B (en) HTML5web worker migration method and system
CN109634751A (en) A method of application layer and bottom communication are realized using electron frame
CN102426612A (en) Condition object query method and system
CN103593199A (en) Method and systems for data conversion
CN111552464A (en) SDK generation method, device, equipment and medium
CN103324479A (en) Distributed big-data computation middleware system framework in loose environment
CN104503767A (en) System and method for automatically generating codes based on LIN protocol
CN104850403A (en) Implementation method of remote control system of oscilloscope based on control component technology
CN113434147A (en) ProtoBuf protocol-based message analysis method and device
CN105183485A (en) Visual software and hardware collaborative development method
CN104992379A (en) Dynamic text exchange format management method of big data of power industry
CN107818073B (en) Method and system for automatically converting dynamic form page into HTML5 page
CN114615521B (en) Video processing method and device, computer readable storage medium and electronic equipment
CN113722037B (en) User interface refreshing method and device, electronic equipment and storage medium
CN109597611A (en) Front end data flow control Components Development system, method, equipment and storage medium
CN104102496A (en) Development method for bank self-service system cross-browser plugin based on WINDOWS platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant