WebFund 2014W Lecture 6: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
Video from the lecture given on January 24, 2014 is available: | Video from the lecture given on January 24, 2014 is available: | ||
* [http://www.screencast.com/t/8wuWC7k35rE small at screencast.com] (flash/mp4) | |||
* [http://www.screencast.com/t/8jhcxWGsl large at screencast.com] (flash/mp4) | |||
* [http://dl.cuol.ca/capture/Anil.Somayaji/COMP_2406_2014W_Lecture_6_-_20140124_144406_27.mp4 original at CUOL] (mp4) | |||
* [http://homeostasis.scs.carleton.ca/~soma/webfund-2014w/lectures/comp2406-2013f-lec06-24Jan2014.mp4 original at homeostasis] (mp4) | |||
==Notes== | ==Notes== |
Latest revision as of 21:02, 26 January 2014
Video
Video from the lecture given on January 24, 2014 is available:
- small at screencast.com (flash/mp4)
- large at screencast.com (flash/mp4)
- original at CUOL (mp4)
- original at homeostasis (mp4)
Notes
• Client-server
o Key distinction: Which ports they communicate on o Web server means "I have a port listening on port 80"
• TCP/IP
o Port number: Identifies programs, 16 bit
• DNS
o Translating host-names to IP address o When typing in an address, browser needs to do a DNS lookup to translate it to an IP address
• HTTP
o Modern browsers assume everything starts with "http://"
• HTML
• URL: Uniform Resource Locator
o Components Name of the server you wish to contact Resource you're requesting
• Server: A "box" to serve and deal with requests • Internet: A network of other local networks, connecting them to each other • Packets: 1500 bytes, switched networks, how computers send information to each other over a network
o Packet loss: When you're on a connection that loses too many packets, TCP cannot provide the illusion that you're on a continuous data stream
• IP address: source and destination both have one
o Can ping computers to find out their IP addresses and find the IP address of a server serving a webpage o Identifies the computer to talk to
• When you're writing a web server, you're just writing a program that's running on a different port, and talking through TCP/IP • express: a framework
o Difference between framework and middleware: Middleware is code that you can use; a framework is a way to organize your code, that may use middleware
• require: importing code from a directory to save time, instead of writing it yourself
o Looks for the file that was input as a parameter
• var user refers to ./routers/user, but it's not used so it doesn't do anything • Web servers have infinite loops, in order to wait for events to come in so that they may handle it