module_1
module_1
module_1
A. Concurrency
• 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.
• 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.
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:
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.
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 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.
• Challenges: Designing such systems requires addressing issues like data consistency, fault
tolerance, and efficient network communication.
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:
• Challenges:
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 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.
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.
• Definition: Pervasive networking enables devices to connect anytime and anywhere, utilizing
various technologies like WiFi, WiMAX, Bluetooth, and mobile networks.
o Supports a range of services (World Wide Web, email, file transfer) that can be easily
expanded with new servers and applications.
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 Computing:
o Refers to performing computing tasks while on the move, allowing users to access
the Internet and resources from different locations.
• Ubiquitous Computing:
• 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:
• Functions: Such systems must be capable of storing, transmitting, and presenting these
media types while ensuring that users can access and share them seamlessly.
• 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.
• New Services: Distributed multimedia computing enables various services, such as live TV
broadcasts, video-on-demand, music libraries, and conferencing tools.
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
• Include adaptation strategies to handle situations where QoS cannot be met, ensuring the
system remains functional despite challenges.
• 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.
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 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.
• User Familiarity: Users often take for granted the ability to share various resources, including
hardware (like printers) and data (such as files and databases).
• 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.
• 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.
• 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.
• 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.
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:
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:
Failure Handling
1. Types of Failures:
o Detecting Failures: Some failures, like corrupted messages, can be detected through
checksums, while others may not be identifiable.
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).
Concurrency
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 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.
• QoS requires reserving the necessary resources to ensure timely task completion and
managing resources effectively
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.
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.
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>
<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]
• 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.
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).
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
▪ Emerged in the late 1970s and early 1980s with local area networking
technology (e.g., Ethernet).
▪ Emerged in the 1990s alongside the Internet's growth (e.g., Google launched
in 1996).
▪ Nodes were typically desktop computers that were static, discrete, and
autonomous.
4. Systems of Systems:
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 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.
• 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:
• 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.
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 A mobile agent is a program that can move between nodes in a network, performing
tasks locally and reducing communication overhead.
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:
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 Types of Failures:
▪ 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.
Interaction Models
o Process execution times can vary significantly, potentially taking an arbitrarily long
time.
Failure Models
• Omission Failures:
o Fail-stop: A process halts and remains in a halted state, which can be detected by
other processes.
o Channel Failures: A message may fail to arrive at its destination or not be placed in
the outgoing buffer.
Timing Failures
• Clock Failures: A process’s local clock exceeds its allowed drift rate.
• Channel Failures: A message takes longer to transmit than the allowed time limit.
Security Models
• Secure Communication:
o Protecting both processes and the communication channels is critical for maintaining
the integrity of interactions.
• Threats: