Application Layer 1 CNS
Application Layer 1 CNS
Client-Server Architecture
• Definition: In a client-server model, clients request services, and
the server responds by providing them. The server is a centralized
entity that handles all the processing and resource distribution.
Characteristics:
•Server: Always on, awaiting requests.
•Client: Requests services from the server.
•Scalability: Can be an issue as the server needs more resources to handle a
growing number of clients.
Examples:
•Fault Tolerance: No single point of failure; if one peer disconnects, others can still
share resources.
Disadvantages:
•Security: Difficult to secure and manage because there’s no centralized control over
what peers share.
•Performance Variability: As peer availability and bandwidth vary, the quality of
service can fluctuate.
Hybrid Architectures
•Some systems use a combination of client-server and P2P models to
benefit from both architectures.
• Example: Modern VoIP services like Zoom use a central server for
authentication and control but establish P2P connections for actual
voice or video transmission when possible.
Process communication in networking refers to how two programs
(processes) on different devices communicate across a network to
exchange information. This involves sending and receiving data over a
network.
Sockets
Definition:
A socket is the interface between a process and the network that enables
communication. It is the endpoint for sending and receiving data across the
network.
Socket Programming:
• Programs (like web browsers or servers) use sockets to communicate
with other processes.
• The Socket API allows applications to create, use, and manage
sockets for network communication.
Socket Types:
•Stream Sockets (TCP): Used for reliable, connection-oriented
communication (e.g., HTTP, FTP).
•Datagram Sockets (UDP): Used for connectionless, unreliable
communication (e.g., DNS, video streaming).
Addressing in Process Communication
For two processes to communicate, they need to know each other’s
address, which includes both the IP address and port number:
IP Address:
•Uniquely identifies a device (host) on the network.
•IPv4 (e.g., 192.168.1.1) and IPv6 (e.g.,
2001:0db8::85a3:0000:0000:8a2e:0370:7334) are used for identifying
devices.
Port Numbers:
1. Identify specific applications or services running on a host.
2. Well-known Ports:
1. Port 80: HTTP (web traffic).
2. Port 443: HTTPS (secure web traffic).
3. Port 21: FTP.
3. Dynamic/Private Ports: Typically assigned by the OS for client
processes.
Combination:
•The combination of an IP address and a port number is called a socket
address (or endpoint), which uniquely identifies where communication
should be directed.
•Example: 192.168.1.100:80 indicates an HTTP service (port 80) on
the device with IP 192.168.1.100