Client-Server Model and Sockets

Slides:



Advertisements
Similar presentations
Data Communications and Networking (Third Edition)
Advertisements

Socket Programming.
1 Java Networking – Part I CS , Spring 2008/9.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Davide Rossi 2002 Using Sockets in Java. 2Davide Rossi 2002 TCP/IP  A protocol is a set of rules that determine how things communicate with each other.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
1 School of Computing Science Simon Fraser University CMPT 771/471: Internet Architecture and Protocols Socket Programming Instructor: Dr. Mohamed Hefeeda.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
I NTRODUCTION OF S OCKET P ROGRAMMING L.Aseel AlTurki King Saud University.
Client – Server Architecture A Basic Introduction Kathleen R. Murray, Ph.D. May 2002.
Process-to-Process Delivery:
Understanding Networked Applications A First Course 1 CONTENTS  INTRODUCTION.  WHAT IS CLIENT SERVER ARCHITECTURE ?  WHY WE NEED CLIENT SERVER ARCHITECTURE.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 3: TCP/IP Architecture.
Copyright 2003 CCNA 1 Chapter 9 TCP/IP Transport and Application Layers By Your Name.
Network Communications Technology Chapter 19 Internet Architecture and TCP/IP.
TCP/IP Networking Review Covered Subjects:  Packet Switched Network Structure  Issues of PSNs  Ports & IP Numbers  Delivery Services  Domain Name.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Client – Server Architecture. Client Server Architecture A network architecture in which each computer or process on the network is either a client or.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
TCP/IP Transport and Application (Topic 6)
RGEC MEERUT(IWT CS703) 1 Java Networking RGEC Meerut.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
1. I NTRODUCTION TO N ETWORKS Network programming is surprisingly easy in Java ◦ Most of the classes relevant to network programming are in the java.net.
1 TCP/IP, Addressing and Services S. Hussain Ali M.S. (Computer Engineering) Department of Computer Engineering King Fahd University of Petroleum and Minerals.
Position of application layer. Application layer duties.
Socket Programming Introduction. Socket Definition A network socket is one endpoint in a two-way communication flow between two programs running over.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 15 Application Layer and Client-Server.
Socket Programming.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
Client – Server Architecture A Basic Introduction 1.
Java’s networking capabilities are declared by the classes and interfaces of package java.net, through which Java offers stream-based communications that.
1 Network Communications A Brief Introduction. 2 Network Communications.
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:
SOCKET PROGRAMMING Presented By : Divya Sharma.
Introduction To Application Layer
Introduction to Networks
Chapter 5 Network and Transport Layers
Networking Based Applications
Remote Logging, Electronic Mail, and File Transfer
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Sockets and Beginning Network Programming
MCA – 405 Elective –I (A) Java Programming & Technology
Process-to-Process Delivery, TCP and UDP protocols
TCP Transport layer Er. Vikram Dhiman LPU.
Introduction to Networks
Client-Server Interaction
Chapter 2 Introduction Application Requirements VS. Transport Services
The Internet and HTTP and DNS Examples
I. Basic Network Concepts
Process-to-Process Delivery:
Copyright 1999, University of California by David G. Messerschmitt
Starting TCP Connection – A High Level View
CSC Advanced Unix Programming, Fall 2015
Networking Theory (part 2)
CSCD 330 Network Programming
ECE 4450:427/527 - Computer Networks Spring 2017
Internet Applications & Programming
Computer Networks Topic :User datagram protocol Transmission Control Protocol -Hemashree S( )
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Networking Theory (part 2)
Networking Theory (part 2)
Presentation transcript:

Client-Server Model and Sockets King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department ICS 343 Fundamentals of Computer Networks Client-Server Model and Sockets These slides are based on: - Understanding Networked Applications, David Messerschmitt - Introduction to Sockets and TCP/IP Protocols, Leon Jololian and George Blank

Copyright 1999, University of California Aug 26, 2012 Client-Server Model Client host Client host Server host

Client Server Model Client application program running on the local machine requests a service from another application program – server – running on the remote machine. Commonly server provides service to any client, not a particular client Generally, a client application program that requests a service should run only when it is needed. A server program providing service should run all the time, as it does not know when its services will be needed.

Client Server Model A client opens the communication channel using IP address of the remote host and the port address of the specific server program running on the host – Active open. Request-response may be repeated several times, the process is finite. The client closes the communication channel with an Active close.

Client Server Model A server program opens its door for incoming requests from clients but never initiates a service unless explicitly requested – Passive open. A server program is infinite – runs unless a problem occurs. Concurrency in client: two or more clients can run at the same time on a machine – current trend, alternatively: one client must start, run, and terminate before another client may start (iterative).

Client Server Model Concurrency in server: An iterative server can process only one request at a time whereas a concurrent server can process many requests at the same time – share its time. Connectionless iterative server: the ones that use UDP are iterative, server uses one single port, arriving packets wait in line, Connection oriented concurrent server: the ones that use TCP are normally concurrent,

Client–Server Computing Process takes place on the server and on the client Servers Store and protect data Process requests from clients Clients Make requests Format data on the desktop

Copyright 1999, University of California Aug 26, 2012 Example: Email Server Server Client Client Email client sends message to server Later, recipient’s email client retrieves message from server Message is stored on POP server

Copyright 1999, University of California Aug 26, 2012 Chat Server Server Client Client Chat server aggregates typing from all users and sends to all clients Other user’s clients display aggregated typing from chat server Chat clients send user’s typing to server

Client-Server Vs Peer-To-Peer Copyright 1999, University of California Copyright 1999, University of California Aug 26, 2012 Aug 26, 2012 Client-Server Vs Peer-To-Peer “I want to collaborate with my colleague” “I want to access some information” Client Peer-to-peer Server Client/server 10

Client-Server Vs Peer-To-Peer Copyright 1999, University of California Aug 26, 2012 Client-Server Vs Peer-To-Peer Client-server Asymmetric relationship Client predominately makes requests, server makes replies Peer-to-peer Symmetric relationship

Types of Servers Application Servers Audio/Video Servers Chat Servers Fax Servers FTP Servers Groupware Servers IRC Servers List Servers Mail Servers News Servers Proxy Servers Telnet Servers Web Servers Z39.50 Servers

Socket Socket: is a construct that supports network input/output. An application creates a socket when it needs a connection to a network. It then establishes a connection to a remote application via the socket. Communication is achieved by reading data from the socket and writing data to it. Socket acts as an endpoint.

Socket

Socket A socket is defined in the OS as a structure. Simplified socket structure with five fields: - Family: defines the protocol group (IPv4, IPv6, UNIX domain protocols) - Type: defines the exchange-type (stream, packet, raw) - Protocol: set to zero for TCP/ UDP - Local address: combination of local IP and application port address. - Remote address: combination of remote IP and application port address.

Socket Stream socket: to be used with connection oriented protocol (TCP) Datagram socket: to be used with connectionless protocol (UDP) Raw socket: some protocols (ICMP) directly use the service of IP. Raw sockets are used in these applications.

The end