©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 15 Application Layer and Client-Server.

Slides:



Advertisements
Similar presentations
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.
Advertisements

28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Data Communications and Networking (Third Edition)
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.
1 Java Networking – Part I CS , Spring 2008/9.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
1 Generic Transport Service Primitives Listen –notify Transport layer a call is expected Connect –establish Transport layer connection Send (or Write)
1 Data Communications and Networking Socket Programming Part II: Design of Server Software Reference: Internetworking with TCP/IP, Volume III Client-Server.
CS 311 – Lecture 18 Outline IPC via Sockets – Server side socket() bind() accept() listen() – Client side connect() Lecture 181CS Operating Systems.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Concurrent vs. iterative servers
Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 Chapter 24 TCP/IP.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Process-to-Process Delivery:
資 管 Lee Application Layer and Client-Server Model A3.
Elementary TCP Sockets
Chapter 23 TCP/IP Overview Network Layer Transport Layer Application Layer WCB/McGraw-Hill  The McGraw-Hill Companies, Inc., 1998.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
13/09/2015 Michael Chai; Behrouz Forouzan Staffordshire University School of Computing Transport layer and Application Layer Slide 1.
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.
 Socket  The combination of an IP address and a port number. (RFC 793 original TCP specification)  The name of the Berkeley-derived application programming.
Chapter 3 OSI Model The model Functions of the layers WCB/McGraw-Hill  The McGraw-Hill Companies, Inc., 1998.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Chapter 2 OSI Model and TCP/IP
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 3 Transport Layer.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface
CSP Implementing a network 1 Implementing a network Lecturer: Smilen Dimitrov Cross-sensorial processing – MED7.
11 TRANSPORT LAYER PROTOCOLS Chapter 6 TCP and UDP SPX and NCP.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface.
Inter-process communication: Socket. socket Internet socket From Wikipedia, the free encyclopedia Jump to: navigation,
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.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
Position of application layer. Application layer duties.
Networking Basics CCNA 1 Chapter 11.
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.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 5.
Socket Programming.
Networking OSI (Open Systems Interconnection) model of computer networking, seven layers (the Application, Presentation, Session, Transport, Network, Data.
Berkeley Socket Abstraction
Inter-Process Communication 9.1 Unix Sockets You may regard a socket as being a communication endpoint. –For two processes to communicate, both must create.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 16 Socket Interface.
McGraw-Hill©2003 The McGraw-Hill Companies, Inc. Chapter 3 Transport Layer.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
Client-server communication Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
1 K. Salah Application Layer Module K. Salah Network layer duties.
Process-to-Process Delivery:
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
SOCKET PROGRAMMING Presented By : Divya Sharma.
Client-Server Model and Sockets
MCA – 405 Elective –I (A) Java Programming & Technology
Chapter 14 User Datagram Program (UDP)
Client-Server Interaction
Process-to-Process Delivery:
Issues in Client/Server Programming
PART VI Application Layer.
Process-to-Process Delivery: UDP, TCP
Presentation transcript:

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 15 Application Layer and Client-Server Model  CLIENT-SERVER MODEL  CONCURRENCY  PROCESSES

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl2 2 Comparison between OSI and TCP/IP

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl Client-server model To make any use of the Internet, application programs should run on the two endpoints of a network connection. The applications are the entities that communicate with each other to exchange services “Client” applications request service “Server” applications provide service.

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl4 4 Client-Server Relationship: Many-to-One Servers  Run all the time (i.e. infinite)  Provide service to any client  Typically specialize in providing a certain type of service, e.g. Mail.  Listen to a well-known port and passively open connection. Clients  Run when needed, then terminate (i.e. finite)  Actively Open TCP or UDP connection with Server’s socket.

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl Concurrency Operation mode could be either iterative or concurrent. In clients:  Iterative mode: One client at-a-time in serial  Concurrent mode: Several clients run at the same time In servers:  Iterative mode: serve one client at-a-time (clients wait in a queue)  Concurrent mode: serve multiple clients concurrently and independently. In addition, servers could chose the Transport layer protocol:  UDP, i.e. connectionless  TCP, i.e. connection-oriented

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl6 6 Server types Transport Protocol  Operation Mode

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl7 7 Connectionless iterative server Clients’ request arrive inside UDP datagrams and wait in a queue for the server Server processes one datagram at-a-time, send response back to client inside a UDP datagram Clients use ephemeral UDP ports Server uses one well-known UDP port at which all clients’ requests arrive

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl8 8 Connection-Oriented Concurrent Server Requests and responses are streams of data spanning several segments. Parent Server passively opens the well-know port to listen for incoming connection requests Once opened, connections now use ephemeral ports between one client and one Child Server.

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl Programs and Processes Program: code on disk Process: a running instance of a program. Process Control Block:  ProcessID, UserID, Program Name.  Where is the data  Which line will execute next Figure shows two processes of the same program.

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl10 10 The Process ID & getpid()

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl11 11 Process Creation & fork() By Replication One-Parent needed After the fork(), both parent and child processes execute the same line, the one after the fork()

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl12 12 A program with two fork functions

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl13 13 Return Value of fork() In the parent process, fork() returns the processID of the just created child In the child process, fork() simply returns a 0 (which is not a valid processID) This way, each of the two identical replica can detect whether it is indeed the original parent, or it is the newly created process.

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl14 14 A program that prints the processIDs of the parent and the child

©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl15 15 Example of a server program with parent and child processes Parent Server listens indefinitely (to the well-know port) for connection requests from clients Once a client requests a connection, a child server process is created to serve this client (on an ephemeral port) The parent server continues to listen for more clients