Slide 1 Client / Server Paradigm. Slide 2 Outline: Client / Server Paradigm Client / Server Model of Interaction Server Design Issues C/ S Points of Interaction.

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

Remote Procedure Call (RPC)
Intermediate TCP/IP TCP Operation.
Chapter 7: Transport Layer
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 7: Transport Layer Introduction to Networking.
1 Chapter 6 Datagram Delivery by UDP Just as the Internet Protocol uses the services of subnetworks, transport protocols build upon the services of IP.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
CS335 Networking & Network Administration Tuesday, May 25, 2010.
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.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
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.
Networking Support In Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Transport Layer.
Introduction to Network Programming and Client-Server Design.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
Server issues How to approach the design of servers.
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:
Server Design Discuss Design issues for Servers Review Server Creation in Linux.
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
1 Transport Layer Computer Networks. 2 Where are we?
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
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.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_a Transport Protocols - UDP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
User Datagram Protocol (UDP) Chapter 11. Know TCP/IP transfers datagrams around Forwarded based on destination’s IP address Forwarded based on destination’s.
Copyright © Curt Hill, Client – Server Computing An important paradigm.
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.
File Transfer And Access Chapter 26 Chapter 26 Group 3 Presentation Deepak Mittal Nishit Ranjan Venugopal Janapati Amit Palshikar Ref: Internetworking.
The InetAddress Class A class for storing and managing internet addresses (both as IP numbers and as names). The are no constructors but “class factory”
Position of application layer. Application layer duties.
Client-Server Model of Interaction Chapter 20. We have looked at the details of TCP/IP Protocols Protocols Router architecture Router architecture Now.
Networking Basics CCNA 1 Chapter 11.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
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.
Reading TCP/IP Protocol. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also.
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.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
1 User Datagram Protocol. 2 Transport Protocols Provide logical communication between application processes running on different hosts Run on end hosts.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
R Some of these slides are from Prof Frank Lin SJSU. r Minor modifications are made. 1.
1 K. Salah Application Layer Module K. Salah Network layer duties.
Process-to-Process Delivery:
Chapter 11 User Datagram Protocol
Boots Cassel Villanova University
Chapter 3 Internet Applications and Network Programming
Module 4 Remote Login.
File Transfer and access
NET323 D: Network Protocols
Client-Server Interaction
NET323 D: Network Protocols
Process-to-Process Delivery:
Issues in Client/Server Programming
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

Slide 1 Client / Server Paradigm

Slide 2 Outline: Client / Server Paradigm Client / Server Model of Interaction Server Design Issues C/ S Points of Interaction Complexity of Servers Connectionless vs. Connection-Oriented Interaction Stateless vs. Stateful Servers

Slide 3 Client / Server Model of Interaction: Primary pattern of interaction among applications is the client-server paradigm (C/S). The C/S paradigm uses the direction of initiation to categorize whether a program is a client or a server. Depending upon the process and need, a server may at some point become a client.

Slide 4 Client / Server Model of Interaction: Clients: –Initiate communication. –Are often easier to built than servers since they usually do not require special system privileges.

Slide 5 Client / Server Model of Interaction: Server: –Any program that waits for incoming communication requests from a client and performs the requested service. –Usually require system privileges, so when designing them, you must be careful not to pass those privileges on to the client.

Slide 6 Server Design Issues: Issues that must be handled when designing (programming) servers: –Authentication - verify identity of the client. –Authorization - permission to request the service. –Data Security - prevent data from becoming compromised. –Privacy - preserving unauthorized access. –Protection - preventing applications from abusing system resources.

Slide 7 Client / Server Points of Interaction: Server: –Continuously executes (before and after requests arrive). Client: –Makes the request. –Waits for a response. –Terminates the connection (when it no longer needs the service).

Slide 8 Client / Server Points of Interaction: Server: –Waits for requests at a well-known protocol port that’s been reserved for it’s specific service. Client: –Allocates an arbitrary (unused and non- reserved) protocol port for it’s communication. –Only one of two end ports need be reserved.

Slide 9 Applica- tion 1 Applica- tion 2 Client 1 Client 2 Client n Server (a) (b)

Slide 10 Standard vs. Non-standard Client Software: Two classes of services exist: –Standard Application Services: Consist of those services defined by TCP/IP and are assigned well-known (universally accepted) protocol port numbers. –Non-Standard Application Services: Are locally defined by sites. This distinction is only important when applications are to communicate outside of a local environment.

Slide 11 Parameterization of Clients: Fully parameterized clients allow a user to specify the protocol port, as well as other input parameters. Doing so does not restrict applications to any specific port, even though it may always use a well-known port number in practice. ( (

Slide 12 Complexity of Servers: Servers need to accommodate multiple, concurrent requests. Servers usually have two parts: –Single master which accepts new requests. –Multiple slaves (child processes) which handle those requests.

Slide 13 Complexity of Servers: Steps taken by a Master Server: –Opens a well-known port (socket open and bind). –Waits for a new client’s request (socket listen). –Chooses a new local port for the client to connect over. –Spawns new concurrent slave to service the client over the new port (socket accept). –Goes back to waiting for requests while slave processes handle the requests.

Slide 14 Complexity of Servers: Servers are usually more difficult to build than clients since servers must: –Handle concurrent requests. –Enforce all access and protection policies of the computer system on which they run. –Must protect themselves against all possible errors, such as malformed requests and requests causing it to abort.

Slide 15 Connectionless vs. Connection-Oriented Interaction: Clients and servers communicate using: –UDP - connectionless interaction (unreliable delivery of messages). –TCP - connection-oriented interaction (reliable delivery of messages).

Slide 16 Connectionless vs. Connection-Oriented Interaction: Designing client / server applications: –Connection-oriented protocols: Make programming simpler. Relieves the responsibility of detecting and correcting errors.

Slide 17 Connectionless vs. Connection-Oriented Interaction: –Programs only use UDP (connectionless service) if the application protocol: Handles the reliability, Requires hardware broadcast or multicast, Or the application cannot tolerate virtual- circuit overhead delays.

Slide 18 Stateless vs. Stateful Servers: The information a server maintains on the status of ongoing interactions with it’s clients, is called state information. Keeping small amounts of state information in a server can: –Reduce the size of messages sent. –Allow the server to respond quickly to requests.

Slide 19 Stateless vs. Stateful Servers: The motivation for statelessness lies in protocol reliability. State information can become incorrect if: –Messages are lost, duplicated, or delivered out- of-order. –The client crashes and reboots.

Slide 20 Stateless vs. Stateful Servers: State Tables State Tables: –Are maintained to allow communication without having to pass filenames or extra identification information in each message.

Slide 21 Stateless vs. Stateful Servers: State Tables When a client opens a remote file, the server adds an entry in the state table with information that includes: –Name of file. –File handle (small integer used for identification). –Current position in the file.

Slide 22 Stateless vs. Stateful Servers: State information - can improve efficiency, but can be difficult to correctly maintain if the client and server use UDP to communicate. Stateless Servers: –Rely on the application protocol to assume the responsibility for reliable delivery –Should give the same response no matter when or how many times a request arrives.

Slide 23 Stateless vs. Stateful Servers: In a real internetwork, where machines crash and reboot, and messages can be lost, delayed, duplicated, or delivered out-of-order, stateful designs lead to complex application protocols that are difficult to: –Design –Understand –Program correctly.

Slide 24 Program Interface to Protocols: Routines the operating system supplies, define the interface between the applications and protocol software (Application Program Interface - API). Advantages: –Provides flexibility and tolerance. –Allows procedural or message-passing interface styles. Disadvantage: –Interface details can differ between vendors where applications may not correctly interoperate.

Slide 25 System Calls: System calls: –Transfer control between an application program and the operating system procedures that supply services. Applications that need access to system resources (including the network connection) make system calls.

Slide 26 System Calls In Computer’s Operating System Application Program Code Library Routines Used application program bound with library routines it calls System Calls: