module_1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

1.

Definition of Distributed Systems

A distributed system consists of multiple autonomous computers that communicate through a


network. These systems collaborate to achieve a common goal by sharing resources and processing
tasks. The key features of distributed systems include:

• Autonomy: Each component (computer or process) operates independently, which means


they can manage their own resources and processes without centralized control.

• Communication: Components communicate and coordinate their actions solely through


message passing, which can introduce delays and complexities due to network latency and
potential failures.

2. Significant Characteristics of Distributed Systems

A. Concurrency

• Concurrent Execution: In distributed systems, multiple processes can execute simultaneously


across different machines. For instance, one user can access a file while another performs a
computation on a different machine. This parallelism enhances efficiency and resource
utilization.

• Resource Sharing: Resources (e.g., files, printers, processing power) are shared among
different nodes in the network. The addition of more machines or resources can improve the
overall capacity and performance of the system.

• Coordination: Managing the interactions between concurrent processes is crucial.


Techniques such as locks, semaphores, and monitors are often used to coordinate access to
shared resources and prevent conflicts or inconsistencies.

B. Lack of a Global Clock

• Clock Synchronization Challenges: In a distributed system, each computer may maintain its
own clock, leading to discrepancies in time representation across the network. Since the only
means of communication is through messages, achieving synchronized time across all nodes
is difficult.

• Consequences:

o Event Ordering: Without a global clock, determining the order of events can become
complicated. Logical clocks (like Lamport timestamps) are often employed to
establish a sequence of events in a way that respects causality.

o Coordination of Actions: Applications that require precise coordination (e.g.,


distributed databases) face challenges due to time discrepancies, leading to potential
inconsistencies in data states.

C. Independent Failures

• Failure Modes: In distributed systems, components can fail independently without affecting
the others. This introduces new failure scenarios compared to centralized systems:

o Network Failures: Communication links may fail, isolating certain nodes without
shutting them down.
o Node Failures: Individual nodes may crash or become unresponsive, but the rest of
the system can continue to operate.

• Fault Tolerance: Designers must incorporate mechanisms to handle failures, such as:

o Redundancy: Maintaining backup components or replicating data across nodes to


ensure availability even when some components fail.

o Error Detection and Recovery: Implementing protocols to detect failures and


recover from them gracefully. This can include techniques like retries, failover
procedures, and consensus algorithms.

3. Motivation for Distributed Systems

The primary motivation behind distributed systems is to enable resource sharing, which can enhance
performance, scalability, and fault tolerance. Key aspects include:

• Resource Types:

o Hardware Resources: Includes physical devices like printers, storage systems, and
processors that can be shared among multiple users or applications.

o Software Resources: Involves files, databases, and applications that can be accessed
remotely, allowing users to collaborate and share information seamlessly.

o Media Streams: Examples include audio and video streams from devices like
cameras and microphones, which require real-time processing and delivery across
the network.

• Collaborative Applications: Many applications in fields like cloud computing, online gaming,
and real-time collaboration rely on distributed systems to function effectively, allowing
multiple users to interact with shared data in real time.

4. Examples of Distributed Systems

Here are a few practical examples of distributed systems to illustrate these concepts:

• The Internet: A vast network of interconnected computers that communicate using standard
protocols. Websites, email services, and online storage are all distributed systems leveraging
the Internet infrastructure.

• Cloud Computing: Services like Amazon Web Services (AWS) or Google Cloud provide
distributed computing resources on-demand. They allow users to scale their applications and
share resources without managing the underlying hardware.

• Peer-to-Peer Networks: Systems like BitTorrent enable users to share files directly with each
other without relying on a centralized server, exemplifying resource sharing and concurrency.

• Distributed Databases: Systems like Apache Cassandra or Google Spanner are designed to
manage large volumes of data across multiple nodes, ensuring availability and fault tolerance
while dealing with independent failures.
1.2.1 Web Search

Web search engines, such as Google, represent a significant application of distributed systems, given
the scale and complexity of the task:

• Scale of Operations: With over 10 billion searches per month and more than 63 billion web
pages indexed, web search is a massive distributed computing challenge.

• System Architecture:

o Physical Infrastructure: Google employs a vast network of data centers worldwide,


each containing numerous computers that work together to index and retrieve web
content.

o Distributed File System: A specially designed file system optimizes reading from
large files, accommodating the high demands of web search operations.

o Structured Distributed Storage: Ensures fast access to vast datasets necessary for
quick search results.

o Lock Service: Manages distributed locking and agreement mechanisms, essential for
coordinating access to shared resources.

o Programming Model: Supports managing large parallel computations across the


infrastructure.

• Challenges: Designing such systems requires addressing issues like data consistency, fault
tolerance, and efficient network communication.

1.2.2 Massively Multiplayer Online Games (MMOGs)

MMOGs offer an interactive gaming experience for thousands of players simultaneously, presenting
unique challenges for distributed system designers:

• User Interaction: Games like EVE Online and EverQuest II enable many players to interact
within a persistent virtual world, often with complex social and economic systems.

• System Design:

o Client-Server Architecture: EVE Online uses a centralized server architecture to


manage the game state, which simplifies consistency but creates a bottleneck. The
server must handle events and player interactions in real time.

o Geographically Distributed Servers: Other MMOGs distribute game data across


multiple servers to manage load and provide players with faster access based on
their location.

o Peer-to-Peer Approaches: Emerging models consider fully decentralized


architectures, allowing players to contribute resources, which could enhance
scalability.

• Challenges:

o Latency: Fast response times are critical to maintaining an engaging player


experience.
o Event Propagation: Real-time updates must be efficiently communicated to all
players, requiring sophisticated networking protocols.

1.2.3 Financial Trading

The financial sector is a prime example of how distributed systems facilitate high-stakes, real-time
decision-making:

• Real-Time Access: Financial systems need to process vast amounts of information rapidly,
such as stock prices and market trends, to inform trading decisions.

• System Architecture:

o Event-Driven Systems: These systems rely on real-time event processing to notify


traders of significant market changes.

o Adapters: These translate various event formats (e.g., FIX protocol, Reuters market
data) into a common format for processing, addressing the challenge of
heterogeneity.

o Complex Event Processing (CEP): This technology enables the automated analysis of
multiple event streams to identify trading opportunities based on predefined
patterns.

• Challenges:

o Speed and Reliability: Systems must deliver timely and reliable event notifications to
many clients, which requires robust communication protocols.

o Automation: Increasing reliance on automated trading strategies necessitates


systems that can adapt quickly to market conditions and risks.

2. Application Domains of Distributed Systems

The examples above illustrate the diversity of applications supported by distributed systems,
spanning various sectors, including:

• Finance and Commerce: E-commerce platforms and digital payment systems rely on
distributed architectures for processing transactions and managing user data.

• Healthcare: Distributed systems enable telemedicine and electronic patient records,


improving accessibility and efficiency in healthcare services.
• Education: Online learning platforms utilize distributed systems for e-learning, allowing
remote access to educational resources and collaboration tools.

• Transportation: GPS-based systems and smart traffic management utilize distributed


technologies to enhance navigation and logistics.

• Science and Research: Distributed computing supports e-science initiatives, facilitating


collaboration and data sharing among researchers worldwide.

• Environmental Management: Sensor networks monitor environmental conditions and


disasters, providing real-time data for better management and response

Pervasive Networking and the Modern Internet

• Definition: Pervasive networking enables devices to connect anytime and anywhere, utilizing
various technologies like WiFi, WiMAX, Bluetooth, and mobile networks.

• The Internet as a Distributed System:

o Comprises interconnected networks allowing programs to communicate through


standardized protocols.

o Supports a range of services (World Wide Web, email, file transfer) that can be easily
expanded with new servers and applications.

• Intranets and Firewalls:

o Intranets are private networks secured by firewalls, which filter incoming and
outgoing traffic to protect sensitive information.

o Firewalls can complicate resource sharing between internal and external users,
necessitating additional access control measures.
• Backbone Networks and ISPs:

o Backbones are high-capacity connections (fiber optic, satellite) that link different
segments of the Internet.

o ISPs provide essential infrastructure and services to facilitate user access to the
Internet.

• Security Considerations:

o Some organizations opt for complete isolation from the Internet for security, which is
the most effective means of protection against external threats.

Mobile and Ubiquitous Computing

• Advancements: Technological improvements in miniaturization and wireless networking


have integrated portable computing devices into distributed systems. These devices include
laptops, handhelds (smartphones, PDAs), wearable tech (smartwatches), and embedded
systems in everyday appliances.

• Mobile Computing:

o Refers to performing computing tasks while on the move, allowing users to access
the Internet and resources from different locations.

o Provides location-aware and context-aware computing, enabling users to utilize


nearby resources (e.g., printers or sales points) as they travel.
o Introduces challenges for distributed systems, including managing variable
connectivity and ensuring operations continue despite mobility (mobility
transparency).

• Ubiquitous Computing:

o Involves the integration of numerous small, inexpensive computing devices into


users’ environments (homes, offices, etc.), making them almost invisible in daily life.

o Promotes seamless communication between devices, enhancing user convenience


(e.g., controlling appliances from a smartphone).

o Aims for transparent computational behavior linked to physical functions.

• Distinction Between Mobile and Ubiquitous Computing:

o While overlapping, they are distinct: ubiquitous computing operates in a fixed


environment (like a home), whereas mobile computing emphasizes user mobility
with various devices.

• Practical Scenario:

o A user visiting a host organization can connect their devices (laptop, mobile phone,
digital camera) to local networks for tasks like accessing stock prices, using GPS for
navigation, and printing photos or documents directly.

o This illustrates the need for spontaneous interoperation among devices, highlighting
the challenges of service discovery and communication within unfamiliar
environments.

This excerpt highlights the essential features and challenges of distributed multimedia systems.
Here's a breakdown of the key points discussed:

Definition and Importance

• Multimedia Support: Distributed multimedia systems are designed to integrate various


media types, including discrete (text, images) and continuous (audio, video) media.

• Functions: Such systems must be capable of storing, transmitting, and presenting these
media types while ensuring that users can access and share them seamlessly.

Continuous Media Characteristics

• Temporal Dimension: Continuous media types, like video and audio, require real-time
integrity, meaning the timing of data delivery is crucial.
• Quality of Service (QoS): Parameters like frame rates and latency are vital to ensure smooth
playback and user experience.

Benefits and Applications

• New Services: Distributed multimedia computing enables various services, such as live TV
broadcasts, video-on-demand, music libraries, and conferencing tools.

• Impact on Consumer Devices: This technology prompts a rethinking of home entertainment


devices, questioning whether the future lies with computers, TVs, or gaming consoles.

Webcasting

• Definition: Webcasting refers to broadcasting continuous media over the Internet, with
significant events attracting large audiences.

• Example: The Live8 concert in 2005 serves as a notable case where webcasting drew 170,000
viewers simultaneously.

Infrastructure Demands

For distributed multimedia applications like webcasting, the infrastructure must:

• Support a variety of encoding and encryption formats (e.g., MPEG standards).

• Ensure quality of service through effective resource management and scheduling.

• Include adaptation strategies to handle situations where QoS cannot be met, ensuring the
system remains functional despite challenges.

Distributed Computing as a Utility

• Concept: The evolution of distributed systems has led companies to view distributed
resources as commodities or utilities, similar to water and electricity. In this model, resources
are rented from service providers rather than owned by users.

• Types of Resources:

o Physical Resources:

▪ Users can access networked storage and processing power without the need
to own them. This includes remote storage for files and backups and the
ability to rent computational nodes for processing needs.

▪ Sophisticated data centers provide access to large volumes of data and


computational infrastructure, exemplified by services from companies like
Amazon and Google.

▪ Operating System Virtualization: This technology allows users to receive


services from virtual nodes, enhancing flexibility for service providers in
managing resources.

o Software Services:
▪ Software services can also be offered over the Internet, allowing users to
rent applications like email and calendars. For example, Google Apps bundles
various business services, enabled by standards for software services (e.g.,
web services).

• Cloud Computing:

o Defined as a set of Internet-based services (application, storage, and computing) that


meet users' needs, enabling them to minimize local storage and software.

o Promotes the idea of "everything as a service," where users pay based on usage
rather than purchasing outright. This reduces the requirements on user devices,
allowing access to resources from simple devices.

o Implemented on cluster computers that provide the scale and performance required
for cloud services. A cluster consists of interconnected commodity PCs, often running
a standard operating system (like Linux).

• Hardware Solutions:

o Blade Servers: These are minimal computational units that contain processing and
memory capabilities, designed to fit into a blade enclosure. This makes them
cheaper and smaller than traditional PCs.

o The aim of cluster computing is to offer cloud services, including high-performance


computing, mass storage, and application services (e.g., web search).

• Relation to Grid Computing:

o Grid computing is considered a precursor to cloud computing, generally focused on


scientific applications. Although the terms can be synonymous, they are often used
interchangeably.

Importance of Resource Sharing

• User Familiarity: Users often take for granted the ability to share various resources, including
hardware (like printers) and data (such as files and databases).

• Higher-Level Resources: The emphasis is on higher-level resources—users care more about


the functionality provided by services (like databases and search engines) than the physical
hardware used to implement them.

Variability in Resource Sharing

• Scope and Interaction: Resource sharing varies in scope and user interaction. For example:

o Web Search Engines: Provide global access to users who may not interact directly.

o Computer-Supported Cooperative Work (CSCW): Involves a closed group of users


directly sharing resources like documents.

• Coordination Mechanisms: The nature of resource sharing and user distribution influences
the necessary mechanisms for coordinating user actions.

Concept of Services
• Definition of Services: A service is a distinct component of a system that manages related
resources and presents functionality to users/applications. For example:

o File Service: Offers operations like read, write, and delete on files.

o Printing Service: Manages document printing requests.

• Access via Operations: Users access services through a well-defined set of operations, which
is a standard practice in software engineering and reflects the organization of distributed
systems.

Servers and Clients

• Server Definition: A server is a program on a networked computer that responds to requests


from client programs running on other computers.

• Client-Server Model: This model defines the interaction between clients (active, making
requests) and servers (passive, responding to requests).

o Remote Invocation: The interaction from the client sending a request to receiving a
response from the server is termed a remote invocation.

Interaction Dynamics

• Client and Server Roles: The same process can act as both client and server in different
contexts, depending on the request.

• Processes vs. Computers: The terms "client" and "server" primarily refer to processes, but
they are often used to describe the physical computers as well.

• Object-Oriented Systems: In systems designed with object-oriented languages, resources


may be encapsulated as objects, and interaction occurs through method invocation (e.g., a
client object invoking a method on a server object).

Application Examples

• Common Systems: Many distributed systems (like the Web, email, and networked printers)
utilize the client-server architecture.

• Web Browsing: A web browser acts as a client that requests web pages from a web server,
exemplifying the client-server interaction.

1.5.1 Heterogeneity

Distributed systems often operate across a diverse range of networks, hardware, operating systems,
programming languages, and implementations. This diversity can lead to communication difficulties
and inconsistencies. To manage these challenges:

• Internet Protocols: Despite the variety, the Internet protocols enable communication by
masking underlying differences.

• Data Representation: Different hardware may represent data types (like integers) differently,
which complicates data exchange.
• Middleware: Middleware layers help mask heterogeneity by providing a uniform
programming abstraction and supporting communication standards, such as CORBA and Java
RMI.

1.5.2 Openness

Openness refers to a system's ability to be extended and reimplemented. Key points include:

• Published Interfaces: For a system to be open, its software interfaces must be publicly
available, allowing developers to build upon them.

• Requests For Comments (RFCs): The Internet community uses RFCs to document protocols,
which has enabled the development of various systems and applications.

• Open Distributed Systems: These systems allow for the integration of heterogeneous
components while ensuring that all elements conform to published standards.

1.5.3 Security

Security in distributed systems is crucial due to the sensitive nature of many resources. The main
components of security are:

• Confidentiality: Protection against unauthorized access.

• Integrity: Ensuring data is not altered or corrupted.

• Availability: Guaranteeing that resources are accessible when needed.

Challenges include:

• Denial of Service Attacks: Flooding a service with requests to disrupt its availability.

• Security of Mobile Code: Risks associated with executing code received from external
sources, such as email attachments.

1.5.4 Scalability

Scalability is the ability of a system to handle increased load without sacrificing performance. Key
considerations include:

• Resource Management: Systems must efficiently manage resources as demand grows,


ideally maintaining a cost proportional to the number of users.

• Performance Maintenance: Algorithms should minimize performance loss as the system


scales; hierarchical structures generally scale better than linear ones.

• Avoiding Bottlenecks: Centralized algorithms can create performance bottlenecks;


decentralized systems are preferable to distribute load effectively.

Failure Handling

1. Types of Failures:

o Failures in distributed systems can be partial, affecting some components while


others continue functioning.
o Difficulties arise in detecting failures, particularly in cases where the faults cannot be
directly observed (e.g., a crashed remote server).

2. Techniques for Handling Failures:

o Detecting Failures: Some failures, like corrupted messages, can be detected through
checksums, while others may not be identifiable.

o Masking Failures: This involves hiding or mitigating the impact of failures:

▪ Retransmitting failed messages.

▪ Using redundant storage (e.g., writing to multiple disks).

o Tolerating Failures: Designing systems so that they can operate even in the presence
of failures (e.g., informing users of issues without indefinite waiting).

o Recovery from Failures: Mechanisms to restore data to a consistent state post-


failure.

o Redundancy: Employing multiple components (e.g., multiple routers, replicated


databases) to ensure availability and reliability.

Concurrency

• Concurrency arises when multiple clients access shared resources simultaneously.

• It is crucial for shared resources to manage concurrent access to prevent inconsistencies


(e.g., two bids in an auction being recorded incorrectly).

• Synchronization techniques (like semaphores) are necessary to ensure consistent data


access.

Transparency

• Definition: Transparency refers to hiding the complexities of the distributed system from
users and application developers, making the system appear cohesive.

• Types of Transparency:

o Access Transparency: Uniform access methods for local and remote resources.

o Location Transparency: Resources can be accessed without knowledge of their


physical location.

o Concurrency Transparency: Multiple processes can operate on shared resources


without interference.

o Replication Transparency: Users are unaware of the existence of multiple instances


of resources.

o Failure Transparency: Users can continue their tasks despite failures in components.

o Mobility Transparency: Resources can move within the system without affecting
operations.

o Performance Transparency: The system can adapt to varying loads without user
intervention.
o Scaling Transparency: The system can grow without changes to its structure or
algorithms.

Quality of Service (QoS)

• QoS assesses the non-functional attributes of services, focusing on:

o Reliability: The ability of a system to operate correctly over time.

o Security: Protection against unauthorized access and data breaches.

o Performance: Ability to meet responsiveness and throughput requirements,


redefined as the capability to meet deadlines, particularly in time-sensitive
applications.

• In time-critical applications (like multimedia streaming), maintaining a consistent processing


rate is essential.

• QoS requires reserving the necessary resources to ensure timely task completion and
managing resources effectively

Case Study: The World Wide Web

Introduction
The World Wide Web (WWW) is an evolving system for publishing and accessing resources and
services across the Internet, enabling users to retrieve and view diverse documents, audio, and video
streams through web browsers. Originating at CERN in 1989 as a tool for document exchange among
physicists, the Web has developed into a vast hypertext structure that organizes knowledge through
links, allowing for complex interconnections among documents.

Key Features of the Web

1. Hypertext Structure: The Web’s hypertext capability enables users to navigate between
documents easily, enhancing their experience by providing links to related resources.

2. Open System: The Web is designed to be extensible and implemented in various ways
without disrupting its existing functionality. This is facilitated by widely published
communication and content standards.

3. Access Across Devices: Users can access the Web on numerous devices, from mobile phones
to desktop computers, through various browsers.

Technological Components
The Web operates on three main technological standards:

• HyperText Markup Language (HTML): Defines the structure and layout of web pages,
specifying how content is presented.

• Uniform Resource Locators (URLs): Identify resources on the Web, allowing browsers to
access them.

• Client-Server Architecture: Utilizes HyperText Transfer Protocol (HTTP) for communication


between browsers (clients) and web servers.
The Role of HTML

HTML is crucial for creating web pages, containing structured elements such as headings, paragraphs,
images, and links. For example, a simple HTML snippet might look like this:

html

Copy code

<IMG SRC="http://www.example.com/image.jpg">

<P>

Welcome to Earth! Visitors may also be interested in taking a look at the

<A HREF="http://www.example.com/moon.html">Moon</A>.

</P>

• Tags: HTML uses tags to delineate elements, such as <IMG> for images and <A> for
hyperlinks.

• Rendering: Browsers interpret HTML tags to display content, while the server provides the
content type to assist in the rendering process.

Understanding URLs

A URL functions as an address for resources on the Web, generally structured as follows:

bash

Copy code

scheme://hostname[:port]/path[?query][#fragment]

• Scheme: Indicates the protocol (e.g., http, ftp).

• Hostname: Specifies the web server.

• Path: Refers to the specific resource on the server.

• Query and Fragment: Provide additional parameters or identifiers.

For instance, the URL http://www.example.com/page.html?query=search breaks down into:

• Server: www.example.com

• Path: page.html

• Query: query=search

HTTP Protocol

HTTP defines interactions between clients and servers, primarily through request-reply messages.
Key features include:

1. Request-Reply Model: Clients request resources, and servers respond with the content or an
error message (e.g., 404 Not Found).
2. Content Types: The server indicates the content type (MIME type) to inform the browser
how to process the data.

3. One Resource per Request: Each HTTP request targets a single resource, although browsers
can make multiple requests simultaneously to enhance speed.

Dynamic Content and Services

The Web has evolved to support dynamic content, where user input influences server responses.
This interaction often involves:

• Web Forms: Users fill out forms that trigger HTTP requests with their input.

• CGI Programs: On the server side, CGI programs process user input and generate responses
dynamically, typically returning HTML content.

Additionally, JavaScript enhances user interaction on web pages, allowing real-time feedback and
asynchronous data updates (via AJAX).

Web Services and XML

While HTML is primarily for presenting information, there is a growing need for structured data
exchange, addressed by XML. Unlike HTML, XML is extensible and self-describing, enabling various
applications to process the same data.

• Web Services: Operations like ordering products or checking order statuses are implemented
using structured data formats, often utilizing REST architecture for flexibility and extensibility
in handling resources.

Conclusion

The World Wide Web has transformed how we access and interact with information and services. By
leveraging technologies like HTML, URLs, HTTP, and XML, it has created a robust platform for sharing
knowledge and facilitating complex interactions. As the Web continues to evolve, its architecture will
support increasingly sophisticated applications, enhancing user experiences and service accessibility.
Physical Models of Distributed Systems

1. Definition: A physical model represents the hardware components of a distributed system,


abstracting away specific technologies used.

2. Baseline Physical Model: A distributed system consists of an extensible set of computer


nodes interconnected via a network for message passing.

3. Generations of Distributed Systems:

o Early Distributed Systems:

▪ Emerged in the late 1970s and early 1980s with local area networking
technology (e.g., Ethernet).

▪ Typically involved 10 to 100 nodes providing limited services like shared


printers, file servers, email, and file transfer.

▪ Systems were homogeneous, with less focus on openness or quality of


service.

o Internet-Scale Distributed Systems:

▪ Emerged in the 1990s alongside the Internet's growth (e.g., Google launched
in 1996).

▪ Consist of a vast number of interconnected nodes providing global services


across organizational boundaries.

▪ Significant heterogeneity in networks, architectures, operating systems, and


languages led to an emphasis on open standards and middleware (e.g.,
CORBA, web services).

▪ Introduced additional services for end-to-end quality of service.

o Contemporary Distributed Systems:

▪ Nodes were typically desktop computers that were static, discrete, and
autonomous.

▪ Key trends in mobile and ubiquitous computing have changed physical


models:

▪ Mobile Computing: Nodes like laptops and smartphones can move,


requiring service discovery and spontaneous interoperation.

▪ Ubiquitous Computing: Computers are embedded in everyday


objects (e.g., smart homes).

▪ Cloud Computing: Shift from autonomous nodes to clusters of nodes


providing services collectively (e.g., Google’s search service).

4. Systems of Systems:

o Ultra Large-Scale (ULS) Systems: Modern distributed systems are complex


architectures called "systems of systems," comprising various subsystems that work
together.
o Example: An environmental management system for flood prediction may integrate
sensor networks for environmental monitoring, simulation systems for flood
predictions, and systems for analyzing historical data or providing early warnings to
stakeholders.

5. Challenges:

o Managing heterogeneity and ensuring key properties such as openness and quality
of service are significant challenges in contemporary distributed systems.

Architectural models

Client-Server Architecture

Overview: The client-server architecture is a foundational model in distributed systems where client
processes request services from server processes. This architecture is widely used and has a
significant historical impact.

• Structure:

o Clients: Initiate requests to servers.

o Servers: Provide resources and services, often interacting with other servers.

• Examples:

o Web Servers: Serve web pages to client browsers while acting as clients themselves
to file servers for resource management.

o Search Engines: Operate as both clients (responding to user queries) and servers
(running web crawlers that access other servers).

• Concurrency: Servers can handle multiple client requests simultaneously, often using
multiple threads to manage different tasks concurrently, such as serving clients while also
running background processes.

Peer-to-Peer (P2P) Architecture


Overview: In P2P architecture, all processes involved have similar roles, interacting without
distinction between client and server. This architecture emphasizes decentralized resource sharing
and load distribution.

• Structure:

o Each peer operates similarly, running the same programs and offering identical
interfaces.

o Resources are distributed among peers, avoiding centralization which can lead to
scalability issues.

• Examples:

o Napster: Early P2P application for sharing music, demonstrating feasibility for large-
scale resource sharing.

o BitTorrent: A more advanced P2P system for efficient file sharing among numerous
users.

• Benefits:

o Increased resource availability and service capacity as more peers join.

o Distribution of storage, processing, and communication loads, improving scalability.

• Complexity: P2P systems require complex mechanisms for object placement, replication, and
retrieval due to their distributed nature.

Placement Strategies

Overview: Placement strategies determine how services and objects map onto the physical
infrastructure of distributed systems. Effective placement can enhance performance, reliability, and
security.

1. Mapping Services to Multiple Servers:

o Services can be partitioned among servers (each managing different objects) or


replicated across multiple servers for redundancy.

o Example: In web services, each server may host different resources, while replication
can be seen in network services like NIS (Network Information Service).

2. Caching:

o Caches store frequently accessed data closer to clients to reduce latency and
bandwidth usage.

o Example: Web browsers and proxy servers maintain caches of web resources to
improve response times and reduce server load.

3. Mobile Code:

o Mobile code refers to programs (e.g., applets) that are transferred across networks
to run locally, enhancing responsiveness and reducing network dependency.

o Example: Java applets downloaded from web servers to client browsers.


4. Mobile Agents:

o A mobile agent is a program that can move between nodes in a network, performing
tasks locally and reducing communication overhead.

o Example: Agents that gather information across multiple databases or perform


software maintenance tasks.

The fundamental models of distributed systems focus on their essential properties, enabling a
deeper understanding of their characteristics, potential failures, and security risks. Here's an
overview based on your input:

Fundamental Properties of Distributed Systems

1. Interaction:

o Processes: The basic unit of computation in distributed systems. Each process can
perform computations and interact with other processes.
o Communication: Processes communicate by passing messages, which facilitates
coordination and data exchange.

2. Failure:

o Definition: Classifying faults in distributed systems is crucial for understanding their


impact and designing systems that can tolerate these faults.

o Types of Failures:

▪ Omission Failures: Occur when a process or communication channel fails to


perform its expected actions.

▪ Arbitrary (Byzantine) Failures: The most severe form of failure, where any
type of error can occur, including unexpected behaviors from processes or
channels.

3. Security:

o Definition: The security model defines potential attack forms and provides a
framework for analyzing threats and designing resilient systems.

o Security Objectives: Protect processes, communication channels, and data objects


from unauthorized access and attacks.

Interaction Models

1. Synchronous Distributed Systems:

o Each process has known bounds on execution time.

o Messages are guaranteed to be received within a specific time frame.

o Local clocks have a known drift rate relative to real time.

2. Asynchronous Distributed Systems:

o Process execution times can vary significantly, potentially taking an arbitrarily long
time.

o Message transmission can experience unpredictable delays.

o Local clocks may drift without specific bounds.

Failure Models

• Omission Failures:

o Fail-stop: A process halts and remains in a halted state, which can be detected by
other processes.

o Crash: A process halts but may not be detectable by others.

o Channel Failures: A message may fail to arrive at its destination or not be placed in
the outgoing buffer.

• Arbitrary (Byzantine) Failures:


o Processes or channels can exhibit arbitrary behaviors, such as sending unexpected
messages or stopping unexpectedly.

Timing Failures

Applicable mainly in synchronous systems:

• Clock Failures: A process’s local clock exceeds its allowed drift rate.

• Performance Failures: A process exceeds time limits between execution steps.

• Channel Failures: A message takes longer to transmit than the allowed time limit.

Security Models

• Secure Communication:

o A secure channel connects two processes, allowing them to communicate securely


on behalf of a principal (user or entity).

o Protecting both processes and the communication channels is critical for maintaining
the integrity of interactions.

• Threats:

o Threats may target processes and communication channels, leading to unauthorized


access or data breaches.

You might also like