Chapter2
2017-01-06 13:48:04 0 举报
AI智能生成
在Chapter2中,故事的情节进一步展开,揭示了角色们更深层次的动机和冲突。主角开始面对他的内心恐惧和挑战,同时也发现了自己的勇气和力量。他遇到了一些新的角色,这些角色不仅增加了故事的复杂性,也为他提供了新的启示和帮助。同时,Chapter2也设定了故事的主要冲突,为接下来的剧情发展埋下了伏笔。这一章充满了悬念和紧张感,让读者对接下来的故事充满了期待。
作者其他创作
大纲/内容
Web & HTTP
web page
base HTML-file
objects
be addressable by URL
client/server model
client
browser
server
web server
HTTP connections
non-persistent HTTP
2RTT per object
响应时间 = 2RTT + 传输时间
persistent HTTP
HTTP Message
Request
request line
方法
GET
POST
HEAD
URL
HTTP版本
header lines
空行
entity body
Response
status line
protocol
status code
status phrase
header lines
空行
entity body
Cookie
components
cookie header line in HTTP request message
cookie header line of HTTP response message
cookie file kept on user's host,managed by user's browser
back-end database at Web site
用途
authorization
shopping carts
recommendations
问题
隐私
Web Cache
proxy server
goal
satisfy client requesting without involving origin server
acts as both client and server
installed by ISP
作用
减少对客户机请求的响应时间
减少一个机构的接入链路到因特网的通信量
整体上降低因特网的流量
Conditional Get
goal
don't send object if cache has up-to-date cached version
条件请求报文
请求报文使用GET方法
请求报文中包含If-Modified-Since首部行
E-Mail
components
User Agents
Mail Server
Mailbox
Message Queue
SMTP
Client
sending mail server
Server
receiving mail server
SMTP
phase
handshaking
transfer of message
closure
command
ASCII text
response
status code and phrase
messages
format
Header
TO
From
Subject
blank line
Body
must be in 7-Bit ASCII
use CRLF.CRLF to determine end
comparison with HTTP
HTTP
pull
每个对象封装在它自己的响应报文中
SMTP
push
所有对象封装在一个报文中
mail access protocol
POP
phases
Athorization
user
pass
Transaction
list
retr
dele
quit
mode
download-and-keep
download-and-delete
stateless across sessions
IMAP
keep all messages in one place:at server
allow users to organize messages in folder
keep user state across sessions
HTTP
P2P
3 architectures for locating content
Centralized
Napster
central server
IP address
content
problems
single point of failure
performance bottleneck
Decentralize and Unstructured
Gnutella
核心机制
应用层建立逻辑上的覆盖网络
protocol
查询消息通过已存在的TCP连接发送
peers转发消息
查询命中则经反向路径发送
优缺点
优点
scalabilty
问题
limited scope flooding
Decentralize and Structrued
带弦环
环提供功能
取得当前结点的前驱
取得当前结点的后继
为加速定位
加入“弦”
分布式散列表DHT
安全散列函数
SHA-1
例子:Chord
file distribution
BitTorrent
Tracker
track peers participating in torrent
Torrent
group of peers exchanging chunks of a file
Chunk
256KB
application
architecture
Client/Server
Server
总是打开
固定、周知的IP地址
Client
与服务器通信
互相之间不直接通信
连接可能是间歇性的
IP地址可能会变动
Pure P2P
没有总是打开的服务器
任意两个端系统可直接通信
Peer(对等方)间断连接,并可能改变IP地址
很高的扩展性但难以管理
Hybrid
Skype
中心服务器
寻找地址
客户机 - 客户机
直接相连
instant messaging
chatting between two users - P2P
中心服务器
client presence detection/location
在服务器注册IP地址
通过服务器找到伙伴IP
processes communicating
same host
Inter-process communication
different host
Message
Process
Client Process
发起通信
Server Process
会话开始时等待
Socket
host-local
application-created
OS-controlled
API
选择运输层协议
也许能设定几个运输层参数
addressing processes
identifier
IP address
Port numbers
app-layer protocol
分类
Public-domain Protocol
Proprietary Protocol
内容
types of messages exchanged
message syntax
message semantics
rules for when & how process send & respond to message
transport service
应用程序服务要求分类
Data loss
no-loss
loss-tolerant
Timing
Throughput
bandwidth-sensitive
elastic
Security
service
TCP
connection-oriented
reliable transport
flow control
congestion control
does not provide
timing
minimum throughput guarantee
security
UDP
unreliable transport
什么都不提供
FTP
client/server model
client
side that initiates transfer
server
remote host
2 TCP connections
control connection
out of band
data connection
maintains "state"
FTP commands
USER username
PASS password
LIST
RETR filename
STOR filename
FTP responses
DNS
定义
distributed,hierarchical database
application-layer protocol
service
hostname to IP address translation
host aliasing
mail server aliasing
load distribution
centralize DNS 问题
single point of failure
traffic volumn
distant centralized database
maintanance
doesn't scale
分布式、层次数据库
DNS servers
Root
TLD
Authoritative
local name server
each ISP has one
acts as proxy
查询
iterated query
recursive query
DNS cache
一段时间后丢弃
TLD服务器通常缓存在本地服务器
Resourse Record (RR)
format (name, value, type, ttl)
type
A
name → hostname
value → IP address
NS
name → domain
value → hostname of authoritative name server for this domain
CNAME
name → host alias name
value → cononcial name
MX
name → mailserver alias name
value → cononcial name of mailserver
DNS messages
类型
query
reply
format
header
identification
flags
question
answer
RR
authority
additional information
插入数据
提供基本和辅助权威服务器的主机名与IP地址
DNS registrar
insert two RRs into TLD
A
NS
为Web服务器创建A类型RR
0 条评论
下一页
为你推荐
查看更多