0% found this document useful (0 votes)
11 views40 pages

CSC322-Lect 1-Introduction to Network and Distributed System

The document provides an introduction to networks and distributed systems, covering basic networking concepts, types of networks, and the OSI and TCP/IP models. It also explores distributed systems, their characteristics, design goals, and various types of middleware that facilitate communication and resource sharing among independent nodes. Key features of distributed systems such as scalability, fault tolerance, and security are discussed, alongside common architectures like client-server and peer-to-peer.

Uploaded by

David Waihenya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views40 pages

CSC322-Lect 1-Introduction to Network and Distributed System

The document provides an introduction to networks and distributed systems, covering basic networking concepts, types of networks, and the OSI and TCP/IP models. It also explores distributed systems, their characteristics, design goals, and various types of middleware that facilitate communication and resource sharing among independent nodes. Key features of distributed systems such as scalability, fault tolerance, and security are discussed, alongside common architectures like client-server and peer-to-peer.

Uploaded by

David Waihenya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

The University of Embu

Department of Computing and Information Technology

SUBJECT: CSC322-Network and Distributed Programming


Lecture 1-Introduction to Networks and Distributed Systems

BSc Computer Science

By
Dr Peter Maina Mwangi
Lecturer
Overview
❑Basic networking concepts (OSI model, TCP/IP
stack).

❑Distributed Systems Overview: Characteristics and


Design Goals
❑Types of distributed systems and their applications.

1/24/2025
INTRODUCTION TO NETWORKS

What is a Network?
 A network is a system of interconnected computing
devices that communicate with each other to share
resources, data, and applications.
 These devices can range from personal computers,
servers, and smartphones to more specialized equipment
like routers, switches, and storage devices.
 Networks can be as simple as connecting two computers
or as complex as connecting millions of devices across the
globe.

1/24/2025
Goals Of Network
 The goals of a computer network include:
• Sharing: programs (O.S., applications), data, equipment
(printers, disks).
• High reliability: users are more immune from
hardware/software failure.
• Less cost: It is easy to increase the capacity by adding
new machines.
• Communications medium: Users have access to email
and the Internet

1/24/2025
Computer Networks

5
Computer Networks-Cont
Key Components of a Computer Network
• Nodes: Devices such as computers, servers, and printers that are
connected to the network.
• Transmission Media: The physical or wireless pathways
through which data travels (e.g., Ethernet cables, fiber optics,
radio waves).
• Network Interface Cards (NICs): Hardware that allows a
device to connect to a network.
• Switches and Hubs: Devices that connect multiple devices in a
LAN and manage data traffic within the network.
• Routers: Devices that route data packets between different
networks, particularly in a WAN.
• Firewalls: Security devices that control access to a network by
filtering incoming and outgoing traffic based on security rules.
6
Types Of Networks
 Networking is the practice of connecting computers and
other devices to share resources and data. Networks are
classified based on their geographical scope, ownership,
or technology used.
 Below are the main types of networks:
 LAN

 MAN

 WAN

1/24/2025
Introduction to Networks Models
 In computer networks, networking models provide
frameworks for understanding and standardizing the
communication process between different devices.
 These models break down the complex task of
networking into simpler, manageable layers. Each layer
is responsible for a specific aspect of the
communication process, ensuring interoperability
between various systems, software, and hardware.
 The two most widely known networking models are the
OSI Model and the TCP/IP Model.

1/24/2025
The OSI Model (Open Systems Interconnection)
 OSI Protocol Stack

1/24/2025
The OSI Model (Open Systems Interconnection)
 The OSI Model was developed by the International Organization
for Standardization (ISO) to facilitate interoperability between
different communication systems. It divides the networking process
into seven distinct layers.
 The Seven Layers of the OSI Model:
1. Physical Layer (Layer 1):
1. Deals with the physical connection between devices.
2. Transmits raw data bits over physical mediums such as cables or
radio signals.
3. Examples: Ethernet cables, fiber optics, USB (Universal Serial
Bus), DSL (Digital Subscriber Line), BluetoothIEEE 802.11 (Wi-Fi)
and RS-232 (Serial communication).

1/24/2025
Cont.
2. Data Link Layer (Layer 2):
 Ensures error-free data transfer between two directly connected devices.
 Organizes data into frames and manages access to the physical medium.
 Examples: Ethernet (MAC addresses), Wi-Fi.
3. Network Layer (Layer 3):
 Responsible for routing data between devices across different networks.
 Manages logical addressing (IP addresses) and determines the best path
for data transmission.
 Example: Internet Protocol (IP).

1/24/2025
Cont.
4. Transport Layer (Layer 4):
 Ensures reliable data transmission between end devices.
 Manages flow control, error detection, and recovery.
 Examples: TCP (Transmission Control Protocol), UDP
(User Datagram Protocol).
5. Session Layer (Layer 5):
 Establishes, manages, and terminates communication
sessions between applications.
 Ensures that data streams are properly synchronized.
 Example: Remote Procedure Call (RPC).

1/24/2025
Cont.
6. Presentation Layer (Layer 6):
 Translates data between application and network
formats.
 Handles encryption, compression, and data conversion.
 Example: SSL/TLS for encryption.
7. Application Layer (Layer 7):
 Provides network services directly to end users.
 Manages application-specific network protocols.
 Examples: HTTP, FTP, SMTP.

1/24/2025
2. The TCP/IP Model (Transmission Control
Protocol/Internet Protocol)
 The TCP/IP Model, also known as the Internet
Protocol Suite, is the foundation of modern internet
communications.
 Developed by the U.S. Department of Defense, it is
simpler than the OSI Model and consists of four
layers.

1/24/2025
The TCP/IP Model (Transmission Control
Protocol/Internet Protocol)

1/24/2025
Cont.
The Four Layers of the TCP/IP Model:
1. Network Interface Layer (Link Layer):
 Similar to the OSI Model's Physical and Data Link layers.
 Handles the hardware aspect of sending and receiving data
between devices within the same network.
 Examples: Ethernet, Wi-Fi.
2. Internet Layer:
 Corresponds to the OSI Network Layer.
 Manages logical addressing (IP addresses) and routing across
multiple networks.
 Example: Internet Protocol (IP).

1/24/2025
Cont.
3. Transport Layer:
 Maps directly to the OSI Transport Layer.
 Ensures reliable or connectionless communication
between devices.
 Examples: TCP (reliable), UDP (unreliable).
4. Application Layer:
 Combines OSI's Application, Presentation, and Session
layers.
 Provides protocols and services that applications use to
communicate over the network.
 Examples: HTTP, DNS, SMTP.

1/24/2025
Differences between OSI and TCP IP

Comparison of OSI and TCP/IP Models

1/24/2025
Conclusion
 Networking models like the OSI and TCP/IP models are
fundamental to understanding how devices communicate
in a network.
 They break down complex processes into smaller,
understandable layers, providing a framework for
designing and troubleshooting networks.
 While the OSI model is largely used for theoretical
understanding and reference, the TCP/IP model forms
the backbone of the internet today.

1/24/2025
2. Distributed Systems Overview: Characteristics and
Design Goals
What Is a Distributed  A distributed system is a
System? collection of loosely coupled
nodes interconnected by a
 A distributed system is a
communications network
collection of independent
computers that appear to the • Nodes variously called
users of the system as a single processors, computers,
coherent system. machines, hosts
 These computers or nodes  Site is location of the machine,
work together, communicate node refers to specific system
over a network, and coordinate
their activities to achieve a
common goal by sharing
resources, data, and tasks.

1/24/2025
1.1 Definition of a Distributed System (2)

Figure 1-1. A distributed system organized as middleware. The


middleware layer extends over multiple machines, and offers
each application the same interface.
Middlewares.
 Middleware is a crucial component in distributed systems
that acts as an intermediary layer between the client
applications and the underlying operating systems or network
services.
 It provides common services and capabilities to facilitate
communication, data management, and the integration of
various components in a distributed environment.
 Essentially, middleware abstracts the complexity of
managing multiple, independent systems in a distributed
architecture.
 Middleware simplifies the development of distributed
applications by offering a set of standardized interfaces and
services that allow different systems to communicate and
interact, without developers having to deal with low-level
details such as socket programming, data formats, or
synchronization.
Types of Middleware in Distributed Systems

 Middleware can be categorized based on the functionality it


provides in distributed systems.
 The key types of middleware include:
Types of Middleware in Distributed Systems
1. Message-Oriented Middleware (MOM):
•Facilitates communication between distributed components using messaging
systems.
•Examples include:
•Message Queues: Systems like RabbitMQ, ActiveMQ, or IBM MQ use
message queues to provide asynchronous communication between
distributed components.
•Publish-Subscribe Systems: Systems like Apache Kafka and Google
Pub/Sub use the publish-subscribe messaging pattern where messages
are broadcasted to multiple subscribers.

2. Remote Procedure Call (RPC) Middleware:


•Allows programs to call functions or procedures on remote machines as if they
were local function calls.
•Examples include:
•gRPC (Google's RPC framework), XML-RPC, Java RMI (Remote
Method Invocation), and CORBA (Common Object Request Broker
Architecture).
Cont.
3. Object Request Brokers (ORB):
▪ Object-oriented middleware that allows objects to communicate across different
machines in a distributed system.
▪ Example Include
✓ CORBA is a well-known ORB that allows communication between distributed objects written in
different programming languages.

4. Database Middleware:
▪ Facilitates access to distributed databases, enabling the seamless execution of
queries and transactions across different database systems.
▪ Examples include
✓ ODBC (Open Database Connectivity) and JDBC (Java Database Connectivity).

5. Transaction Processing (TP) Middleware:


• Manages transactions across distributed systems, ensuring that they follow ACID
(Atomicity, Consistency, Isolation, Durability) properties.
✓ Example: IBM CICS (Customer Information Control System) and Microsoft DTC (Distributed
Transaction Coordinator) are examples of TP middleware.
Cont.
6. Enterprise Service Bus (ESB):
1. Provides a communication bus that integrates various
enterprise applications and services.
2. Apache Camel, WSO2 ESB, and Mule ESB are popular
examples.

7. Web Middleware:
1. Supports the development of web applications by providing
services such as request handling, session management, and
load balancing.
2. Examples include Apache Tomcat, JBoss, and Microsoft IIS.

8. Middleware for Distributed File Systems:


1. Manages file systems spread across multiple machines,
allowing users to access and manage files as if they were local.
2. Examples include NFS (Network File System), Hadoop
Distributed File System (HDFS), and AFS (Andrew File
System).
Summary Table of Middleware Types
Type Primary Function Example Applications

Message passing between


Message-Oriented Middleware RabbitMQ, Kafka Real-time analytics
applications

Remote Procedure Call Remote execution of procedures gRPC, Thrift Microservices communication

Communication between
Object-Oriented Middleware Java RMI, CORBA Distributed object systems
distributed objects

Interface for distributed database


Database Middleware ODBC, JDBC ERP, data-intensive apps
interaction

Distributed transaction
Transaction Middleware MSDTC, X/Open XA Online banking, e-commerce
management

Web Middleware Support for web applications Apache Tomcat, Nginx Web hosting platforms

Service-Oriented Middleware SOA-based communication Oracle SOA Suite Microservices, automation

Peer-to-Peer Middleware Resource sharing in P2P systems BitTorrent, JXTA File sharing, distributed systems

Real-Time Middleware Support for real-time applications DDS, RTPS Robotics, autonomous systems

Application Middleware Runtime support for applications Spring, Java EE Enterprise and e-commerce

1/24/2025
Characteristics of Distributed Systems

1. Scalability
• Definition: The ability of a system to handle increasing workloads by adding
resources (e.g., servers, storage).
• Types of Scalability:
• Horizontal Scalability: Adding more nodes or machines.
• Vertical Scalability: Enhancing the capacity of existing nodes.
• Example: Expanding cloud infrastructure to support more users.
2. Concurrency
• Definition: Multiple processes or users can access and operate on
shared resources simultaneously.
• Challenges:
• Avoiding race conditions.
• Ensuring data consistency.
• Example: Multiple users editing a shared document in Google Docs.

1/24/2025
Cont.
3. Resource Sharing
• Definition: Resources such as files, printers, or storage are shared among all
participants in the system.
• Benefit: Reduces redundancy and improves resource utilization.
• Example: Distributed file systems like Hadoop Distributed File System
(HDFS).
4. Fault Tolerance
• Definition: The ability of the system to continue operating correctly even in
the presence of hardware or software failures.
• Mechanisms:
• Data replication.
• Automatic failover.
• Example: Netflix's distributed systems use Chaos Monkey to test fault
tolerance.

1/24/2025
Cont.
5. Transparency
 Transparency makes the distributed system appear as a single, unified system to users. There are
various types:
1. Access Transparency: Users can access resources without knowing their location or
implementation.
1. Example: Accessing files stored in the cloud without knowing which server holds them.

2. Location Transparency: Resources can be accessed without knowledge of their physical


location.
1. Example: URL redirects in web systems.

3. Replication Transparency: Users are unaware of resource duplication for fault tolerance or
scalability.
1. Example: Distributed databases with multiple replicas.

4. Concurrency Transparency: Multiple users can access resources simultaneously without


conflicts.
1. Example: Online ticket booking systems.

5. Failure Transparency: The system hides failures and automatically recovers.


1. Example: Cloud services rerouting requests after server failure.

6. Migration Transparency: Resources or processes can move without disrupting users.


1. Example: Virtual machine live migration in cloud environments.

1/24/2025
Cont.
6. Openness
• Definition: The system's ability to interact with other systems and adapt to new
technologies.
• Features:
• Use of standardized protocols and interfaces.
• Compatibility with heterogeneous hardware and software.
• Example: Web services using REST APIs for interoperability.
7. Security
• Definition: Protecting data and resources in the distributed system from
unauthorized access and attacks.
• Key Aspects:
• Authentication.
• Data encryption.
• Secure communication.
• Example: End-to-end encryption in messaging apps like WhatsApp.

1/24/2025
Cont.
8. Heterogeneity
• Definition: The system can work across different types of hardware,
operating systems, and networks.
• Challenge: Ensuring seamless interaction despite differences.
• Example: Cloud platforms that support both Linux and Windows
virtual machines.
9. Performance
• Definition: The system ensures low latency and high throughput even
under high loads.
• Techniques:
• Load balancing.
• Caching frequently accessed data.
• Example: Content delivery networks (CDNs) like Akamai.

1/24/2025
Cont.
10. Decentralization
• Definition: No single central point of control; responsibilities are distributed across
multiple nodes.
• Benefits:
• Avoids single points of failure.
• Improves system reliability.
• Example: Peer-to-peer (P2P) systems like BitTorrent.
11. Latency and Bandwidth Management
• Definition: Efficient communication despite physical separation and
network constraints.
• Techniques:
• Compressing data.
• Using geographically distributed servers.
• Example: Video streaming platforms adjusting quality based on bandwidth.

1/24/2025
Architectures of Distributed systems
 Below are some of the common distributed system architectures:
• Client-Server Architecture:

• In this setup, servers provide resources or services, and clients


request them. Clients and servers communicate over a network.
• Examples: Web applications, where browsers (clients) request
pages from web servers.
• Peer-to-Peer (P2P) Architecture:

• Each node, or “peer,” in the network acts as both a client and a


server, sharing resources directly with each other.
• Examples: File-sharing networks like BitTorrent, where files are
shared between users without a central server.

1/24/2025
Cont.
• Three-Tier Architecture:
• This model has three layers: presentation (user interface),
application (business logic), and data (database). Each layer is
separated to allow easier scaling and maintenance.
• Examples: Many web applications use this to separate user
interfaces, logic processing, and data storage.
• Microservices Architecture:

• The application is split into small, independent services, each


handling specific functions. These services communicate over a
network, often using REST APIs or messaging.
• Examples: Modern web applications like Netflix or Amazon, where
different services handle user accounts, orders, and
recommendations independently.

1/24/2025
Cont.
• Service-Oriented Architecture (SOA):

• Similar to microservices, SOA organizes functions as services.


However, SOA typically uses an enterprise service bus (ESB) to
manage communication between services.
• Examples: Large enterprise applications in finance or government,
where different services handle various aspects of business
processes.
• Event-Driven Architecture:

• Components interact by sending and responding to events rather


than direct requests. An event triggers specific actions or
processes in various parts of the system.
• Examples: Real-time applications like IoT systems, where sensors
trigger actions based on detected events.

1/24/2025
Advantages of Distributed Systems
 Below are some of the advantages of Distributed System:
• Scalability: Distributed systems can easily grow by adding more computers
(nodes), allowing them to handle increased demand without significant
reconfiguration.

• Reliability and Fault Tolerance: If one part of the system fails, others can take
over, making distributed systems more resilient and ensuring services remain
available.

• Performance: Workloads can be split across multiple nodes, allowing tasks to


be completed faster and improving overall system performance.

• Resource Sharing: Distributed systems allow resources like data, storage, and
computing power to be shared across nodes, increasing efficiency and
reducing costs.

• Geographical Distribution: Since nodes can be in different locations,


distributed systems can serve users globally, providing faster access to
resources based on location
1/24/2025
Disadvantages of Distributed Systems
1. Complexity
• Description: Distributed systems are inherently complex to
design, implement, and maintain due to multiple interacting
components.
• Challenges:
• Synchronization across nodes.
• Handling partial failures without disrupting the system.
2. Network Dependency
• Description: The performance and reliability of distributed
systems are highly dependent on the underlying network.
• Challenges:
• Network latency can slow down communication between
nodes.
• Network partitions can disrupt system operations.
1/24/2025
Cont.
3. Security Concerns
• Description: The distributed nature exposes more entry points for potential
attacks.
• Challenges:
• Securing communication between nodes.
• Managing authentication and authorization across a distributed architecture.
 4. Data Consistency
• Description: Maintaining consistent data across multiple nodes can be challenging,
especially under failure conditions.
• Challenges:
• Trade-offs between consistency, availability, and partition tolerance (CAP
theorem).
• Complexities in implementing distributed transactions.

1/24/2025
Cont.
5. Overhead Costs
• Description: Distributed systems introduce additional costs in terms
of hardware, software, and communication.
• Challenges:
• Message passing overhead.
• Increased resource usage for synchronization and redundancy.
6. Resource Contention
• Description: Nodes may compete for shared resources, leading to bottlenecks.
• Challenges:
• Load balancing issues.
• Resource allocation conflicts.

1/24/2025

You might also like