Today’s Musical Selections
It does sort of feel like I’m on a spaceship with my dog. (The view is nice, but not exactly incredible…)
You can’t do much better for quarantive music than the supergroup boygenius.
Web
Some examples for today are available here:
https://github.com/cs125-illinois/lecture-webapis-examples
Feel free to fork!
Web APIs Web Internet
-
Before we can talk about web APIs, we first have to talk about the web…
-
…and before we can talk about the web, we have to talk about the internet.
-
Which is great, because I love the internet!
What is the internet?
Internet As Wired Infrastructure
The internet comprises an enormous amount of physical infrastructure.
-
Most of it is wired, not wireless. Wireless is mainly used for the first hop.
-
Most of it is fiber (glass), not copper. Signals degrade quickly in copper but travel faster and with less attenuation in glass 1. Copper is only used for the last 100 meters.
-
The internet wouldn’t exist without fiber optic cable. It’s one of the wonders of the modern world. It’s not just glass, it’s really clear glass.
An Internet Journey
If you want to learn more, you can join me as we follow a cable from my former office to the edge of our campus network.
-
Next hop to the network closet on my floor. Here copper gives way to fiber.
-
My last hop on campus. At this point all of the campus network traffic leaves on only a few slim fiber optic cable.
Internet As Wireless Infrastructure
In recent years we’ve also built out a huge amount of wireless internet infrastructure.
-
Short range wireless is dominated by WiFi and what you use when you’re on campus, at home, or at a coffee shop
-
Medium-range wireless is used to provide connectivity to mobile devices like smartphones over longer distances. You usually buy this from a cellular provider like Verizon or Sprint.
Internet As Connectivity
The result is that by connecting a computer to the internet, you are now connected to 4 billion other computers.
-
Many times the first connection is wireless
-
But after that point there is literally a wire that you can follow from your computer to the other computer
But How Do Internet-Connected Devices Communicate?
Internet As Agreement
A communication protocol is a system of rules that allow two or more entities of a communications system to transmit information.
The Internet Protocol (IP)
The Internet Protocol (IP) consists of a series of agreements that allow internet-connected devices to communicate.
-
What do we call each other? IP specifies the format of internet protocol addresses, also called IP addresses.
-
Here’s one:
192.17.96.8
(IPv4) -
Here’s a new one:
2607:f8b0:4009:807::2004
(IPv6)
-
-
How are our message structured? IP specifies a format for each message (or datagram) exchanged across the internet.
IP Datagram Format
The Miraculous Internet
The core internet protocols were invented by a bunch of graduate students, including Vint Cerf and Bob Kahn. They changed the world.
Vint Cert has said "we kept wondering when the adults were going to show up."
Packet Switching
Data is transferred over the internet in small units called packets.
-
Each packet may travel a different route between the source and destination
-
The internet protocol (IP) provides best effort packet transmission—but delivery is not guaranteed!
-
Internet routers are responsible for transferring packets one hop closer to their destination
-
Packet switching was revolutionary when it was proposed—but now even traditional voice traffic is moving to packet-based networks
Internet Protocol Stack
So The Web Is Not The Internet
The web is just one of many services running over the internet.
Announcements
-
The final midterm is Monday May 4th. We can’t close class with a midterm! Plus, Wednesday’s class is a lot of fun…
-
Please get started on the final project! Remember that grading is generous…