1 Chapter 28-29 Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.

Slides:



Advertisements
Similar presentations
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Advertisements

CCNA – Network Fundamentals
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Chapter 7 Protocol Software On A Conventional Processor.
Slide 1 Client / Server Paradigm. Slide 2 Outline: Client / Server Paradigm Client / Server Model of Interaction Server Design Issues C/ S Points of Interaction.
CS335 Networking & Network Administration Tuesday, May 25, 2010.
Distributed Computing. Spring 2002Computer Networks Applications Networking Master-slave: A large, central computer controls small I/O devices Peer-to-peer.
Socket Programming.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
COS 420 DAY 25. Agenda Assignment 5 posted Chap Due May 4 Final exam will be take home and handed out May 4 and Due May 10 Latest version of Protocol.
Chapter 25 Internet Routing Internetworking Technology How routing tables are built initially How routing software updates the tables as needed. Propagation.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints Adapted from the notes By Lami Kaya, © 2009 Pearson Education.
What Is TCP/IP? The large collection of networking protocols and services called TCP/IP denotes far more than the combination of the two key protocols.
Client Server Model and Software Design TCP/IP allows a programmer to establish communication between two application and to pass data back and forth.
I NTRODUCTION OF S OCKET P ROGRAMMING L.Aseel AlTurki King Saud University.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
CSIT 320 (Blum)1 Client-Server Interaction Based on Appendix 1 in Computer Networks and Internets, Comer.
Process-to-Process Delivery:
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 Transport Layer Computer Networks. 2 Where are we?
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 3.1 Internet Applications Ch. 31,32,34 (DNS, , TELNET, FTP)
TCP/IP: Basics1 User Datagram Protocol (UDP) Another protocol at transport layer is UDP. It is Connectionless protocol i.e. no need to establish & terminate.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
1 Computer Networks DA Chapter 1-3 Introduction.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Chapter Three Network Protocols By JD McGuire ARP Address Resolution Protocol Address Resolution Protocol The core protocol in the TCP/IP suite that.
Internet Applications and Network Programming Dr. Abraham Professor UTPA.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
User Datagram Protocol (UDP) Chapter 11. Know TCP/IP transfers datagrams around Forwarded based on destination’s IP address Forwarded based on destination’s.
FALL 2003CSI 4118 – UNIVERSITY OF OTTAWA1 Part 3.1 Internet Applications Ch. 28,… (Client-Server Concept, Use of Protocol Ports, Socket API, DNS, ,
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
Chapter 2 Applications and Layered Architectures Sockets.
The Socket Interface Chapter 21. Application Program Interface (API) Interface used between application programs and TCP/IP protocols Interface used between.
The Socket Interface Chapter 22. Introduction This chapter reviews one example of an Application Program Interface (API) which is the interface between.
Client-Server Model of Interaction Chapter 20. We have looked at the details of TCP/IP Protocols Protocols Router architecture Router architecture Now.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 3.1 Internet Applications Ch. 28,… (Client-Server Concept, Use of Protocol Ports, Socket API)
Chapter 27 Socket API Interface The interface between an application program and the communication protocols in an operating system is known as the Application.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Part 4: Network Applications Client-server interaction, example applications.
The Client Server Model And Software Design
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Berkeley Socket Abstraction
File Transfer And Access (FTP, TFTP, NFS). Remote File Access, Transfer and Storage Networks For different goals variety of approaches to remote file.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
UDP: User Datagram Protocol Chapter 12. Introduction Multiple application programs can execute simultaneously on a given computer and can send and receive.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
1 K. Salah Application Layer Module K. Salah Network layer duties.
Process-to-Process Delivery:
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Chapter 11 User Datagram Protocol
Boots Cassel Villanova University
Chapter 3 Internet Applications and Network Programming
File Transfer and access
NET323 D: Network Protocols
Client-Server Interaction
Interacting With Protocol Software
NET323 D: Network Protocols
Process-to-Process Delivery:
Internet Applications & Programming
Process-to-Process Delivery: UDP, TCP
Exceptions and networking
Presentation transcript:

1 Chapter Client-Server Interaction

2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer  Abstractions  Files  Services  Databases  Names

3 Dichotomy of Duties  Network  Transfers bits  Operates at application’s request  Applications determine  What to send  When to send  Where to send  Meaning of bits

4 Important Point Although an internet system provides a basic communication service, the protocol software cannot initiate contact with, or accept contact from, a remote computer. Instead, two application programs must participate in any communication: one application initiates communication and the other accepts it.

5 How Two Application Programs Make Contact  One application  Begins execution first  Waits passively at prearranged location  Another application  Begins execution later  Actively contacts first program  Called client-server interaction

6 Client-Server Paradigm  Used by all network applications  Passive program called a server  Active program called a client

7 Internet Communication All network applications use a form of communication known as the client-server paradigm. A server application waits passively for contact, while a client application initiates communication actively. If both parties are equal, you may have a peer-to-peer solution

8 Characteristics of a Client  Arbitrary application program  Becomes client temporarily  Can also perform other computations  Invoked directly by user  Runs locally on user’s computer  Actively initiates contact with a server  Contacts one server at a time

9 Characteristics of a Server  Special-purpose, privileged program  Dedicated to providing one service  Can handle multiple remote clients simultaneously  Invoked automatically when system boots  Executes forever  Needs powerful computer and operating system  Waits passively for client contact  Accepts requests from arbitrary clients

10 Terminology  Server  An executing program that accepts contact over the network  Server-class computer  Hardware sufficient to execute a server  Informally  Term server often applied to computer

11 Direction of Data Flow  Data can flow  From client to server only  From server to client only  In both directions  Application protocol determines flow  Typical scenario  Client sends request(s)  Sever sends response(s)

12 Key Idea Although the client initiates contact, information can flow in either or both directions between a client and server. Many services arrange for the client to send one or more requests and the server to return one response for each request.

13 Clients, Servers, and Other Protocols  Clients and servers are application programs

14 Server CPU Use  Facts  Server operates like other applications  Uses CPU to execute instructions  Performs I/O operations  Waiting for data to arrive over a network does not require CPU time  Consequence  Server program only uses CPU when servicing a request

15 Multiple Services  Can have multiple servers on single computer  Servers only use processor when handling a request  Powerful hardware required to handle many services simultaneously

16 Illustration of Multiple Servers  Each server offers one service  One server can handle multiple clients

17 Identifying a Service  Protocol port number used  Each service given unique port number, P  Server  Informs OS it is using port P  Waits for requests to arrive  Client  Forms request  Send request to port P on server computer

18 The Point About Ports Transport protocols assign each service a unique port identifier. A server must specify the identifier when it begins execution. A client must specify the identifier when it requests transport protocol software to contact a server. Protocol software on the server computer uses the identifier to direct an incoming request to the correct server.

19 In Theory  Port numbers are merely integers  Any server could use any port number

20 In Practice  Protocol port numbers used as service identifiers  Need uniform numbering  To allow arbitrary client to contact server on arbitrary machine  To avoid inventing “directory assistance” mechanism  Port numbers  Uniform throughout Internet  Set by standards bodies (IANA – Internet Assigned Numers Authority)

21 Assigned port numbers  The port numbers are divided into three ranges:  The Well Known Ports,  The Registered Ports,  The Dynamic and/or Private Ports, –  Numbers primarily assigned for TCP. UDP for most part uses the same numbers 

22 Terminology  Sequential program  Typical of most programs  Single thread of control  Concurrent program  Multiple threads of control  Execution proceeds “in parallel”  More difficult to create

23 Servers and Concurrency  Sequential server  Also called iterative  Handles one request at a time  Concurrent server  Can handle multiple requests at a time  No waiting

24 Delay in Servers  Concurrent server  Server creates new thread of control to handle each request  Client only waits for its request to be processed  Sequential server  Client waits for all previous requests to be processed as well as for its request to be processed  Unacceptable to user if long request blocks short requests

25 Concurrency in Servers Concurrent execution is fundamental to servers because concurrency permits multiple clients to obtain a given service without having to wait for the server to finish previous requests. In a concurrent server, the main server thread creates a new service thread to handle each client.

26 Protocol Ports and Concurrent Servers  Apparent problem  One port number assigned to each service  Concurrent server has multiple copies (threads) running  Client and server may interact  Messages sent to server’s port must be delivered to correct copy

27 Protocol Ports and Concurrent Servers (continued)  Solution to problem: use information about client as well as server to deliver incoming packets  TCP uses four items to identify connection  Server’s IP address  Server’s protocol port number  Client’s IP address  Client’s protocol port number

28 Demultiplexing in a Concurrent Server Transport protocols assign an identifier to each client as well as to each service. Protocol software on the server’s machine uses the combination of client and server identifiers to choose the correct copy of a concurrent server.

29 Variations on a Theme  A server can use  Connectionless transport (UDP)  Connection-oriented transport (TCP)  Both for a single service  A single server can offer multiple services  Often used for “trivial” services  Server uses multiple port numbers simultaneously

30 Variations on a Theme (cont)  A server can  Maintain interaction with a client for days or hours  Send a short response and terminate interaction  Perform I/O on the local computer  Become a client for another service (potential cycle problem)

31 Example of Circularity  Time server  Returns time of day  File server  Allows client to read or write a file  Calls time server when generating time stamp for file  Suppose programmer modifies time server to log requests to a file

32 Interacting with Protocol Software  Client or server uses transport protocols  Protocol software inside OS  Applications outside OS  Mechanism needed to bridge the two  Called Application Program Interface (API)

33 Application Program Interface  Part of operating system  Permits application to use protocols  Defines  Operations allowed  Arguments for each operation

34 Socket API  Originally designed  For BSD UNIX  To use with TCP/IP protocols  Now  Industry standard  Available on many operating systems

35 Sockets and Socket Libraries A socket library can provide applications with a socket API on a computer system that does not provide native sockets. When an application calls one of the socket procedures, control passes to a library routine that makes one or more calls to the underlying operating system to implement the socket function.

36 Socket  OS abstraction (not hardware)  Created dynamically  Persists only while application runs  Referenced by a descriptor

37 Descriptor  Small integer  One per active socket  Used in all operations on socket  Generated by OS when socket created  Only meaningful to application that owns socket  In UNIX, integrated with file descriptors