This document discusses best practices for building applications that integrate with external APIs and services. It recommends reducing the number of HTTP calls, using caching, and being prepared for APIs to change or fail. Specific techniques mentioned include using API wrappers to isolate changes, implementing timeouts and exponential backoff for retries, and leveraging HTTP caching and webhooks to further reduce calls. The document provides rules of thumb for building applications that depend on external services in a resilient manner.
The Digital Toolbox - a discussion -Science Online '11Kaitlin Thaney
A few guiding slides to jumpstart a discussion on technology and scientific research - a look at what works, where we need further exploration, and a peek at some of the remaining pain points. given at Science Online 2011 (NC) at Sigma Xi.
What you should think about putting in webops dashboards. There's a lot of discussion that isn't annotated in the slide stack -- so you're missing a lot without audio.
You want to have more video on your site or in your social media. but what to show? Good stories might be closer than you think. 13 good ideas for web videos.
Draught buster workshop guide for leapPaul Cameron
Draught Busting notes from LEAP's Draught Busting workshops.
Produced by LEAP - Local Energy Action Project. LEAP aim to deliver a range of free services in the communities of Lochwinnoch, Kilbarchan and Howwood. To help residents save energy and money, provide free impartial advice on insulation, draught proofing, heating, renewables, grants and subsidies. To encourage renewable developments, food cooperatives and car sharing.
lochwinnoch.info/community/leap/who-are-we
A letter to MSP T Godman from Renfrewshire Council stating that there is no requirement to carry out consultations with the public when moving a library within a community. (missing out the moving of the children in LOSC) It also implies that people had been consulted with already through a "Quizdom" consultation that happened in Johnstone (which also covers Lochwinnoch) even though Johnstone is another village some distance away from Lochwinnoch.
This is a presentation made by Cllr David Arthur, the McKillop in Lochwinnoch, 24th November 2010. Entitled "Difficult Choices for Difficult Times" to the on the 24th Nov 2010. He outlines some of the "statistics" used as justification for the downgrading of Lochwinnoch Library. Please see pages 9 and 10, with a summary of the most damming figures on page 12. The figures are very biased as they use a single year comparison, and for maximum effect the council has used percentage decline figures rather than usage by the population.
The Digital Toolbox - a discussion -Science Online '11Kaitlin Thaney
A few guiding slides to jumpstart a discussion on technology and scientific research - a look at what works, where we need further exploration, and a peek at some of the remaining pain points. given at Science Online 2011 (NC) at Sigma Xi.
What you should think about putting in webops dashboards. There's a lot of discussion that isn't annotated in the slide stack -- so you're missing a lot without audio.
You want to have more video on your site or in your social media. but what to show? Good stories might be closer than you think. 13 good ideas for web videos.
Draught buster workshop guide for leapPaul Cameron
Draught Busting notes from LEAP's Draught Busting workshops.
Produced by LEAP - Local Energy Action Project. LEAP aim to deliver a range of free services in the communities of Lochwinnoch, Kilbarchan and Howwood. To help residents save energy and money, provide free impartial advice on insulation, draught proofing, heating, renewables, grants and subsidies. To encourage renewable developments, food cooperatives and car sharing.
lochwinnoch.info/community/leap/who-are-we
A letter to MSP T Godman from Renfrewshire Council stating that there is no requirement to carry out consultations with the public when moving a library within a community. (missing out the moving of the children in LOSC) It also implies that people had been consulted with already through a "Quizdom" consultation that happened in Johnstone (which also covers Lochwinnoch) even though Johnstone is another village some distance away from Lochwinnoch.
This is a presentation made by Cllr David Arthur, the McKillop in Lochwinnoch, 24th November 2010. Entitled "Difficult Choices for Difficult Times" to the on the 24th Nov 2010. He outlines some of the "statistics" used as justification for the downgrading of Lochwinnoch Library. Please see pages 9 and 10, with a summary of the most damming figures on page 12. The figures are very biased as they use a single year comparison, and for maximum effect the council has used percentage decline figures rather than usage by the population.
42. Intranet
GET /user/23 + ETag
HR service
Monday, 18 April 2011
43. Intranet
304 Not Modified
HR service
Monday, 18 April 2011
44. #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
end
Monday, 18 April 2011
45. #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)
end
Monday, 18 April 2011
46. Webhooks
(have your people call my people)
Monday, 18 April 2011
52. 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 calls
Monday, 18 April 2011