Skip to content

Latest commit

 

History

History
279 lines (196 loc) · 14 KB

File metadata and controls

279 lines (196 loc) · 14 KB

Distributed Computing Lab

CSL802 · Semester VIII · Computer Engineering

Curated by Documents Language Middleware Type

A comprehensive collection of laboratory experiments for Distributed Computing, covering clock synchronization, election algorithms, mutual exclusion, deadlock detection, and middleware protocols.


How to Use  ·  Learning Path  ·  Experiment 1  ·  Experiment 2  ·  Experiment 3  ·  Experiment 4  ·  Experiment 5  ·  Experiment 6  ·  Experiment 7  ·  Experiment 8  ·  Experiment 9  ·  Experiment 10


Note

Environment Configuration: This repository focuses on distributed architectures. Experiments utilize Python's socket module for low-level communication and Pyro4 for Remote Method Invocation (RMI), alongside multithreaded Java implementations for coordination protocols.

Tip

Distributed Debugging: When debugging multi-process systems (like the Bully Algorithm or Token Ring), use centralized logging or timestamped console outputs to trace the sequence of events across nodes. Logical clocks are your best tool for ordering events in the absence of a global clock.

Warning

Port Conflicts: Ensure that ports used in the RMI and Socket experiments (default: 1234 or Pyro4 default) are not occupied by other system services. If a "Connection Refused" error occurs, verify that the server script is initialized and listening before running the client.


How to Use

Viewing Implementation

  1. Navigate to the specific experiment folder (e.g., Experiment-7).
  2. Execute the script using the appropriate runtime:
    • For Python: python Chat_Server.py (Run server first, then client in a new terminal).
    • For Java: javac Token_Ring.java && java Token_Ring.
  3. Analyze the console output to observe distributed protocol messages and state changes.

Development Setup

Required Tools:

  • Python 3.x: Standard library for sockets; pip install Pyro4 for middleware tasks.
  • Java JDK 8+: For multithreaded coordination implementations.
  • Terminal Multiplexer: Recommended to run multiple nodes (processes) simultaneously for realistic simulation.

Learning Path

Phase 1: Communication & Middleware

Foundational concepts of process interaction and remote execution.

  • Experiment-1: Compare Network vs Distributed Operating Systems.
  • Experiment-2: Implement a multi-user Chat application using low-level Sockets.
  • Experiment-3: Develop a remote Calculator service using RMI and RPC concepts.

Phase 2: Synchronization & Coordination

Managing state and consensus in a distributed environment without global memory.

  • Experiment-4: Synchronize events using Lamport's Logical Clocks.
  • Experiment-5: Implement the Bully Algorithm for dynamic leader election.
  • Experiment-6: Ensure Mutual Exclusion using the circular Token Ring protocol.

Phase 3: Advanced Distributed Protocols

Handling complex scenarios like deadlocks, load distribution, and name services.

  • Experiment-7: Detect distributed deadlocks using the Chandy-Misra-Haas edge-chasing algorithm.
  • Experiment-8: Implement Static and Dynamic Load Balancing models.
  • Experiment-9: Review Distributed File System architectures (NFS, AFS, GFS).
  • Experiment-10: Implement Name Resolution and sophisticated RPC services.

Experiment-1: NOS vs DOS Comparison

To Compare Network operating system and Distributed operating system.

Date: January 13, 2022

# Program Description Source Code
Lab Report (PDF) Detailed experiment report View

Experiment-2: Socket Programming Chat App

To Implement Group Communication as a Chat application using socket programming.

Date: January 20, 2022

# Program Description Source Code
1 Chat_Server.py Multi-client chat server View
2 Chat_Client.py Interactive chat client View
Lab Report (PDF) Detailed experiment report View

Experiment-3: RMI / RPC Implementation

To Implement any application using RMI/RPC.

Date: January 27, 2022

# Program Description Source Code
1 RMI_Server.py Calculator service server View
2 RMI_Client.py Calculator service client View
Lab Report (PDF) Detailed experiment report View

Experiment-4: Logical Clock Synchronization

To Implement Lamport Logical clock Algorithm.

Date: February 03, 2022

# Program Description Source Code
1 Lamport_Clock_Synchronization.py Lamport's Logical Clock View
2 Lamport_Mutual_Exclusion.py Alternative Clock implementation View
Lab Report (PDF) Detailed experiment report View

Experiment-5: Bully Election Algorithm

To Implement a Bully Algorithm.

Date: February 10, 2022

# Program Description Source Code
1 Bully_Algorithm.java Election protocol simulation View
Lab Report (PDF) Detailed experiment report View

Experiment-6: Token Ring Mutual Exclusion

To Implement Token Ring Mutual Exclusion Algorithm.

Date: February 18, 2022

# Program Description Source Code
1 Token_Ring.java Circular token passing engine View
Lab Report (PDF) Detailed experiment report View

Experiment-7: Chandy-Misra-Haas Deadlock Detection

To Implement Chandi-Misra-Haas distributed deadlock detection algorithm.

Date: February 25, 2022

# Program Description Source Code
1 Chandy_Misra_Haas.java Unified CMH Simulation (Java) View
2 Chandy_Misra_Haas_Deadlock.java CMH (Deadlock - Java) View
3 Chandy_Misra_Haas_No_Deadlock.java CMH (No Deadlock - Java) View
4 Chandy_Misra_Haas.py Unified CMH Simulation (Python) View
5 Chandy_Misra_Haas_Deadlock.py CMH (Deadlock - Python) View
6 Chandy_Misra_Haas_No_Deadlock.py CMH (No Deadlock - Python) View
Lab Report (PDF) Detailed experiment report View

Experiment-8: Distributed Load Balancing

To Implement Load Balancing algorithm.

Date: March 11, 2022

# Program Description Source Code
1 Load_Balancing.java Static load distribution (Java) View
2 Load_Balancing.py Dynamic load balancer (Python) View
Lab Report (PDF) Detailed experiment report View

Experiment-9: Distributed File Systems Case Study

To Discuss different types of a file system (NFS, AFS, Google Case Study).

Date: March 18, 2022

# Program Description Source Code
Lab Report (PDF) Detailed experiment report View

Experiment-10: Name Resolution & RPC

To Implement Name Resolution.

Date: March 31, 2022

# Program Description Source Code
1 Rpc_Server.py Name Resolution Server View
2 Rpc_Client.py Name Resolution Client View
3 Name_Resolution.ipynb Jupyter Notebook version View
4 test.txt Dataset/Resource for resolution View
Lab Report (PDF) Detailed experiment report View


CSL802 · Semester VIII · Computer Engineering

University of Mumbai · Curated by Amey Thakur