Skip to content

Commit

Permalink
Added P2 team teach
Browse files Browse the repository at this point in the history
  • Loading branch information
sl984 committed Dec 4, 2023
1 parent 81679bb commit 4e2e0b1
Show file tree
Hide file tree
Showing 2 changed files with 317 additions and 0 deletions.
101 changes: 101 additions & 0 deletions _notebooks/2023-08-17-P2-Routing-And-Computing.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"comments: true\n",
"layout: notebook\n",
"title: P2 Routing and Computing\n",
"description: Team teach on the routing and computing\n",
"type: collab\n",
"author: Gurshawn, Lincoln, Ashwin, Dante\n",
"toc: true\n",
"courses: { csp: {week: 14} }\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Networking\n",
"a network is essentially a bunch of computer or internet devices that are connected with wires so they can communicate"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Teamteach](images/Teamteach.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This network, however, will take a long time to have A comunicate with G. So a network that will work faster is shown below. There are different benefits to each as well, the first one takes less resources, but if one of the wires breaks, the whole comunication fails. But wih the second one, it takes a lot of resources, but if one wire fails, the comunication will still work. This second network in this case is fault tolerent."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![TeamTeach2](images/TeamTeach2.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# popcorn hack 1\n",
"Is this network fault tolerent?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Pop1.png](attachment:Pop1.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Redundancy\n",
"The Internet is fault tolerant and has been made to withstand errors or problems that may occur. It does this by using redundancy. Redundancy is the inclusion of extra components in order to mitigate the failure of one part of the system. One method of to achieve this is having multiple paths between connected devices allowing transfers to have alternative routes. If a route fails the data will be sent down a different path. Fault tolerance allows users to use a network even if there are system failures. One example where redundancy wasn't present was the backend during the night at the museum. The pathway to transfer data likely broke, and there was no redundancy to allow for an alternative path."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Popcorn Hack #2\n",
"What would make this network fault-tolerant. \n",
"Insert image 4.2 video 2 3:57"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## What is Computing?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
216 changes: 216 additions & 0 deletions _notebooks/2023-11-27-P2_Internet.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"comments: true\n",
"layout: notebook\n",
"title: P2 The Internet\n",
"description: Team teach on the internet\n",
"type: collab\n",
"author: Nandan, Arnav, Varun, Torin\n",
"toc: true\n",
"courses: { csp: {week: 14} }\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"# Understanding the Internet\n",
"\n",
"The internet is a vast network of interconnected computers and devices that allows for the exchange of information and communication on a global scale. It is a fundamental part of modern life, influencing the way we work, socialize, and access information. Let's explore how the internet works and its key functionalities.\n",
"\n",
"## How the Internet Works\n",
"\n",
"### 1. **Network Infrastructure:**\n",
" - The internet is a network of networks, comprised of millions of devices connected through various technologies such as cables, fiber optics, and wireless connections.\n",
" - The internet is decentralized, meaning that there is no central authority that controls it. Instead, it is made up of many smaller networks that are connected to each other. This allows for greater flexibility and resilience in the face of disasters or attacks.\n",
"\n",
"### 2. **Protocols:**\n",
" - Communication on the internet relies on protocols, which are standardized sets of rules that govern data transmission. For example, HTTP is used for web browsing.\n",
" - Protocols are used to ensure that data is transmitted reliably and efficiently. They also allow for interoperability between different devices and networks. For example, HTTP allows web browsers to communicate with web servers. This means that you can access any website from any device as long as it supports HTTP. This is why you can use your phone to browse the internet even though it doesn't have a keyboard or mouse. HTTPS is a secure version of HTTP that encrypts data before sending it over the network. This prevents eavesdroppers from intercepting sensitive information such as passwords or credit card numbers. There are many other versions of HTTP, each with its own purpose and features.\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "html"
}
},
"outputs": [],
"source": [
"GET /index.html HTTP/1.1\n",
"Host: www.example.com"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# IP Addresses:\n",
"Every device connected to the internet is assigned a unique identifier called an IP address. This address helps in routing data to the correct destination."
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"www.example.com -> 192.168.1.1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This is similar to how your home address is used to deliver mail to your house. IP addresses are typically represented in a 32-bit format, with each 8-bit segment separated by a period. However, with the growth of the internet, the number of available IP addresses is running out. To solve this problem, a new standard called IPv6 was introduced, which uses a 128-bit format."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Popcorn Hack 1\n",
"\n",
"Log into your AWS account. Which type of ip address is used in the AWS server?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Data Packets & Transfering:\n",
"Information is broken down into small packets for efficient transmission. These packets travel independently across the network and are reassembled at their destination. There are many examples on how data sends their packets but the most common one is messaging with your friends. \n",
"\n",
"Data packets are like letters that are sent through the mail. They contain information about the sender, recipient, and contents of the letter. Similarly, data packets contain information about the source and destination of the data, as well as the data itself. This allows for efficient transmission of information over the internet.\n",
"An example of a data packet is shown below:\n",
"\n",
"<img src = \"{{site.baseurl}}/images/Chart.png\" width = \"800\" height = \"450\">\n",
"\n",
"## Bandwith\n",
"\n",
"Bandwith measures how fast data sends to the recipent. Think about cars, they go in miles per hour, but in this case, as we are talking about computers, we measure this in bits per second. In a car the slower the miles per hour, the slower the car. Same logic applies here as well, when the bandwith is lower, the data takes a longer time to send resulting in lag. \n",
"\n",
"## Routing\n",
"\n",
"Routing in simple terms is the path in which the sender sends a message and the router helps give a \"route\" to the sender through a series of packets. Without a router, packets cannot be sent and devices won't be able to communicate with each other. \n",
"\n",
"\n",
"\n",
"\n",
"### Popcorn Hack \n",
"\n",
"<img src = \"{{site.baseurl}}/images/PopcornHack1.png\" width = \"800\" height = \"450\">\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Brief Overview into Domains and Subdomains\n",
"\n",
"Domain name: For example in https://docs.google.com/, google is the domain name\n",
"Subdomain name: In the same example as above, docs is the subdomain name. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Protocols and Transfering of Data (Briefly Explained)\n",
"\n",
"<img src = \"{{site.baseurl}}/images/computer protocols.png\" width = \"800\" height = \"450\">\n",
"\n",
"The OSI Model consists of 7 steps in which devices communicate with each other. Each step contains its own different steps and going over them will take a long time, so review over them after the lesson is over. \n",
"\n",
"In the Narrow Waist, there are 4 layers in which devices communicate with each other. \n",
"\n",
"The Network Access Layer there is a connection between a hardware device (ethernet and others) and its connected to a physical device like a computer in order to send packets and information that way. \n",
"\n",
"The Internet Layer, is the layer which is built off the Network Access Layer in which packets are sent via the IP addresses. These packets contain metadata in which there is information stored inside. (Routers also play a role!) \n",
"\n",
"Internet Scalability: Based on what we learned, the internet is very scalable, its able to send information (via packets) to many devices which are all part of a LAN or Local Area Network. These LANs are part of a router in which the intranet is. LANs can also exchange information with each other. \n",
"\n",
"TCP (Transmission Control Protocol):\n",
"\n",
"Reliable Delivery: TCP makes sure that data sent between devices arrives safely and in the right order.\n",
"\n",
"Connection Setup: Before sending data, TCP sets up a connection between devices.\n",
"\n",
"Checks and Corrections: It double-checks to confirm data is sent and received correctly. If anything gets lost, it sends it again.\n",
"\n",
"Efficiency: It controls how fast data moves so that a fast sender doesn't overwhelm a slow receiver.\n",
"\n",
"\n",
"TCP guarantees the safe and ordered delivery of data, similar to a registered mail service. It's often used for applications like web browsing, email, file transfer, and etc. \n",
"\n",
"\n",
"\n",
"UDP (User Datagram Protocol):\n",
"Not So Safe Delivery: UDP doesn't promise that your data will arrive or be in the right order.\n",
"\n",
"No Handshake: It doesn't say \"hello\" before sending data; it just shoots out the packets without checking if they reached the other side.\n",
"\n",
"Less Checking: It doesn't spend time correcting errors like TCP does, which makes it faster.\n",
"\n",
"Speed Matters: UDP is used in things like online games, live videos, and voice calls where being fast matters more than making sure every piece of data gets there perfectly.\n",
"\n",
"\n",
"\n",
"Think of UDP as a protocol that's akin to sending a postcard; it's fast and efficient, but there's no confirmation that the postcard arrived at its destination, and it might get lost or arrive out of order.\n",
"\n",
"DNS (Domain Name System)\n",
"Internet Phone Book: DNS is like an internet directory that matches human-readable website names (like \"google.com\") to their actual computer-friendly addresses called IP addresses (like \"192.168.1.1\").\n",
"\n",
"Translation Service: It translates website names into IP addresses so devices can find and connect to the correct websites or services on the internet.\n",
"Routing Requests: When you type a website name in a browser, DNS helps your device locate the right server by providing the IP address associated with that name.\n",
"\n",
"Simplifying Access: Instead of remembering complicated strings of numbers, DNS makes it easier for people to access websites using simple and memorable names.\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"# Wrap-Up / Popcorn Hack\n",
"\n",
"## Information Retrieval:\n",
"The internet serves as a vast repository of information. Search engines like Google help users find relevant content by indexing and ranking web pages.\n",
"Question: How does a search engine determine the relevance of web pages?\n",
"\n",
"## Entertainment:\n",
"Streaming services for music, movies, and games provide entertainment options, accessible to users at any time.\n",
"Question: Briefly explain how streaming services deliver content to users in real-time.\n",
"\n",
"## Collaboration:\n",
"Tools like Google Docs and cloud storage services facilitate collaboration, allowing individuals and teams to work on projects together, regardless of location.\n",
"Question: How does cloud storage ensure data availability and accessibility?\n",
"\n",
"\n",
"## Conclusion\n",
"In summary, the internet is a dynamic and ever-evolving network that plays a crucial role in our daily lives. Understanding its basic components and functionalities is essential for navigating the digital landscape effectively."
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 4e2e0b1

Please sign in to comment.