Jump to content

Stub (distributed computing)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pczajkowski (talk | contribs) at 11:51, 16 May 2007 (Created page with 'A stub in distributed computing is a piece of code used for converting parameters passed during a Remote Procedure Call (RPC). The main idea of an [[RP...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

A stub in distributed computing is a piece of code used for converting parameters passed during a Remote Procedure Call (RPC).

The main idea of an RPC is to allow a local computer (client) to remotely call procedures on a remote computer (server). Client and server use different address spaces, so conversion of parameters used in a function call have to be performed, otherwise the values of those parameters could not be used, because of pointers to the computers memory pointing different data. Stubs are used to perform the conversion of the parameters, so a Remote Function Call looks like a local function call for the remote computer.

Stub libraries must be installed on client and server side. A client stub is responsible for conversion of parameters used in function call and deconversion of results passed form server after execution of the function. A server stub is responsible for deconversion of parameters passed by the client and conversion of the results after the execution of the function.