02Sockets - Networked Applications: Sockets COS 461:...

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

View Full Document Right Arrow Icon
1 Networked Applications: Sockets COS 461: Computer Networks Jennifer Rexford
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Goals of Today’s Lecture 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
Background image of page 2
3 End System: Computer on the ‘Net Internet Also known as a “host”…
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 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”
Background image of page 4
5 Clients Are Not Necessarily Human Example: Web crawler (or spider) Automated client program 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
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 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
Background image of page 6
7 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
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 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
Background image of page 8
9 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
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 Identifying the Receiving Process Sending process must identify the receiver Name or address of the receiving end host
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/05/2009 for the course EC EC0123 taught by Professor Mark during the Spring '09 term at Albany College of Pharmacy and Health Sciences.

Page1 / 38

02Sockets - Networked Applications: Sockets COS 461:...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online