Posts

Showing posts from November, 2024

GT-lecture_01

### 1. **Graph Theory Introduction**    - **What is Graph Theory?**        Graph theory is a branch of mathematics that studies graphs. A graph is a collection of points, called nodes (or vertices), connected by lines, called edges. Graphs help us represent and analyze relationships between things.    - **Why is Graph Theory Important?**        Graphs are used in computer science and many other fields to model relationships, such as connections in a network or links between pages on the web. They help us solve complex problems and make it easier to understand relationships between different objects. ### 2. **Applications of Graph Theory**    Graph theory applies to many areas, which is why understanding it is so valuable. Here’s a breakdown of key applications:    #### **Social Networks**    - **Friendship Connections**        Social networks like Facebook or Twit...

Data Replication using sync and async mode

### Data Replication Overview Data replication means copying data from one main source (the "master") to other locations ("replicas") to make it accessible across multiple systems or locations. This helps with data availability and reliability, especially in distributed systems. Here’s how it works differently in **synchronous**, **asynchronous**, and **semi-synchronous** scenarios. ### Synchronous Replication 1. **Process**:    - When a client writes (or sends) data to the master, the master saves it to its own storage.    - Then, the master **sends this data to all replicas**.    - **Only after all replicas confirm** that they have received and saved the data, the master tells the client the write is successful. 2. **Consistency**:    - This guarantees that all copies of the data are **exactly the same** at all times.    - If one replica fails to receive the data, the client gets an error, meaning the write didn’t complete everywhere. ...

Lecture-1.1 PDC

### Synchronous Communication 1. **Definition**: In synchronous communication, components work in a coordinated way with a set order and timing. Here, the sender waits until the receiver confirms receipt before continuing.     2. **Characteristics**:    - **Real-Time Interaction**: The sender waits for the receiver’s reply before moving forward.    - **Request-Response Pattern**: A request is sent, and the sender pauses until a response comes back. 3. **Advantages and Disadvantages**:    - **Simplified Design**: It’s easy to design since processes are in sync, knowing exactly what’s happening when.    - **Potential Delays**: If the receiver takes time to respond, the sender is idle, which can slow down the system. 4. **Example**:     Imagine a **chat system** where every message you send has to be acknowledged by the other person immediately before you can send the next message. If the other person delays, you’re left wait...

Lecture-1 PDC

### Distributed Systems 1. **Definition**:    - A *distributed system* is a network of independent computers that work together to appear as a single, unified system. Imagine multiple computers collaborating to act as one "supercomputer." 2. **Key Points**:    - **Autonomous Components**: Each computer (or component) operates independently.    - **Collaboration**: These computers work together to solve problems, sharing data and processing tasks.    - **Diversity**: Distributed systems don’t require all computers to be the same; they can range from powerful servers to tiny devices.    - **Consistency for Users**: The system hides complexity, making it look like a single system to users.    - **Expandability**: Distributed systems are designed to scale up, which means new computers or resources can be added easily. 3. **Transparency and Reliability**:    - **Transparency**: The system hides where data or resources are ...