10
Chapter 26 Client Chapter 26 Client Server Interaction Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one computer initiates communication and the other computer accepts the contact request.

Client Server Interaction

  • Upload
    ceh

  • View
    237

  • Download
    0

Embed Size (px)

DESCRIPTION

CSI

Citation preview

  • Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one computer initiates communication and the other computer accepts the contact request.

  • Client-Server Paradigm A server is an application program that waits passively for contacta client is an application program that actively initiates communication with a server. A server application that expects communication must interact with protocol software before an external source (client) attempts to communicate(fig 26.1).server application notifies the local protocol software that a specific type of message is expectedserver application then waits for a client application to actively initiate interaction

  • Server Software a special-purpose, privileged program dedicated to providing one service, but can handle multiple remote clients at the same time.is invoked automatically when a system bootsruns on a shared computer that has powerful hardware and sophisticated operating systemwaits passively for contact from any remote clientaccepts contact from clients, but offers a single service Eg. Telnetd, ftpd, named, httpd

  • Client Software An application program that becomes a client temporarily when remote access is needed.Invoked by a user, and executes for only one sessionRuns locally on users computerActively initiates contact with serverDoes not require sophisticated operating system

  • Direction of Data Flow a client usually sends a request to a server, and the server returns a response to the client. Its possible for the client to send one request and the server to send a response and continuous updates (eg. Weather program)Its possible for server to export and import information (eg. File server)Hence, information can flow in either or both directions between a client and server.

  • Client/Server Interaction with Transport Layer Protocol Transport protocols (eg. TCP, UDP) assign each service a unique identifier. Both clients and servers specify the service identifier protocol software uses the identifier to direct each incoming request to the correct server application(fig 26.2)

  • TCP Port NumberTCP uses a 16-bit integer known as protocol port numbers to identify services. A unique port number is assigned to each serviceA server specifies the port number for the service it offers. A client specifies the port number of the desired service when sending a requestTCP software uses the port number in an incoming message to determine which server to receive the request.well-known port numbers

  • Handling Multiple ClientsA concurrent (mutitasking) file server can handle multiple clients simultaneously. A separate copy (process or thread) of the server handles each request. Each new request is handle by forking a new child process while the parent process waits for new requests.

  • Source and Destination PortsEach client application is assigned a port number in SOURCE port field and a port number of the server in the DESTINATION port field. TCP software on the servers machine uses the combination of client and server port numbers (as well as client and server IP addresses) to choose the correct copy of a concurrent server

  • TCP vs. UDPClients and servers can use either connection-oriented (eg. TCP) or connectionless (eg. UDP) transport protocols to communicate. Some servers may support both TCP and UDP