第二章. Application Layer 應用層
1. Principle:
- run on different end systems
- communicate over a network
2. Web and HTTP (port 80)
- URL (uniform resource locators):
www.someschool.edu/someDept/pci.gif,網頁網址
|--- host name ---|--- path name ---|
- HTTP (hypertext transfer protocol): 提供發行和接收HTML的方法
Request GET/POST/HEAD, PUT/DELETE
Response 1xx Informational/2xx Success/3xx Redirection/4xx Client Error/5xx Server Error
- Cookies: 網站為了辨識用戶身分而儲存在用戶端上的資料
- Web cache/ proxy server: 提高存取速度,節省成本
3. FTP (File Transfer Protocol, port 21)
- 基於TCP-based網路中,在Host端間用於傳輸電腦檔案的協議
ftp://[<user>[:<password>@]<host>[:<port>]/<url-path>
4. Electronic Mail
- SMTP (simple mail transfer protocol, port 25): 傳輸e-mail的協議
- POP3 (post office protocol, version 3, port 110): 本地用戶取得和下載遠端伺服器的e-mail
- IMAP (internet mail access protocol, port 143): 本地用戶存取遠端伺服器的e-mail
- HTTP: Hotmail, Yahoo! Mail, Gmail
5. DNS (Domain Name System, port 53)
- IP位址和網域名稱的對應轉換
6. 其他
- Telnet (port 23): 本地用戶端執行遠端伺服器上的工作
- SSH (Secure Shell, port 22): 加密,可替代telnet
補充相關名詞 2015.6.10
1. Metadata: 詮釋資料,data about data,描述資料屬性的資訊
2. Java annotation: Java註解,class, method, variable, parameter and package都可註解,提供metadata給Java complier
3. Retrofit:
4. Marshallings: the process of transforming the memory representation of an object to a data format suitable for storage or transmission
5. JSON: text-based format, more space efficient than XML
6. HTTP polling vs. Push messaging
7. REST: representational state transfer,是設計風格非標準
2. Java annotation: Java註解,class, method, variable, parameter and package都可註解,提供metadata給Java complier
3. Retrofit:
- marshal Java objects into HTTP request bodies
- turn HTTP API into a Java interface
4. Marshallings: the process of transforming the memory representation of an object to a data format suitable for storage or transmission
5. JSON: text-based format, more space efficient than XML
6. HTTP polling vs. Push messaging
- HTTP polling: 週期性向server取得最新資料,簡單易實作,缺點是沒效率,浪費頻寬
- Push messaging: 建立full-duplex TCP通道後,由server傳送data給用戶(WebSocket, 反向ajax)
7. REST: representational state transfer,是設計風格非標準
- /video/1/duration
- /{all videos}/{specific of video}/{a part of video}
沒有留言:
張貼留言