Presentation is loading. Please wait.

Presentation is loading. Please wait.

ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 5.

Similar presentations


Presentation on theme: "ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 5."— Presentation transcript:

1 ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 5

2 ICOM 6115©Manuel Rodriguez-Martinez Project 1: Simplet FTP Systems Implement a simple FTP client-server system ( Due: 11:59 PM-September 13,2002 ) –You will write SFTPClient.java –Main client application SFTPServer.java –Main server application SFTPStub.java –Client stub to interact with server SFTPHandler.java –Server handler to manage all requests

3 ICOM 6115©Manuel Rodriguez-Martinez Lecture Objectives Understand Network Programming –Operating Systems support for Networking threads –Implementation options for servers Iterative servers Concurrent servers –Buffering of I/O streams –Finite state machines –Protocols Design

4 ICOM 6115©Manuel Rodriguez-Martinez Options to implement a server Iterative Server –One server instance serves all clients MyServer1.java Concurrent server –Multiple server instances server the clients MyServer2.java Which one is best? –As usual: it depends on what you want…

5 ICOM 6115©Manuel Rodriguez-Martinez Iterative Server Server Client Listen Queue Client OS

6 ICOM 6115©Manuel Rodriguez-Martinez Iterative Server One server to handle multiple requests –Simple to implement –Takes some time to service each request Becomes a bottleneck if heavy I/O is needed –Should be used only to service small requests Time of day –to synchronize all hosts on a network Name of a computer –Typically used for connectionless services Datagrams (UDP)

7 ICOM 6115©Manuel Rodriguez-Martinez Concurrent Server Master Server Client Slave Server Initial Connection Create slave Connection Hand off

8 ICOM 6115©Manuel Rodriguez-Martinez Concurrency: Multiple Servers Client Slave Server Slave Server Slave Server Master Server

9 ICOM 6115©Manuel Rodriguez-Martinez Concurrent Server Multiple serves to handle multiple requests –Each client has its own server Master – slave relationship –Master server: receives initial request and forwards it to slaver server –Slave server: the actual entity that interacts with the client Requires OS support to be implemented –Concurrent processes –Threads

10 ICOM 6115©Manuel Rodriguez-Martinez Concurrent Server Issues Issues –Far more complex to implement –Provide parallelism Good for I/O intensive applications –Should be used to service large requests FTP, HTTP Database requests –Typically used by connection-oriented services Streams (TCP)

11 ICOM 6115©Manuel Rodriguez-Martinez Example Concurrent Server MyServer2.java MyClient2.java Download from class web page


Download ppt "ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 5."

Similar presentations


Ads by Google