CSC322-Lect 1-Introduction to Network and Distributed System
CSC322-Lect 1-Introduction to Network and Distributed System
By
Dr Peter Maina Mwangi
Lecturer
Overview
❑Basic networking concepts (OSI model, TCP/IP
stack).
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
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)
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).
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.
Remote Procedure Call Remote execution of procedures gRPC, Thrift Microservices communication
Communication between
Object-Oriented Middleware Java RMI, CORBA Distributed object systems
distributed objects
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
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.
3. Replication Transparency: Users are unaware of resource duplication for fault tolerance or
scalability.
1. Example: Distributed databases with multiple replicas.
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:
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:
1/24/2025
Cont.
• Service-Oriented Architecture (SOA):
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.
• Resource Sharing: Distributed systems allow resources like data, storage, and
computing power to be shared across nodes, increasing efficiency and
reducing costs.
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