18.04.2013 Views

B2B Integration : A Practical Guide to Collaborative E-commerce

B2B Integration : A Practical Guide to Collaborative E-commerce

B2B Integration : A Practical Guide to Collaborative E-commerce

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Integration</strong> Patterns 83<br />

remote procedure call, let's review some of the key terms of RPC<br />

pro<strong>to</strong>col.<br />

Client — A client is an application or program that makes remote<br />

procedure calls <strong>to</strong> remote servers. Irrespective of the language in which<br />

the client is developed, it needs <strong>to</strong> know the following in order <strong>to</strong> make<br />

a remote call:<br />

• The uniform resource loca<strong>to</strong>r (URL) and transmission control pro<strong>to</strong>col<br />

(TCP) port of the server;<br />

• The name of the remote procedure;<br />

• The kind and number of arguments that procedure expects; and<br />

• The kind and number of return values.<br />

Server — A server is a process that provides remote services <strong>to</strong> clients.<br />

Remote Service — A remote service is a collection of one or more<br />

remote programs available over the network.<br />

Remote Program — A remote program implements one or more remote<br />

procedures.<br />

A remote procedure call involves a single thread that controls<br />

two processes. One of the processes is that of the calling program<br />

(caller's process) or application and the other one is that of the server<br />

on which the call is being made (server's process). The caller process<br />

initiates the communication by sending a message with the remote<br />

procedure's parameters <strong>to</strong> the server process (see Figure 3.23). After<br />

sending the message, the caller process can wait for the server process<br />

<strong>to</strong> respond back with the results of the remote procedure (synchronous<br />

communication) or continue on (asynchronous communication). The server<br />

process, on the other hand, is dormant waiting for the client requests<br />

and servicing them as the RPCs are invoked. Once it receives a message<br />

from the client program, it executes the remote procedure and sends the<br />

calling process the results in the form of messages.<br />

In the above implementation example, there is only one process that<br />

is active at any moment in time. RPC pro<strong>to</strong>col supports simultaneous<br />

execution of more than one process. For instance, in an asynchronous<br />

RPC call, the client process can continue without waiting for the results<br />

from the server process.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!