Professional Documents
Culture Documents
Last Lecture
DNS SMTP
Todays Lecture
P2P
Electronic Mail
Asynchronous Communication Medium Three major components:
User Agents Mail Servers Simple Mail Transfer Protocol: SMTP
user agent mail server
user agent
mail server
user agent
User Agent a.k.a. mail reader composing, editing, reading mail messages e.g., Eudora, Outlook, Mozilla Thunderbird Sends message to the mail server
user agent
Electronic Mail
Mail Servers Each recipient has a mailbox located in one of the mail servers Mailbox manages and maintains the mail messages that have been sent to server him. Message queue of outgoing (to be sent) mail messages SMTP Simple Mail Transfer Protocol (SMTP) between mail servers to send email messages mail Client and Server server Both client and sever sides of SMTP run on every mail server. Runs on TCP at port 25. user agent RFC 5321
user agent user agent mail server user agent
SMTP
SMTP
user agent
user agent
SMTP
access protocol
user agent
SMTP: delivery/storage to receivers server Mail access protocol: retrieval from server
POP: Post Office Protocol [RFC 1939] IMAP: Internet Mail Access Protocol [RFC 1730] HTTP: Gmail, Hotmail, Yahoo! Mail, etc. User agent is ordinary web browser HTTP to send email to web server HTTP to access mail box
Client wants IP for www.amazon.com: Client first queries a root server The root server returns the IP addresses for TLD servers for the top level domain com The client then contacts one of the TLD servers which returns the IP address of an authoritative server for amazon.com The authoritative server then returns the IP address for the host name www.amazon.com
Iterated query:
Contacted server replies with name of server to contact I dont know this name, but ask this server
requesting host
cis.poly.edu
gaia.cs.umass.edu
Cache entries timeout (disappear) after some time TLD servers typically cached in local name servers Thus root name servers not often visited
8
authoritative DNS server dns.cs.umass.edu
requesting host
cis.poly.edu
gaia.cs.umass.edu
no always-on server
peer-peer
that takes advantage of resources e.g. storage, content, human presence, available at the edges of the Internet
Instant messaging:
ICQ, Jabber etc
application on her notebook computer Intermittently connects to Internet; gets new IP address for each connection Registers her content in P2P system
Asks for some music file Application displays other peers that have copy of that file. Alice chooses one of the peers, Bob. File is copied from Bobs PC to Alices notebook: P2P While Alice downloads, other users uploading from Alice.
How a peer determines which peers have the desired content Three approaches for organizing and searching for contents Different approaches are used by different P2P file sharing systems.
1 peers 1 1 1 3
Alice
1. Construct Database Users connect to Napster Server Server builds up a list of available songs and locations
User B
User D
(Another.mp3)
User A
5. User A connects to User C and downloads song.mp3
User C
(Song.mp3)
Decentralized Directory
Query Flooding Directory/Index is fully distributed over the community of peers No central server Used by Gnutella Each peer indexes the files it makes available for sharing (and no other files) Overlay Network:
Peers form an abstract,
logical network called an overlay network Edge between peer X and Y if theres a TCP connection All active peers and edges form overlay network edge: virtual (not physical) link Overlay network may have thousands of participating peers but Given peer typically connected with < 10 overlay neighbors
Query Flooding
Query message sent over existing TCP connections Peers forward Query message Query-Hit message sent over reverse path
Non-scalable Query Hit Query File transfer
Query
QueryHit
Significant amount of traffic among the peers in the underlying network connecting the peers
limit (say, 7). Each time the query message reaches a new peer, the peer decrements the peer-count field before forwarding the query to its overlay neighbor. Stops forwarding the query when peer-count field set to zero Flooding is localized to a region of the overlay network Reduces the query traffic Peer seeking the content may not be able to locate that content.
2. 3.
4. 5.
Peer X sequentially attempts TCP connections with candidate peers until connection setup with some peer Y. Peer X sends Ping message to Peer Y that forwards this message to his overlay neighbors (who then forward to their neighbors.) Peer Z on receiving Ping message respond to Peer X with Pong message (IP address) Peer X receives many Pong messages, and can then setup additional TCP connections
Creating multiple edges from itself into the overlay network
Maintain a list of peers (IP addresses ) that are often up in the overlay network Peer X can also contact a tracker site that maintains such a list
Hierarchical Overlay
Between centralized index and query
flooding approaches No dedicated server for indexing files Super Peers: Peers with high bandwidth connections into internet and high availability. Ordinary peer is assigned as a child to super peer. A new peer
Establishes a TCP connection with one of super peers Informs all the files it is sharing
ordinary peer group-leader peer neighoring relationships in overlay network
addresses of children holding different files. Significant more peers can be checked for a match without creating an excessive quantity of query traffic
Home Assignment
Bit Torrent Protocol
See