WebFund 2013F Lecture 1: Difference between revisions
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Audio from the lecture given on September 9, 2013 is available [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/lectures/comp2406-2013f-lec01-09Sep2013.m4a here]. | Audio from the lecture given on September 9, 2013 is available [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/lectures/comp2406-2013f-lec01-09Sep2013.m4a here]. | ||
==Early Web== | |||
Web | Web | ||
Browser <-talks to-> Server | Browser <-talks to-> Server | ||
Multiple protocols: | |||
http <-- Stream of text or data byte stream from tcp and puts syntax on it | * http <-- Stream of text or data byte stream from tcp and puts syntax on it | ||
tcp <-- turns packets into continuous stream, controls sending, reordering etc | * tcp <-- turns packets into continuous stream, controls sending, reordering etc | ||
ip <--packet based | * ip <--packet based | ||
ethernet/wifi/... | * ethernet/wifi/... | ||
==Modern Web== | |||
Browser <-talks to-> Server | Browser <-talks to-> Server | ||
program talking to program | program talking to program | ||
Line 24: | Line 22: | ||
most of data on internet is encoded in http or smtp | most of data on internet is encoded in http or smtp | ||
code that runs inside of browser is known as sandboxed | code that runs inside of browser is known as sandboxed | ||
* everything you care about is in the sandbox | |||
google tracks and monetizes you | google tracks and monetizes you | ||
* ''you'' are the product | |||
'''bandwidth:''' how much can I get at once? | |||
'''latency:''' when I make a request, how long does it take for me to get the first bit | |||
gmail has all kinds of code built in to predict what you want and predicts which emails you're going to want to read | gmail has all kinds of code built in to predict what you want and predicts which emails you're going to want to read | ||
constantly modelling your behaviour to work well | constantly modelling your behaviour to work well | ||
==Server-Side Technologies== | |||
* PHP | |||
* servlets | |||
* apache | |||
* rails | |||
Note we aren't covering these in this class except at the end. | |||
==node.js is JavaScript== | |||
* Why? runs pretty fast | |||
* chromes v8 javascript engine and stuck on the server | |||
==on browser access the DOM== | |||
* browser manipulates the DOM | |||
* no DOM on server | |||
learning javascript running on server first THEN on the browser | learning javascript running on server first THEN on the browser | ||
Server puts together an HTML document that it sends to the browser and then using this they talk to each other | Server puts together an HTML document that it sends to the browser and then using this they talk to each other | ||
* can't trust the browser. | |||
* browser keeps no secrets | |||
* any data sent to server has to be appropriately validated | |||
Database is persistent data structure for servers | Database is persistent data structure for servers | ||
* relational database | |||
callbacks -> asynchronous I/O | callbacks -> asynchronous I/O | ||
* here is some code, do this when ... | |||
processes | processes | ||
threads : | threads : | ||
* start new thread | |||
* heavier weight than you want | |||
* not efficient |
Latest revision as of 21:38, 8 November 2013
Audio from the lecture given on September 9, 2013 is available here.
Early Web
Web Browser <-talks to-> Server
Multiple protocols:
- http <-- Stream of text or data byte stream from tcp and puts syntax on it
- tcp <-- turns packets into continuous stream, controls sending, reordering etc
- ip <--packet based
- ethernet/wifi/...
Modern Web
Browser <-talks to-> Server program talking to program (embedded in html document that was loaded)
most of data on internet is encoded in http or smtp code that runs inside of browser is known as sandboxed
- everything you care about is in the sandbox
google tracks and monetizes you
- you are the product
bandwidth: how much can I get at once?
latency: when I make a request, how long does it take for me to get the first bit
gmail has all kinds of code built in to predict what you want and predicts which emails you're going to want to read constantly modelling your behaviour to work well
Server-Side Technologies
- PHP
- servlets
- apache
- rails
Note we aren't covering these in this class except at the end.
node.js is JavaScript
- Why? runs pretty fast
- chromes v8 javascript engine and stuck on the server
on browser access the DOM
- browser manipulates the DOM
- no DOM on server
learning javascript running on server first THEN on the browser Server puts together an HTML document that it sends to the browser and then using this they talk to each other
- can't trust the browser.
- browser keeps no secrets
- any data sent to server has to be appropriately validated
Database is persistent data structure for servers
- relational database
callbacks -> asynchronous I/O
- here is some code, do this when ...
processes threads :
- start new thread
- heavier weight than you want
- not efficient