Client Server Model and Software Design TCP/IP allows a programmer to establish communication between two application and to pass data back and forth.

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)
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.
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.
UDP - User Datagram Protocol UDP – User Datagram Protocol Author : Nir Shafrir Reference The TCP/IP Guide - ( Version Version.
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.
Chapter 25 Internet Routing Internetworking Technology How routing tables are built initially How routing software updates the tables as needed. Propagation.
1 Data Communications and Networking Socket Programming Part II: Design of Server Software Reference: Internetworking with TCP/IP, Volume III Client-Server.
© 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.
Networks 1 CS502 Spring 2006 Network Input & Output CS-502 Operating Systems Spring 2006.
Introduction to Network Programming and Client-Server Design.
CS-3013 & CS-502, Summer 2006 Network Input & Output1 CS-3013 & CS-502, Summer 2006.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
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.
Fundamentals of Python: From First Programs Through Data Structures
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.
1 Chapter Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
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.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Other Topics RPC & Middleware.
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
University of the Western Cape Chapter 12: The Transport Layer.
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)
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.
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.
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.
Prepared by: Azara Prakash L.. Contents:-  Data Transmission  Introduction  Socket Description  Data Flow Diagram  Module Design Specification.
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 McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 15 Application Layer and Client-Server.
Chapter 17 - Clients + Servers = Distributed Computing Introduction Large Computers Use Networks For Input and Output Small Computers Use Networks To Interact.
The Client Server Model And Software Design
1 Chapter 38 RPC and Middleware. 2 Middleware  Tools to help programmers  Makes client-server programming  Easier  Faster  Makes resulting software.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
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.
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:
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Chapter 3: Process Concept
Boots Cassel Villanova University
Chapter 3 Internet Applications and Network Programming
NET323 D: Network Protocols
Client-Server Interaction
NET323 D: Network Protocols
Process-to-Process Delivery:
CGS 3763 Operating Systems Concepts Spring 2013
Issues in Client/Server Programming
UDP Principles (Chapter 24) (User Datagram Protocol)
Exceptions and networking
Presentation transcript:

Client Server Model and Software Design TCP/IP allows a programmer to establish communication between two application and to pass data back and forth. Application can execute on the same machine or on different machines. One organizational method dominates the use of TCP/IP is known as the client-server paradigm.

Terminology and concept Client: an application that initiates peer-to- peer communication is called client Each time a client application executes, it contacts a server, sends a request, and awaits a response. Clients are often easier to build than servers, and usually require no special system privileges to operate

Server: is any program that waits for incoming communication requests from a client. The server receives a client’s request, performs the necessary computation, and returns the result to the client. Privilege and complexity Servers must contain code that handles the issues of: Authentication, Authorization, data security, privacy and protection

Parameterization of Clients Some client software provides more generality than others. In particular, some client software allows the user to specify both remote machine on which a server operates and the protocol port number at which the server is listening.

Connectionless vs. connection- oriented servers When programmers design client-server software, they must choose between two types of interaction: a connectionless or a connection- oriented style. TCP – connection-oriented. It provides all the reliability needed to communicate across an internet. –Verifies data arrives, automatically retransmits –Compute checksum over data. –Automatically delete duplicated package UDP – User datagram protocol.connectionless. No guarantees about reliable delivery.

Chapter 3 Concurrent Processing in Client-Server Software The term concurrency refers to real or apparent simultaneous computing. Concurrent processing is fundamental to distributed computing and occurs in many forms –Many pairs of application programs can communicate concurrently, sharing the network that interconnects them –Concurrency can occur within a given computer system. Multiple users on a timesharing system –Set of all clients on a set of machines can execute concurrently –Concurrency in server. A single server program must handle incoming requests concurrently

Programs vs. processes Process defines the fundamental unit of computation( some system use the terms task, job, or thread instead of process) A process differs from a program because the process concept includes only the active execution of a computation, not the code. After the code has been loaded into a computer, the operating system allows multiple processes to execute the same piece of code “at the same time”

For( I = 1, I<=10; I++) printf(“%d\n”, I); If two or more processes execute the code segment concurrently, one of them may be on the sixth iteration when other starts the first iteration When multiple processes execute a piece of code concurrently, each process has its own, independent copy of the variables associated with the code

Procedure call The run-time system for procedure-oriented programming languages uses a stack mechanism to handle procedure calls. The run-time system pushes a procedure activation record on the stack whenever it makes a procedure call. When multiple procedures execute a piece of code concurrently, each has its own run-time stack of procedure activation records

An example of concurrent process creation #include Int sum; Main() { int I; sum = 0; for ( I = 1; I <= 5; I++) { printf(“The value of I is %d\n”,I); fflush(stdout); /* flush the buffer*/ sum+= I; } printf(“The sum is %d\n”, sum); Exit(0); }

A concurrent version To create a new process in UNIX, a program calls the system function fork. fork divides the running program into two identical processes, both executing at the same place in the same code. The two processed continue just as if two users had simultaneously started two copies of the application.

#include int sum; main() {int I; sum =0; fork(); /* create a new process*/ for( I =1; I <=5; I++) { printf(“The value of I is %d\n”, I); fflush(stdout); sum+= I; } printf(“The sume is %d \n”, sum); exit(0); }

To understand the fork function, imagine that fork causes the operating system to make a copy of the executing program and allows both copies to run at the same time Output: The value of I is 1 The value of I is 2 The value of I is 3 The value of I is 4 The value of I is 5 The sum is 15 The value of I is 1 The value of I is 2 The value of I is 3 The value of I is 4 The value of I is 5 The sum is 15 The first process executed so rapidly that it was able to complete execution before the second process ran at all

timeslicing The operating system allocates the available CPU power to each process for a short time before moving on to the next. We use term timeslicing to describe system that share the available CPU among several processes concurrently To see the effect of timeslicing, extend the concurrent program to iterate 10,000 times instead 5 times

Process identifier or process id In practice, the process created by fork is not absolutely identical to the original process: it differs in one small detail.fork is a function that returns a value to its caller. in the original process, fork returns a small positive integer that identifies the newly created process In the newly created process, the fork returns zero

#include int sum; main() { int pid; sum = 0; pid = fork(); if (pid != 0) { /* original process */ printf(“The original process prints this.\n”); else { /* newly created process*/ printf(“The new process print this\n”); } exit(0); }