This lesson introduces another high-level protocol of the Internet, HTTP. It begins with a review of the layers of the Internet covered thus far, before transitioning to a video covering high-level protocols of the Internet, most notably HTTP. Students will investigate HTTP traffic generated within their own browser by accessing the browser's developer tools and visiting a variety of websites.
- DNS: the service that translates URLs to IP addresses
- HTTP: HyperText Transfer Protocol - the protocol used for transmitting web pages over the Internet
- IP Address: a number assigned to any item that is connected to the Internet
- TCP: Transmission Control Protocol - provides reliable, ordered, and error-checked delivery of a stream of packets on the internet. TCP is tightly linked with IP and usually seen as TCP/IP in writing
- URL: an easy-to-remember address for calling a web page (like www.code.org).
Students will be able to:
- Explain how layers of protocols allow the Internet to function
- Use developer tools in a modern browser to explore the HTTP traffic associated with visiting common websites
- Identify abstractions used in the development of Internet protocols
- Describe how a protocol or layer of the internet acts as an "abstraction" for other layers
There are two main purposes to this lesson:
First, simply getting a basic understanding of what HTTP is and what it's for. HTTP like DNS is an ASCII-text based protocol - it's just two computers sending text messages to each other. What makes it a protocol are the rules of the "conversation" the two machines are having. In the case of HTTP, it is a call-and-response protocol for a client/server relationship, where a client requests a web page or other content (image, sound, video, etc.) from a server. The server looks for it and sends it back.
Second and perhaps more importantly, is understanding HTTP as a "high level" protocol that sits on top of all the other protocols and internet systems we've learned about in the course. That text message conversation between the computers is being broken up into TCP/IP packets, and all the data gets sent as bits over wires and airwaves, taking different paths, and it gets interpreted reassembled at the end.
We often talk about how the Internet works in "layers" and this is a perfect example of abstraction on the Internet, as one layer makes use of the functionality provided by the layer below it, without worrying about the details of how this functionality is achieved. And HTTP doesn't have to worry about anything other than the text protocol of HTTP works. The network software and devices on your and others' computers handle looking up addresses, breaking down data, packeting, routing, transmission and interpretation and reassembly. It's really amazing.
- Resource page in large print
- Resource page in braille, Duxbury file
- Resource page in braille, .brf
- HTTP in Action Worksheet in large print
- HTTP in Action Worksheet in braille, Duxbury file
- HTTP in Action Worksheet in braille, .brf
Use the resource file to help you undertand how Internet protocols work.
Think of the Internet protocols as working in "layers." Imagine outgoing information going DOWN the stack and incoming information going UP the stack.
All of this happens in the network software on each computer, whether that computer is your phone, a laptop, or a server like a DNS or web server (routers are a special case that only look at the IP layer).
The important takeaway here is that the system was constructed with layers of abstraction where each layer only needs to concern itself with its specific job, and then hands it off to another layer. This makes the very complicated task of digital network communication possible. At the top layer, for example, DNS just thinks it is "speaking DNS" to some other computer - the DNS protocol does not even need to know how the other layers work. It just relies on them doing their jobs.
Where have you seen the letters "HTTP" when using the internet? It is in the URL of web adresses. The rest of this lesson will focus on HTTP, which is a protocol that sits at the same "layer" as DNS - right above TCP.
It's not important to get too deep into the specifics. If students understand the basic idea of layers of abstraction -- that each layer relies on those below it, but uses them "abstractly" that's enough.
Put differently, higher-level layers depend on the functionality of lower-level layers, without worrying about precisely how those layers work. The Enduring Understanding from the CSP framework states: "6.1 The Internet is a network of autonomous systems." And these layers of abstraction (protocols) is a large part of what that statement is about.
Before completing the activity on the worksheet, have students watch the "The Internet: HTML and HTTP" video below, either as a class or individually.
This video includes some content relating to security which will not be covered until later in the course. Rather than focus on every protocol covered, keep the focus on the fact that all of the protocols discussed are text-based and rely on the lower-level protocols already covered in class in order to function.
Now distribute the "HTTP in Action Worksheet" and place students in pairs, if possible. By completing this worksheet, students will access the developer tools of their browser, monitor the HTTP traffic generated by visiting a variety of websites, and record their findings using the "Resource Sheet" as a guide.
At the beginning of the activity, students will need to gain access to the Developer Tools of their web browser, and more specifically gain access to the "Network" tab of the tools. It is recommended you practice prior to the beginning of the lesson so that you can demonstrate to the class and provide assistance.If students haven't previously encountered the terms "static" and "dynamic," as used to describe web pages, those concepts should be introduced before they begin the activity. This article gives a good explanation: Wikipedia: Static web page.
Either as groups or as a class, have students share with others their findings. Use the following questions to guide them.
- What surprised you about the HTTP traffic you observed?
- What does it mean to say that high-level layers of the Internet use low-level layers "abstractly"?
- What other examples of abstraction have we seen in this course? Hint: Unit 1 is basically all about abstraction.
1. Multiple Choice: HTTP is considered to be a high-level protocol because:
- A. HTTP requests are given higher priority for fast delivery when being routed on the Internet
- B. HTTP requests are encoded using higher-frequency radio waves
- C. HTTP messages can be either requests or responses
- D. HTTP requests make use of abstractions provided by lower-level protocols
2. Choose Two: Choose the two true statements about HTTP:
- A. An HTTP request is sent from a client to request access to data stored on a server
- B. HTTP requests and responses have identical formats
- C. Displaying a web page will often require multiple HTTP requests in order to acquire all the necessary data
- D. An HTTP response code is only used when a server could not fulfill a request
3. Free Response: The definition of HTTP makes use of the ASCII character set, without reference to how these characters are encoded. Explain why this is an example of abstraction.
- Research SMTP, a high-level protocol for formatting email messages.
- Expore "Internet Techniques and Web Formats," an excellent resource for explaining the many layers of protocols that make up the Internet.
- Internet Techniques and Web Formats
- Have students read the following excerpt, and then answer the following questions: The layers of protocols used in network communication is an example of abstraction. Can you give other examples of abstraction in everyday life? When you browse to a web page, maybe with some animated advertisements embedded on it, describe in detail what happens behind the scenes to display that page on your browser.
- Blown to Bits, Appendix, The Internet as System and Spirit, pp. 309-316
- Have students read the following excerpt, and then answer the following question about abstraction: Discuss how not knowing some basics of how a software tool or computer works, and the abstractions they use, could lead to bad outcomes.
- Ghosts in the Machine: Secrets and Surprises of Electronic Documents, pp. 73-77
- CSTA K-12 Computer Science Standards: CD.L3A:8, CD.L3A:9
- CSTA K-12 Computer Science Standards: CPP.L3A:9
- CSTA K-12 Computer Science Standards: CT.L3A:9
- Computer Science Principles: 6.1.1 (I)
- Computer Science Principles: 6.2.2 (H)