Difference between revisions of "WebFund 2013F Lecture 1"

From Soma-notes
Jump to navigation Jump to search
Line 15: Line 15:
ethernet/wifi/...
ethernet/wifi/...


[[now:]]<nowiki>Insert non-formatted text here
[[now:]]
Browser               <-talks to->                 Server
Browser               <-talks to->                 Server
program               talking to                 program
program               talking to                 program
Line 29: Line 29:
''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


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
Line 36: Line 36:




Server
Server (not actually going to learn any of these languages)
PHP
PHP
servlets <-- not actually going to learn any of these languages
servlets
apache
apache
rails
rails




node.js is javascript
[[node.js is javascript]]
Why? runs pretty fast
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]]
browser manipulates the DOM
browser manipulates the DOM
no DOM on server
no DOM on server
Line 52: Line 52:
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.
- can't trust the browser.
browser keeps no secrets
- browser keeps no secrets
any data sent to server has to be appropriately validated
- 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
-relational database


callbacks -> asynchronous I/O
callbacks -> asynchronous I/O
here is some code, do this when ...
- here is some code, do this when ...
 
processes
processes
threads : start new thread
threads :  
heavier weight than you want
-start new thread
not efficient
- heavier weight than you want
 
- not efficient
</nowiki>

Revision as of 17:03, 8 November 2013

Audio from the lecture given on September 9, 2013 is available here.

Notes

September 9 Node

Web Browser <-talks to-> Server

how? 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 (not actually going to learn any of these languages) PHP servlets 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