DC Mod 2
DC Mod 2
Remote Procedure Call (RPC) is a protocol that enables one program to invoke a procedure
(or function) located on a different computer or server over a network, as if it were a local
function. The core idea behind RPC is to abstract the complexities of network
communication, allowing developers to focus on high-level functionality rather than low-
level networking details.
RPC forms the foundation for many distributed systems, allowing them to share resources
and services by making cross-network function calls in a seamless and standardized way.
Detailed Working of RPC:
To understand RPC thoroughly, it helps to look at its components, execution flow, and key
concepts involved in the communication process.
4. Binding in RPC:
• Static Binding:
The server to which the client binds is decided at compile-time.
• Dynamic Binding:
The client determines the server during run-time, typically using a name server or registry.
5. Advantages of RPC:
• Transparency:
Abstracts the network, making remote calls look like local ones.
• Reusability:
Enables reusability of code on the server side by exposing functionalities as services.
• Interoperability:
Facilitates communication between applications written in different languages or running on
different platforms (depending on implementation).
• Simplified Development:
Developers are relieved from handling network communication directly.
Conclusion:
RPC is a powerful abstraction for building distributed applications by enabling function calls
across a network. Its ability to mimic local calls and simplify client-server communication has
made it a foundational concept in distributed systems. By handling tasks like message
formatting, network transmission, and interface definition, RPC allows developers to build
robust, scalable systems with ease. However, attention must be paid to network issues, error
handling, and security to fully leverage its potential.
3. Detailed Comparison
Message-Oriented Stream-Oriented
Feature Communication
Communication
Communication Continuous data stream
Discrete message passing
Model
Data Units Individual messages Byte stream
5. Real-World Analogy
• Message-Oriented Communication is like mailing letters. Each letter is a complete package
with a sender and recipient. They are delivered independently, and the receiver may open
them at any time.
• Stream-Oriented Communication is like a phone call. Once the call is connected, a
continuous flow of conversation happens in real-time until the connection is terminated.
6. Conclusion
Both message-oriented and stream-oriented communication play vital roles in distributed
systems. The selection between the two depends on application requirements.
• If the application demands reliable delivery of discrete, decoupled messages, message-
oriented communication is ideal.
• If the application needs real-time, sequential, and continuous data transfer, stream-
oriented communication is the better choice.
Understanding their underlying mechanisms and differences enables system architects and
developers to design robust and scalable distributed applications tailored to their specific
communication needs.
Conclusion:
Group communication plays a pivotal role in modern distributed systems by enabling
structured and efficient data exchange among multiple processes. The 1:M model helps in
broadcasting messages from a central source to multiple receivers efficiently, making it ideal
for real-time updates and notifications. In contrast, the M:1 model supports gathering data
from distributed sources to a central point, which is essential in data aggregation and
monitoring systems.
By utilizing specialized group communication protocols and tools, developers can ensure
reliability, scalability, and coordination in complex distributed environments.