"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Station-wagons and electrons
1. cd /pub
cat beer > /dev/bluesmoon
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
2. Not stuck in a cloud of volcanic ash
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
3. Didn’t get sidetracked on my way here
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
4. Didn’t go on an extended vacation
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
5. Almost not allowed in
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
6. Philip Tellis
geek
yahoo
@bluesmoon
http://bluesmoon.info/
philip@bluesmoon.info
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
7. Station wagons and Electrons
Philip Tellis / philip@bluesmoon.info
Yahoo! London Pub Night – May 27, 2010 – Wallacespace
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
8. Never underestimate the bandwidth of a station wagon
speeding down the motorway
– Andrew S Tanenbaum?
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
9. Should you fly a 747 or a 737?
A 747 seats 400+ passengers
A 737 seats about 150
Both take about the same time to fly from FRA to LHR
A 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
10. Bandwidth and Latency
How much data can you transfer at once
v/s
How quickly can you get your data across
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
11. But bandwidth is easy
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
12. Shannon’s Theorem
S
C = B × log2 (1 + )
N
C – Channel capacity in bps
B – Bandwidth in Hz
S – Signal strength
N – Noise strength – S/N measured in dB
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
13. Bandwidth can be bought
Bandwidth has increased steadily over time
Networks, hard drives, memory, CPU, system bus,
everything.
Bandwidth can be parallelised
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
14. 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
15. 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
16. Blink
The average human eye takes 300-400ms
to blink
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
17. 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
19. 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
20. Latency – not so easy to sell
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
21. Speed Limits
3 × 108 m /s – in vacuum
2 × 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
22. Round-trip
It should take a packet around 53ms to go from Boston to
London and back
It actually takes around 90ms for a packet to go from
Boston to London and back
This is pretty good as far as approaching theoretical limits
goes
Ref: It’s the latency, stupid – Stuart Cheshire
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
23. Round-trip
It should take a packet around 53ms to go from Boston to
London and back
It actually takes around 90ms for a packet to go from
Boston to London and back
This is pretty good as far as approaching theoretical limits
goes
Ref: It’s the latency, stupid – Stuart Cheshire
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
24. But then again...
Never underestimate the data-transfer capabilities of a
Galaxy class starship travelling at Warp 9.875 and
fitted with a computer that sounds like Majel Barett
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
25. Latency isn’t sexy
When was the last time you saw a TV commercial mention
latency?
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
27. 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
28. Latency v/s Bandwidth
Improving latency tends to improve perceived bandwidth
Improving bandwidth utilisation can potentially worsen
latency
Larger/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
29. Getting around latency problems
Don’t add latency – It’s bad enough without us adding to it
Caching – Bring the data closer to where it’s needed
Parallelise – Reduce the number of serial roundtrips
Predict – Get data before it’s needed
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
30. If you can, stuff everything into one call
Have a look at search.yahoo.com load up in firebug
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
31. Parallelise where possible
Downloading a script blocks page load, so do it in the
background instead
Browsers will download 4-8 resources from a host in
parallel, take advantage of that
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
32. Predict what’s next and fetch it
If you know what the user will do next, pre-fetch it
Yahoo! Search page pre-loads sprites and Javascript for
the results page
Log 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
33. Measure your user’s bandwidth & latency
Javascript code to measure your user’s bandwidth & latency
http://bluesmoon.info/perf-tests/bw/bw-test-1.3.zip
http://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
34. Useful tools for performance analysis
YSlow – Firefox/Firebug plugin from Yahoo!
PageSpeed – Firefox/Firebug plugin from Google
PageTest – Web page testing tool
ShowSlow – Automated YSlow runs against your URL
Fiddler – Web debugging Proxy
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
35. Further reading
developer.yahoo.com/performance – Yahoo!
code.google.com/speed/page-speed/docs/rules_intro.html
– Google
slideshare.net/stoyan/the-business-of-performance –
Stoyan Stefanov
stevesouders.com/blog/ – Steve Souders
phpied.com – Stoyan Stefanov
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
36. Stay tuned...
Coming this summer...
to an interweb near you
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
37. Stay tuned...
BOOMERANG
2010 06 24
STARRING: JAVASCRIPT, APACHE, YAHOO
SCRIPT: BLUESMOON, PRODUCTION: TOM CROUCHER, CHOREOGRAPHY: CROCKFORD
http://developer.yahoo.net/blog
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
38. 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
39. Contact me
Philip Tellis
yahoo
geek
@bluesmoon
http://bluesmoon.info/
slideshare.net/bluesmoon
philip@bluesmoon.info
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
40. Thank you
Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons