• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Src2011 killer clouds
 

Src2011 killer clouds

on

  • 971 views

 

Statistics

Views

Total Views
971
Views on SlideShare
942
Embed Views
29

Actions

Likes
1
Downloads
3
Comments
0

3 Embeds 29

http://55degrees.posterous.com 10
http://55degrees.posterous.com 10
http://blog.55degrees.co.uk 9

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Src2011 killer clouds Src2011 killer clouds Presentation Transcript

    • Monday, 18 April 2011
    • What You Dont Know About Clouds Could Kill You!!!Monday, 18 April 2011
    • What we learned about the cloud by building and scaling a corporate intranet.Monday, 18 April 2011
    • the • External infrastructure • Easy commissioning " Easy scaling • Less maintenance • Focus on what makes your app differentMonday, 18 April 2011
    • But sometimes...Monday, 18 April 2011
    • TIMTOWTDI (pronounced Tim Toady)Monday, 18 April 2011
    • TIMTOWTDIBSCINABTE (pronounced Tim Toady Bicarbonate)Monday, 18 April 2011
    • @tangleofwire gar@55degrees.co.ukMonday, 18 April 2011
    • MINTMonday, 18 April 2011
    • IntranetMonday, 18 April 2011
    • Google APIs IntranetMonday, 18 April 2011
    • Google APIs Intranet HR ServerMonday, 18 April 2011
    • Google APIs Intranet HR Interface HR ServerMonday, 18 April 2011
    • Google APIs Google Sites Intranet HR Interface HR ServerMonday, 18 April 2011
    • Scaling • Eliminate N+1 queries • Add database indexes • Page, Fragment, Action caching • Background jobsMonday, 18 April 2011
    • Other best practices • Metrics & useful debugging data • Notifications & error numbers • MonitoringMonday, 18 April 2011
    • Max load (many simultaneous web requests)Monday, 18 April 2011
    • Google Sites IntranetMonday, 18 April 2011
    • AJAX polling (are we there yet?)Monday, 18 April 2011
    • i.Reduce number of HTTP callsMonday, 18 April 2011
    • Annual leave • Request • View summaryMonday, 18 April 2011
    • Intranet HR Interface HR ServerMonday, 18 April 2011
    • API wrappers (separate the things that change)Monday, 18 April 2011
    • Integration tests (how are you today?)Monday, 18 April 2011
    • ii.Be prepared for APIs to changeMonday, 18 April 2011
    • People pages • Directory • HR API • Google APIsMonday, 18 April 2011
    • Google APIs Intranet HR Interface HR ServerMonday, 18 April 2011
    • Sync (avoid unnecessary HTTP requests)Monday, 18 April 2011
    • Timeouts (discard requests or retry later)Monday, 18 April 2011
    • require net/http url = URI("http://example.com/feed") req = Net::HTTP.new(url.host, url.port) req.read_timeout = HTTP_READ_TIMEOUT req.open_timeout = HTTP_OPEN_TIMEOUTMonday, 18 April 2011
    • Exponential backoff (handle intermittent network problems)Monday, 18 April 2011
    • times_tried = 0 max_retries = 5 begin times_tried += 1 feed = HRApi.get_employee_feed rescue => e if times_tried < max_retries sleep 4 ** times_tried retry end raise e, "max retries reached" endMonday, 18 April 2011
    • Isolate components (one error shouldn’t stop everything)Monday, 18 April 2011
    • Fail (and go to the pub cache)Monday, 18 April 2011
    • iii.Expect services to failMonday, 18 April 2011
    • Other considerations • HTTP caching • WebhooksMonday, 18 April 2011
    • HTTP caching (anything new?)Monday, 18 April 2011
    • Intranet HR serviceMonday, 18 April 2011
    • Intranet GET /user/23 HR serviceMonday, 18 April 2011
    • Intranet { user 23 + ETag } HR serviceMonday, 18 April 2011
    • Intranet HR serviceMonday, 18 April 2011
    • Intranet GET /user/23 + ETag HR serviceMonday, 18 April 2011
    • Intranet 304 Not Modified HR serviceMonday, 18 April 2011
    • #users_controller def show @user = User.find(params[:id]) expires_in 24.hours if stale? (:etag => @user, :last_modified => @user.updated_at) respond_to do |wants| wants.html wants.xml { render :xml => @user } end end endMonday, 18 April 2011
    • #client code def get_user u = User.find(23) return u if u.max_age < Time.now.utc headers = { If-None-Match => u.etag, If-Modifed-Since => u.last_modifed } ... data = request.get(path, headers) ... return u if response.code == 304 return u.update_attributes(data) endMonday, 18 April 2011
    • Webhooks (have your people call my people)Monday, 18 April 2011
    • Intranet HR serviceMonday, 18 April 2011
    • Intranet GET /generate_report? callback=/foo HR serviceMonday, 18 April 2011
    • Intranet working... HR serviceMonday, 18 April 2011
    • Intranet POST /foo { fascinating data } HR serviceMonday, 18 April 2011
    • iv.Reduce time and cost of HTTP callsMonday, 18 April 2011
    • Rules of thumb i.Reduce number of HTTP calls ii.Be prepared for APIs to change iii.Expect services to fail iv.Reduce time and cost of HTTP callsMonday, 18 April 2011
    • Thanks $ git log --format=%aN | sort -u @rogerbooth @mrloop @cframe @grahamsavage @douglasfshearer @aw221 @jaz303 @lenary @subblueMonday, 18 April 2011
    • Questions?Monday, 18 April 2011