Client-Server Model of Interaction Chapter 20. We have looked at the details of TCP/IP Protocols Protocols Router architecture Router architecture Now.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

Routing: Cores, Peers and Algorithms
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Slide 1 Client / Server Paradigm. Slide 2 Outline: Client / Server Paradigm Client / Server Model of Interaction Server Design Issues C/ S Points of Interaction.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
Chapter 25 Internet Routing Internetworking Technology How routing tables are built initially How routing software updates the tables as needed. Propagation.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
© 2007 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets with Internet Applications, 4e By Douglas.
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 1 Let’s get started. Let’s start by selecting an architecture from among.
Chapter 23: ARP, ICMP, DHCP IS333 Spring 2015.
Host Configuration: BOOTP and DHCP
COS 420 DAY 22. Agenda Assignment 4 Corrected 2 B’s Assignment 5 posted Chap Due May 4 Final exam will be take home and handed out May 4 and Due.
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.
Copyright 2003 CCNA 1 Chapter 7 TCP/IP Protocol Suite and IP Addressing By Your Name.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Electronic Mail (SMTP, POP, IMAP, MIME)
21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping.
Layering and the TCP/IP protocol Suite  The TCP/IP Protocol only contains 5 Layers in its networking Model  The Layers Are 1.Physical -> 1 in OSI 2.Network.
Mapping Internet Addresses to Physical Addresses (ARP)
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
1 Internet Protocol: Forwarding IP Datagrams Chapter 7.
Determining an Internet Address at Startup
Bootstrap and Autoconfiguration (DHCP)
1 Transport Layer Computer Networks. 2 Where are we?
23-Support Protocols and Technologies Dr. John P. Abraham Professor UTPA.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Firewall and Internet Access Mechanism that control (1)Internet access, (2)Handle the problem of screening a particular network or an organization from.
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.
© 2002, Cisco Systems, Inc. All rights reserved..
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Bootstrap and Autoconfiguration Chapter 23. Introduction Each computer attached to a TCP/IP internet needs to know: –its IP address –the address of a.
User Datagram Protocol (UDP) Chapter 11. Know TCP/IP transfers datagrams around Forwarded based on destination’s IP address Forwarded based on destination’s.
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
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.
File Transfer And Access Chapter 26 Chapter 26 Group 3 Presentation Deepak Mittal Nishit Ranjan Venugopal Janapati Amit Palshikar Ref: Internetworking.
1 Network Layer Lecture 12 Imran Ahmed University of Management & Technology.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Distributed Computing A Programmer’s Perspective.
TCP/IP (Transmission Control Protocol / Internet Protocol)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 3.1 Internet Applications Ch. 28,… (Client-Server Concept, Use of Protocol Ports, Socket API)
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
Chapter 22 Bootstrap and Auto configuration (DHCP) History of Bootstrap -Bootstrap is used to assign IP address to the computer. -Constant changes in the.
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.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
The Client Server Model And Software Design
Mapping IP Addresses to Hardware Addresses Chapter 5.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Multicasting  A message can be unicast, multicast, or broadcast. Let us clarify these terms as they relate to the Internet.
Reading TCP/IP Protocol. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also.
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.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Chapter 5. An IP address is simply a series of binary bits (ones and zeros). How many binary bits are used? 32.
Process-to-Process Delivery:
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
Chapter 11 User Datagram Protocol
IP: Addressing, ARP, Routing
Chapter 3 Internet Applications and Network Programming
BOOTP and DHCP Objectives
Client-Server Interaction
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Computer Networks DA2402.
Presentation transcript:

Client-Server Model of Interaction Chapter 20

We have looked at the details of TCP/IP Protocols Protocols Router architecture Router architecture Now want to look at application programs that use a TCP/IP internet Example applications are practical & interesting Example applications are practical & interesting But…focus instead on the patterns of interaction among the cooperating applications But…focus instead on the patterns of interaction among the cooperating applications Primary one is client-server paradigm Primary one is client-server paradigm Forms basis of most network communications Foundation for distributed algorithms See basic model here; later chapters show use in specific applications

Client-Server Model Server Any program that offers a service that can be reached over a network Any program that offers a service that can be reached over a network Accepts a request Performs it service Returns the result to the requester For simple services, each request is a single IP datagram; response is another datagram For simple services, each request is a single IP datagram; response is another datagram

Client An executing program that sends a request to a server and waits for a response An executing program that sends a request to a server and waits for a responseClient-server: Extension of interprocess communication on single machine Extension of interprocess communication on single machine Servers can be simple or complex Time-of-day server: returns current time Time-of-day server: returns current time Web-server: fetches a copy of a web page Web-server: fetches a copy of a web page

Servers are usually application programs Execute on any machine supporting TCP/IP Execute on any machine supporting TCP/IP Timesharing system or a PC Timesharing system or a PC Multiple servers can offer the same service Multiple servers can offer the same service Can be on same machine or on multiple machines Copies on independent machines increase reliability “Server” can be applied to a machine When the computer’s primary purpose is to support a particular server program When the computer’s primary purpose is to support a particular server program

Example: UDP Echo Server Simplest form of client-server interaction uses unreliable datagram delivery UDP echo server UDP echo server Echo server process gets use of UDP echo port Enters infinite loop Wait for datagram Wait for datagram Reverse source and destination addresses Reverse source and destination addresses Return the datagram to the original sender Return the datagram to the original sender Echo client is somewhere else Gets unused UDP port, sends UDP msg to echo server, waits Gets unused UDP port, sends UDP msg to echo server, waits

Figure 20.1

Two points generally true of client-servers 1 - Operation 1 - Operation Server starts execution before interaction begins Accepts requests and sends responses w/o terminating Accepts requests and sends responses w/o terminating Client makes request and awaits response Terminates after using server a finite number of times Terminates after using server a finite number of times 2 - Location 2 - Location Server waits for requests at well-know port Reserved for the service it offers Reserved for the service it offers Client allocates an arbitrary, unused, nonreserved port

Time and Date Service Time server Used to set a computer’s time-of-day clock Used to set a computer’s time-of-day clock Hardware device that keeps current date and time Can do manually Can do manually Type in time and date when system boots Use client-server interaction to do automatically Use client-server interaction to do automatically Configure one machine manually All others contact server when they boot

Representation for the date and time Many store time and date from an epoch Many store time and date from an epoch Use count of seconds since the epoch date UNIX OS uses January 1, 1970 TCP/IP defines epoch as January 1, 1900 Reports time as seconds past the epoch Reports time as seconds past the epoch Time is 32-bit integer Time is 32-bit integer Representation is compact Representation is compact Allows easy comparison Ties together date and time of day Measure time by incrementing single binary integer

Timer server interaction Interaction with time service like echo server Interaction with time service like echo server Server sits at well known port Waits for UDP message Responds with UDP message containing 32-bit current time

The Complexity of Servers Sequential servers are simple Process one request at a time Process one request at a time Assume OS queues the requests if server busy Assume OS queues the requests if server busy Queue will not get too long since work is trivial Usually more complex than that Usually more complex than that Must accommodate multiple concurrent requests Server typically has two parts Single master program to accept new requests Single master program to accept new requests Set of copies to handle individual requests Set of copies to handle individual requests

Server performs following steps: Open port Open port Opens the well-known port where it can be reached Wait for client Wait for client Start copy Start copy Invoke independent, concurrent copy of itself Copy handles the one request then terminates Continue Continue Go to wait state while new copy handles request

Processing requests proceeds concurrently New copy for each request New copy for each request Short requests finish earlier than long requests Short requests finish earlier than long requests Independent of the order in which they are started Advantage of concurrent server: Speed Speed Disadvantage of concurrent server: Complexity (more difficult to construct) Complexity (more difficult to construct)

Other forms of complexity arise as well Must enforce authorization & protection rules Must enforce authorization & protection rules Server programs execute with highest privilege Cannot blindly honor requests from other sites Must protect themselves against errors Must protect themselves against errors May get malformed requests May get requests that cause them to abort

Maybe client will not know server address When booting, can use DHCP to obtain an address When booting, can use DHCP to obtain an address But does not know address of DHCP server But does not know address of DHCP server For protocols where client does not know the address of a server, the client-server paradigm permits client to broadcast requests For protocols where client does not know the address of a server, the client-server paradigm permits client to broadcast requests Broadcasting a Request

Alternatives to Client-Server ARP protocol (Chap 5) Clients ask for information Clients ask for information ARP minimizes such interactions ARP minimizes such interactions Uses cache of answers to improve later queries Improves performance when recent history of queries is a good indicator of future use Does not change essence of client-server interaction Program executes until needs information Program executes until needs information Then becomes client to obtain the information Then becomes client to obtain the information Caching lowers the cost for all except the first process Caching lowers the cost for all except the first process

How to lower cost for the first request? In a distributed system, do precollection In a distributed system, do precollection Background activities collect and propagate information before any program requests it Basis for UNIX ruptime command Basis for UNIX ruptime command Reports CPU load and time since system startup Background program on each machine is used Periodically broadcasts information Periodically broadcasts information Collects incoming information and stores in a file Collects incoming information and stores in a file Each machine always has a copy of latest info Client never has to access the network Reads info from secondary storage Reads info from secondary storage

Chief advantage of precollection is speed Information available locally without delay Information available locally without delay Main disadvantage: potential to be wasteful Uses processor time and network bandwidth Uses processor time and network bandwidth Even when no one cares about the data being collected Even when no one cares about the data being collected Cost for reading and processing broadcasts is high Cost for reading and processing broadcasts is high Precollection is not among most popular alternatives to client-server

Summary Distributed programs need communication Often use client-server interaction Often use client-server interaction Server process awaits request; then responds Client program makes request, sends, waits Client can send request directly or broadcast Broadcast useful on local network Broadcast useful on local network Machine not need to know address of server Machine not need to know address of server

Servers can use internet protocols like UDP Accept and respond to requests across internet Accept and respond to requests across internet Can communicate with physical frames Restricted to single physical network Restricted to single physical network Precollection is an alternative to the client- server model Precollects information to avoid delays Precollects information to avoid delays