Unit 1

Unit 1: Distributed Environment - Complete Notes


1. Introduction to Distributed Environment

Definition and Overview:

  • A Distributed Environment is a system where multiple computers (nodes) are connected through a network and work together for a common goal.

  • This system is decentralized, meaning there is no single authority or server.

  • Real-World Example:

    • Google Search Engine: Google operates on distributed systems. Data is stored across servers worldwide, and every search query is processed by multiple servers.

    • Bitcoin (Blockchain): Bitcoin is a decentralized distributed system where all nodes communicate directly with each other.

Benefits:

  1. Scalability: The system can easily be expanded by adding new nodes.

    • Example: Amazon Web Services (AWS): AWS uses distributed systems to scale its services globally.

  2. Fault Tolerance: If one node fails, the system does not stop working.

    • Example: Netflix: Netflix uses distributed systems to stream videos. If one server fails, other servers continue to function.

  3. Resource Sharing: Resources (such as storage and processing power) can be shared.

    • Example: Dropbox: Dropbox uses distributed storage to let users store and share files.

  4. Performance Improvement: Distributing tasks across multiple nodes improves performance.

    • Example: YouTube: YouTube uses distributed systems to enable fast video streaming.

Limitations:

  1. Complexity: Designing and managing distributed systems is complex.

    • Example: Banking Systems: Maintaining distributed banking systems is challenging because every transaction needs to be tracked.

  2. Security: Securing data is difficult as it is stored across multiple nodes.

    • Example: Cloud Storage: If one node of a cloud storage system is hacked, sensitive data can be leaked.

  3. Consistency: Maintaining data consistency is challenging.

    • Example: E-commerce Websites: If stock updates across servers are not synchronized, it can lead to inconsistencies.

  4. Network Dependency: If the network is slow or down, the system will not function.

    • Example: Online Gaming: If the internet connection is slow, online games may lag.


Mind Map for Introduction to Distributed Environment:

Distributed Environment  
├── Definition  
│   └── Multiple connected nodes working together  
├── Benefits  
│   ├── Scalability (Example: AWS)  
│   ├── Fault Tolerance (Example: Netflix)  
│   ├── Resource Sharing (Example: Dropbox)  
│   └── Performance Improvement (Example: YouTube)  
└── Limitations  
    ├── Complexity (Example: Banking Systems)  
    ├── Security (Example: Cloud Storage)  
    ├── Consistency (Example: E-commerce Websites)  
    └── Network Dependency (Example: Online Gaming)

2. Communication Mechanisms

Remote Procedure Call (RPC):

  • Definition: RPC is a mechanism where a program can call a function in another program located on a remote machine, as if it were local.

  • How It Works:

    1. The client calls a function.

    2. This call is sent to the server through the network.

    3. The server executes the function and returns the result to the client.

  • Real-World Example:

    • Google Maps API: Google Maps uses RPC to fetch location data. When you view a map, data is retrieved from Google’s servers.

    • Online Banking: Banks use RPC to process transactions. When you withdraw money from an ATM, the transaction reaches the server via RPC.

Remote Object Invocation:

  • Definition: In this, objects on remote machines can be invoked (called).

  • How It Works:

    1. The client calls a remote object.

    2. The object’s method executes, and the result is returned.

  • Real-World Example:

    • Java RMI (Remote Method Invocation): Java RMI is used in distributed applications like online shopping carts where products and prices are stored on remote servers.

    • CORBA (Common Object Request Broker Architecture): CORBA facilitates communication between objects in distributed systems.

Message-Oriented Communication:

  • Definition: Communication is done via messages. These messages are stored in queues and processed by receivers.

  • How It Works:

    1. The sender places a message in the queue.

    2. The receiver retrieves and processes the message.

  • Real-World Example:

    • WhatsApp: Messages in WhatsApp are stored in queues and delivered to receivers.

    • Email Systems: Emails are stored on SMTP servers and retrieved by receivers.


Mind Map for Communication Mechanisms:

Communication Mechanisms  
├── RPC  
│   ├── Remote function call  
│   └── Example: Google Maps API, Online Banking  
├── Remote Object Invocation  
│   ├── Remote object method call  
│   └── Example: Java RMI, CORBA  
└── Message-Oriented Communication  
    ├── Message queues  
    └── Example: WhatsApp, Email Systems

3. Types of Communication

Unicasting:

  • Definition: Communication between one sender and one receiver.

  • Real-World Example:

    • Email: Sending an email involves one sender and one receiver.

    • Online Banking Transactions: Money transfer involves communication between one sender and one receiver.

Multicasting:

  • Definition: Communication between one sender and multiple receivers.

  • Real-World Example:

    • Live Video Streaming: Platforms like YouTube Live or Zoom meetings where one host sends data to multiple viewers.

    • Stock Market Updates: Updates are sent to multiple investors simultaneously.

Broadcasting:

  • Definition: Communication between one sender and all receivers on the network.

  • Real-World Example:

    • Radio Broadcasting: A radio station sends messages to all listeners.

    • Emergency Alerts: Emergency alerts are broadcasted to all mobile users.

Group Communication:

  • Definition: Communication among members of a group.

  • Real-World Example:

    • WhatsApp Group Chat: A message in a group chat is delivered to all members.

    • Slack Channels: Teams communicate via Slack channels.


Mind Map for Types of Communication:

Types of Communication  
├── Unicasting  
│   ├── One sender, one receiver  
│   └── Example: Email, Online Banking  
├── Multicasting  
│   ├── One sender, multiple receivers  
│   └── Example: Live Streaming, Stock Market Updates  
├── Broadcasting  
│   ├── One sender, all receivers  
│   └── Example: Radio Broadcasting, Emergency Alerts  
└── Group Communication  
    ├── Communication among group members  
    └── Example: WhatsApp Group Chat, Slack Channels

4. Group Communication

Definition:

  • Group communication involves communication among members of a group, where messages are efficiently distributed.

Types of Group Communication:

  1. Centralized Group Communication:

    • A central server manages all messages.

    • Real-World Example:

      • Zoom Meetings: The host manages all participants in a meeting.

      • Online Gaming Servers: Servers manage communication among players.

  2. Decentralized Group Communication:

    • No central authority; all members communicate directly.

    • Real-World Example:

      • Blockchain Networks: All nodes communicate directly in blockchain.

      • BitTorrent: Files are shared directly between users.

Challenges:

  1. Consistency: All members should have the same information.

    • Example: Google Docs: In collaborative editing, all users need access to the latest version.

  2. Scalability: Managing large groups is difficult.

    • Example: Social Media Platforms: Managing communication for millions of users is challenging.

  3. Fault Tolerance: The system should remain operational even if a member fails.

    • Example: Google Drive: Data is available even if one server fails.


Last updated