<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2022W_Lecture_22</id>
	<title>Mobile App Development 2022W Lecture 22 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2022W_Lecture_22"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_22&amp;action=history"/>
	<updated>2026-04-06T01:52:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_22&amp;diff=23975&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture given on April 6, 2022 is now available: * [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec22-20220406.m4v video] * [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec22-20220406.cc.vtt auto-generated captions] Video is also available through Brightspace (Resources-&gt;Zoom Meetings (Recordings, etc.)-&gt;Cloud Recordings tab).  Note that here you&#039;ll also see chat messages.  ==Notes=...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_22&amp;diff=23975&amp;oldid=prev"/>
		<updated>2022-04-06T23:04:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture given on April 6, 2022 is now available: * [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec22-20220406.m4v video] * [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec22-20220406.cc.vtt auto-generated captions] Video is also available through Brightspace (Resources-&amp;gt;Zoom Meetings (Recordings, etc.)-&amp;gt;Cloud Recordings tab).  Note that here you&amp;#039;ll also see chat messages.  ==Notes=...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
Video from the lecture given on April 6, 2022 is now available:&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec22-20220406.m4v video]&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec22-20220406.cc.vtt auto-generated captions]&lt;br /&gt;
Video is also available through Brightspace (Resources-&amp;gt;Zoom Meetings (Recordings, etc.)-&amp;gt;Cloud Recordings tab).  Note that here you&amp;#039;ll also see chat messages.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 22&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
Networking!&lt;br /&gt;
&lt;br /&gt;
Tutorials are due today, will have extra office hours for checkoffs this evening (around 8 PM), will announce on Teams&lt;br /&gt;
&lt;br /&gt;
Today: networking &amp;amp; the Internet&lt;br /&gt;
&lt;br /&gt;
What is an IP address?&lt;br /&gt;
 - the numbers that identify computers on the Internet&lt;br /&gt;
&lt;br /&gt;
communication happens between a source and a destination, both identified by an IP address&lt;br /&gt;
&lt;br /&gt;
What is actually happening with those IP addresses?&lt;br /&gt;
&lt;br /&gt;
They actually are used to label network packets&lt;br /&gt;
 - fixed chunks of information, generally around 1500 bytes or less&lt;br /&gt;
&lt;br /&gt;
Data isn&amp;#039;t sent in a stream, it is sent in individual packets&lt;br /&gt;
&lt;br /&gt;
A packet has a header and a payload&lt;br /&gt;
 - header is metadata, payload is the data&lt;br /&gt;
 - standard metaphor: a postcard, with the header being the to and from address &amp;amp; stamp, and the payload being the written note plus front picture&lt;br /&gt;
    - postcard, not letter, because there is no privacy!&lt;br /&gt;
&lt;br /&gt;
So right now millions of &amp;quot;postcards&amp;quot; are being sent to facilitate this class&lt;br /&gt;
 - do they all arrive?&lt;br /&gt;
&lt;br /&gt;
Modern networking is mostly &amp;quot;best effort&amp;quot; - packets can be damaged or lost at any time in any place&lt;br /&gt;
 - if you want reliable communication, you have to build it on top&lt;br /&gt;
&lt;br /&gt;
There are many technologies for sending data between computers&lt;br /&gt;
 - wired ethernet&lt;br /&gt;
 - wifi (802.11...)&lt;br /&gt;
 - cellular networks&lt;br /&gt;
 - (carrier pidgeon)&lt;br /&gt;
&lt;br /&gt;
Each of these work in their own way.  What allows data to be shared across them is the Internet Protocol (IP).  That&amp;#039;s what standardizes how packets are structured&lt;br /&gt;
  - if you can speak IP, you can communicate on the Internet&lt;br /&gt;
&lt;br /&gt;
So there are protocols for exchanging IP packets (Ethernet), and there are protocols for what to do with IP packets (TCP)&lt;br /&gt;
&lt;br /&gt;
TCP is a protocol built on top of IP&lt;br /&gt;
 - allows for reliable streams of bytes to be sent&lt;br /&gt;
 - will reorder and re-transmit packets as needed&lt;br /&gt;
&lt;br /&gt;
When we do things &amp;quot;on the web&amp;quot;, we&amp;#039;re mostly using programs speaking http/https&lt;br /&gt;
&lt;br /&gt;
   HTTP: hypertext transport protocol (web browser&amp;lt;-&amp;gt;web server)&lt;br /&gt;
   TCP: transmission control protocol (computer&amp;lt;-&amp;gt;computer)&lt;br /&gt;
   IP: internet protocol (computer&amp;lt;-&amp;gt; computer)&lt;br /&gt;
   Ethernet&lt;br /&gt;
   &amp;lt;hardware stuff&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Layers in networking is really closer to Matryoshka dolls&lt;br /&gt;
 - one fits inside the other and so on&lt;br /&gt;
 - &amp;quot;encapsulation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So literally, a packet will start with different headers&lt;br /&gt;
 - ethernet header&lt;br /&gt;
 - IP header&lt;br /&gt;
 - TCP header&lt;br /&gt;
 - HTTP header (just in first few packets and last of connection)&lt;br /&gt;
&lt;br /&gt;
When a packet arrives at a computer, it has to unpack it&lt;br /&gt;
 - parse ethernet header&lt;br /&gt;
 - parse IP header&lt;br /&gt;
 - parse TCP header&lt;br /&gt;
 - parse HTTP header&lt;br /&gt;
&lt;br /&gt;
Modern computers can have many many programs interacting with the network at the same time.  IP addresses identify computers, not programs.  So which program gets which packets?&lt;br /&gt;
 - that&amp;#039;s what ports are for&lt;br /&gt;
 - just a number to identify a program on a computer&lt;br /&gt;
 - added by the TCP headers&lt;br /&gt;
 - source ports &amp;amp; destination ports&lt;br /&gt;
&lt;br /&gt;
Much of the time ports are dynamically allocated&lt;br /&gt;
 - when your web browser makes a request&lt;br /&gt;
&lt;br /&gt;
But key services have well-known low numbered ports&lt;br /&gt;
 - low numbered (&amp;lt; 1024) -&amp;gt; only can be used by privileged programs&lt;br /&gt;
&lt;br /&gt;
When you connect to a server, you normally do so on a well-known port&lt;br /&gt;
 - port designates the kind of program you want to talk to&lt;br /&gt;
&lt;br /&gt;
 - 80    HTTP (web)&lt;br /&gt;
 - 443   HTTPS (web, encrypted)&lt;br /&gt;
 - 22    SSH&lt;br /&gt;
 - 25    SMTP (email)&lt;br /&gt;
 - 143   IMAP (mailbox access)&lt;br /&gt;
 - 993   IMAPS (mailbox access, encrypted)&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s lots more, but most aren&amp;#039;t used so much anymore.&lt;br /&gt;
Any idea why not?&lt;br /&gt;
  - everything is over the web now&lt;br /&gt;
  - because everything else is blocked by firewalls!&lt;br /&gt;
&lt;br /&gt;
Originally the Internet had lots of services on lots of ports&lt;br /&gt;
 - but then the Internet grew and bad people started abusing it&lt;br /&gt;
 - so we had to block those other ports, they were a security risk&lt;br /&gt;
 - but now we just do everything over HTTP/HTTPS because that has to get through firewalls&lt;br /&gt;
    - so now there are web firewalls...&lt;br /&gt;
&lt;br /&gt;
DNS: Domain Name system&lt;br /&gt;
 - hierarchical set of servers that answer requests to translate domain names into IP addresses&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>