CN103051728B - Remote-procedure calling method - Google Patents
Remote-procedure calling method Download PDFInfo
- Publication number
- CN103051728B CN103051728B CN201310009444.7A CN201310009444A CN103051728B CN 103051728 B CN103051728 B CN 103051728B CN 201310009444 A CN201310009444 A CN 201310009444A CN 103051728 B CN103051728 B CN 103051728B
- 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.)
- Active
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
Technical field
The present invention relates to a kind of communication system, particularly relate to a kind of remote procedure calling (PRC) method.
Background technology
In software systems, along with the increase day by day of functional requirement, the module that realizes of system also gets more and more, and the interactive communication between module (process) also comes more.In most cases, the implementation of the communication of intermodule is all, define a structure and a message numbering, then will the Information encapsulation of communication be needed to send again in this structure, server end also needs to write corresponding code process Decoding Analysis and realizes communication, the intricate operation of this part is complicated and easily make mistakes, and developer needs the cost plenty of time to write code and debugging code, and is absorbed in the functional development after message communicating.
Summary of the invention
The object of the present invention is to provide a kind of remote procedure calling (PRC) method, solve intermodule communication mode scaling complexity and the problem of easily makeing mistakes.
For solving the problem, the technical solution used in the present invention is:
A kind of remote procedure calling (PRC) method, comprises the following steps:
Use the parameter analyzing 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 remote process client;
According to the definition of remote process, analyze the call function that script generates 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 of script generation remote process server end;
Analyze the setup code that script generates remote process server end, monitor and receive the message that client sends, take out the remote process ID carried in message, corresponding function is obtained according to remote process ID and call function mapping table, the input parameter structure carried in message is called and obtains corresponding function according to remote process ID and call function mapping table as function parameter and obtain Output rusults, Output rusults is sent it back client process;
After remote server process initiation, call and analyze the setup code that script generates remote process server end;
When client process needs to call remote process, call and analyze the call function that script generates remote process client.
Further technical scheme is the definition according to remote process, and analyze the call function that script generates 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 is sent to remote process;
Wait for that remote process returns response;
After receiving long-range response, result is copied in return value;
Function returns.
Further technical scheme is the definition according to remote process, and analyze the call function that script generates remote process server end, the method for code is as follows:
The message content receiving client is resolved according to input parameter structure and copies in function parameter variable;
Call remote process function;
By return results copy to return information structure memory headroom in;
Function returns.
The beneficial effect that produces of technique scheme is adopted to be: can simply by analyzing script to realize message encapsulation in remote procedure call process and message unpacks, developer only need to pay close attention to remote process function realization and without the need to being concerned about communication process loaded down with trivial details between process, in the exploitation of project, reduce the workload that code is write, improve development efficiency.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of a kind of remote procedure calling (PRC) method of the present invention embodiment.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, 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, be 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, comprises the following steps:
Use the parameter analyzing 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 remote process client;
According to the definition of remote process, analyze the call function that script generates 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 of script generation remote process server end;
Analyze the setup code that script generates remote process server end, monitor and receive the message that client sends, take out the remote process ID carried in message, corresponding function is obtained according to remote process ID and call function mapping table, the input parameter structure carried in message is called and obtains corresponding function according to remote process ID and call function mapping table as function parameter and obtain Output rusults, Output rusults is sent it back client process;
After remote server process initiation, call and analyze the setup code that script generates remote process server end;
When client process needs to call remote process, call and analyze the call function that script generates remote process client.
Have more another embodiment of this 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 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 is sent to remote process;
Wait for that remote process returns response;
After receiving long-range response, result is copied in return value;
Function returns.
Have more another embodiment of this 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 remote process server end, the method for code is as follows:
The message content receiving client is resolved according to input parameter structure and copies in function parameter variable;
Call remote process function;
By return results copy to return information structure memory headroom in;
Function returns.
Although with reference to multiple explanatory embodiment of the present invention, invention has been described here, but, should be appreciated that, those skilled in the art can design a lot of other amendment and execution mode, these amendments and execution mode will drop within spirit disclosed in the present application and spirit.More particularly, in the scope of, accompanying drawing open in the application and claim, multiple modification and improvement can be carried out to the building block of subject combination layout and/or layout.Except the modification of carrying out building block and/or layout is with except improvement, to those skilled in the art, other purposes also will be obvious.
Claims (1)
1. a remote procedure calling (PRC) method, is characterized in that comprising the following steps:
Use the parameter analyzing 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 remote process client;
According to the definition of remote process, analyze the call function that script generates 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 of script generation remote process server end;
Analyze the setup code that script generates remote process server end, monitor and receive the message that client sends, take out the remote process ID carried in message, corresponding function is obtained according to remote process ID and call function mapping table, the input parameter structure carried in message is called and obtains corresponding function according to remote process ID and call function mapping table as function parameter and obtain Output rusults, Output rusults is sent it back client process;
After remote server process initiation, call and analyze the setup code that script generates remote process server end;
When client process needs to call remote process, call and analyze the call function that script generates remote process client;
According to the definition of remote process, analyze the call function that script generates 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 is sent to remote process;
Wait for that remote process returns response;
After receiving long-range response, result is copied in return value;
Function returns;
According to the definition of remote process, analyze the call function that script generates remote process server end, the method for code is as follows:
The message content receiving client is resolved according to input parameter structure and copies in function parameter variable;
Call remote process function;
By return results copy to return information structure memory headroom in;
Function returns.
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 CN103051728A (en) | 2013-04-17 |
CN103051728B true 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) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106648928A (en) * | 2016-11-29 | 2017-05-10 | 成都广达新网科技股份有限公司 | Method and device for inter-process communication |
CN107402826B (en) * | 2017-06-30 | 2018-09-21 | 武汉斗鱼网络科技有限公司 | A kind of method and device carrying out remote procedure call in an asynchronous manner |
CN108200080B (en) * | 2018-01-19 | 2021-03-16 | 深圳神州数码云科数据技术有限公司 | Remote service communication method |
CN109857507B (en) * | 2019-02-21 | 2022-03-08 | 成都安恒信息技术有限公司 | Method for automatically and remotely executing Windows program |
CN113448655B (en) * | 2021-07-09 | 2022-06-17 | 赞同科技股份有限公司 | C standard dynamic library calling method and device |
Citations (3)
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 |
-
2013
- 2013-01-10 CN CN201310009444.7A patent/CN103051728B/en active Active
Patent Citations (3)
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)
Title |
---|
"面向信息系统的Ajax框架的设计与实现";韩京勋;《中国优秀硕士学位论文全文数据库 信息科技辑》;20111215(第S2期);正文第3章 * |
Also Published As
Publication number | Publication date |
---|---|
CN103051728A (en) | 2013-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108345531B (en) | Test method, device and system | |
CN111176626B (en) | Cross-programming-language code calling method and device, medium and equipment | |
CN103051728B (en) | Remote-procedure calling method | |
CN109002362A (en) | A kind of method of servicing, device, system and electronic equipment | |
CN102591961B (en) | Method and system for making data charts | |
JP2015534688A (en) | Application development, compilation, and debugging method and apparatus | |
CN105589909A (en) | Data visualization realization system and method | |
CN107678778B (en) | Hybrid-based compatible method, adapter, operation device and system | |
CN104899027A (en) | Universal form verification method for js | |
CN104821954A (en) | Cross-platform remote procedure call method | |
CN105912339A (en) | development and integration method and system | |
CN111338623A (en) | Method, device, medium and electronic equipment for developing user interface | |
CN103530097B (en) | The implementation method and device of a kind of component across middleware platform | |
CN107483412B (en) | HTML5web worker migration method and system | |
CN108038241A (en) | Integrated WEB visual workflows method, apparatus, readable storage medium storing program for executing and system | |
CN103324479A (en) | Distributed big-data computation middleware system framework in loose environment | |
CN111552464A (en) | SDK generation method, device, equipment and medium | |
CN113641577A (en) | Debugging method and device for terminal product application program | |
CN107818073B (en) | Method and system for automatically converting dynamic form page into HTML5 page | |
CN105260179A (en) | Method for achieving flex and servlet interaction | |
CN104102496A (en) | Development method for bank self-service system cross-browser plugin based on WINDOWS platform | |
CN104992379A (en) | Dynamic text exchange format management method of big data of power industry | |
CN107291455B (en) | Method and system for realizing transfer service based on factory mode | |
CN110457151B (en) | Thermal restoration method and device and readable storage medium | |
CN104461905A (en) | Method and system for debugging intelligent card virtual machine, API bank and upper layer application at same time |
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 |