In Distributed Systems information is exchanged through message passing. Parameter passing semantics is the way to share information between the client and the remote server in Remote Procedure Calls.
- There are different parameter passing methods that pass the parameters correctly.
- Some of the common methods include passing parameters by value and by reference, by move and by visit.

1. Call-by-Reference
The memory address (pointer) of a variable is passed instead of the actual value. The called procedure can directly modify the original variable through the reference.
- The client sends a reference (pointer) to the parameter instead of copying its value.
- In distributed systems, direct pointer passing is not practical because the client and server have separate address spaces.
- RPC systems handle this using stub mechanisms or distributed shared memory techniques.
- The server may request the client stub to read or write the referenced data when needed.
- This method is rarely used in RPC because it requires additional communication between the client and server.
2. Call-by-Object-Reference
This is used in object-oriented RPC systems where a reference to an object is passed instead of the object itself.
- The RPC system sends an object reference or remote handle to the server.
- The server can invoke methods on the remote object through this reference.
- The actual object remains on the original machine.
- Commonly used in distributed object systems such as Java RMI.
3. Call-by-Move
This is a parameter-passing technique where the object itself is transferred to the remote node during the procedure call.
- The parameter object is moved from the caller to the callee.
- The procedure executes locally on the moved object at the server.
- The object may remain at the server or return after execution, depending on implementation.
- This approach reduces repeated network communication during execution.
4. Call-by-Visit
This is a technique where the computation moves to the location of the object instead of moving the object itself.
- The object remains on the caller’s machine.
- The remote procedure visits the node where the object resides.
- The operation is executed at the object’s location.
- This approach helps reduce data movement across the network.
Issues:
- However, in a large distributed system, it is typical to have a variety of machine types.
- Numbers, letters, and other data objects are typically manifested differently by each machine.
- To exemplify, IBM mainframes and IBM personal computers use a different encoding techniques IBM mainframes use EBCDIC, but IBM PC uses ASCII.
- Due to this difference, transfer of character arguments is not possible between these two.
- Integer and floating-point numbers can both have challenges with representation.
- Another issue is that some machines count bytes from right to left, while others count them from left to right. eg Intel/AMD x86, Digital VAX handles data in Little-Endian form and Sun SPARC, Power PC representation of numbers in another way i.e. Big-Endian form.