Lesson 13: HTTP and Abstraction on the Internet
External Tool | Exploration
In this lesson students are introduced to another high-level protocol of the Internet, HTTP. The lesson 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. A handout summarizing the structure of HTTP is provided to help students understand the components of the HTTP requests and responses they will observe. The lesson concludes with students sharing their findings with their classmates and a reflection on how the layers of the Internet make use of abstraction.
The main purpose of this lesson is round out understanding of one of the main Enduring Understandings and associated Learning Objective of the CSP Framework:
- 6.1 The Internet is a network of autonomous systems.
- 6.1.1 Explain the abstractions in the Internet and how the Internet functions. [P3]
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 and 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.
What we want students to understand is some degree of the "Big Picture". We want them to be able to recognize that these layers exist and to reasonably explain how they work together for common web page requests.
Getting Started (15 mins)
Activity (25 mins)
Wrap-up (10 mins)
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.
- Practice accessing the Developer Tools for the browser used in your classroom (see Worksheet for links to directions)
For the Students
- HTTP and Abstraction on the Internet - Resource
- HTTP in Action - Worksheet
- The Internet: HTTP and HTML - Video (download)
- DNS - short for Domain Name System, this system translates domain names (like example.com) to IP addresses (like 18.104.22.168)
- 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).
Getting Started (15 mins)
The Internet Protocol Stack
Display the image shown at right, and/or distribute the HTTP and Abstraction on the Internet - Resource handout and have students follow along with the explanation for the first 2 pages.
We're rounding out our understanding of how the many protocols and systems of the Internet work together to make the Internet function.
- We want to think of the protocols as working in "layers".
- This picture here (also on first 2 pages of HTTP and Abstraction on the Internet - Resource) is a simplified version of what's known as the "Internet Protocol Stack." We've studied each layer separately but now you can begin to see how they work together.
We 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 to understand 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.
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) are a large part of what that statement is about.
Answer any questions and move on to the activity.
This is largely a rhetorical question. Use as a gateway to explaining that today we'll learn a little bit more about how HTTP works and look under the hood to see it in action.
Transitional Prompt: "Have you ever seen the letters "HTTP" anywhere while using the internet?"
- You see it in the URL of most websites, http://code.org for example.
Today we will focus our attention on HTTP, which is a protocol that sits at the same "layer" as DNS - right above TCP.
Activity (25 mins)
- HTTP is an ASCII text based protocol.
- It's somewhat remarkable to note that many "high level" protocols, like HTTP, are just computers sending ASCII text messages back and forth. Each protocol simply defines the rules of the "conversation" between two machines.
- In the case of HTTP it is the protocol used for sending and receiving web pages and other web content.
- Today we'll look under the hood and see HTTP in action.
Show Video: "The Internet: HTML and HTTP."
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.
Either as a class or individually, students watch The Internet: HTML and HTTP Overview.
Tell students to pay particular attention to the portions about HTTP.
Video Link: The Internet: HTTP and HTML - Video
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.
Investigate HTTP traffic on your computer
Students should be placed in pairs and given HTTP in Action - Worksheet
- (optionally distribute HTTP and Abstraction on the Internet - Resource if you haven't yet).
Students will complete the worksheet while using the resource as a reference.
During the activity, students will:
- Access the developer tools of their browser.
- Monitor the HTTP traffic generated by visiting a variety of websites.
- Record their findings, using the resource as a guide.
Wrap-up (10 mins)
Discuss: If there is time, ask students to share their findings using a group-share-strategy. Otherwise use a closing discussion to once more discuss the way abstraction is utilized by the different layers of the Internet, relating the discussion to the material discussed today. Some possible prompts:
- 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.
Code Studio: Assessment questions are available on the Code Studio.
Worksheet: If you like, you may collect and assess the Worksheet for completion.
- Research SMTP, a high-level protocol for formatting email messages.
- An excellent resource for explaining the many layers of protocols that make up the Internet: Internet Techniques and Web Formats.
- Blown to Bits (www.bitsbook.com), Appendix, The Internet as System and Spirit, pp. 309-316 (The Internet Spirit), 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 (www.bitsbook.com), Chapter 3, Ghosts in the Machine: Secrets and Surprises of Electronic Documents, pp. 73-77, 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.
- HTTP requests make use of abstractions provided by lower level protocols.
- An HTTP request is sent from a client to request access to data stored on a server.
- Displaying a web page will often require multiple HTTP requests in order to acquire all the necessary data.
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.
CSTA K-12 Computer Science Standards (2011)
CD - Computers & Communication Devices
- CD.L3A:8 - Explain the basic components of computer networks (e.g., servers, file protection, routing, spoolers and queues, shared resources, and fault-tolerance).
- CD.L3A:9 - Describe how the Internet facilitates global communication.
CPP - Computing Practice & Programming
- CPP.L3A:9 - Explain the principles of security by examining encryption, cryptography, and authentication techniques.
CT - Computational Thinking
- CT.L3A:9 - Discuss the value of abstraction to manage problem complexity.
Computer Science Principles
6.1 - The Internet is a network of autonomous systems.
6.1.1 - Explain the abstractions in the Internet and how the Internet functions. [P3]
- 6.1.1I - Standards such as hypertext transfer protocol (HTTP), IP, and simple mail transfer protocol (SMTP) are developed and overseen by the Internet Engineering Task Force (IETF).
6.2 - Characteristics of the Internet influence the systems built on it.
6.2.2 - Explain how the characteristics of the Internet influence the systems built on it. [P4]
- 6.2.2H - Standards for sharing information and communicating between browsers and servers on the Web include HTTP and secure sockets layer/transport layer security (SSL/TLS).
CSTA K-12 Computer Science Standards (2017)
CS - Computing Systems
- 3A-CS-01 - Explain how abstractions hide the underlying implementation details of computing systems embedded in everyday objects.
- 3A-CS-02 - Compare levels of abstraction and interactions between application software, system software and hardware layers.