Lecture 2 Introduction To Client Server Computing

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

INTE 321/COMP 322

DISTRIBUTED SYSTEMS

Lecture 1: Introduction to client server sysem

Prof S Karume
Presentation Outline
• Review of lecture 1
• Introduction to client server (videos – 24
minutes)
• Characteristics of Distributed Systems
• Example Distributed Systems
• Challenges of Distributed Systems
• Summary
Review of Lesson 1
• What are distributed systems
• What is a centralized system
• Difference between the two
• Why we need distributed systems
• Consequences of distributed system
• Goals of distributed systems
• Characteristics of distributed systems
• Examples of selected applications of distributed systems
• Challenges of application of distributed systems
Introductory videos
• https://www.youtube.com/watch?v=L5BlpPU_muY

• https://www.youtube.com/watch?v=eesqK59rhGA

• https://www.youtube.com/watch?v=Zfmk0GtANNs

• https://www.youtube.com/watch?v=eVYsIolL2gE - sockets

• https://www.youtube.com/watch?v=LtXEMwSG5-8 --- sockets


Introduction
• Internet and WWW have emerged as global
ubiquitous media for communication and are
changing the way we conduct science,
engineering, and commerce
• They are also changing the way we learn, live,
enjoy, communicate, interact, engage, etc. It
appears like the modern life activities are getting
completely centered around the Internet

5
Internet Applications Serving Local and
Remote Users
PC client

Internet
Server
Local Area Network

PDA

6
Increasing Demand for Internet Applications
• To take advantage of opportunities presented by the
Internet, businesses are continuously seeking new
and innovative ways and means for offering their
services via the Internet.
• This created a huge demand for software designers
with skills to create new Internet-enabled
applications or migrate existing/legacy applications
to the Internet platform.
• Client Server applications is one architecture for
creating web enabled applications

7
Elements of Client-Server
Computing/Communication
a client, a server, and network

t
ues
req

result
network

client
server

• Client server application is an application that enable the client and the server to
communicate either in a distributed environment or on same computer
• Processes follow protocols that define a set of rules that must be observed by participants:
8
How client server system works
the clients requests a resource and the server
provides that resource. A server may server
multiple clients at the same time while a client is
in contact with only one server. Both the client
and server usually communicate via a computer
network but sometimes they may reside in the
same system
• Main Components
• Client
• Server
• Network / internet (network of
networks)

9
Client Server Components
explained
Client is the hardware and software that enable user to request a service or a
resource form a server

Server is the software responsible for processing the client request e.g web server
(www or HTTPD demon in apache)

Network / internet (network of networks) the communication medium between the


server and the client

Middleware is software that runs between client and server processes. It is the "glue"
between the client and server, which makes it possible for them to communicate to
each other. Middleware is written in such a way that the user never notices it's
presence. It delivers secure and transparant services to users. (e.g RPC, ORB, )

10
Networking Basics
TCP/IP Stack
• Physical/Link Layer
• Functionalities for transmission of signals representing a stream of Application
data from one computer to another
(http,ftp,telnet,…)
• Internet/Network Layer
• IP (Internet Protocols) – a packet of data to be addressed to a Transport
remote computer and delivered
(TCP, UDP,..)
• Transport Layer
• Functionalities for delivering data packets to a specific process on a
Internet/Network
remote computer (IP,..)
• TCP (Transmission Control Protocol)
• UDP (User Datagram Protocol) Physical/Link
• Programming Interface: (device driver,..)
• Sockets
• Applications Layer
• Message exchange between standard or user applications:
• HTTP, FTP, Telnet, Skype,…

11
Networking Basics
• TCP (Transmission Control • TCP/IP Stack
Protocol) is a connection-
oriented communication
protocol that provides a Application
reliable flow of data between (http,ftp,telnet,…)
two computers. Transport
• Analogy: Speaking on Phone (TCP, UDP,..)

• Example applications: Internet/Network


• HTTP, FTP, Telnet (IP,..)
• Skype uses TCP for call signalling, Physical/Link
and both UDP and TCP for (device driver,..)
transporting media traffic.

12
Networking Basics
• UDP (User Datagram Protocol) • TCP/IP Stack
is a connectionless
communication protocol that
sends independent packets of
data, called datagrams, from Application
one computer to another with no (http,ftp,telnet,…)
guarantees about arrival or Transport
order of arrival
(TCP, UDP,..)
• Similar to sending multiple
emails/letters to friends, each Network
containing part of a message. (IP,..)
• Example applications: Link
• Clock server (device driver,..)
• Ping
• Live streaming (event/sports
broadcasting) 13
TCP Vs UDP Communication

A … B

 Connection-Oriented Communication

A
… B

 Connectionless Communication

14
Understanding Ports
• The TCP and UDP P
o TCP
server
protocols use ports r Client
t
to map incoming
data to a particular
process running on
a computer. app app app app

port port port port


TCP or UDP
Packet
Data 15 port# data
Understanding Ports
• Port is represented by a positive (16-bit) integer value
• Some ports have been reserved to support common/well known services:
• HTTP 80/http
• ftp 21/tcp
• telnet 23/tcp
• smtp 25/tcp
• login 513/tcp
• User-level processes/services generally use port number value >= 1024

16
Sockets
• Sockets provide an interface for programming networks at the transport layer
• Network communication using Sockets is very much similar to performing file
I/O
• In fact, socket handle is treated like file handle.
• The streams used in file I/O operation are also applicable to socket-based I/O
• Socket-based communication is programming language independent.
• That means, a socket program written in Java language can also communicate to a
program written in Java or non-Java socket program

17
Socket Communication
• A server (program) runs on a specific
computer and has a socket that is bound
to a specific port. The server waits and
listens to the socket for a client to make
a connection request.

Connection request
port

server Client

18
Socket Communication
• If everything goes well, the server accepts the connection. Upon acceptance, the
server gets a new socket bounds to a different port. It needs a new socket
(consequently a different port number) so that it can continue to listen to the original
socket for connection requests while serving the connected client.

port

server

port
Client
port Connection

19

You might also like