An Introduction to Internetworking. Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and.

Slides:



Advertisements
Similar presentations
TCP/IP MODEL Maninder Kaur
Advertisements

Java Network Programming Vishnuvardhan.M. Dept. of Computer Science - SSBN Java Overview Object-oriented Developed with the network in mind Built-in exception.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Socket Programming 0.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Network Programming Chapter 11 Lecture 6. Networks.
Slide 1 Client / Server Paradigm. Slide 2 Outline: Client / Server Paradigm Client / Server Model of Interaction Server Design Issues C/ S Points of Interaction.
Content Introduction TCP Clients Iterative TCP Servers Concurent TCP Servers UDP Multicasting
Socket Programming.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
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.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
Universidad de Chile - Tupper 2007, Santiago - Fono/Fax: (56 2) cec.uchile.cl Módulo ECI - 11: Fundamentos de Redes de Computadores.
CS3771 Today: network programming with sockets  Previous class: network structures, protocols  Next: network programming Sockets (low-level API) TODAY!
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.
An Introduction to Internetworking. Why distributed systems - Share resources (devices & CPU) - Communicate people (by transmitting data)
1 School of Computing Science Simon Fraser University CMPT 771/471: Internet Architecture and Protocols Socket Programming Instructor: Dr. Mohamed Hefeeda.
© Lethbridge/Laganière 2001 Chap. 3: Basing Development on Reusable Technology 1 Let’s get started. Let’s start by selecting an architecture from among.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 25 Networking.
VSP Video Station Protocol Presented by : Mittelman Dana Ben-Hamo Revital Ariel Tal Instructor : Sela Guy Presented by : Mittelman Dana Ben-Hamo Revital.
I NTRODUCTION OF S OCKET P ROGRAMMING L.Aseel AlTurki King Saud University.
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:
Socket Programming -What is it ? -Why bother ?. Basic Interface for programming networks at transport level It is communication end point Used for inter.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
 Socket  The combination of an IP address and a port number. (RFC 793 original TCP specification)  The name of the Berkeley-derived application programming.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface
 TCP (Transport Control Protocol) is a connection-oriented protocol that provides a reliable flow of data between two computers.  TCP/IP Stack Application.
Practicum: - Client-Server Computing in Java Fundamental Data Structures and Algorithms Margaret Reid-Miller 13 April 2004.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 16 Socket Interface.
Chapter 2 Applications and Layered Architectures Sockets.
1 Chapter 28 Networking. 2 Objectives F To comprehend socket-based communication in Java (§28.2). F To understand client/server computing (§28.2). F To.
Silberschatz, Galvin, and Gagne  1999 Applied Operating System Concepts Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
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.
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.
Socket Programming.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
Networking OSI (Open Systems Interconnection) model of computer networking, seven layers (the Application, Presentation, Session, Transport, Network, Data.
Java Network Programming Network Programming Spring 2000 Jeffrey E. Care
Berkeley Socket Abstraction
UNIT-6. Basics of Networking TCP/IP Sockets Simple Client Server program Multiple clients Sending file from Server to Client Parallel search server.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 16 Socket Interface.
Multimedia Retrieval Architecture Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India Multimedia Retrieval Architecture.
Netprog: Client/Server Issues1 Issues in Client/Server Programming Refs: Chapter 27.
Socket programming in C. Socket programming Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm.
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.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
1 K. Salah Application Layer Module K. Salah Network layer duties.
Client-Server Communication
MCA – 405 Elective –I (A) Java Programming & Technology
Client-Server Interaction
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Process-to-Process Delivery:
Chapter 16 Socket Interface.
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
An Introduction to Internetworking
An Introduction to Internetworking
Computer Networks Protocols
Presentation transcript:

An Introduction to Internetworking

Algorithm for client-server communication with UDP (connectionless) A SERVER A CLIENT Create a server-socket (listener)and bound it to a port (higher than 1024) Start listening for UDP packages comming Receive the UDP package and extract Message, Host Address & Port from seder Build a new UDP package with thesender´s Address & Port and the reply message Send message Build a UDP package with the request message, server´s address & port numbre Create socket Send package Listen to answer Receive package Extract answer

Algorithm for client-server communication with TCP (connection-oriented) A SERVER A CLIENT Create a server-socket (listener)and bound it to a port (higher than 1024) Start listening for request Create another (normal) socket and build a TCP connection when a request arrives Open IO streams for this connection read-write Create socket and try a redezvous with a server (given address and port) If the redezvous occurs, build a TCP connection Open IO streams for this connection write-read THIS IS THE APPLICATION’S PROTOCOLL

Every layer has the illusion to be talking to the correspondent one in the other application A SERVER A CLIENT 4444 The UDP: User Defined Package: like writing a letterRead write sequence UDP or TCP communication Internet frames and addresses electric pulses

Attending more than a client: The sequential server: The problem A SERVER A CLIENT 4444 ?

During the conversation the server is not listening at the port 444 A SERVER A CLIENT 4444 X

Only after the server is ready with the first client it can listen to the port 4444 again A SERVER A CLIENT 4444 ?

The service may be to transfer a file. The user at the client may have first to type and send the filename A SERVER A CLIENT 4444 X

What if the server has to wait too much for a client to type in a file name ? (or the file is too big) A SERVER A CLIENT 4444 Timeout X

Concurrent Servers: there are separate processes to attend the port and to transfer the file A SERVER A CLIENT 4444 ?

After the client contacts the server, the server creates another process to attend the client and keeps listening to the port 4444 for another A SERVER A CLIENT 4444 This is a “slave” process or thread It is executed paralell to the “master” process or thread ?

While the new process is serving the first client, the second client can contact the server at the port 4444 A SERVER A CLIENT 4444 ?

And the server creates another process A SERVER A CLIENT 4444 ?

Now the third client contacts the server A SERVER A CLIENT 4444 ?

And a third slave process or thread is created A SERVER A CLIENT 4444 ?

When should I use iterative or concurrent server ? When the answer to a request is small and speedy it is better to have an iterative server When the server should “talk” to the client and wait for actions of the client´s user it is better to use a concurrent server Iterative servers often use UDP connections while concurrent servers use TCP connections

Stateless vs. Stateful servers: the problem of reading a remote file by steps. File reading requests arrive with dealy A SERVER A CLIENT Open file XYZ read first 50 bytes while (not end of file XYZ) read next 50 bytes close file ? Request open file XYZ Answer file XYZ exists and ready

A stateless server means it does not remember previous requests A SERVER A CLIENT Open file XYZ read first 50 bytes while (not end of file XYZ) read next 50 bytes close file ? Request read bytes 0 to 49 from file XYZ Answer the content of the bytes

The client must provide all the information again ! A SERVER A CLIENT Open file XYZ read first 50 bytes while (not end of file XYZ) read next 50 bytes close file ? Request read bytes 50 to 99 from file XYZ Answer the content of the bytes

This may cause a lot of network traffic, especially if there are many clients A SERVER A CLIENT Open file XYZ read first 50 bytes while (not end of file XYZ) read next 50 bytes close file ? Request read bytes X to X+50 from file XYZ Answer the content of the bytes

Stateful Server: it mantains some information abut what clients did A SERVER A CLIENT Open file XYZ read first 50 bytes while (not end of file XYZ) read next 50 bytes close file ? Request open file XYZ Answer: file pointer to file XYZ Pointer File Position 0 XYZ 0 1 FILE ZXY 50

The information the client has to pass to the server is much smaller A SERVER A CLIENT Open file XYZ read first 50 bytes while (not end of file XYZ) read next 50 bytes close file ? Request 0, read 50 Answer: the content Pointer File Position 0 XYZ 50 1 FILE ZXY 50

The information at the server should be updated with every request A SERVER A CLIENT Open file XYZ read first 50 bytes while (not end of file XYZ) read next 50 bytes close file ? Request 0, read 50 Answer: the content Pointer File Position 0 XYZ FILE ZXY 50

It is important to close the file !!! A SERVER A CLIENT Open file XYZ read first 50 bytes while (not end of file XYZ) read next 50 bytes close file ? Request 0, read 50 Answer: the content Pointer File Position 0 XYZ FILE ZXY 50

Problems with stateful servers They are more efficient but they are more sensitive to errors, especially with UDP connections What if a request does not arrive to the server? What if the client collapses without telling it?

New products between the application and transport layer make distributed programming much easier Libraries for distributed programming (middleware) RPC, CORBA, RMI

RPC: remote procedure call Remote process 1. Obtain reference 2. Call procedure & Receive results as the procedure were in the calling computer

RMI in JAVA (similar to CORBA) Creates and publishes a Remote Object Other applications use and share this object (data) server

Problems to solve How does the client which are the name of the procedures that can be invoked (interface file) How can a client know where to find a remote object? (server) How is communication implemented? (http protocols) What do I gain? (protocols!)

Programming and running a RMI Interface Implementation RMI Interface Server prog. Client prog. The RMI-Registry server