WebFund 2013F Lecture 1: Difference between revisions
Line 7: | Line 7: | ||
Web | Web | ||
Browser <-talks to-> Server | Browser <-talks to-> Server | ||
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 | ||
Line 14: | Line 14: | ||
now | now: | ||
Browser <-talks to-> Server | Browser <-talks to-> Server | ||
program talking to program | program talking to program | ||
(embedded in | (embedded in | ||
html document | html document | ||
Line 26: | Line 26: | ||
google tracks and monetizes you | google tracks and monetizes you | ||
you are the product | ''you'' are the product | ||
bandwidth: how much can I get at once | 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 | latency: when I make a request, how long does it take for me to get the first bit | ||
Line 37: | Line 37: | ||
Server | Server | ||
PHP | PHP | ||
servlets <-- not actually going to learn any of these | servlets <-- not actually going to learn any of these languages | ||
apache | apache | ||
rails | rails | ||
node.js is | node.js is javascript | ||
Why? runs pretty | Why? runs pretty fast | ||
chromes v8 javascript engine and stuck on the server | chromes v8 javascript engine and stuck on the server | ||
on browser access the DOM | on browser access the DOM |
Revision as of 20:57, 8 November 2013
Audio from the lecture given on September 9, 2013 is available here.
Notes
September 9 Node
Web Browser <-talks to-> Server
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/...
now:
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
PHP
servlets <-- not actually going to learn any of these languages
apache
rails
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