Rails is not enough, by Javier Ramirez, at Conferencia Rails 2010 in Madrid, Spain

Post on 10-May-2015

1.681 views 1 download

Tags:

description

We rails people tend to think of Rails as the center-piece of web development. The same thing can be said of .net, Spring/Java Server Faces, Drupal, Python or name-your-web-framework-of-choice-here people.Web frameworks are just a component of web applications, and if you want to succeed you better know the miriads of other components beyond your rockstar code.In my session I will talk about things you must take into account and tools/techniques you should master if you want to make a difference in web development, independently of your development language/framework.Talk delivered at conferencia rails 2010 in Madrid, Spain.

Transcript of Rails is not enough, by Javier Ramirez, at Conferencia Rails 2010 in Madrid, Spain

Rails Rails is not is not

EnoughEnoughby javier ramírezby javier ramírez

@supercoco9@supercoco9jramirez@aspgems.comjramirez@aspgems.com

http://javier-ramirez.comhttp://javier-ramirez.com

A monkey's view A monkey's view of weBof weB

developmentdevelopment

internetweb server

database

request

response

model

controller

viewmodel

Standing Standing on the on the

shoulders shoulders of giantsof giants

Ignoring HTTP, HTML, JavaScript or CSS is not an optionIgnoring HTTP, HTML, JavaScript or CSS is not an option

Code like a pro. Validate!Code like a pro. Validate!

Protect yourself, use frameworksProtect yourself, use frameworks

Run Run FORREST FORREST RUNRUN

https://code.google.com/speed/page-speedhttps://code.google.com/speed/page-speedhttp://developer.yahoo.com/yslow/http://developer.yahoo.com/yslow/https://www.facebook.com/notes/facebook-engineering/bigpipe-https://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919pipelining-web-pages-for-high-performance/389414033919http://yehudakatz.com/2010/09/07/automatic-flushing-the-rails-3-1-planhttp://yehudakatz.com/2010/09/07/automatic-flushing-the-rails-3-1-planhttp://github.com/mkelly12/google_closure_compilerhttp://github.com/mkelly12/google_closure_compiler

Size Size Doesn't Doesn't matter,matter,

if you if you know know

howhow

Adding muscleAdding muscleServer Configuration management and provisioningServer Configuration management and provisioning

Cloud servicesCloud serviceshttp://opscode.com/chefhttp://opscode.com/chefhttp://puppetlabs.comhttp://puppetlabs.com

Deploy strategiesDeploy strategies

http://github.com/capistranohttp://github.com/capistrano http://github.com/lg/murderhttp://github.com/lg/murder http://github.com/calavera/marabuntahttp://github.com/calavera/marabunta

Reducing loadReducing loadUser external serversUser external serversPage/reverse proxy caching Page/reverse proxy caching Key/value middlemenKey/value middlemenDistribute (queue, map reduce...)Distribute (queue, map reduce...)Set limitsSet limitsDisplay less contentDisplay less content

Degrade gracefully Degrade gracefully

http://www.railsinside.com/case-studies/421-http://www.railsinside.com/case-studies/421-kgb-scaling-superbowl-traffic-case-study.htmlkgb-scaling-superbowl-traffic-case-study.html

Paul Paul the octopusthe octopus

Look for traffic patterns (peak hours and “valleys”)Look for traffic patterns (peak hours and “valleys”)

Test your siteTest your siteApachebenchApachebenchhttperfhttperfJmeterJmeter

Do the mathsDo the maths(req/s)*60*60(req/s)*60*60(req/s)*60*60*100/(busiest % hour)(req/s)*60*60*100/(busiest % hour)

Our numbers:Our numbers:7% 7% 11 million pageviews/month11 million pageviews/month8 boxes8 boxes

~37 million pageviews limit ~37 million pageviews limit

Plan For Plan For FailureFailure

My other car is a porscheMy other car is a porsche

Sharpening Sharpening youryouraxeaxe

general programming Conceptsgeneral programming Concepts

RubyRuby

Data StorageData Storage

Algorithms (sorting, map/reduce, sawzall...)Algorithms (sorting, map/reduce, sawzall...)

ACID ACID

SOLID SOLID

How much How much did your did your business business Yesterday?Yesterday?

http://google.com/analyticshttp://google.com/analytics http://web.analytics.yahoo.comhttp://web.analytics.yahoo.com http://omniture.comhttp://omniture.com http://coremetrics.comhttp://coremetrics.com http://webtrends.comhttp://webtrends.com http://piwik.orghttp://piwik.org

How many visitors I get?How many visitors I get?How many pages they see?How many pages they see?Why are they getting here?Why are they getting here?What's the entry/exit point?What's the entry/exit point?Where are they going?Where are they going?Which pages are engaging?Which pages are engaging?Is my workflow too complex?Is my workflow too complex?Am I doing better than before?Am I doing better than before?How much did my business today?How much did my business today?

http://clicktale.comhttp://clicktale.com http://percentmobile.comhttp://percentmobile.com http://feedburner.comhttp://feedburner.com

Do you know Do you know who enters who enters your shop?your shop?

https://www.google.com/adplannerhttps://www.google.com/adplanner

How can I help you?How can I help you?Are you happy with me?Are you happy with me?What do you like about me?What do you like about me?Am I missing the point?Am I missing the point?

https://www.kissinsights.comhttps://www.kissinsights.com http://www.4qsurvey.comhttp://www.4qsurvey.com http://getsatisfaction.comhttp://getsatisfaction.com http://uservoice.comhttp://uservoice.com

How popular/unpopular am I?How popular/unpopular am I?

http://blogpulse.comhttp://blogpulse.com http://icerocket.comhttp://icerocket.com http://thinkupapp.comhttp://thinkupapp.com https://analytics.postrank.comhttps://analytics.postrank.com http://www.google.com/alertshttp://www.google.com/alerts

Mirror mirror Mirror mirror on the wall on the wall Who in the Who in the land is land is fairest fairest of all?of all?

http://compete.comhttp://compete.com http://google.com/trendshttp://google.com/trends

If you build it, they will comeIf you build it, they will come

Mr. ObviousMr. ObviousSEMSEM

PRPR

TwitterTwitter => 126 => 126

Facebook => 130 Facebook => 130

Buttons/bannersButtons/banners

Share profitsShare profits

quack like a duckquack like a duckwhat's the message I'm sending? => webmaster toolswhat's the message I'm sending? => webmaster tools

Internal/external searches => webmaster tools & analyticsInternal/external searches => webmaster tools & analytics

Google adwords keyword toolGoogle adwords keyword tool

http://google.com/insights/searchhttp://google.com/insights/search

http://youtube.comhttp://youtube.com

http://delicious.comhttp://delicious.com

The The Scientific Scientific

methodmethod

A/B TestingA/B Testing

https://optimizely.appspot.comhttps://optimizely.appspot.com http://google.com/websiteoptimizerhttp://google.com/websiteoptimizer

A/B Testing for AdsA/B Testing for Ads

Adwords campaign experimentsAdwords campaign experiments

UxymoronUxymoronNon-standard interfaces, usually hard to build, Non-standard interfaces, usually hard to build, making the users more likely to make mistakes and making the users more likely to make mistakes and find the design much more difficult to usefind the design much more difficult to use

Also said of the moron who Also said of the moron who thought it was such a great thought it was such a great idea to implement that idea to implement that interfaceinterface

Jakob's Law of the Internet Jakob's Law of the Internet User ExperienceUser Experience

Users spend most of Users spend most of their time on other sites. their time on other sites. This means that users This means that users prefer your site to work prefer your site to work the same way as all the the same way as all the other sites they already other sites they already know alikeknow alike

http://www.useit.com/alertbox/20000723.htmlhttp://www.useit.com/alertbox/20000723.html

RTFCRTFC

Google Google MicrosoftMicrosoftYahooYahooTwitterTwitterFacebookFacebookLinkedInLinkedInXingXingGithub...Github...

Read The F***king CodeRead The F***king Code

All All together together

now!now!

Standards are coolStandards are coolRemember the client-sideRemember the client-sideThink big, keep smallThink big, keep smallEstimateEstimateHave a B planHave a B plan

Analyse & MeasureAnalyse & MeasureHave a conversationHave a conversationShout your nameShout your nameMake an educated guessMake an educated guessBe easy to useBe easy to useKeep learningKeep learning

javier ramírezjavier ramírez@supercoco9@supercoco9

jramirez@aspgems.comjramirez@aspgems.com http://javier-ramirez.comhttp://javier-ramirez.com

All the images were found via All the images were found via http://ffffound.comhttp://ffffound.com . Many thanks to their authors . Many thanks to their authors