Transport Services Available to Applications
transport service
这边主要区分了四个面向的service
大类,Reliable Data transfer
、throughput
、timing
、security
。
Reliable data transfer
- 假使protocol提供受保证的data delivery service则为受信赖的,亦即就是此service保证了一旦data从sending process传递到socket时就已经保证此data一定会抵达receiving process而且无任何error,若无提供此服务,则data从sending process之后有可能永远到达不了receiving process端,这行为能被 loss-tolerant applications
接受throughput
- transport提供了保证稳定传输速率的service,可以保证application能拥有的传输速度,Applications需要throughput requirements的类型又被称为bandwidth-sensitive applications
。timing
- 提供了时间的保证,可以保证资料传递的时间间距,此service相对real-time application是重要的。security
- 提供资料安全性的service,提供加密以及解密data的服务Transport Services Provided by the Internet
Internet(大部分为TCP/IP networks)提供了两个协定TCP
、UDP
,当设计一个network application时的必做选择之一为在此两种协定中择一,不同的协定提供了不同的服务,不同的应用程式也有不同的需求。
TCP
TCP model 包含了连结取向的设计服务以及提供了reliable data transfer
服务,TCP在client server端都拥有transpoart-layer control information
在实际进入应用层面的message
时启动,也就是所谓的handshaking procedure
,在握手阶段完成后TCP connection
存在于sockets of the two process
之间。
TCP 以及 UDP 两者皆没有提供任何加密手段,但以TCP
而言,广大社群开发了一套SSL
,用于加强于TCP
中的安全考量,但注意到SSL
并不属于一种协定,跟TCP、UDP是不同的level,而只是TCP
的强化,将加密手段实作于application layer
TCP
的设计中包含了防堵塞机制,会在网路壅塞时,去控制process
的送出以避免packet loss的问题等等。
UDP
相对于tcp
,UDP相对宽鬆并只提供最小限度的服务,没有加密手段,没有防堵塞机制,也没有任何Connection过程,甚至也不保证资料的传递,
Application-Layer Protocols
应用层的协定主要规範了,types of messages exchanged
、syntax of the various message type
、semantics of the fields
、rules for determining how and when a process sends message and responds to messages
有些应用层协定是已经在RFCs
被明确记录了,也因此这些协定是存在于public domain
里的,例如常见的http
,也就是说今天一个web application若遵守http
协定,他便能从任何遵守http
的web server
去要求档案。而另一种常见的协定为,email
传递所遵守的SMTP
。而协定在一个web application组成的一小部分,但也是极重要的部分之一,通常web application的组成包括了,文档格式(HTML)、Web browser、Webserver、application-layer protocols