{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

Info icon This 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
Image of page 1

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

View Full Document Right 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
Image of page 2
3 End System: Computer on the ‘Net Internet Also known as a “host”…
Image of page 3

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

View Full Document Right 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”
Image of page 4
5 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
Image of page 5

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

View Full Document Right 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
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
Image of page 7

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

View Full Document Right 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
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
Image of page 9

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern