[Network]Application Layer

1 Principles of Network Applications

1.1 Application Architectures

Client-Server

Peer-to-Peer

Hybird of C/S and P2P

--Skype

client-server: find the address of the remote client

client-client: direct communication

--Instant messaging

Similar with Skype

1.2 Application Requirements(From Transport Layer Services)

1. About Data Loss

2. Timing

3. Throughput

4. Security

2 Application-Layer Protocols

2.1 Web and HTTP

1. Properties of HTTP 

Uses TCP

Nonpersistent HTTP: One TCP connection for One object transmission

RTT: time for a small packet from client to server and back.

Response time: RTT(TCP connection) + RTT(HTTP request) + file transmission

Persistent HTTP: Multiple Objects on One TCP connection

HTTP is stateless:

server maintains no information about past client requests.

2. HTTP Request messages:

Request line: method path protocol

Header lines

Entity body

3. HTTP Response messages:

Status line: protocol statuscode statusphrase

Header lines

Data

4. Cookies

As we have disscussed above, HTTP is stateless, so if we want to keep states of users, we must utilize the process of HTTP to get it.

Most of Web Sites use cookies.

Four components:

1) cookie header line in HTTP request message

2) cookie header line in HTTP response message

3) cookie file kept on user‘s host, managed by user browser

4) cookie file kept on server database of Web sites

To sum up, HTTP is stateless for it does not store the information of user states. But we can store the cookies in user hosts and servers and let the HTTP messages carry states.

5. Web cache

Why caching

1) reduce response time

2) reduce traffic

With HTTP:

Use conditional GET: If-modified-since, Not-modified

2.2 FTP

FTP seperate control and data connections, see following:

out-of-band: 是控制和数据分离,当有紧急情况(控制数据须要传输时,控制传输具有较高的优先级)

1) client build control connection, server build data connection

2) FTP is stateful

2.3 Email

1. SMTP: reliably transfer email messages(TCP connection)

Compare with HTTP

HTTP: pull(GET); No such restriction;
each object encapsulated in its own response msg

SMTP: push(transfer); 7-bit ASCII;
multiple objects sent in multiple msg

Message Format: 7-bit ASCII

header lines (if extention, add some lines to declare the file type)

body

2. POP3

Store email locally.

3. IMAP

Store on mail server.

4. The difference of them

This part I most quoted from the page.

SMTP is the basis. POP3(locally, stateless) and IMAP(on the server, stateful-folder) are used to access the mails.

2.4 DNS

TLD: Top-Level-Domain com, cn, org ...

1. DNS records

hostname is the name of a host - ibm

domain is part of URL you can consider as. - ibm.com

alias name is URL - www.ibm.com

canonical name is real name - servereast.backup2.ibm.com

2. DNS Protocol, Message

query and reply messages

header: identification and flags

some fields

3. An Example: Inserting records into DNS

(networkutopia.com,dns1.networkutopia.com, NS)

(dns1.networkutopia.com,212.212.212.1, A)

Then others can find your web site at IP 212.212.212.1

2.5 P2P

There are some properties of P2P:

1) no always-on server

2) end systems directly communicate

3) peers change IP

1. File Distribution

C/S is "N copies upload and N copies download", but P2P is "One copy uploads and N copies download".

BitTorrent

tracker: track peers participating in torrent.  - an individual

torrent: group of peers exchanging chunks of a file. - a group

The processes of bit torrent consist of pulling chunks and sending chunks.

- When downloading chunks, the peer will request a list of chunks from its neighbors, and choose the rarest chunks first. (从最稀缺的内容開始)

- When uploading chunks, the peer will send chunks to four neighbors currently sending it chunks at highest rate.(投桃报李)

So one file will be held by several peers in the network and each peer can both download and upload. And there are some prescriptions for peers to down and up.

2. Searching for Information

Query blood

is a method to find resource in a P2P network. Because the graph of P2P network may not be connected by each node. So a query must be broadcasted in the network to find a resource.

It may cause DoS attack.

The TCP connection built in the process of blooding form a hierarchical searching graph.

3. Skype

Almost similar with BitTorrent and Query blood.

End.

时间: 2024-10-13 01:41:32

[Network]Application Layer的相关文章

Application Layer

1. Applications – The Interface Between the Networks two programs access to the network: applications and services. Applications are designed to interact with us. Application is software for the user. If the device is a computer, the application is t

[Network]Link Layer

1 Introduction This part explains some similar points of other layers, such as layer service, data format and link. And link layer is a layer of combination of hardware, software and firmware. But why both link-level and end-end systems need rdt? 2 E

课程一,第四周(Deep Neural Networks) —— 2.Programming Assignments: Deep Neural Network - Application

Deep Neural Network - Application Congratulations! Welcome to the fourth programming exercise of the deep learning specialization. You will now use everything you have learned to build a deep neural network that classifies cat vs. non-cat images. In

【资料整理】cisco [OSI, IP Address, Network Segment, Subnet Mask]

### Concept ### ---------------------- from 20110712 to 20110716 1.Network segment { router; switch; bridge; } 2.LAN blocks { broadcast domain; broadcast  storm; multicast; low brandwidth; } 3.benefits of the router { ! forward broadcast; filter msgs

UDS(ISO14229-2006) 汉译(参考文献)

[1] SAE J1939-73, Recommended Practice for a Serial Control and Communications Vehicle Network Application Layer — Diagnostics [2] ANSI/IEEE 754-1985, IEEE Standard for Binary Floating-Point Arithmetic [3] ISO 16844-7, Road vehicles — Tachograph syst

Core abstraction layer for telecommunication network applications

A new sub-system, the core abstraction layer (CAL), is introduced to the middleware layer of the multi-core processor based modem board. This new module provides an abstraction for the multi-core FSL P4080 processor and its DPAA. For the deployment o

Computer Networking: Network layer

Forwarding and routing 2 important network-layer functions – forwarding and routing. Forwarding: The router-local action of transferring a packet from an input link interface to the appropriate output link interface (within a single router). Terms 'f

Lock-less buffer management scheme for telecommunication network applications

A buffer management mechanism in a multi-core processor for use on a modem in a telecommunications network is described herein. The buffer management mechanism includes a buffer module that provides buffer management services for one or more Layer 2

Linking code for an enhanced application binary interface (ABI) with decode time instruction optimization

A code sequence made up multiple instructions and specifying an offset from a base address is identified in an object file. The offset from the base address corresponds to an offset location in a memory configured for storing an address of a variable