08 10 12 Meebo Ajaxworld Preso

46
confidential scaling the synchronous web scaling the synchronous web

Transcript of 08 10 12 Meebo Ajaxworld Preso

Page 1: 08 10 12 Meebo Ajaxworld Preso

confidential

scaling the synchronous webscaling the synchronous web

Page 2: 08 10 12 Meebo Ajaxworld Preso

confidential

scaling the synchronous webscaling the synchronous webOctober 10October 10thth, 2008, 2008

Elaine WherryCo-Founder, VP Products

Page 3: 08 10 12 Meebo Ajaxworld Preso
Page 4: 08 10 12 Meebo Ajaxworld Preso

www++

Page 5: 08 10 12 Meebo Ajaxworld Preso

2 3 4 5 6 7

Page 6: 08 10 12 Meebo Ajaxworld Preso
Page 7: 08 10 12 Meebo Ajaxworld Preso

traditional versusnontraditional...traditional versusnontraditional...

Page 8: 08 10 12 Meebo Ajaxworld Preso

asynchronous versus synchronous...

Page 9: 08 10 12 Meebo Ajaxworld Preso
Page 10: 08 10 12 Meebo Ajaxworld Preso

asynchronous versus synchronous...

page views versus persistence...

content versus application...

database versus memory...

Page 11: 08 10 12 Meebo Ajaxworld Preso

simpler is better

know your bottlenecks

quick fix or homerun

useful abstractions

Page 12: 08 10 12 Meebo Ajaxworld Preso

#1: simpler is better

Page 13: 08 10 12 Meebo Ajaxworld Preso

protocol plugins

msn

jabber

yahoo

oscar (aim)

gaim 1.5.0ui & core & services

Page 14: 08 10 12 Meebo Ajaxworld Preso

yahoo

gaim 1.5.0core & services

protocol plugins

msn

jabber

yahoo

oscar (aim)

meebo network layer

Page 15: 08 10 12 Meebo Ajaxworld Preso
Page 16: 08 10 12 Meebo Ajaxworld Preso
Page 17: 08 10 12 Meebo Ajaxworld Preso

confidential

Page 18: 08 10 12 Meebo Ajaxworld Preso
Page 19: 08 10 12 Meebo Ajaxworld Preso

#1: simpler is betterDon’t try to solve a scaling problem you don’t have (yet)

Build it as quickly and as inexpensively as possible

You want to save time to iterate upon other ideas in casethis one doesn’t work

Setting yourself up for success – easier to optimizesomething you understand

Page 20: 08 10 12 Meebo Ajaxworld Preso

#2 know your bottlenecks

confidential

Page 21: 08 10 12 Meebo Ajaxworld Preso
Page 22: 08 10 12 Meebo Ajaxworld Preso
Page 23: 08 10 12 Meebo Ajaxworld Preso

tools

stracegdboprofilehttpanalyzermonitoring

Page 24: 08 10 12 Meebo Ajaxworld Preso
Page 25: 08 10 12 Meebo Ajaxworld Preso

confidential

#2: know your bottlenecks

your type of app determines the type of scaling

don’t prematurely optimize

know system at different levels: oprofile,valgrind, gdb

know your bottlenecks: memory, cpu, bandwidth,storage, disk i/o

Page 26: 08 10 12 Meebo Ajaxworld Preso

#3: quick fix or homerun!#3: quick fix or homerun!

confidential

Page 27: 08 10 12 Meebo Ajaxworld Preso

kill –9 <pid>

Page 28: 08 10 12 Meebo Ajaxworld Preso
Page 29: 08 10 12 Meebo Ajaxworld Preso
Page 30: 08 10 12 Meebo Ajaxworld Preso
Page 31: 08 10 12 Meebo Ajaxworld Preso
Page 32: 08 10 12 Meebo Ajaxworld Preso

confidential

Page 33: 08 10 12 Meebo Ajaxworld Preso

confidential

Page 34: 08 10 12 Meebo Ajaxworld Preso
Page 35: 08 10 12 Meebo Ajaxworld Preso

cgifastcgi

mod_meebo

Page 36: 08 10 12 Meebo Ajaxworld Preso

#3: quick fix or homerun

users just want it to work (now)

use the time the quick fix affords you wisely

aim for small or big, avoid the middle

fix the root issue

Page 37: 08 10 12 Meebo Ajaxworld Preso

#4: useful abstractions#4: useful abstractions

Page 38: 08 10 12 Meebo Ajaxworld Preso
Page 39: 08 10 12 Meebo Ajaxworld Preso
Page 40: 08 10 12 Meebo Ajaxworld Preso

meebo

util.jsajax

uidlg

menubutton

element

IMDlg BuddyListDlg

EventMgr NetworkMgr

Page 41: 08 10 12 Meebo Ajaxworld Preso

meeboApp meeboAppmeeboApp

meeboui

utilajax

PubSub

Buddy BuddyList Account

EventMgr NetworkMgr

dlg

menubutton

element

iPhoneiPhoneFirefox

Page 42: 08 10 12 Meebo Ajaxworld Preso

#4: useful abstractions

keep it simple, flexible, so you can adapt quicklyto changes and scale with needs

abstractions allow you to reuse existingcomponents to scale to new challenges

it’s hard to know where the useful abstractionsare when you start a project

Page 43: 08 10 12 Meebo Ajaxworld Preso

simpler is better

know your bottlenecks

quick fix or homerun

useful abstractions

Page 44: 08 10 12 Meebo Ajaxworld Preso

today

3 years old45 people (2 dogs)35 million uniques per month350 years worth of usage per day200 million messages per day54,000 kiss emoticons each day :-*2.5 hour session length

Page 45: 08 10 12 Meebo Ajaxworld Preso

confidential

thank you

Page 46: 08 10 12 Meebo Ajaxworld Preso

http://flickr.com/photos/23327394@N05/2247502690/sizes/o/ (synchronized swimming)http://www.flickr.com/photos/exlibris/1031926094/ (traditional wedding)http://www.flickr.com/photos/callmemurphy/15877783/ (elvis)http://www.tadgear.com/edged%20tools/tad_gear_titanium_folding_spork.htm (spork)http://flickr.com/photos/deeleea/527574056/sizes/o/ (cat bottleneck)http://flickr.com/photos/pinelife/2580999964/sizes/l/ (quick fix)http://petitinvention.files.wordpress.com/2008/04/stinky_trash-petitinvention.jpg (trash icon)http://technet.microsoft.com/en-us/library/cc722911.aspx (windows dlg)http://flickr.com/photos/simonkimber/1096654635/ (traffic light tree)http://www.flickr.com/photos/jumblejet/2685719879/sizes/l/ (elephant veggie art)