KEMBAR78
Intro Client Server Concepts Prof JM Wafula | PDF | Port (Computer Networking) | Computer Network
0% found this document useful (0 votes)
53 views61 pages

Intro Client Server Concepts Prof JM Wafula

Client/server systems use a client-server paradigm where client applications request services from server processes running on different computers connected by a network. Servers listen for requests from clients and perform tasks like database queries or file access. Common client applications include email and web browsers, while common servers provide services like email, web pages, and file storage. The domain name system (DNS) translates human-readable domain names to IP addresses to allow clients and servers to communicate over the internet.

Uploaded by

yessir
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)
53 views61 pages

Intro Client Server Concepts Prof JM Wafula

Client/server systems use a client-server paradigm where client applications request services from server processes running on different computers connected by a network. Servers listen for requests from clients and perform tasks like database queries or file access. Common client applications include email and web browsers, while common servers provide services like email, web pages, and file storage. The domain name system (DNS) translates human-readable domain names to IP addresses to allow clients and servers to communicate over the internet.

Uploaded by

yessir
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/ 61

Client/Server Systems

Overview
Prof Muliaro Wafula

Client Server Systems 1


Client-server paradigm
• Client-server paradigm is a form of communication

• Server application is ``listener'’


• Waits (passively) for incoming message
• Performs service
• Returns results
• Eg, a mail server’s function
is to receive, store and deliver e-mails.

• Client application establishes connection


• Sends message to server
• Waits for return message
• Eg, a mail client (also called a mailer or mail program mail application) is a software
that allows a user to manage, read, and compose e-mail.

Client Server Systems 2


Basics

• Network communication is mainly based upon the interaction


between the client and server.
• Heterogeneous computing is the term used for the description of
the client server interaction
• The three main components of any system are its hardware,
• software programs and operating system. The hardware platforms
must be able to support
• multiple operating system, networks and protocols.
• The OS must deal with logical connections not only between their
peer components, but with other OS.

Client Server Systems 3


Client Server Computing

• Client–server computing is a distributed computing model in which client


applications request services from server processes.
• Clients and servers typically run on different computers interconnected by a
computer network
• A client application is a process or program that sends messages to a server
via the network.
• Those messages request the server to perform a specific task, such as
looking up a customer record in a database or returning a portion of a file on
the server’s hard disk.
• The client manages local resources such as a display, keyboard, local disks,
and other peripherals
• The server process or program listens for client requests that are transmitted
via the network. Servers receive those requests and perform actions such as
database queries and reading files. Server processes typically run on
powerful PCs, workstations, or mainframe computers –Cloud Computing.

Client Server Systems 4


Characteristics of client
• Arbitrary application program
 Becomes client when network service is needed (Eg, a
sender’s computer becomes a client to a remote mail
server)
 Also performs other computations
• Invoked directly by user
• Runs locally on user's computer Initiates contact with server
• Can access multiple services (one at a time)
• Does not require special hardware or sophisticated
operating system

Client Server Systems 5


Characteristics of server
 Special purpose application dedicated to providing network
service
 Starts automatically at system initialization time (system boot)
 Runs on a remote computer (usually centralized, shared
computer)
 Waits for service requests from clients; loops to wait for next
request
 Will accept requests from arbitrary clients; provides one service
to each client
 May require powerful hardware and sophisticated operating
system

Client Server Systems 6


Types of Servers

• Repetitive/Iterative server:
• can process one request at a time.
• it receives a request, processes it, and sends the
response to the requestor before it handles
another request.
• Concurrent server:
• can process many requests at the same time.

Client Server Systems 7


Multiple servers for one service

• Responding to a client request may require significant time


• Other clients must wait while earlier requests are satisfied
• concurrent program - has > 1 thread of control
• concurrent server offers service to multiple clients at the
same time
• When a request arrives, the server assigns the request to a
thread of control that can execute concurrently with existing
threads
• In other words, multiple copies of a servers for a single
service can handle requests concurrently

Client Server Systems 8


Dynamic servers

• Concurrent server operates dynamically


• One way to run concurrent servers is to dynamically create
server processes for each client
• Parent (or Master) server accepts incoming requests and
starts Child (or slave) server for each client
• Child server handles subsequent requests from its client
• Parent server then waits for next request

Client Server Systems 9


Mapping request to target server
• How do incoming messages get delivered to the correct server?
• To allow a process to identify the other process with which it wants to
communicate some form of addressing is needed.
• Addressing: Each transport session has two unique identifiers
• (IP address, port number) on server
• (IP address, port number) on client
• A port number is a 16 bits number located in the TCP header
• port numbers 0 to 1,023 (controlled by IANA (Internet Assigned Numbers
Authority)) are reserved for `well-known` services like telnet and ftp
• port numbers 1,024 to 49,151 (not controlled by IANA, these ports can
only be registered with IANA)
• port numbers from 49,152 to 65,535 are ephemeral ports (Dynamic
and/or Private Ports) and can be used by any process.
• No two clients on one computer can use same source port
• Thus, client endpoints are unique, and server computer protocol software
can deliver messages to correct server process

Client Server Systems 10


Domain Name System (DNS)

• All applications use IP addresses through the TCP/IP protocol


software
• Difficult for humans to remember: 134.82.11.70

• The Domain Name System (DNS) provides translation


between symbolic names and IP addresses
• DNS is the naming scheme used in the Internet

Client Server Systems 11


Structure of DNS names

• Each name consists of a sequence of alphanumeric components


separated by periods
• Examples:
• www.jkuat.ac.ke
• www.google.com

Names are hierarchical, with most-significant component on the right


• Left-most component is computer name
• Domain name space: names are defined in an inverted-tree structure
with the root at the top
• the tree can have only 128 levels: level 0 (root) to level 127.

Client Server Systems 12


DNS naming structure
• Domain: a part of the computer naming hierarchy used in the Internet.
• Eg, commercial organization have names registered under the .com domain
• Top level domains (right-most components; also known as TLDs) defined by global authority

Client Server Systems 13


DNS and client-server computing

• DNS names are managed by a hierarchy of DNS servers


• Translates a name to an IP address, or
• Contains information that links to other DNS servers
• Hierarchy is related to DNS domain hierarchy
• Root server at top of tree knows about next level servers
• Next level servers, in turn, know about lower level servers

Client Server Systems 14


Name Servers
• Partition hierarchy into administrative authority responsible for portion of the
hierarchy

edu com gov mil org net uk fr

princeton … mit cisco … yahoo nasa … nsf arpa … navy acm … ieee

cs ee physics

ux01 ux04

Client Server Systems 15


2.2. Domain Name System (DNS)

• DNS Name Servers:


• maps domain name of a host to its IP address.
• hierarchically organized
• local name servers:
• located in the same domain as the host that make the DNS query.
• authoritative name servers:
• often located in the domain where the host that we queried is located.
• can perform name/address translation for that host’s name
• root name servers:
• contacted by local name server that can not resolve name
• give referral on which authoritative name servers to contact.

Client Server Systems 16


Telnet

• Telnet (TErminaL NETwork)


• the standard TCP/IP protocol for virtual terminal service by ISO.
• enables the establishment of a connection to a remote system in such a way
that the local terminal appears to be a terminal at the remote system.
• uses TCP service on the well-known port 23.

Client Server Systems 17


Telnet: How Remote Login Works

• Remote login follows the client-server


paradigm.
• The client:
• Is the application that uses TCP/IP
for making connection
• transforms the characters typed
by users to a universal character
set called Network Virtual
Terminal (NVT) characters.
• The server:
• Allows the user to interact with
the remote computer
• Sends output to the client

Client Server Systems 18


FTP

• FTP (File Transfer Protocol)


• the standard application for copying a file from one host to another.
• uses the client-server approach

Client Server Systems 19


How E-mail Works

• E-mail systems follow the client


server approach
• In sender’s computer, an email
program becomes a client
• contacts an e-mail server program
on the recipient’s computer
• transfer a copy of the message
• When the e-mail server receives a
message, it
• stores the message in the
recipient’s mailbox
• informs the recipient

Client Server Systems 20


SMTP

• SMTP (Simple Mail Transfer Protocol)


• the standard TCP/IP protocol for supporting electronic
mail on the Internet
• uses the TCP well-known port 25.
• SMTP client/server has two components:
• UA (User Agent) - prepares the message, creates the
envelope and puts the message in the envelope.
• MTA (Mail Transfer Agent) - transfers the mail across the
Internet.

Client Server Systems 21


Peer-to-peer Computing

• Peer-to-peer computing:
• Hosts or computers are linked together without a central
repository for applications.
• Hosts communicate with one another to share files.
• Each host can act both as client or server at the same
time.
• Example: Napster, Gnutella, Freenet

Client Server Systems 22


Multicast

• Multicast:
• sending of a packet from one sender to multiple receivers
with a single send operation
• involve one sender and multiple receivers - multicast group
• Example of multicast applications:
• sending time-critical, real-time stock quotes to clients
• news broadcast, video conferencing

Client Server Systems 23


Multicast

• Some reasons for using multicasting:


• to decrease the network load.
• E.g. in stock ticker applications which are required to
transmit packets to hundreds of stations.
• supports webcasting applications (audio and video
applications).
• E.g. one source sending real-time audio and video over
the Internet to one or more receivers
• client flexibility in joining and leaving a group makes the
variable membership much easier to handle.

Client Server Systems 24


Internet Telephony

• What is Internet Telephony?


• Definition: Internet telephony (IPT) is transport of telephone calls
over the Internet, no matter whether traditional telephony devices,
multimedia PCs or dedicated terminals take part in the calls and no
matter whether the calls are entirely or only partially transmitted
over the Internet.

Client Server Systems 25


Internet Telephony

• Also known as VoIP (Voice over IP) Telephony


• Refers to communications services - voice, fascimile, and/or
voice-messaging applications - that are transported via the
Internet rather than PSTN.
• Involves:
• conversion of the analog voice signal to digital format
• compression/translation of the signal into IP packets for transmission
over the Internet.
• the process is reversed at the receiving end.

Client Server Systems 26


Internet Telephony

• Benefits of IP Telephony
• Efficiency:
• Network unification & convergence
• Unify network operation, management and maintenance
• Better utilize available network resources
• Packetization allows transport of multiple media formats
• Ultimately delivering inexpensive calling
• Flexibility:
• Efficient, Colorful and Information-rich Communications
• Packetized voice can be mixed, maneuvered, and transported
together with other types of media enabling unlimited opportunities
for application innovation and value creation
• Simultaneous availability of rich and relevant information

Client Server Systems 27


Internet Telephony

• Connection configuration:
• PC-to-PC

• PC-to-Phone ITG

• via ITG = Internet Telephony Gateway


• Phone-to-Phone
ITG ITG

• Phone-to-PC
ITG

Client Server Systems 28


Internet Telephony
• Internet Telephony Gateway (ITG)
• takes the standard telephone signal, digitizes it, significantly compresses it,
packetizes it for the Internet using Internet Protocol (IP), and routes it to a
destination over the Internet.
• reverses the operation for packets coming in from the network and going out
the phone.
• both operations (coming from and going to the phone network) take place at
the same time, allowing a two-way conversation.

Phone Translation Internet


PSTN network function Internet
connection
connection

Client Server Systems 29


Internet Telephony

• Internet telephony applications:


• Unified messaging - voicemail2email.
• Adding Voice to the Interactive Online Gaming Experience

IP Network

Client Server Systems 30


Heterogeneous Computing
• Large organizations and smaller companies have many computer
systems installed in single and multiple sites.
• For Management Information Systems(MIS), the issue is how to make
all the systems communicate and interoperate with each other.
• For application developers the issue is to provide their software as on
as many platforms as possible and allow their applications to
communicate with each other.
• Heterogeneous computing is the term used to describe the diverse
computing environments.
• Many time organizations decide whether to purchase a software
systems based on these criteria:
• Is it compatible with our existing software and hardware?
• Will it integrate with our current platform?
• Will it integrate with platforms we intend to use in the future?

Client Server Systems 31


Cross-Platform computing

• An application program should run in more than a single platform.


There is a diversity of systems and it is the job of the application
developer to support each one.
• while doing so requires an increased amount of effort, the benefits
far outweigh the sacrifice and costs on the developers side.
• When creating a cross-platform application, developers has to face
many issues as follows.
1. The application must run on multiple platforms.
2. It must have same look and feel as on other platforms.
3. It must integrate with the native operating environment.
4. It must behave the same on all platforms
5. It must be maintained simply and consistently

Client Server Systems 32


Distributed computing
• Distributed computing involves distribution of work among more
than one machine.
• Distributed computing is processing work on behalf of client
machines.
• Distributed computing is client server computing with one client and
many servers.
• Advantages are increase of overall application throughput and the
ability to multitask is tremendous benefits for the user.
• Distributed computing is a complex architecture that allows all
system and network to operate as a whole.
• It involves re-architecture of applications, redeployment of systems
and increased difficulty in managing the network as a whole.

Client Server Systems 33


Cost of Client Server Computing

• The cost includes system support,


maintenance, and training,
labor costs.
• Labor costs compromise almost
half of the total costs of a client
server information system.

Client Server Systems 34


Benefits of Client Server Computing

1. Reduced total execution time.


2. Reduced client CPU usage.
3. Increased client CPU usage.
4. Reduced client memory usage.
5. Reduced network traffic.

Client Server Systems 35


Task allocation between Client and Server
SERVER
• The efficient execution components for the client server communication are:
Client:-
1. Presentation/Display
2. User Interaction
3. Application Logic
4. Request Formulation
Server:-
1. Queries against shared resources
2. Management: Application and data
3. Transaction processing
4. Centralized application logic
5. Communications
6. Computations

Client Server Systems 36


Client Server Implementation

• One of the keys to implementing successful client server applications


is the proper distribution of functionality and programs between the
client and the server machines.
• Choosing this application code mix is one of the most important
architectural challenges to client server development.
• The correct distribution of code will produce the most optimal
execution for both client and server.
• If either machine becomes overloaded, the benefits of the
technology are reduced.

Client Server Systems 37


File Server

• All the files reside on the server machine.


• File Server provides clients access to records within files from the
server machine.
• File Servers are useful for sharing files across a network among the
different client process requesting the services.
• The examples of File servers are:
1. UNIX: Network File Services (NFS) created by Sun Micro systems.
2. Microsoft Windows “Map Drive”
3. Samba: An open Source/Free Software suite that provides
seamless file
4. SMB/CIFS clients (i.e., Microsoft Windows clients).

Client Server Systems 38


Application Server

• This machine manages access to centralized application software; for


example, a shared database. When the user requests information
from the database, the application server processes the request and
returns the result of the process to the user

Client Server Systems 39


Directory Services Server

• It is found on large-scale systems with data that is distributed


throughout multiple servers.
• This machine functions as an organization manager, keeping track of
what is stored where, enabling fast and reliable access to data in
various locations.

Client Server Systems 40


Web Server

• This machine stores and retrieves Internet (and intranet) data for the
enterprise. Some documents, data, etc., reside on web servers.
• Web application provides access to documents and other data.
“Thin” clients typically use a web browser to request those
documents
• Such servers shares documents across intranets, or across the
Internet (or extranets).
• The most commonly used protocol is HTTP (Hyper Text Transfer
Protocol).
• Web application servers are now augmenting simple web servers.
The examples of web application servers are Microsoft’s Internet
Information Server (IIS), Netscape’s iPlanet IBM’s WebSphere, BEA’s
WebLogic and Oracle Application Server.

Client Server Systems 41


Database Server

• Data resides on server, in the form of a SQL database.


• Database server provides access to data to clients, in response to
SQL requests.
• It shares the data residing in a database across a network.
• Database Server has more efficient protocol than File Server.
• The Database Server receives SQL requests and processes them and
returning only the requested data; therefore the client doesn’t have
to deal with irrelevant data. However, the client does have to
implement SQL application code.
• The example of database server is: Oracle9i database server.

Client Server Systems 42


Transaction Servers

• The data and remote procedures reside on the server.


• The Server provides access to high level functions, and implements efficient
transaction processing.
• It shares data and high level functions across a network.
• Transaction servers are often used to implement Online Transaction
Processing (OLTP) in high-performance applications.
• A transaction server utilizes a more efficient protocol in comparison to a
Database Server. The transaction Server receives high-level function request
from the clients and it implements that function. Often it needs to return
less information to the client than a Database Server.
• Examples of the Transaction servers mainly categorized as
• TP-Light with Database Stored Procedures like Oracle, Microsoft SQL Server etc.
• TP-Heavy with TP Monitors like BEA Tuxedo, IBM CICS/TX Series.

Client Server Systems 43


Client/Server: Fat or Thin

• A Client or a Server is so named depending on the extent to which


the processing is shared between the client and server.
• A thin client is one that conducts a minimum of processing on the
client side while a fat client is one that carries a relatively larger
proportion of processing load.
• The concept of Fat Clients or Fat Servers is given by one of the
important criterion, that is, how much of an application is placed at
the client end vs. the server end.

Client Server Systems 44


Fat Clients

• This architecture places more application functionality on the client


machine(s).
• They are used in traditional of Client/Server models. Their use can be
a maintenance headache for Client/Server systems.

Client Server Systems 45


Fat Servers

• This architecture places more application functionality on the server


machine(s).
• Typically, the server provides more abstract, higher level services.
The current trend is more towards fat servers in Client/Server
Systems. In that case, the client is often found using a fast web
browser.
• The biggest advantage of using the fat server is that it is easier to
manage because only the software on the servers needs to be
changed, whereas updating potentially thousands of client machines
is a real headache.

Client Server Systems 46


Client/Server: Stateless or Stateful

• A stateless server is a server that treats each request as an independent


• transaction that is unrelated to any previous request.
• The biggest advantage of stateless is that it simplifies the server design
because it does not need to dynamically allocate storage to deal with
conversations in progress or worry about freeing it if a client dies in mid-
transaction.
• One disadvantage is that it may be necessary to include more information in
each request and this extra information will need to be interpreted by the
server each time.
• An example of a stateless server is a World Wide Web server. With the
exception of cookies, these take in requests (URLs) which completely specify
the required document and do not require any context or memory of
previous requests.
• Contrast this with a traditional FTP server which conducts an interactive
session with the user.
• A request to the server for a file can assume that the user has been
authenticated and that the current directory and file transfer mode have
been set.

Client Server Systems 47


Stateful Server

• Client data (state) information are maintained by server on status of


ongoing interaction with clients and the server remembers what
client requested previously and at last maintains the information as
an incremental reply for each request.
• The advantages of stateful server is that requests are more efficiently
handled and are of smaller in size.
• Some disadvantages are their like state information becomes invalid
when messages are unreliable. Another disadvantage is that if clients
crash (or reboot) frequently, state information may exhaust server’s
memory..

Client Server Systems 48


Stateless vsStateful Servers

1. A stateful server remembers client data (state) from one request


to the next.
2. A stateless server keeps no state information. Using a stateless file
server, the client must specify complete file names in each request
specify location for reading or writing and re-authenticate for each
request.
3. Using a stateful file server, the client can send less data with each
request. A stateful server is simpler.
4. On the other hand, a stateless server is more robust and lost
connections can’t leave a file in an invalid state rebooting the
server does not lose state information rebooting the client does
not confuse a stateless server.

Client Server Systems 49


Networking

Modes of connection
• Communication over a network can be classified into two types:
• circuit-switched-In this network, a dedicated channel exists to the remote
machine
• packet-switched
• Connections are shared in this type of network. Data that is
transported across the network is broken up into chunks called
packets. Because packets from different sources (and to different
destinations) are now intermixed, each packet must contain the
address of the destination

Client Server Systems 50


Protocol

• The instructions and conventions needed


for successful communication is known as
a protocol.
• The most popular model of guiding
(not specifying) protocol layering is the
OSI Reference Model

Qn. Explain functions of every Layer


Qn. Describe all network topologies

Client Server Systems 51


Transmission Network

• Baseband
– All nodes share access to network media on an equal basis
– Data uses entire bandwidth of media
• Broadband
– Data takes segment of media by dividing media into channels
(frequency bands)

Client Server Systems 52


Baseband: Ethernet

• Standardized by IEEE as 802.3 standard


• Speeds: 100 Mbps - 1 Gbps typical today
– Ethernet: 10 Mbps
– Fast Ethernet: 100 Mbps
– Gigabit Ethernet: 1 Gbps
– 10 Gbps, 100 Gbps
• Network access method is Carrier Sense Multiple Access with Collision
Detection (CSMA/CD)
– Node first listens to network to see if busy
– Send
– Sense if collision occurred
– Retransmit if collision

Client Server Systems 53


Client – Server Communication

• Send messages to applications


– not just machines
• Client must get data to the desired process
– server process must get data back to client process
• To offer a service, a server must get a transport address for a
particular service
– well-defined location

Client Server Systems 54


Machine address vsTransport address

Transport provider:
• Layer of software that accepts a network message and sends it to a
remote machine

Two categories:
• connection-oriented protocols
• connectionless protocols

Client Server Systems 55


Connection-oriented Protocols

1. establish connection
2. [negotiate protocol]
3. exchange data
4. terminate connection

Client Server Systems 56


Connectionless Protocols

• no call setup
• -send/receive data (each packet addressed)
• no termination

datagram service
– client is not positive whether message arrived at destination
– no state has to be maintained at client or server
– cheaper but less reliable than virtual circuit service

Client Server Systems 57


Eg Ethernet

• Layers 1 & 2 of OSI model


– Physical ( Layer 1)
Cables: 10Base-T, 100Base-T, 1000Base-T, etc.
• Data Link (Layer 2)
• Ethernet bridging (via bridges)
• Data frame parsing
• Data frame transmission
• Error detection
• Unreliable, connectionless communication

Client Server Systems 58


Internet Protocol (IP)

• Connectionless protocol designed to handle the interconnection of a


large number of local and wide-area networks that comprise the
internet
• IP can route from one physical network to another
• Each machine on an IP network is assigned a unique 32-bit number
for each network interface:
– IP address, not machine address
• A machine connected to several physical networks will have several
IP addresses
– One for each network

Client Server Systems 59


IPv6 vs. IPv4

IPv4
– 4 byte (32 bit) addresses

IPv6:
– 16-byte (128 bit) addresses
3.6 x 1038 possible addresses
8 x 1028 times more addresses than IPv4

Client Server Systems 60


OSI Ref
Model

Client Server Systems 61

You might also like