CN101764843A - Processing method and system for remote process call, client end and server - Google Patents

Processing method and system for remote process call, client end and server Download PDF

Info

Publication number
CN101764843A
CN101764843A CN200910260295A CN200910260295A CN101764843A CN 101764843 A CN101764843 A CN 101764843A CN 200910260295 A CN200910260295 A CN 200910260295A CN 200910260295 A CN200910260295 A CN 200910260295A CN 101764843 A CN101764843 A CN 101764843A
Authority
CN
China
Prior art keywords
message
server
client
communication protocol
interprocess communication
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
CN200910260295A
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.)
Ruijie Networks Co Ltd
Fujian Star Net Communication Co Ltd
Original Assignee
Fujian Star Net Communication 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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN200910260295A priority Critical patent/CN101764843A/en
Publication of CN101764843A publication Critical patent/CN101764843A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a processing method and a system for remote process call, a client end and a server, wherein the method comprises the following steps of: inquiring a TIPC (Transparent Inter-Process Communication) address by the client end according to a preconfigured address list, wherein the TIPC address is the address of the server of a process to be called; generating a RPC (Remote Procedure Call) call request according to the TIPC address and the parameter information of a required content; packaging the RPC call request into a first message following a TIPC protocol and sending the first message to the server; and receiving a second message which is sent by the server and follows the TIPC protocol and obtaining the content corresponding to the parameter information according to the second message. In the processing method and the system for remote process call, the client end and the server provided by the invention, RPC is realized on the basis of the TIPC protocol, thereby solving the problem that a traditional RPC mechanism supporting a (TCP Transfer Control Protocol) or UDP (User Datagram Protocol) protocol is limited by the quantity of famous ports of the server.

Description

The processing method of remote procedure call, system and client, server
Technical field
The embodiment of the invention relates to the remote procedure call technology, relates in particular to a kind of processing method, system and client, server of the remote procedure call based on transparent interprocess commications protocol.
Background technology
Distributed system generally includes many computers in the communication environment, under distributed environment, needs the communication between process to be distributed in resource on the various computing machine with visit, and interprocess communication is the core of distributed system.Remote procedure call (Remote Procedure Call; Abbreviate as: RPC) mechanism is a kind of inter-process communication mechanisms that is widely used, and allows a computer program to serve from the request of remote computer program by network, and does not need to understand the agreement of bottom-layer network technology.
RPC mechanism is supported transmission control protocol (Transmission Control Protocol; Abbreviate as: TCP) or User Datagram Protocol (User Datagram Protocol; Abbreviate as: UDP), adopt Client, for carrying information data between the communication process, detailed process is: client (calling process) is called the RPC interface function and is sent recalls information to server, server receives this recalls information by corresponding server interface function, and from recalls information, obtain the parameter of the process of being called, program number for example, version number and process number, call this process executable operations, and operating result is returned to client by opposite implementation, finish client the RPC of server end process is called, wherein realize being connected between client and the server and adopt socket (socket) connected mode.
And since RPC mechanism based on TCP or udp protocol, therefore, RPC mechanism is with Internet Protocol (Internet Protocol; Abbreviate as: IP) mode of address and port numbers is carried out addressing, usually need to obtain required port by a dynamic port mapping service earlier, concrete: during startup of server, the teleprogram of the dynamic port mapper of the last operation of Xiang Benji registration oneself number, version number and the port numbers that dynamically obtains, and client is with teleprogram number, the dynamic port mapper inquiry corresponding dynamic port of version number on remote server, when a plurality of RPC call request, just need to distribute a plurality of ports, and the limited amount of well-known port in the ICP/IP protocol model, server distributes a well-known port unrealistic for each program, therefore, the RPC mechanism of existing support TCP or udp protocol is subjected to a limited number of restrictions of well-known port of server.
Summary of the invention
The embodiment of the invention provides a kind of processing method, system and client, server of remote procedure call, is subjected to the problem of the well-known port restricted number of server in order to the RPC mechanism that solves existing TCP of support or udp protocol.
The embodiment of the invention provides a kind of processing method of remote procedure call, comprising:
Client is according to pre-configured address table inquiry transparent interior interprocess communication protocol address, and described transparent interior interprocess communication protocol address is the address of the server at required process place of calling;
Described client generates the RPC call request according to the parameter information of described transparent interior interprocess communication protocol address and required content;
Described client is encapsulated as first message of following the transparent interior interprocess communication protocol with described RPC call request, and described first message is sent to described address corresponding server;
Described client receives second message of following the transparent interior interprocess communication protocol that described server sends, obtain the content corresponding with described parameter information according to described second message, described content is carried out described process by described server according to described parameter information and is obtained.
The embodiment of the invention provides a kind of processing method of remote procedure call, comprising:
Server receives and resolves first message of following the transparent interior interprocess communication protocol that client sends, and obtains the RPC call request that encapsulates in described first message;
The described RPC call request of described server parses obtains the transparent interior interprocess communication protocol address that comprises in the described RPC call request and the parameter information of required content;
Described server is carried out described process according to described parameter information, obtains the content corresponding with described parameter information;
Described server generates RPC according to described content and calls response, described RPC is called response be encapsulated as second message of following the transparent interior interprocess communication protocol, and send described second message to described client.
The embodiment of the invention provides a kind of client, comprising:
Enquiry module is used for according to pre-configured address table inquiry transparent interior interprocess communication protocol address, and described transparent interior interprocess communication protocol address is the address of the server at required process place of calling;
Generation module is used for the parameter information according to described transparent interior interprocess communication protocol address and required content, generates the RPC call request;
The encapsulation sending module is used for described RPC call request is encapsulated as first message of following the transparent interior interprocess communication protocol, and described first message is sent to described address corresponding server;
Receive acquisition module, be used to receive second message of following the transparent interior interprocess communication protocol that described server sends, obtain the content corresponding with described parameter information according to described second message, described content is carried out described process by described server according to described parameter information and is obtained.
The embodiment of the invention provides a kind of server, comprising:
Message receives parsing module, is used to receive and resolve first message of following the transparent interior interprocess communication protocol that client sends, and obtains the RPC call request that encapsulates in described first message;
The call request parsing module is used to resolve described RPC call request, obtains the transparent interior interprocess communication protocol address that comprises in the described RPC call request and the parameter information of required content;
Executive Module is used for carrying out described process according to described parameter information, obtains the content corresponding with described parameter information;
Generate package module, be used for generating RPC and call response, described RPC is called response be encapsulated as second message of following the transparent interior interprocess communication protocol, and send described second message to described client according to described content.
The embodiment of the invention provides a kind of treatment system of remote procedure call, comprising: client and server;
Described client is used for according to pre-configured address table inquiry transparent interior interprocess communication protocol address, and described transparent interior interprocess communication protocol address is the address of the server at required process place of calling; Parameter information according to described transparent interior interprocess communication protocol address and required content, generate the RPC call request, described RPC call request is encapsulated as first message of following the transparent interior interprocess communication protocol, and described first message is sent to described address corresponding server; Receive second message of following the transparent interior interprocess communication protocol that described server sends, obtain the content corresponding with described parameter information according to described second message, described content is carried out described process by described server according to described parameter information and is obtained;
Described server is used to receive and resolve described first message of following the transparent interior interprocess communication protocol that described client sends, and obtains the RPC call request that encapsulates in described first message; Resolve described RPC call request, obtain the transparent interior interprocess communication protocol address that comprises in the described RPC call request and the parameter information of required content, carry out described process, obtain the content corresponding with described parameter information according to described parameter information; Generate RPC according to described content and call response, described RPC is called response be encapsulated as described second message of following the transparent interior interprocess communication protocol, and send described second message to described client.
The processing method of the remote procedure call of the embodiment of the invention, system and client, server, by at the pre-configured transparent interior interprocess communication protocol of client and server address table, and the parameter information of the transparent interior interprocess communication protocol address of the required invoked procedure that will obtain and required content generates the RPC call request, the RPC call request that will comprise transparent interior interprocess communication protocol address is encapsulated as the message of following the transparent interior interprocess communication protocol and sends to server, and the RPC that follows the transparent interior interprocess communication protocol that reception server sends calls response, realize RPC mechanism based on the transparent interior interprocess communication protocol, because transparent interior interprocess communication protocol address need not be corresponding with port, overcome the problem that existing RPC mechanism is subjected to the well-known port restricted number of server.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The flow chart of the processing method of the remote procedure call that Fig. 1 provides for the embodiment of the invention one;
The flow chart of the processing method of the remote procedure call that Fig. 2 provides for the embodiment of the invention two;
The flow chart that Fig. 3 provides for the embodiment of the invention three based on the RPC implementation method of TIPC agreement;
The flow chart that Fig. 4 provides for the embodiment of the invention four based on TIPC agreement RPC implementation method;
The structural representation of the client that Fig. 5 provides for the embodiment of the invention five;
The structural representation of the server that Fig. 6 provides for the embodiment of the invention six;
The structural representation of the treatment system of the remote procedure call that Fig. 7 provides for the embodiment of the invention seven.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Transparent interior interprocess communication protocol (Telecom Inter Process Communication; Abbreviate as: TIPC) being the transparent reliable host-host protocol of communicating by letter between a kind of implementation process, is the scheduling of basic realization task and resource with shared drive.The TIPC agreement is mainly used in communication between inner cluster (intra cluster), the TIPC agreement makes the different nodes that are in the same cluster (cluster) can consider residing position and directly carry out rapid and reliable communication, wherein, inner cluster (intra cluster) can be the distributed multi-processor system of any kind.For example, embedded system, it is a kind of application-centered, software and hardware can be reduced, be applicable to the dedicated computer system of application system, mainly form by flush bonding processor (being embedded central processing unit), relevant supporting hardware, embedded OS and application software system etc. to comprehensive strict demands such as function, reliability, cost, volume, power consumptions.
The TIPC agreement realizes based on socket (socket), when creating the socket connection, in kernel, register COS (service type) and the instance number that connects corresponding process with socket, and by TIPC address table of kernel maintenance, wherein the TIPC address is made of COS and instance number.When server is judged when receiving the TIPC protocol massages, obtain corresponding socket and connect according to resolving the TIPC protocol massages, connect according to this socket and carry out respective process.In cluster inside, every machine is all safeguarded a TIPC address table, like this, concerning application layer, the opposite end is corresponding to an address of being made up of COS and instance number, therefore client only need specify the COS of required invoked procedure and instance number just can be routed to corresponding process by the kernel of server, and need not know which IP address and which port have been used in this socket connection.
Further, the TIPC agreement is as the intra cluster communication agreement, have fireballing characteristics, but the remote procedure call function is not supported in the communication that is based between the integrated circuit board of TIPC agreement, based on this, the invention provides a kind of processing method, system and client, server of the remote procedure call of realizing based on the TIPC agreement, when solving the problem of well-known port restricted number that existing remote procedure call mechanism is subjected to server, realize the remote procedure call between the integrated circuit board, further improve the communication speed between the integrated circuit board.
The flow chart of the processing method of the remote procedure call that Fig. 1 provides for the embodiment of the invention one.The executive agent of present embodiment is a client, and as shown in Figure 1, the processing method that present embodiment provides comprises:
Step 11, client is according to pre-configured address table inquiry TIPC address, and described TIPC address is the address of the server at required process place of calling;
In the present embodiment, the TIPC address is the address of the server at required process place of calling, can realize by the type and the instance number of process, the i.e. server address that the TIPC address of being realized by the type of process and instance number can the required invoked procedure of unique identification place, and the corresponding required process of calling on the server.
Step 12, client generate the RPC call request according to the parameter information of TIPC address and required content;
This step is used for according to the server address at required process place of calling and calls the required parameter information of this process, generates the RPC call request, promptly carries above-mentioned information in this RPC call request.To use the most general RPC mechanism to be example, parameter information can be meant program number, version number and the process number of the required process of calling under the RPC mechanism, to confirm the required content of calling execution.
Step 13, client is encapsulated as first message of following the TIPC agreement with the RPC call request, and first message is sent to the address corresponding server;
This step is used to realize the combination of TIPC agreement and RPC mechanism, is specially the RPC call request is encapsulated as the TIPC protocol massages; Simultaneously send call request to server, concrete gives server with the TIPC agreement with first message transmissions.The realization of TIPC agreement is usually based on the socket technology, and socket (socket) is equivalent to carry out the socket at the two ends of network service, as long as the other side's socket and the socket of oneself communicate to connect, both sides just can transmit and receive data.The specific implementation of socket: be similar to the definition of file handle, when the user uses the socket system call to write application program, represent a socket by a numeral, all operations are all carried out on this numeral, this numeral is called the socket file descriptor, and socket supports various protocols, for example based on the general socket of TCP/IP, UDP/IP agreement, the used socket of present embodiment is based on the socket of TIPC agreement, is mainly used in communication between plate.
Step 14, second message of following the TIPC agreement that the client reception server sends obtains the content corresponding with parameter information according to second message, and described content is obtained according to the parameter information implementation by server.
Be example still with the most frequently used RPC mechanism, then required content by server by carrying out by parameter information: the well-determined process of program number, version number and process number obtains, and execution result is returned to client by the TIPC agreement, realize the remote procedure call between integrated circuit board.
The processing method of the remote procedure call that present embodiment provides, realize remote procedure call based on the TIPC agreement, utilize address in the TIPC agreement directly to point to process on the server, rather than be mapped to the characteristics of port, overcome the existing defective that is subjected to a limited number of restrictions of well-known port of server based on the RPC mechanism of TCP or udp protocol; Simultaneously, the RPC mechanism that realizes based on the TIPC agreement can be used between the integrated circuit board, realizes the remote procedure call between the integrated circuit board, in the communication speed that has further improved on the basis of TIPC agreement between integrated circuit board.
The flow chart of the processing method of the remote procedure call that Fig. 2 provides for the embodiment of the invention two, the executive agent of present embodiment is a server, corresponding to embodiment one, as shown in Figure 2, the processing method of present embodiment comprises:
Step 21, server receive and resolve first message of following the TIPC agreement that client sends, and obtain the RPC call request that encapsulates in first message;
Step 22, server parses RPC call request obtains the TIPC address that comprises in the RPC call request and the parameter information of required content;
Above-mentioned steps 21, step 22 are used to receive the message that comprises call request that client sends, and obtain call request by parsing, the specifically finger TIPC address that obtains in the call request to be comprised, and the relevant parameter information of the required process of calling; Wherein the process on the server can be by the type and the instance number unique identification of this process, and the TIPC address is to be realized by the type of process and instance number in the present embodiment, therefore this TIPC address not only can identify the server at required process place of calling, but and the type by process and the instance number corresponding required process of calling on the unique identification server also.
Step 23, server obtain the content corresponding with parameter information according to the parameter information implementation;
Step 24, server generates RPC according to content and calls response, RPC is called response be encapsulated as second message of following the TIPC agreement, and send second message to client.
Server calls by the uniquely identified process according to parameter information, and carries out this process, obtains the execution result that RPC calls, and generates RPC and calls response, and by the TIPC agreement RPC response is returned to client.
The processing method of the remote procedure call that present embodiment provides, the processing method that provides with embodiment one adapts, by receiving the RPC call request of coming based on the TIPC protocol transmission, be encapsulated as the TIPC protocol massages through operation contents that client is required such as parsing, execution, encapsulation, be transferred to client based on the TIPC agreement by RPC mechanism, overcome the existing defective that is subjected to a limited number of restrictions of well-known port of server based on the RPC mechanism of TCP or udp protocol; Simultaneously, will can be used for the communication between the integrated circuit board, realize the remote procedure call between the integrated circuit board, in the communication speed of further having accelerated on the basis of TIPC agreement between integrated circuit board based on the RPC mechanism of TIPC agreement realization.
Further, in the foregoing description, between the server and client side a kind of connectionless communication mode, i.e. the direct call request after server sends encapsulation of client; Can also adopt connection-oriented communication mode between the client and server, concrete: set up between client elder generation and the server and follow communicating to connect of TIPC agreement, and this communicate to connect set up finish after, send call request to server, wherein the form of call request is specially the TIPC protocol massages.
Concrete, the client and server end is followed the TIPC agreement, and the TIPC address of pre-configured client and server end, and client and server is stored pre-configured TIPC address table, i.e. routing table respectively.During startup of server, each TIPC address of process binding with operation thereon, give client by TIPC communication protocol with the process of operation and the TIPC address notification of this process binding, after client is received this notice message, receive and with the information stores in this notice message in the TIPC address table; When the application process of client needs certain process on the invoking server, can be by inquiring about the TIPC address that local TIPC address table obtain required invoked procedure, and the processing method of the remote procedure call that provides by the embodiment of the invention realizes calling required invoked procedure.
Technique scheme provides a kind of execution mode of pre-configured TIPC address table, but is not limited to this.
At present, multiple RPC pattern and execution are arranged.Using the most general pattern now and carrying out is distributed computing environment (DCE) (the Distributed Computing Environment on open type software basis; Abbreviate as: DCE).Based on above-mentioned RPC pattern and execution, the TIPC agreement in conjunction with being realized by the socket technology describes technical scheme of the present invention in detail below.Before introducing technical scheme of the present invention, earlier the RPC mechanism that adopts among the present invention is simply introduced:
The information protocol of RPC is made up of recalls information and reply message; The RPC recalls information: every remote procedure call information comprises program number (Program number), program version number (Program versionnumber), three signless integer fields of process number (Procedure number), with independent identification remote process, described three signless integer fields are to be used for unique parameter information of determining required invoked procedure in the technical solution of the present invention.The RPC reply message promptly refers to carry out the content that the required process of calling obtains in embodiments of the present invention.
The flow chart that Fig. 3 provides for the embodiment of the invention three based on the RPC implementation method of TIPC agreement, present embodiment is described from the mutual angle of client and server, wherein adopt connectionless communication mode between the client and server, as shown in Figure 3, the RPC process of present embodiment comprises:
Step 31, server is created the RPC handle;
During the server starting up, at first create the RPC handle that meets server architecture, each parametric variable and function parameter in the RPC handle that for example SVCXPRT server handle, and initialization is created; For example, parametric variable: TIPC server end address (being the local terminal address); Server end socket handle etc.; Function parameter mainly is meant the initialization of the RPC handle being handled function, for example the functions such as function of receiver function, transmission function, deletion RPC handle.
Wherein, TIPC server end address can be pre-configured, and store a TIPC address table respectively at the client and server end, when server is started shooting the process of operation bound a TIPC address, and this message is sent to client.
Further, in order to solve the different problem of data format of the call request that different clients sends, in the present embodiment, carry out conversion between local data and the external data by calling External Data Representation, to overcome the problems referred to above.
Concrete, External Data Representation (External data representation; Abbreviate as: XDR) be a kind of data representation method that is independent of computer architecture, it is with transmitting the problems such as syllable sequence, data type size and alignment that data faced between the computer that solves different systems.Application program can use XDR to transmit data between the isomerization hardware system.
Step 32, server is registered the handle of being created;
In this step server with the server RPC handle information created with the socket handle be index stores in an array, array XPRT for example; Have mapping relations between the socket of described server RPC handle and the socket of client, the socket 2000 of the socket 1000 corresponding with service device RPC handles of client RPC handle for example, therefore, can find corresponding relation between client RPC handle and the server RPC handle by socket.
Step 33, server enters wait state, waits for that client sends call request message;
Step 34, client is created the RPC handle;
Client is created the RPC handle, is specially to create the RPC handle that meets client (CLIENT) structure, and each parametric variable and function parameter in the RPC handle created of initialization; For example, parametric variable: TIPC server end address promptly will connect the address of the server of communication; Client socket handle etc.; Function parameter mainly is meant the initialization of the RPC handle being handled function, for example be used to send transmission (call) function of client-side information, for example, be used for reception (reply) function of the information that reception server sends, and deletion (delete) function etc. that is used to delete the RPC handle.
Step 35 is created the XDR internal memory, to carry out conversion between native data formats and the external data form by calling External Data Representation (XDR);
This step is corresponding to the processing of local data and external data with server end, by cooperating the data interaction that realizes between client and the server.Wherein, for client, local data is meant the RPC call request of formation, and external data is meant the RPC call request after the process format conversion that sends to server; And for server, external data be meant receive represent the RPC call request by what client was sent with the XDR data format, local data is meant through XDR mechanism and data is carried out the RPC call request that obtains after the format conversion.
Step 36, user end to server send the RPC call request, and waiting for server is returned RPC and called response;
Concrete, client is with the address of the server at required invoked procedure place, and the program number, version number, the process number generation RPC call request that are used to identify this process, and carries out the XDR format conversion, and be encapsulated as after the message that is fit to the TIPC agreement, send to server.
Step 37, the message of following TIPC agreement of server to receiving;
Concrete, the socket handle of the message of following the TIPC agreement that the client that the server basis listens to is sent, with this socket handle is to index the RPC handle of searching the corresponding server end in the array of server, is used to receive the message of following the TIPC agreement that client sends;
The server parses message obtains the RPC call request, is native data formats to this RPC call request by the XDR mechanism transformation then, and obtains the parameter information of required invoked procedure, specifically refers to program number, version number and process number.
Step 38, server calls corresponding process according to parameter information, obtains the required content of client;
Step 39, server calls response to the RPC that returns of client;
Server forms RPC with result and calls response, and is the external data form by the XDR mechanism transformation, generates the message of following the TIPC agreement, sends to client by the TIPC agreement.
Step 40, the message that the client reception server sends, and carry out dissection process, obtain required content;
After client receives the message that server sends, earlier this message is resolved and obtain RPC and call response, and be native data formats, obtain required content, carry out corresponding operation according to the content of being obtained by the XDR mechanism transformation.
If a plurality of call request are arranged, then by on a plurality of call request recursive call servers with the corresponding process of call request, all finish up to all invoked procedures.
Step 41, client finishes this remote procedure call to server with the RPC handle deletion of being set up.
At this moment, server enters wait state, waits for follow-up RPC call request message.
Present embodiment has been introduced client and server and how have been realized calling of remote process by technical scheme of the present invention, the address of TIPC agreement is not mapped to TCP or udp port in the technical solution of the present invention, therefore is not subjected to the restriction of the well-known port quantity of server based on the RPC mechanism of TIPC agreement; Simultaneously, reduced the operating process of obtaining port to server, compared with prior art, the efficient of the remote procedure call that technical solution of the present invention provides is higher;
In addition, RPC can't directly set up Socket with server and communicates by letter in the prior art, needs auxiliary other technologies know that in advance RPC starts the port numbers that the back obtains, and can't directly send call request by RPC, influence the speed of interprocess communication.Therefore, existing RPC mechanism is subjected to the restriction of TCP or udp protocol, the remote procedure call between the integrated circuit board that is unsuitable for communication speed is had relatively high expectations.Present embodiment is that the TIPC agreement realizes that therefore, technical solution of the present invention can realize the remote procedure call between integrated circuit board, further quickens the communication speed between integrated circuit board based on communication protocol between integrated circuit board.
The flow chart that Fig. 4 provides for the embodiment of the invention four based on TIPC agreement RPC implementation method; Present embodiment is similar to embodiment three, and its difference is: user end to server sends before the call request in the present embodiment, set up in advance and server between communicating to connect, be specially the TIPC that a kind of socket realizes and communicate to connect.
As shown in Figure 4, present embodiment also comprises step 351 between step 35 and step 36, and client-requested and server connect; If successful connection is then carried out to server and is sent out RPC call request and follow-up operation; If connection failure then finishes.
Based on step 351, the connection request message of following the TIPC agreement that server receives in the step 37 for the client transmission.Server is receiving this message, and to this message resolve know be the connection request message that sends of client after, be that client is created a new RPC handle, be used to handle the RPC call request message that client sends; And the RPC handle of server when being in wait state is used to receive the connection request that client sends.
When server is after client has been set up the RPC handle of handling its RPC call request message, the operating process of server and this RPC handle is discussed in the present embodiment no longer in detail with embodiment three, please refer to embodiment three.
Present embodiment further illustrates technical solution of the present invention and how to implement by to adopting connection-oriented communication mode to realize the explanation of remote procedure call flow process between client and the server.
The structural representation of the client that Fig. 5 provides for the embodiment of the invention five, as shown in Figure 5, the client of present embodiment comprises: enquiry module 51, generation module 52, encapsulation sending module 53 and receive acquisition module 54.
Enquiry module 51 is used for according to pre-configured address table inquiry TIPC address, this TIPC address is the address of the server at required process place of calling, the address of this server can be realized by the type and the instance number of process, therefore, the TIPC address of realizing by the type of process and instance number can the required invoked procedure of unique identification place server, and the corresponding required process of calling on the server; It is the TIPC address that generation module 52 is used for according to the result that enquiry module 51 inquires, and the required parameter information that calls content, generate the RPC call request, and with this RPC call request offer the encapsulation sending module 53, make encapsulation sending module 53 that this RPC call request is encapsulated as first message of following the TIPC agreement, and the first packaged message is sent to TIPC address corresponding server; Receive acquisition module 54, be used for after encapsulation sending module 53 sends first message, waiting for second message of following the TIPC agreement that reception server sends, and obtaining the content corresponding, promptly required content with parameter information according to second message; Wherein the content in second message is specifically carried out corresponding process by server according to parameter information and is obtained.
The client of present embodiment, by enquiry module, generation module, encapsulation sending module and reception acquisition module, realization is based on the remote procedure call of TIPC agreement, because the address of TIPC agreement is not mapped to port, but map directly to process on the server, so the client that present embodiment provides can overcome the defective that is subjected to the well-known port restricted number of server when implementing RPC mechanism; Simultaneously, realize RPC mechanism, can be applicable to the communication between the integrated circuit board, realize the remote procedure call between the integrated circuit board, further improve the speed of communicating by letter between integrated circuit board based on the TIPC agreement.
The structural representation of the server that Fig. 6 provides for the embodiment of the invention six; As shown in Figure 6, the server of present embodiment comprises: message receives parsing module 61, call request parsing module 62, Executive Module 63 and generates package module 64.
Message receives parsing module 61 and is used to receive and resolve first message of following the TIPC agreement that client sends, obtain the RPC call request that encapsulates in first message, and this RPC call request offered call request parsing module 62,62 pairs of these RPC call request of call request parsing module are resolved, obtain the TIPC address that comprises in the RPC call request and the parameter information of required content, wherein, the TIPC address is the address of the server at required process place of calling, concrete this TIPC address can be realized by the type and the instance number of process, therefore, the TIPC address of realizing by the type of process and instance number can the required process place of calling of unique identification server, and the corresponding required process of calling on the server; The parameter information that Executive Module 63 is used for obtaining according to call request parsing module 62 is carried out respective process, obtain the content corresponding with this parameter information, and this content offered generate package module 64, make according to this content generation RPC and call response, and with this RPC call the response be encapsulated as second message of following the TIPC agreement, send to client.
The server of present embodiment, receive parsing module, call request parsing module, Executive Module and generation package module by message, the response of the RPC call request that realization sends based on the TIPC agreement client, and based on the TIPC agreement RPC is called response and return to client; The server of present embodiment is realized RPC mechanism based on the TIPC agreement, has overcome that RPC mechanism is subjected to the Service-Port restricted number in the prior art, is subjected to the defective of port restricted number when calling a plurality of process especially at the same time; Simultaneously, set up cluster, can realize the remote procedure call of cluster inside, further improve based on the communication speed between the cluster of TIPC agreement based on this server.
Further, the client that the server of present embodiment and embodiment five provide can compounding practice, realizes the RPC mechanism based on the TIPC agreement, and can adopt connectionless communication mode between the client and server, also can adopt connection-oriented communication mode.The operation principle of the client and server that the foregoing description provides, and do not have connect and connection-oriented communication mode under operation principle, see the flow process of the remote procedure call of the client and server end that the embodiment of the invention provides for details.
The structural representation of the treatment system of the remote procedure call that Fig. 7 provides for the embodiment of the invention seven, this treatment system comprises client 71 and server 72.
Client 71 is used for according to pre-configured address table inquiry TIPC address, and wherein, the TIPC address is the address of the server at required process place of calling; Parameter information according to described TIPC address and required content, generate the RPC call request, the RPC call request is encapsulated as first message of following the TIPC agreement, and first message sent to described address corresponding server 72, and second message of following the transparent interior interprocess communication protocol of reception server 72 transmissions, obtain the content corresponding with parameter information according to second message, described content is carried out described process by described server according to described parameter information and is obtained.
Server 72 is used to receive and resolve first message of following the TIPC agreement that client 71 sends, and obtains the RPC call request that encapsulates in first message; Resolve the RPC call request, obtain the TIPC address that comprises in the RPC call request and the parameter information of required content, wherein the TIPC address can be realized by the type and the instance number of process, and type by process and instance number can the required processes of calling of unique identification; Carry out the required process of calling according to parameter information then, obtain the content corresponding with parameter information; Generate RPC according to content and call response, RPC is called response be encapsulated as second message of following the TIPC agreement, and send second message to client 71.
Further, can adopt connectionless communication mode between client 71 and the server 72, promptly client 71 directly sends to server 72 with first message; First message that server 72 direct reception client end 71 send; Perhaps can also adopt connection-oriented communication mode between client 71 and the server 72, promptly client 71 is set up with server 72 and is followed communicating to connect of TIPC agreement, and this communicate to connect set up finish after, first message is sent to server 72; Server 72 is followed communicating to connect of TIPC agreement according to what set up with client 71, receives first message that client 71 sends.
Client and server in the treatment system of the remote procedure call of present embodiment, by supporting the RPC mechanism of TIPC agreement, realize the remote procedure call of user end to server, because the address of TIPC agreement is not mapped to concrete port, therefore can not be subjected to the restriction of port in realizing remote procedure call, the RPC mechanism in the prior art of having solved is subjected to the problem of a limited number of restrictions of well-known port of server; Simultaneously, the RPC mechanism based on the TIPC agreement realizes can be used for communication process between integrated circuit board, realizes the remote procedure call between integrated circuit board, further accelerates the communication speed between integrated circuit board.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. the processing method of a remote procedure call is characterized in that, comprising:
Client is according to pre-configured address table inquiry transparent interior interprocess communication protocol address, and described transparent interior interprocess communication protocol address is the address of the server at required process place of calling;
Described client generates the remote procedure call request according to the parameter information of described transparent interior interprocess communication protocol address and required content;
Described client is encapsulated as first message of following the transparent interior interprocess communication protocol with described remote procedure call request, and described first message is sent to described address corresponding server;
Described client receives second message of following the transparent interior interprocess communication protocol that described server sends, obtain the content corresponding with described parameter information according to described second message, described content is carried out described process by described server according to described parameter information and is obtained.
2. the processing method of remote procedure call according to claim 1 is characterized in that, described first message is sent to described address corresponding server comprise:
Directly described first message is sent to described server; Perhaps,
Set up with described server and to follow communicating to connect of transparent interior interprocess communication protocol, and described communicate to connect set up finish after, described first message is sent to described server.
3. the processing method of a remote procedure call is characterized in that, comprising:
Server receives and resolves first message of following the transparent interior interprocess communication protocol that client sends, and obtains the remote procedure call request that encapsulates in described first message;
The described remote procedure call request of described server parses obtains the transparent interior interprocess communication protocol address that comprises in the described remote procedure call request and the parameter information of required content;
Described server is carried out described process according to described parameter information, obtains the content corresponding with described parameter information;
Described server generates the remote procedure call response according to described content, described remote procedure call response is encapsulated as second message of following the transparent interior interprocess communication protocol, and sends described second message to described client.
4. the processing method of remote procedure call according to claim 3 is characterized in that, described server receives described first message of following the transparent interior interprocess communication protocol and comprises:
Directly receive described first message that described client sends; Perhaps,
Set up with described client and to follow communicating to connect of transparent interior interprocess communication protocol, and described communicate to connect set up finish after, receive described first message that described client sends.
5. a client is characterized in that, comprising:
Enquiry module is used for according to pre-configured address table inquiry transparent interior interprocess communication protocol address, and described transparent interior interprocess communication protocol address is the address of the server at required process place of calling;
Generation module is used for the parameter information according to described transparent interior interprocess communication protocol address and required content, generates the remote procedure call request;
The encapsulation sending module is used for described remote procedure call request is encapsulated as first message of following the transparent interior interprocess communication protocol, and described first message is sent to described address corresponding server;
Receive acquisition module, be used to receive second message of following the transparent interior interprocess communication protocol that described server sends, obtain the content corresponding with described parameter information according to described second message, described content is carried out described process by described server according to described parameter information and is obtained.
6. client according to claim 5 is characterized in that, described encapsulation sending module sends to described address corresponding server with described first message and is specially:
Described encapsulation sending module directly sends to described server with described first message; Perhaps,
Described encapsulation sending module and described server are set up and are followed communicating to connect of transparent interior interprocess communication protocol, and described communicate to connect set up finish after, described first message is sent to described server.
7. a server is characterized in that, comprising:
Message receives parsing module, is used to receive and resolve first message of following the transparent interior interprocess communication protocol that client sends, and obtains the remote procedure call request that encapsulates in described first message;
The call request parsing module is used to resolve described remote procedure call request, obtains the transparent interior interprocess communication protocol address that comprises in the described remote procedure call request and the parameter information of required content;
Executive Module is used for carrying out described process according to described parameter information, obtains the content corresponding with described parameter information;
Generate package module, be used for generating the remote procedure call response, described remote procedure call response is encapsulated as second message of following the transparent interior interprocess communication protocol, and sends described second message to described client according to described content.
8. server according to claim 7 is characterized in that, first message of following the transparent interior interprocess communication protocol that described message receives the transmission of parsing module reception client is specially:
Described message receives parsing module and directly receives described first message that described client sends; Perhaps,
Described message receives parsing module and sets up with described client and follow communicating to connect of transparent interior interprocess communication protocol, and described communicate to connect set up finish after, receive described first message of described client transmission.
9. the treatment system of a remote procedure call is characterized in that, comprising: client and server;
Described client is used for according to pre-configured address table inquiry transparent interior interprocess communication protocol address, and described transparent interior interprocess communication protocol address is the address of the server at required process place of calling; Parameter information according to described transparent interior interprocess communication protocol address and required content, generate the remote procedure call request, described remote procedure call request is encapsulated as first message of following the transparent interior interprocess communication protocol, and described first message is sent to described address corresponding server; Receive second message of following the transparent interior interprocess communication protocol that described server sends, obtain the content corresponding with described parameter information according to described second message, described content is carried out described process by described server according to described parameter information and is obtained;
Described server is used to receive and resolve described first message of following the transparent interior interprocess communication protocol that described client sends, and obtains the remote procedure call request that encapsulates in described first message; Resolve described remote procedure call request, obtain the transparent interior interprocess communication protocol address that comprises in the described remote procedure call request and the parameter information of required content, carry out described process according to described parameter information, obtain the content corresponding with described parameter information; Generate the remote procedure call response according to described content, described remote procedure call response is encapsulated as described second message of following the transparent interior interprocess communication protocol, and sends described second message to described client.
10. the treatment system of remote procedure call according to claim 9, it is characterized in that, described client sends to described address corresponding server with described first message, and described first message of following the transparent interior interprocess communication protocol that described server receives described client transmission is specially:
Described client directly sends to described server with described first message, and described server directly receives described first message that described client sends;
Perhaps,
Described client and described server are set up and are followed communicating to connect of transparent interior interprocess communication protocol, and described communicate to connect set up finish after, described first message is sent to described server; Described server and described client are set up and are followed communicating to connect of transparent interior interprocess communication protocol, and described communicate to connect set up finish after, receive described first message that described client sends.
CN200910260295A 2009-12-28 2009-12-28 Processing method and system for remote process call, client end and server Pending CN101764843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910260295A CN101764843A (en) 2009-12-28 2009-12-28 Processing method and system for remote process call, client end and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910260295A CN101764843A (en) 2009-12-28 2009-12-28 Processing method and system for remote process call, client end and server

Publications (1)

Publication Number Publication Date
CN101764843A true CN101764843A (en) 2010-06-30

Family

ID=42495825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910260295A Pending CN101764843A (en) 2009-12-28 2009-12-28 Processing method and system for remote process call, client end and server

Country Status (1)

Country Link
CN (1) CN101764843A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438048A (en) * 2011-12-15 2012-05-02 北京新媒传信科技有限公司 Method and system for calling remote service from Internet
CN102497453A (en) * 2011-12-28 2012-06-13 用友软件股份有限公司 Calling device and calling method for remote programs
CN102540911A (en) * 2010-12-10 2012-07-04 北京北方微电子基地设备工艺研究中心有限责任公司 Control device and control method for equipment
CN102594891A (en) * 2012-02-17 2012-07-18 中国科学院计算技术研究所 Method and system for processing remote procedure call request
CN103023906A (en) * 2012-12-20 2013-04-03 北京奇虎科技有限公司 Method and system aiming at remote procedure calling conventions to perform status tracking
CN103095785A (en) * 2011-11-08 2013-05-08 阿里巴巴集团控股有限公司 Remote procedure call method and system, client and server
CN104601702A (en) * 2015-01-19 2015-05-06 迈普通信技术股份有限公司 Cluster remote procedure call method and system
CN107920075A (en) * 2017-11-17 2018-04-17 北京锐安科技有限公司 A kind of system of data processing
CN107948215A (en) * 2018-01-17 2018-04-20 广州汇智通信技术有限公司 A kind of remote invocation method and device based on UDP communications
CN107979648A (en) * 2017-12-12 2018-05-01 苏州蜗牛数字科技股份有限公司 A kind of Server remote control system and method
CN108200080A (en) * 2018-01-19 2018-06-22 深圳神州数码云科数据技术有限公司 A kind of remote service communication means
CN109426571A (en) * 2017-08-28 2019-03-05 阿里巴巴集团控股有限公司 Function call and the method for data access, system, storage medium, processor and device
CN109688128A (en) * 2018-12-21 2019-04-26 成都安世亚太科技有限公司 Real-time distributed objective system software frame based on reliable UDP agreement
CN110333957A (en) * 2019-05-30 2019-10-15 重庆金融资产交易所有限责任公司 Remote procedure call service calling method, device and computer equipment
CN112839136A (en) * 2020-12-30 2021-05-25 厦门亿联网络技术股份有限公司 Call method and call system of registered terminal
CN114422570A (en) * 2021-12-31 2022-04-29 深圳市联软科技股份有限公司 Cross-platform multi-module communication method and system
CN114928660A (en) * 2022-05-16 2022-08-19 北京计算机技术及应用研究所 Method for transparent interprocess communication of embedded operating system
CN114422570B (en) * 2021-12-31 2024-05-14 深圳市联软科技股份有限公司 Cross-platform multi-module communication method and system

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102540911A (en) * 2010-12-10 2012-07-04 北京北方微电子基地设备工艺研究中心有限责任公司 Control device and control method for equipment
CN102540911B (en) * 2010-12-10 2014-08-27 北京北方微电子基地设备工艺研究中心有限责任公司 Control device and control method for equipment
CN103095785A (en) * 2011-11-08 2013-05-08 阿里巴巴集团控股有限公司 Remote procedure call method and system, client and server
CN103095785B (en) * 2011-11-08 2016-04-06 阿里巴巴集团控股有限公司 Remote procedure calling (PRC) method and system, client and server
CN102438048B (en) * 2011-12-15 2014-04-30 北京新媒传信科技有限公司 Method and system for calling remote service from Internet
CN102438048A (en) * 2011-12-15 2012-05-02 北京新媒传信科技有限公司 Method and system for calling remote service from Internet
CN102497453A (en) * 2011-12-28 2012-06-13 用友软件股份有限公司 Calling device and calling method for remote programs
CN102594891A (en) * 2012-02-17 2012-07-18 中国科学院计算技术研究所 Method and system for processing remote procedure call request
CN103023906A (en) * 2012-12-20 2013-04-03 北京奇虎科技有限公司 Method and system aiming at remote procedure calling conventions to perform status tracking
CN103023906B (en) * 2012-12-20 2017-04-19 北京奇虎科技有限公司 Method and system aiming at remote procedure calling conventions to perform status tracking
CN104601702A (en) * 2015-01-19 2015-05-06 迈普通信技术股份有限公司 Cluster remote procedure call method and system
CN104601702B (en) * 2015-01-19 2018-06-05 迈普通信技术股份有限公司 Cluster remote procedure calling (PRC) method and system
CN109426571A (en) * 2017-08-28 2019-03-05 阿里巴巴集团控股有限公司 Function call and the method for data access, system, storage medium, processor and device
CN107920075A (en) * 2017-11-17 2018-04-17 北京锐安科技有限公司 A kind of system of data processing
CN107979648A (en) * 2017-12-12 2018-05-01 苏州蜗牛数字科技股份有限公司 A kind of Server remote control system and method
CN107948215A (en) * 2018-01-17 2018-04-20 广州汇智通信技术有限公司 A kind of remote invocation method and device based on UDP communications
CN108200080A (en) * 2018-01-19 2018-06-22 深圳神州数码云科数据技术有限公司 A kind of remote service communication means
CN109688128A (en) * 2018-12-21 2019-04-26 成都安世亚太科技有限公司 Real-time distributed objective system software frame based on reliable UDP agreement
CN110333957A (en) * 2019-05-30 2019-10-15 重庆金融资产交易所有限责任公司 Remote procedure call service calling method, device and computer equipment
CN110333957B (en) * 2019-05-30 2024-02-02 深圳创芯在线科技有限公司 Remote Procedure Call (RPC) service calling method, device and computer equipment
CN112839136A (en) * 2020-12-30 2021-05-25 厦门亿联网络技术股份有限公司 Call method and call system of registered terminal
CN112839136B (en) * 2020-12-30 2022-11-22 厦门亿联网络技术股份有限公司 Call method and call system of registered terminal
CN114422570A (en) * 2021-12-31 2022-04-29 深圳市联软科技股份有限公司 Cross-platform multi-module communication method and system
CN114422570B (en) * 2021-12-31 2024-05-14 深圳市联软科技股份有限公司 Cross-platform multi-module communication method and system
CN114928660A (en) * 2022-05-16 2022-08-19 北京计算机技术及应用研究所 Method for transparent interprocess communication of embedded operating system
CN114928660B (en) * 2022-05-16 2023-10-31 北京计算机技术及应用研究所 Method for communication between transparent processes of embedded operating system

Similar Documents

Publication Publication Date Title
CN101764843A (en) Processing method and system for remote process call, client end and server
US11934341B2 (en) Virtual RDMA switching for containerized
CN112513816B (en) Function As A Service (FAAS) execution dispatcher
CN102339234B (en) Device for operating protocol stack and method
US8413172B2 (en) Method and system for socket API call emulation
CN101207568B (en) Multi protocol adapter and method for multi business to implement adapting treatment
CN111034160B (en) non-DSR distributed load balancer with virtual VIP and source agent over load balancing connection
CN111124589B (en) Service discovery system, method, device and equipment
CN109729187B (en) Proxy communication method, system, device and storage medium
US20160099913A1 (en) Internet Protocol (IP) Address Virtualization for Terminal Server Sessions
KR100772175B1 (en) Network robot system and communication method in network robot system
CN103533080A (en) Dispatching method and device for LVS (Linux virtual server)
CN1761929A (en) Method and apparatus for providing multi-client support in a SIP-enabled terminal
CN102594886A (en) Method and device for direct communication between browsers, and communication system
CN106357713B (en) Method for realizing remote procedure call, client device and server device
CN114244654B (en) URL forwarding method, device, equipment and computer storage medium
US10742776B1 (en) Accelerating isochronous endpoints of redirected USB devices
US9929951B1 (en) Techniques for using mappings to manage network traffic
KR101855318B1 (en) At least one mechanism to permit, at least in part, allocation and/or configuration, at least in part, of at least one network-associated object
CN116782200A (en) Processing method, device, equipment and readable storage medium of network address
CN101312412A (en) Ethernet transmission system based on embedded technique
US20210243245A1 (en) Redirection of usb devices from hardware isolated virtual desktop infrastructure clients
CN110719303B (en) Containerization NRF method and system
Qi et al. X-IO: A High-performance Unified I/O Interface using Lock-free Shared Memory Processing
Kehne et al. Light-weight remote communication for high-performance cloud networks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100630