Web Protocols, P2P Networking, and Data Transmission
Classified in Computers
Written on in
English with a size of 2.27 KB
Client and Server Web Interaction
Steps for a Client (Browser)
- Determine the protocol (HTTP).
- Ask DNS for the IP address of the server.
- Make a TCP connection to the server.
- Send a request for the page; the server sends it back.
- Fetch other URLs as needed to display the page.
- Close idle TCP connections.
Steps for a Server
- Accept a TCP connection from the client.
- Get the page request and map it to a resource (e.g., file name).
- Get the resource (e.g., file from disk).
- Send the contents of the resource to the client.
- Release idle TCP connections.
Challenges in P2P Networking
- How do peers find each other?
- How do peers support rapid content downloads?
- How do peers encourage each other to upload?
BitTorrent Protocol Download Steps
- Start with the torrent description.
- Contact the tracker to join and get a list of peers (with at least one seed peer), or use a DHT (Distributed Hash Table) index for peers.
- Trade pieces with different peers.
- Favor peers that upload to you rapidly, and “choke” peers that do not by slowing your upload to them.
Channel Utilization Analysis
Problem: The distance from Earth to a distant planet is approximately 9 × 10¹⁰ m. Calculate channel utilization for a stop-and-wait protocol on a 64 Mbps point-to-point link (Frame size: 32 KB, Speed of light: 3 × 10⁸ m/s).
a) Stop-and-Wait Utilization
- Delay (D) = (9 × 10¹⁰) / (3 × 10⁸) = 300 sec.
- Bandwidth-delay product (BD) = 64 Mbps × 300 sec = 19,200 Mbit = 19.2 Gbit.
- BD is equivalent to 75,000 frames.
- Utilization = (1 / (1 + 2 × 75,000)) × 100% ≈ 6.66 × 10⁻⁴%.
b) Sliding Window Utilization
For 100% utilization: (w / (1 + 2BD)) = 1. Given 2BD = 150,000, then w / (1 + 150,000) = 1. Therefore, the window size must be 150,001 frames.
Bit Stream Encoding Methods
For the provided bit stream, illustrate the following:
- a) Non-Return to Zero (NRZ)
- b) NRZ-Invert (NRZI)
- c) Manchester (with clock)
- d) Bipolar encoding