{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Set2 - CSMC 412 Computer Networks Prof Ashok K Agrawala...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CSMC 412 Computer Networks Prof. Ashok K Agrawala © 2011 Ashok Agrawala Set 2 September 11 CMSC412 Set 2 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Contents Client-server paradigm End systems Clients and servers Sockets Socket abstraction Socket programming in UNIX File-Transfer Protocol (FTP) Uploading and downloading files Separate control and data connections September 11 CMSC412 Set 2 2
Background image of page 2
End System: Computer on the ‘Net Internet Also known as a “host”… September 11 CMSC412 Set 2 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Clients and Servers Client program Running on end host Requests service E.g., Web browser Server program Running on end host Provides service E.g., Web server GET /index.html “Site under construction” September 11 CMSC412 Set 2 4
Background image of page 4
Clients Are Not Necessarily Human Example: Web crawler (or spider) Automated client program Tries to discover & download many Web pages Forms the basis of search engines like Google Spider client Start with a base list of popular Web sites Download the Web pages Parse the HTML files to extract hypertext links Download these Web pages, too And repeat, and repeat, and repeat… September 11 CMSC412 Set 2 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Client-Server Communication Client “sometimes on” Initiates a request to the server when interested E.g., Web browser on your laptop or cell phone Doesn’t communicate directly with other clients Needs to know the server’s address Server is “always on” Services requests from many client hosts E.g., Web server for the www.cnn.com Web site Doesn’t initiate contact with the clients Needs a fixed, well-known address September 11 CMSC412 Set 2 6
Background image of page 6
Peer-to-Peer Communication No always-on server at the center of it all Hosts can come and go, and change addresses Hosts may have a different address each time Example: peer-to-peer file sharing Any host can request files, send files, query to find where a file is located, respond to queries, and forward queries Scalability by harnessing millions of peers Each peer acting as both a client and server September 11 CMSC412 Set 2 7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Client and Server Processes Program vs. process Program: collection of code Process: a running program on a host Communication between processes Same end host: inter-process communication Governed by the operating system on the end host Different end hosts: exchanging messages Governed by the network protocols Client and server processes Client process: process that initiates communication Server process: process that waits to be contacted September 11 CMSC412 Set 2 8
Background image of page 8
Socket: End Point of Communication Sending message from one process to another Message must traverse the underlying network Process sends and receives through a “socket” In essence, the doorway leading in/out of the house Socket as an Application Programming Interface Supports the creation of network applications socket socket User process User process Operating System Operating System September 11 CMSC412 Set 2 9
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}