SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Chapter 2
Application Layer

Computer Networking:
A Top Down Approach,

4th edition.
Jim Kurose, Keith Ross
Addison-Wesley, July
2007.
Electronic Mail

outgoing
message queue
user mailbox

Asynchronous Communication
Medium
Three major components:
•
•
•

User Agents
Mail Servers
Simple Mail Transfer Protocol:
SMTP

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
mail
server

user
agent

SMTP
SMTP

mail
server

user
agent

SMTP
user
agent

mail
server
user
agent

user
agent
Electronic Mail
Mail Servers
r Each recipient has a mailbox
located in one of the mail servers
r Mailbox manages and maintains the
mail
messages that have been sent to
server
him.
r Message queue of outgoing (to be
sent) mail messages
SMTP
r 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

SMTP

SMTP

user
agent

user
agent
mail
server

user
agent

user
agent
Scenario: Alice sends message to Bob
4) SMTP client sends Alice’s
message over the TCP
connection
5) Bob’s mail server places the
message in Bob’s mailbox
6) Bob invokes his user agent
to read message

1) Alice uses UA to compose
message to
bob@someschool.edu
2) Alice’s UA sends message
to her mail server; message
placed in message queue
3) Client side of SMTP opens
TCP connection with Bob’s
mail server

1
user
agent

2

mail
server
3

mail
server
4

5

6

user
agent
Sample SMTP Interaction
•Client SMTP establishes a TCP connection with Server
SMTP
•Application Layer handshaking to introduce themselves
Sample SMTP Interaction

S: 220 hamburger.edu (Service Ready)
C: HELO crepes.fr
S: 250 Hello crepes.fr, pleased to meet you
C: MAIL FROM: <alice@crepes.fr>
S: 250 alice@crepes.fr... Sender ok
C: RCPT TO: <bob@hamburger.edu>
S: 250 bob@hamburger.edu ... Recipient ok
C: DATA (All lines after DATA command are treated as the
mail message)
S: 354 Enter mail, end with "." on a line by itself
C: Do you like ketchup?
C: How about pickles?
C: .
S: 250 Message accepted for delivery
C: QUIT
S: 221 hamburger.edu closing connection
SMTP and HTTP
r

SMTP uses persistent connections


Can send all of the messages over the same TCP connection

Comparison with HTTP:
r

HTTP transfer files from web server to web client

r

SMTP from one mail server to another

r

Both use Persistent Connections

r

HTTP: pull




r

Someone loads information on a web server and users use
HTTP to pull this info
TCP connection is initiated by the machine that wants to
receive the file

SMTP: push



Sending mail sever pushes the file to the receiving mail server
TCP connection is initiated by the machine that wants to send
the file
Mail Access Protocols
SMTP

SMTP

user
agent
sender’s mail
server
r
r

r

access
protocol

receiver’s mail
server

SMTP: delivery/storage to receiver’s 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

IMAP and POP
 Part of Assignment 1

user
agent
Pure P2P Architecture


no always-on server

 Arbitrary end systems

directly communicate
 Peers are intermittently
connected and change IP
addresses
 “P2P is a class of applications

that takes advantage of
resources e.g. storage, content,
human presence, available at the
edges of the Internet”

peer-peer
Examples of P2P Technologies
File sharing Programs:
Gnutella ,Napster ,LimeWire, Kazaa
etc.

Instant messaging:
ICQ, Jabber etc
Conferencing
Netmeeting, Voice over IP (VoIP) etc
P2P File Sharing
 Alice runs P2P client

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 Bob’s PC to
Alice’s 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.
P2P: Centralized Index
original “Napster” design
 When peer connects, it informs
central server:
centralized
directory server
 IP address
 Content that it is making
available
 Central Server collects info from
peers that becomes active
 Creates a centralized dynamic
2
database that maps each object
name to a set of IP addresses
 Hybrid of P2P and client-server
 File distribution is P2P
 Search is client-server

Bob

1

peers
1
3

1
1

Alice
File Sharing with Napster

3. Server searches
database. Finds song
on User C’s machine

www.napster.com
Main Server
File List:
UserC song.mp3
UserD another.mp3
…..

1. Construct Database
• Users connect to Napster Server
• Server builds up a list of available
songs and locations

User B
…

2. User A
searches for
song.mp3

4. Server informs
User A of the location
of song.mp3

User D
(Another.mp3)

User C

User A
5. User A connects to
User C and downloads
song.mp3

(Song.mp3)
P2P: Problems with Centralized Directory
 Single Point of Failure
 If directory server crashes, the
entire P2P application crashes.

 Performance Bottleneck
 Thousands of connected users
 Server must maintain a huge
database and must respond to
thousands of queries per second
 Copyright Infringement
 Easy to obtain copyrighted
material for free
 Heavy metal rock group Metallica
sued Napster for copyright
infringement in April 2000.

file transfer is
decentralized, but
locating content is
highly centralized
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 there’s a TCP connection
 All active peers and edges
form overlay network
 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
Significant amount of
traffic among the peers
in the underlying
network connecting the
peers

File transfer

Query

QueryHit

Query Hit
Query
Limited Query Flooding
A

peer-count field in the message is set to specific

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.
Gnutella: Peer Joining
1.

Joining peer X must find another peer in the overlay
network



2.
3.

4.
5.

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

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
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

 Super peer maintains an index of IP

addresses of children holding different
files.
 Significant more peers can be checked
for a match without creating an
excessive quantity of query traffic

ordinary peer
group-leader peer
neighoring relationships
in overlay network
Assignment 1

Bit Torrent Protocol
Anti-Snubbing, Pipelining, Endgame

mode, Peer Churn?

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Electronic Mail
Electronic MailElectronic Mail
Electronic Mail
 
Wireshark Lab HTTP, DNS and ARP v7 solution
Wireshark Lab HTTP, DNS and ARP v7 solutionWireshark Lab HTTP, DNS and ARP v7 solution
Wireshark Lab HTTP, DNS and ARP v7 solution
 
Application layer
Application layerApplication layer
Application layer
 
transfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imaptransfer protocols,ftp,smtp,pop,imap
transfer protocols,ftp,smtp,pop,imap
 
Networking presentation
Networking presentationNetworking presentation
Networking presentation
 
E mail transfer .74
E mail transfer .74E mail transfer .74
E mail transfer .74
 
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOLSMTP - SIMPLE MAIL TRANSFER PROTOCOL
SMTP - SIMPLE MAIL TRANSFER PROTOCOL
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Electronic mail
Electronic mailElectronic mail
Electronic mail
 
Wireshark lab ssl v7 solution
Wireshark lab ssl v7 solutionWireshark lab ssl v7 solution
Wireshark lab ssl v7 solution
 
Lecture application layer
Lecture application layerLecture application layer
Lecture application layer
 
Unit 5 application layer
Unit 5 application layerUnit 5 application layer
Unit 5 application layer
 
Email Security, The Essence of Secure E-mail
Email Security, The Essence of Secure E-mailEmail Security, The Essence of Secure E-mail
Email Security, The Essence of Secure E-mail
 
Email
EmailEmail
Email
 
Lec 2(intoduction of computer networkes)
Lec 2(intoduction of computer networkes)Lec 2(intoduction of computer networkes)
Lec 2(intoduction of computer networkes)
 
Lecture 9 electronic_mail_representation_and_transfer
Lecture 9 electronic_mail_representation_and_transferLecture 9 electronic_mail_representation_and_transfer
Lecture 9 electronic_mail_representation_and_transfer
 
Smtp protocol
Smtp protocolSmtp protocol
Smtp protocol
 
Simple Mail Transfer Protocol
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol
Simple Mail Transfer Protocol
 
Simple mail transfer protocol
Simple mail transfer protocolSimple mail transfer protocol
Simple mail transfer protocol
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 

Ähnlich wie Week3 lec3-bscs1

Application layer in network system
Application layer in network systemApplication layer in network system
Application layer in network systemSalauddin Rubel
 
Application layer
Application layerApplication layer
Application layerreshmadayma
 
Application layer
Application layerApplication layer
Application layerreshmadayma
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptxZahouAmel1
 
Jaimin chp-7 - application layer- 2011 batch
Jaimin   chp-7 - application layer- 2011 batchJaimin   chp-7 - application layer- 2011 batch
Jaimin chp-7 - application layer- 2011 batchJaimin Jani
 
009478419.pdf
009478419.pdf009478419.pdf
009478419.pdfEidTahir
 
Application layer
Application layerApplication layer
Application layerAnithaRaj31
 
Application layer
Application layerApplication layer
Application layerVipin Nagar
 
Application layer
Application layerApplication layer
Application layerNeha Kurale
 
Application layer
Application layerApplication layer
Application layerNeha Kurale
 
networking and computer security prasantation
networking  and computer  security  prasantationnetworking  and computer  security  prasantation
networking and computer security prasantationDasharathChaudhary3
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdfEidTahir
 

Ähnlich wie Week3 lec3-bscs1 (20)

Application layer in network system
Application layer in network systemApplication layer in network system
Application layer in network system
 
Application layer
Application layerApplication layer
Application layer
 
Application layer
Application layerApplication layer
Application layer
 
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
4-Lect_4-2.pptx4-Lect_4-2.pptx4-Lect_4-2.pptx
 
15 Application layer.pptx
15 Application layer.pptx15 Application layer.pptx
15 Application layer.pptx
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Application layer
Application layerApplication layer
Application layer
 
Jaimin chp-7 - application layer- 2011 batch
Jaimin   chp-7 - application layer- 2011 batchJaimin   chp-7 - application layer- 2011 batch
Jaimin chp-7 - application layer- 2011 batch
 
009478419.pdf
009478419.pdf009478419.pdf
009478419.pdf
 
applayer.pptx
applayer.pptxapplayer.pptx
applayer.pptx
 
Application layer
Application layerApplication layer
Application layer
 
Application layer
Application layerApplication layer
Application layer
 
Cn ppt
Cn  pptCn  ppt
Cn ppt
 
Chapter2 Application
Chapter2 ApplicationChapter2 Application
Chapter2 Application
 
Application layer
Application layerApplication layer
Application layer
 
Application layer
Application layerApplication layer
Application layer
 
networking and computer security prasantation
networking  and computer  security  prasantationnetworking  and computer  security  prasantation
networking and computer security prasantation
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdf
 
Unit 6 : Application Layer
Unit 6 : Application LayerUnit 6 : Application Layer
Unit 6 : Application Layer
 
Appl layer
Appl layerAppl layer
Appl layer
 

Mehr von syedhaiderraza (20)

Week16 lec1
Week16 lec1Week16 lec1
Week16 lec1
 
Week15 lec1
Week15 lec1Week15 lec1
Week15 lec1
 
Week14 lec2
Week14 lec2Week14 lec2
Week14 lec2
 
Week14 lec1
Week14 lec1Week14 lec1
Week14 lec1
 
Week13 lec2
Week13 lec2Week13 lec2
Week13 lec2
 
Week13 lec1
Week13 lec1Week13 lec1
Week13 lec1
 
Week11 lec2
Week11 lec2Week11 lec2
Week11 lec2
 
Week11 lec1
Week11 lec1Week11 lec1
Week11 lec1
 
Week10 lec1
Week10 lec1Week10 lec1
Week10 lec1
 
Week9 lec1
Week9 lec1Week9 lec1
Week9 lec1
 
Week8 lec2-bscs1
Week8 lec2-bscs1Week8 lec2-bscs1
Week8 lec2-bscs1
 
Week8 lec1-bscs1
Week8 lec1-bscs1Week8 lec1-bscs1
Week8 lec1-bscs1
 
Week5 lec3-bscs1
Week5 lec3-bscs1Week5 lec3-bscs1
Week5 lec3-bscs1
 
Week5 lec2-bscs1
Week5 lec2-bscs1Week5 lec2-bscs1
Week5 lec2-bscs1
 
Week5 lec1-bscs1
Week5 lec1-bscs1Week5 lec1-bscs1
Week5 lec1-bscs1
 
Week4 lec2-bscs1
Week4 lec2-bscs1Week4 lec2-bscs1
Week4 lec2-bscs1
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
 
Week3 lec 2
Week3 lec 2Week3 lec 2
Week3 lec 2
 
Week3 lec 1
Week3 lec 1Week3 lec 1
Week3 lec 1
 
Week2 lec2-bscs1
Week2 lec2-bscs1Week2 lec2-bscs1
Week2 lec2-bscs1
 

Kürzlich hochgeladen

AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxMichelleTuguinay1
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptxJonalynLegaspi2
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Developmentchesterberbo7
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 

Kürzlich hochgeladen (20)

AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptxDIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
DIFFERENT BASKETRY IN THE PHILIPPINES PPT.pptx
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
week 1 cookery 8 fourth - quarter .pptx
week 1 cookery 8  fourth  -  quarter .pptxweek 1 cookery 8  fourth  -  quarter .pptx
week 1 cookery 8 fourth - quarter .pptx
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Using Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea DevelopmentUsing Grammatical Signals Suitable to Patterns of Idea Development
Using Grammatical Signals Suitable to Patterns of Idea Development
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 

Week3 lec3-bscs1

  • 1. Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  • 2. Electronic Mail outgoing message queue user mailbox Asynchronous Communication Medium Three major components: • • • User Agents Mail Servers Simple Mail Transfer Protocol: SMTP 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 mail server user agent SMTP SMTP mail server user agent SMTP user agent mail server user agent user agent
  • 3. Electronic Mail Mail Servers r Each recipient has a mailbox located in one of the mail servers r Mailbox manages and maintains the mail messages that have been sent to server him. r Message queue of outgoing (to be sent) mail messages SMTP r 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 SMTP SMTP user agent user agent mail server user agent user agent
  • 4. Scenario: Alice sends message to Bob 4) SMTP client sends Alice’s message over the TCP connection 5) Bob’s mail server places the message in Bob’s mailbox 6) Bob invokes his user agent to read message 1) Alice uses UA to compose message to bob@someschool.edu 2) Alice’s UA sends message to her mail server; message placed in message queue 3) Client side of SMTP opens TCP connection with Bob’s mail server 1 user agent 2 mail server 3 mail server 4 5 6 user agent
  • 5. Sample SMTP Interaction •Client SMTP establishes a TCP connection with Server SMTP •Application Layer handshaking to introduce themselves Sample SMTP Interaction S: 220 hamburger.edu (Service Ready) C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... Recipient ok C: DATA (All lines after DATA command are treated as the mail message) S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection
  • 6. SMTP and HTTP r SMTP uses persistent connections  Can send all of the messages over the same TCP connection Comparison with HTTP: r HTTP transfer files from web server to web client r SMTP from one mail server to another r Both use Persistent Connections r HTTP: pull   r Someone loads information on a web server and users use HTTP to pull this info TCP connection is initiated by the machine that wants to receive the file SMTP: push   Sending mail sever pushes the file to the receiving mail server TCP connection is initiated by the machine that wants to send the file
  • 7. Mail Access Protocols SMTP SMTP user agent sender’s mail server r r r access protocol receiver’s mail server SMTP: delivery/storage to receiver’s 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 IMAP and POP  Part of Assignment 1 user agent
  • 8. Pure P2P Architecture  no always-on server  Arbitrary end systems directly communicate  Peers are intermittently connected and change IP addresses  “P2P is a class of applications that takes advantage of resources e.g. storage, content, human presence, available at the edges of the Internet” peer-peer
  • 9. Examples of P2P Technologies File sharing Programs: Gnutella ,Napster ,LimeWire, Kazaa etc. Instant messaging: ICQ, Jabber etc Conferencing Netmeeting, Voice over IP (VoIP) etc
  • 10. P2P File Sharing  Alice runs P2P client 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 Bob’s PC to Alice’s 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.
  • 11. P2P: Centralized Index original “Napster” design  When peer connects, it informs central server: centralized directory server  IP address  Content that it is making available  Central Server collects info from peers that becomes active  Creates a centralized dynamic 2 database that maps each object name to a set of IP addresses  Hybrid of P2P and client-server  File distribution is P2P  Search is client-server Bob 1 peers 1 3 1 1 Alice
  • 12. File Sharing with Napster 3. Server searches database. Finds song on User C’s machine www.napster.com Main Server File List: UserC song.mp3 UserD another.mp3 ….. 1. Construct Database • Users connect to Napster Server • Server builds up a list of available songs and locations User B … 2. User A searches for song.mp3 4. Server informs User A of the location of song.mp3 User D (Another.mp3) User C User A 5. User A connects to User C and downloads song.mp3 (Song.mp3)
  • 13. P2P: Problems with Centralized Directory  Single Point of Failure  If directory server crashes, the entire P2P application crashes.  Performance Bottleneck  Thousands of connected users  Server must maintain a huge database and must respond to thousands of queries per second  Copyright Infringement  Easy to obtain copyrighted material for free  Heavy metal rock group Metallica sued Napster for copyright infringement in April 2000. file transfer is decentralized, but locating content is highly centralized
  • 14. 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 there’s a TCP connection  All active peers and edges form overlay network  Overlay network may have thousands of participating peers but  Given peer typically connected with < 10 overlay neighbors
  • 15. Query Flooding  Query message sent over existing TCP connections  Peers forward Query message  Query-Hit message sent over reverse path Non-scalable Significant amount of traffic among the peers in the underlying network connecting the peers File transfer Query QueryHit Query Hit Query
  • 16. Limited Query Flooding A peer-count field in the message is set to specific 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.
  • 17. Gnutella: Peer Joining 1. Joining peer X must find another peer in the overlay network   2. 3. 4. 5. 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 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
  • 18. 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  Super peer maintains an index of IP addresses of children holding different files.  Significant more peers can be checked for a match without creating an excessive quantity of query traffic ordinary peer group-leader peer neighoring relationships in overlay network
  • 19. Assignment 1 Bit Torrent Protocol Anti-Snubbing, Pipelining, Endgame mode, Peer Churn?