station-wagons and electrons
DESCRIPTION
Talk I did at Yahoo! Developer evening at Wallacespace: http://upcoming.yahoo.com/event/5741424/TRANSCRIPT
![Page 1: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/1.jpg)
cd /pubcat beer > /dev/bluesmoon
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 2: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/2.jpg)
Not stuck in a cloud of volcanic ash
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 3: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/3.jpg)
Didn’t get sidetracked on my way here
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 4: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/4.jpg)
Didn’t go on an extended vacation
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 5: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/5.jpg)
Almost not allowed in
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 6: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/6.jpg)
Philip Tellisgeekyahoo@bluesmoonhttp://bluesmoon.info/[email protected]
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 7: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/7.jpg)
Station wagons and Electrons
Philip Tellis / [email protected]
Yahoo! London Pub Night – May 27, 2010 – Wallacespace
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 8: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/8.jpg)
Never underestimate the bandwidth of a station wagonspeeding down the motorway
– Andrew S Tanenbaum?
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 9: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/9.jpg)
Should you fly a 747 or a 737?
A 747 seats 400+ passengersA 737 seats about 150Both take about the same time to fly from FRA to LHRA 747 takes longer to load and unload
The best selling aircraft to date is the 737
This analogy would have been much cooler if the Concorde still flew
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 10: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/10.jpg)
Bandwidth and Latency
How much data can you transfer at oncev/s
How quickly can you get your data across
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 11: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/11.jpg)
But bandwidth is easy
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 12: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/12.jpg)
Shannon’s Theorem
C = B × log2(1 +SN
)
C – Channel capacity in bpsB – Bandwidth in HzS – Signal strengthN – Noise strength – S/N measured in dB
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 13: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/13.jpg)
Bandwidth can be bought
Bandwidth has increased steadily over timeNetworks, hard drives, memory, CPU, system bus,everything.Bandwidth can be parallelised
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 14: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/14.jpg)
Diminishing returns
The benefits of increased bandwidth diminish as you get fatter
Ref: More bandwidth doesn’t matter (much) – Mike Belshe
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 15: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/15.jpg)
How fast is the internet?
YUI Blog measured bandwidth at 1Mbps and latency of 262ms
Ref: Analysing Bandwidth & Latency – YUI Blog
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 16: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/16.jpg)
Blink
The average human eye takes 300-400msto blink
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 17: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/17.jpg)
How fast is the internet?
Akamai measured average global bandwidth at 1.7Mbps
Ref: State of the Internet – Akamai
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 18: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/18.jpg)
ISPs
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 19: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/19.jpg)
UK ISPs
Keep in mind that the Internet latency from the UK to the US is 90-100ms
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 20: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/20.jpg)
Latency – not so easy to sell
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 21: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/21.jpg)
Speed Limits
3× 108 m/s – in vacuum2× 108 m/s – in fibre=⇒ 26.42ms × 2(roundtrip from BOS to LON)
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 22: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/22.jpg)
Round-trip
It should take a packet around 53ms to go from Boston toLondon and backIt actually takes around 90ms for a packet to go fromBoston to London and backThis is pretty good as far as approaching theoretical limitsgoes
Ref: It’s the latency, stupid – Stuart Cheshire
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 23: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/23.jpg)
Round-trip
It should take a packet around 53ms to go from Boston toLondon and backIt actually takes around 90ms for a packet to go fromBoston to London and backThis is pretty good as far as approaching theoretical limitsgoes
Ref: It’s the latency, stupid – Stuart Cheshire
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 24: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/24.jpg)
But then again...
Never underestimate the data-transfer capabilities of aGalaxy class starship travelling at Warp 9.875 andfitted with a computer that sounds like Majel Barett
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 25: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/25.jpg)
Latency isn’t sexy
When was the last time you saw a TV commercial mentionlatency?
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 26: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/26.jpg)
ISPs
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 27: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/27.jpg)
UK ISPs
Keep in mind that the Internet latency from the UK to the US is 90-100ms
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 28: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/28.jpg)
Latency v/s Bandwidth
Improving latency tends to improve perceived bandwidthImproving bandwidth utilisation can potentially worsenlatencyLarger/complex packets take more time to assemble
This is the difference between a 737 and a 747
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 29: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/29.jpg)
Getting around latency problems
Don’t add latency – It’s bad enough without us adding to itCaching – Bring the data closer to where it’s neededParallelise – Reduce the number of serial roundtripsPredict – Get data before it’s needed
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 30: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/30.jpg)
If you can, stuff everything into one callHave a look at search.yahoo.com load up in firebug
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 31: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/31.jpg)
Parallelise where possible
Downloading a script blocks page load, so do it in thebackground insteadBrowsers will download 4-8 resources from a host inparallel, take advantage of that
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 32: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/32.jpg)
Predict what’s next and fetch it
If you know what the user will do next, pre-fetch itYahoo! Search page pre-loads sprites and Javascript forthe results pageLog analysis can tell you which pages are most popular,and pre-fetch those
Ref: Preload CSS & JS without execution – Stoyan Stefanov
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 33: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/33.jpg)
Measure your user’s bandwidth & latency
Javascript code to measure your user’s bandwidth & latencyhttp://bluesmoon.info/perf-tests/bw/bw-test-1.3.ziphttp://github.com/bluesmoon/netperf-js
It’s what we used on the YUIBlog test
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 34: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/34.jpg)
Useful tools for performance analysis
YSlow – Firefox/Firebug plugin from Yahoo!PageSpeed – Firefox/Firebug plugin from GooglePageTest – Web page testing toolShowSlow – Automated YSlow runs against your URLFiddler – Web debugging Proxy
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 35: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/35.jpg)
Further reading
developer.yahoo.com/performance – Yahoo!code.google.com/speed/page-speed/docs/rules_intro.html– Googleslideshare.net/stoyan/the-business-of-performance –Stoyan Stefanovstevesouders.com/blog/ – Steve Soudersphpied.com – Stoyan Stefanov
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 36: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/36.jpg)
Stay tuned...
Coming this summer...to an interweb near you
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 37: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/37.jpg)
Stay tuned...
BOOMERANG2010 06 24
STARRING: JAVASCRIPT, APACHE, YAHOOSCRIPT: BLUESMOON, PRODUCTION: TOM CROUCHER, CHOREOGRAPHY: CROCKFORD
http://developer.yahoo.net/blog
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 38: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/38.jpg)
Photo credits
flickr.com/photos/sully_aka__wstera2/4538240734/flickr.com/photos/gertcha/4168724489/flickr.com/photos/30720140@N08/4290289036/flickr.com/photos/dharmasphere/253277654/flickr.com/photos/gi/117771718/flickr.com/photos/siennaisalive/4436708323/flickr.com/photos/vlastula/300102949/flickr.com/photos/electrichamster/3160580687/flickr.com/photos/burnblue/308441464/
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 39: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/39.jpg)
Contact me
Philip Tellisyahoogeek@bluesmoonhttp://bluesmoon.info/slideshare.net/[email protected]
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
![Page 40: Station-wagons and electrons](https://reader036.vdocuments.us/reader036/viewer/2022081403/5559adbad8b42aa4288b5192/html5/thumbnails/40.jpg)
Thank you
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons