Boots Cassel Villanova University

Slides:



Advertisements
Similar presentations
Remote Procedure Call (RPC)
Advertisements

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 Processes and Pipes COS 217 Professor Jennifer Rexford.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Introduction to Network Programming and Client-Server Design.
CS-3013 & CS-502, Summer 2006 Network Input & Output1 CS-3013 & CS-502, Summer 2006.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
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.
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.
Server Design Discuss Design issues for Servers Review Server Creation in Linux.
Socket Programming -What is it ? -Why bother ?. Basic Interface for programming networks at transport level It is communication end point Used for inter.
Networked File System CS Introduction to Operating Systems.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
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.
Position of application layer. Application layer duties.
Prepared by: Azara Prakash L.. Contents:-  Data Transmission  Introduction  Socket Description  Data Flow Diagram  Module Design Specification.
Process to process communication over network connections Includes references to Comer and Stevens Internetworking with TCP/IP vol 3 Client-server programming.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
The Client Server Model And Software Design
Thread basics. A computer process Every time a program is executed a process is created It is managed via a data structure that keeps all things memory.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
1 Network Communications A Brief Introduction. 2 Network Communications.
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.
Network Programming. These days almost all devices.
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
Some Network Commands n Some useful network commands –ping –finger –nslookup –tracert –ipconfig.
1 Issues in Client/Server Refs: Chapter 27 Case Studies RFCs.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Understand IPv6 Part 2 LESSON 3.3_B Networking Fundamentals.
LESSON Networking Fundamentals Understand IPv4.
Application Layer Functionality and Protocols Abdul Hadi Alaidi
The Transport Layer Implementation Services Functions Protocols
Last Class: Introduction
Client-Server Communication
Processes and threads.
Process Management Process Concept Why only the global variables?
Chapter 3 Internet Applications and Network Programming
MCA – 405 Elective –I (A) Java Programming & Technology
Module 4 Remote Login.
Working at a Small-to-Medium Business or ISP – Chapter 7
File Transfer and access
Client-Server Interaction
Subject Name: Computer Communication Networks Subject Code: 10EC71
Chapter 3: Windows7 Part 4.
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
Chapter 2: System Structures
Process-to-Process Delivery:
Starting TCP Connection – A High Level View
Issues in Client/Server Programming
TCP/IP Protocol Suite: Review
Lecture 2: Overview of TCP/IP protocol
Threaded Programming in Python
Prof. Leonardo Mostarda University of Camerino
Internet Applications & Programming
An Introduction to Internetworking
CS510 Operating System Foundations
Computer Networks Protocols
Exceptions and networking
Presentation transcript:

Boots Cassel Villanova University Computer Networks Boots Cassel Villanova University

Client - Server Computing Direction of initiation determines which side is which Client initiates Server responds Same system may be client and server

Parameterization of clients Parameter specifies machine where server resides Optional parameter specifies the port where the server listens Include the port number parameter in defining clients Especially useful for testing new versions

Addressing Specify the machine Specify the port number name gets converted to IP address Specify the port number Which running process to connect to.

How do you know Which machine Which port you have to know the name or the IP address of the partner Names get converted by a Domain Name Service Which port Common services have assigned port numbers telnet = 23, http = 80, etc.

Domain Name Service Structure of Internet Names gadget.netlab.csc.villanova.edu Lookup in order from right to left netlab and csc are both entries in the villanova DNS, so that lookup can go directly from villanova to netlab without using the csc DNS That is always an option in configuring the servers

DNS - Christie’s table ; Addresses for the canonical names ; localhost.netlab.csc.villanova.edu. IN A 127.0.0.1 christie.netlab.csc.villanova.edu. IN A 153.104.203.200 doyle.netlab.csc.villanova.edu. IN A 153.104.203.210 gadget.netlab.csc.villanova.edu. IN A 153.104.203.42 missmarple.netlab.csc.villanova.edu. IN A 153.104.203.7 lordpeter.netlab.csc.villanova.edu. IN A 153.104.203.41 poirot.netlab.csc.villanova.edu. IN A 153.104.203.148 koko.netlab.csc.villanova.edu. IN A 153.104.203.45 sherlock.netlab.csc.villanova.edu. IN A 153.104.203.44 cadfael.netlab.csc.villanova.edu. IN A 153.104.203.43 columbo.netlab.csc.villanova.edu. IN A 153.104.203.46 weber.netlab.csc.villanova.edu. IN A 153.104.203.205 matlock.netlab.csc.villanova.edu. IN A 153.104.203.203 samspade.netlab.csc.villanova.edu. IN A 153.104.203.204 poe.netlab.csc.villanova.edu. IN A 153.104.203.50

Port number usage Some implementations do not allow the user to specify a port number uses the protocol’s reserved number only Allowing a port number to be specified makes it easier to test the implementation allow the “real” version to run while testing a different version

Server Usually runs in privileged condition Responsibilities needs to access protected resources be careful about what access it gives to clients Responsibilities Authenticate client identity Enforce authorization restrictions Data protection: security and privacy Protection: system resources from abuse

Connectionless vs Connection-oriented Directly related to the choice of transport protocol UDP: connectionless TCP: connection-oriented Can build connection-oriented client/server application over a connectionless transport layer Silly to do the converse

Server state Stateless server Stateful server no memory of past interaction each request must be fully qualified Stateful server records state information reduces needed content in subsequent messages depends on reliable network communication vulnerable to system failures, reboots

Idempotent operations An operation that always yields the same result, regardless of repetition or missing prior steps READ or WRITE, without automatic increment of pointer not idempotent - increment, add amount to total, etc.

Concurrent processes Multiprogramming Multiprocessing Apparent simultaneous execution Multiprocessing Real simultaneous execution

Server Concurrency Need to serve requests from multiple clients Process Fundamental unit of computation Address space plus at least one thread of execution instruction pointer tells where in the process the thread is currently executing

Threads Similar to a process except a thread is owned by a process a thread may share common resources belonging to a process A thread has a private copy of local variables

Concurrent processes In a uniprocessor system Each process gets a slice of the CPU time in turn All appear to run at the same time If each process has only one thread of execution, that process shares the CPU with other processes on a time sharing plan If a process has more than one thread, the CPU time is divided among the threads. OS varies: divide time among all threads or divide among processes and multiple threads share the time allotted to their parent process In a multiprocessor system, each process or thread may be allocated a separate CPU

Threads in servers A process may respond to client requests by spawning a separate thread for each client Clients appear to be served simultaneously but actually receive intermingled slices of the CPU time.

Unix concurrency Different operating systems handle concurrency in idfferent ways unix: fork() creates an exact copy of the calling process and continues execution from exactly the same place in the code. Copy includes the stack showing function calls, local and global variables Original and forked process continue from the same point in execution One distinction: fork returns a value: new process returns 0, original returns non zero value

Unix concurrency example Sum = 0; pid = fork(); if (pid != 0 ) { /* original */ printf (“The original process\n”); }else { /* the new process */ printf (“The new process\n”);

Concurrency in Windows _beginthread parameter specifies what is to be executed Not necessarily executing the same code as the calling process

Sockets A de facto standard interface to TCP/IP protocols Defined in BSD unix Adapted by other operating systems

Initiating concurrent subprocesses Windows: _beginthread parameter specifies what to execute as thread unix fork new process is a copy of the initiating process pid identifies each