R Some of these slides are from Prof Frank Lin SJSU. r Minor modifications are made. 1.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

Remote Procedure Call (RPC)
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.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Processes CSCI 444/544 Operating Systems Fall 2008.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Threads CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent University.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.
The Internet Useful Definitions and Concepts About the Internet.
UDP: User Datagram Protocol. UDP: User Datagram Protocol [RFC 768] r “bare bones”, “best effort” transport protocol r connectionless: m no handshaking.
1 Data Communications and Networking Socket Programming Part II: Design of Server Software Reference: Internetworking with TCP/IP, Volume III Client-Server.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
Lecture 8 Epidemic communication, Server implementation.
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.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Process-to-Process Delivery:
Server Design Discuss Design issues for Servers Review Server Creation in Linux.
1 Transport Layer Computer Networks. 2 Where are we?
TCP/IP protocols Communication over Internet is mostly TCP/IP (Transmission Control Protocol over Internet Protocol) TCP/IP "stack" is software which allows.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
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)
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Transport Layer COM211 Communications and Networks CDA College Theodoros Christophides
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
TCP/IP (Transmission Control Protocol / Internet Protocol)
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 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.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 15 Application Layer and Client-Server.
The Client Server Model And Software Design
Acknowledgement: These slides are adapted from slides provided in Thißen & Spaniol's course Distributed Systems and Middleware, RWTH Aachen Processes Distributed.
Reading TCP/IP Protocol. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also.
Threads. Readings r Silberschatz et al : Chapter 4.
1 COMP 431 Internet Services & Protocols Client/Server Computing & Socket Programming Jasleen Kaur February 2, 2016.
Processes and Threads MICROSOFT.  Process  Process Model  Process Creation  Process Termination  Process States  Implementation of Processes  Thread.
COMPUTER NETWORKS Hwajung Lee. Image Source:
1 Network Communications A Brief Introduction. 2 Network Communications.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Last Class: Introduction
Chapter 3 outline 3.1 Transport-layer services
Processes and threads.
WWW and HTTP King Fahd University of Petroleum & Minerals
Boots Cassel Villanova University
06- Transport Layer Transport Layer.
Some bits on how it works
CS 1652 Jack Lange University of Pittsburgh
Client-Server Interaction
Chapter 3: Windows7 Part 4.
Topic 5: Communication and the Internet
September 19th, 2013 CS1652 Jack Lange University of Pittsburgh
Process-to-Process Delivery:
Starting TCP Connection – A High Level View
Lecture 2: Overview of TCP/IP protocol
Lecture 3: Secure Network Architecture
Internet Applications & Programming
Exceptions and networking
Presentation transcript:

r Some of these slides are from Prof Frank Lin SJSU. r Minor modifications are made. 1

2 Client-server model Typical network app has two pieces: client and server application transport network data link physical application transport network data link physical Client:  initiates contact with server ( “ speaks first ” ) r typically requests service from server, r for Web, client is implemented in browser; for , in mail reader Server: r provides requested service to client r e.g., Web server sends requested Web page, mail server delivers e- mail request reply

3 More on Client Server Model r Clients initiate requests r Servers wait for incoming requests and provide services m Servers always up and running m Operating systems normally start servers automatically when they start r More differences m Servers access system resources => special privileges m Servers sometimes handle security issues

4 Connectionless vs. Connection- Oriented Protocols r Connectionless protocols m UDP m Fast m Unreliable r Connection-oriented protocols m TCP m Slower m Reliable r Examples

5 Stateless vs. Stateful Protocols r Stateful protocols m Keeping states in the servers m Reducing the size and number of messages m Applications sometimes need session information r Stateless protocols m Simple m Protocol reliability r example m Stateless file server m Stateful file server

6 How to keep track of clients? Two ways r End points (IP address, port number) m What is wrong? r Handles m A short identifier allocated by the server, stored in server’s database and sent to the client

7 Keeping track of clients: handles r user accounts r shopping carts r Web portals r Advertising m Secretly collecting users’ browsing habits r What to do?

8 More on Stateful Protocols r Keeping correct states is challenging m What happens when clients crash and reboot? m What happens when messages arrive out of order, get duplicated or get lost? r Keeping states sometimes poses security risks m Tracking browsing patterns m Loss of confidential information (e.g. credit card number, ssn)

9 Concurrent Processing Concurrent Processing: r Why is it needed? r Achieving concurrent processing m Time sharing m multiprocessing r Concurrency in clients m no special efforts by client programmers r Concurrency in servers m Special efforts needed by server programmers Multiple processes Multiple threads

10 Processes and Threads r Processes m Fundamental unit of computation m An address space and at least one thread of execution (instruction pointer) r Thread m Light-weight process r Program vs process m Static concept

11 Sharing of Variables r Local Variable Rule - When multiple processes or threads execute a piece of code concurrently, each creates its own independent copy of the variables associated with the code (local variables) r Global Variable Rule - Each process creates a copy of global variables, but multiple threads within a single process share the process’s global variables int x; for (i=1; i<=10; i++) printf (“%d\n”, i+x);

12 Procedure Calls r Procedure Call Rule - When multiple threads execute a piece of code concurrently, each has its own stack of procedure activation records r Example - Putting the rules together!

13 Example of Concurrent Process Creation r Example 1 m Sequential processing r Example 2 m Concurrent version Computationally light Computationally intensive m Both processes do the same job!

14 Sequential C Example /* seq.c - A conventional C program that sums integers from 1 to 5 */ #include int sum; /* global variable */ main() { int i; /* local variable */ sum = 0; for (i=1; i<=5; i++) { /* iterate from 1 to 5 */ printf(“The value of i is %d\n”, i); fflush (stdout); /* flush buffer */ sum += i; } printf (“The sum is %d\n”, sum); exit (0); }

15 Concurrent C Example /* concurr.c - A concurrent C program that sums integers from 1 to 5 */ #include int sum; /* global variable */ main() { int i; /* local variable */ sum = 0; fork(); for (i=1; i<=5; i++) { /* iterate from 1 to 5 */ printf(“The value of i is %d\n”, i); fflush (stdout); /* flush buffer */ sum += i; } printf (“The sum is %d\n”, sum); exit (0); }

16 Concurrent Processes (II) r Processes perform different tasks r Distinguished by the return value of fork() r fork and execve allow newly created processes to execute an independent, separately-compiled program /* sum.c - A concurrent C program that performs different tasks for two processes */ #include main() { int pid; /* local variable */ pid=fork(); if (pid != 0) { /* original process */ printf(“The original process prints this.\n”); } else { /* newly created process */ printf (“The new process prints this.\n”); } exit(0); }

17 Concurrency in I/O Let us take a browser as an example r It needs to respond to input from users m Mouse clicks m Keyboard input r It needs to respond to input from the network m Downloaded web pages, images, … r It needs to send request to the network m Send a HTTP request How to handle this scenario? r Asynchronous I/O (aka non-blocking I/O) r Concurrency in I/O  select system call