Bài giảng Mạng máy tính: Chương 2a - ĐH Giao thông Vận tải

49 24 0
Bài giảng Mạng máy tính: Chương 2a - ĐH Giao thông Vận tải

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Bài giảng Mạng máy tính: Chương 2a do TS. Trần Quang Diệu biên soạn cung cấp cho người học các kiến thức: Một số khái niệm và nguyên tắc, web & Hyper Text Transfer Protocol, web design and HTTP, Web programming,...

Chương Giao thức tầng ứng dụng (application layer) Quang Dieu Tran, PhD Faculty of Information Technology University of Communication and Transport (Branch in Ho Chi Minh City) Email: dieutq@gmail.com Website: sites.google.com/sites/tranlectures Application Layer Chapter The Application Layer Ch2 The Application Layer 2.1 Một số khái niệm nguyên tắc 2.2 Web & Hyper Text Transfer Protocol 2.3 Web design and HTTP, Web programming 2.4 File Transfer Protocol 2.5 Electronic Mail Protocols 2.6 Domain Name System Chapter The Application Layer 2.1 Một số khái niệm nguyên tắc  Một số chương trình ứng dụng (network applications):  Email (Yahoo! Mail, MS Outlook, Google mail,…)  Web browser (MS Internet Explorer, Fire Fox, Netscape Navigator,…)  Instant messenger (Yahoo! Messenger, ICQ, AOL,…)  P2P file sharing (Napster, KazaA…)  Internet games (Yahoo! Games)  Internet telephone (Skype, FPTFone,VNNFone…)  Streaming stored video clips  Real-time video conference  Massive parallel computing Chapter The Application Layer Một số giao thức (application-layer protocols)  HTTP (Hyper Text Transfer Protocol)   FTP (File Transfer Protocol)   Giao thức nhận thư điện tử (khác POP3) DNS (Domain Name System)   Giao thức nhận thư điện tử IMAP (Internet Mail Access Protocol)   Giao thức truyền thư điện tử POP (Post Office Protocol)   Giao thức truyền tệp SMTP (Simple Mail Transfer Protocol)   Giao thức web DNS = hệ thống tên miền, giao thức DNS quy định quy tắc sử dụng tên miền TFTP (Trivial FTP)  Một dạng khác FTP Chapter The Application Layer Net applications vs application-layer protocols  Applications: Chương trình ứng dụng chạy máy tính  Trao đổi thơng điệp (message) với ứng dụng khác nhằm thực thi vai trò ứng dụng  Vd: web browser, email client…   Application-layer protocols: Là thành phần chương trình ứng dụng  Định nghĩa quy tắc trao đổi thông điệp  Giao tiếp với dịch vụ cung cấp tầng (TCP, UDP)  Chapter The Application Layer Các chương trình giao tiếp với ntn?  Các chương trình máy tính  Sử dụng dịch vụ cung cấp hệ điều hành (interprocess communication)  Các chương trình máy tính khác  Giao tiếp thơng qua giao thức tầng ứng dụng (application-layer protocol)  Chương trình phía người dùng = user agent  Giao tiếp với người sử dụng (giao diện sử dụng)  Giao tiếp với giao thức mạng Chapter The Application Layer Mơ hình khách-phục vụ (client-server paradigm) Mơ hình khách-phục vụ quen gọi mơ hình khách-chủ Một ứng dụng cụ thể bao gồm hai phần:  Client      Thiết lập liên kết với server Yêu cầu dịch vụ từ server Nhiều clients Vd: web browser application transport network data link physical request Server    Chờ cung cấp dịch vụ client u cầu Thường có server, khơng thay đổi địa chỉ, chạy 24/7 Vd: web server Chapter The Application Layer reply application transport network data link physical Mơ hình ngang hàng (Peer-to-peer paradigm)    Khơng có máy dịch vụ cố định, máy tính mạng lúc server (nhận yêu cầu kết nối) lúc khác lại client (yêu cầu máy khác kết nối) Các máy tính ngang hàng, tự kết nối giao tiếp đôi Địa máy tính tham gia giao tiếp liên tục thay đổi Chapter The Application Layer Client-server & P2P examples  CNN.com  Client-server  Yahoo! Mail  Client-server  Google  Client-server  Yahoo! Messenger  Client-server  Internet Relay Chat (IRC)  Client-server & P2P Chapter The Application Layer & P2P 10 Caching example (cont) Possible solution  increase bandwidth of access link to, say, 10 Mbps Consequences origin servers public Internet utilization on LAN = 15%  utilization on access link = 15%  Total delay = Internet delay + access delay + LAN delay = sec + msecs + msecs  often a costly upgrade 10 Mbps access link  institutional network Chapter The Application Layer 10 Mbps LAN institutional cache 35 Caching example (cont) Install cache  origin servers suppose hit rate is 0.4 Consequence     40% requests will be satisfied almost immediately 60% requests satisfied by origin server utilization of access link reduced to 60%, resulting in negligible delays (say 10 msec) Total avg delay = Internet delay + access delay + LAN delay = 0.6*(2.01) secs + milliseconds < 1.4 secs public Internet 1.5 Mbps access link institutional network Chapter The Application Layer 10 Mbps LAN institutional cache 36 Web servers  IIS (Microsoft Internet Information Server)  Chạy môi trường Windows  Đi kèm Windows 2000 Server (IIS 5.0)  Apache web server  Mã nguồn mở  Linux/Windows…  http://www.apache.org  Web server dùng nhiều  Tomcat, Netscape, Xitami… Chapter The Application Layer 37 Ch2 The Application Layer 2.1 Một số khái niệm nguyên tắc 2.2 Web & Hyper Text Transfer Protocol 2.3 Web design and HTTP, Web programming 2.4 File Transfer Protocol 2.5 Electronic Mail Protocols 2.6 Domain Name System Chapter The Application Layer 38 Web design: HTML   Thiết kế web: Tạo tài liệu HTML HTML (Hyper Text Markup Language)  Trong tài liệu HTML có nhiều đối tượng  Text  Images  Hyper link  Sử dụng thẻ (tag) để diễn đạt đối tượng  Thẻ mở, vd: ; ; ; …  Thẻ đóng, vd: ; ;;…  Công cụ:  Text editor: Notepad, Ultra Edit  Microsoft FrontPage  Macromedia Dreamweaver  http://www.w3schools.org (http://www.w3schools.com) Chapter The Application Layer 39 Web programming HTML = trang web tĩnh (Static web): Web server trả trang HTML cố định nhận yêu cầu người dùng  Lập trình web: tương tác với người sử dụng thơng qua web   Lập  trình web # Lập trình Pascal, C: Tương tác thơng qua HTTP Message  Client-side scripts: Java script, VB script  Server-side scripts: ASP, JSP, PHP, Perl… Chapter The Application Layer 40 HTML Form: Send user requests HTML Simple Form

ASP Simple ASP

Ngày đăng: 09/05/2021, 18:13

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan