> For the complete documentation index, see [llms.txt](https://davidjosearaujo.gitbook.io/notes-miect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidjosearaujo.gitbook.io/notes-miect/computacao-distribuida/communications/remote-call-procedure-rpc.md).

# Remote Call Procedure (RPC)

<figure><img src="https://2387753953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVneYw7epWOEEPKsfCf%2Fuploads%2FADX642gOlMLh43c9juHI%2Fa.png?alt=media&amp;token=c34b5f83-7718-439b-8ce3-0604224ba201" alt=""><figcaption></figcaption></figure>

Developers are more familiar with procedural models.

Procedures, when well built, operate in an **isolated** fashion.

There is no reason not to execute the procedure on other machines.

## Operation

<figure><img src="https://2387753953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVneYw7epWOEEPKsfCf%2Fuploads%2FgpGVMk7Ox3Mm8ZftEoqH%2Fa.png?alt=media&amp;token=dcefce4d-35e6-4a85-b928-f8d9413b5d5d" alt=""><figcaption></figcaption></figure>

## Parameter Assignment

**Client and Server can have different data representations** (*little endian* vs *big endian*).

Parameter **packaging** means **converting** a **value into a byte stream**.

Client and Server must **agree** to a **common encoding**.

## Asynchronous RPC's

<figure><img src="https://2387753953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVneYw7epWOEEPKsfCf%2Fuploads%2FNFFCT0JSPcHOH83fWcgR%2Fa.png?alt=media&amp;token=bbbec669-86e6-4120-806d-dedac5f7e898" alt=""><figcaption></figcaption></figure>

## Multiple RPC Calls

<figure><img src="https://2387753953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVneYw7epWOEEPKsfCf%2Fuploads%2FBRU1OBJQbXHKyw9HzZl8%2Fa.png?alt=media&amp;token=c84b9762-27f2-4f74-8f43-8f325fccc0d4" alt=""><figcaption></figcaption></figure>

## RPC in Practice (Using C)

<figure><img src="https://2387753953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVneYw7epWOEEPKsfCf%2Fuploads%2F5Y0wlZptp7qYwbsAL7dz%2Fa.png?alt=media&amp;token=8eec311d-85c0-4a41-b481-05f9bbe8ddeb" alt=""><figcaption></figcaption></figure>

## Client-Server Connection (DCE)

<figure><img src="https://2387753953-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9sVneYw7epWOEEPKsfCf%2Fuploads%2FPWl4GRlMu2g2dkh6KthI%2Fa.png?alt=media&amp;token=eea05059-4d22-4b72-a54a-53350c5e92d7" alt=""><figcaption></figcaption></figure>
