data decay and the illusion of the present
DESCRIPTION
My slides from the "APIs and The Future of Data" session at the API Strategy & Practice conference, October 22-24 in San Francisco.TRANSCRIPT
![Page 1: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/1.jpg)
Data Decay and the Illusion of the PresentDan Lynn
@danklynn
![Page 2: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/2.jpg)
Keeps all your contacts in one place and keeps them automatically up to date.
Based in Denver, Colorado
CTO & [email protected]
@danklynn
![Page 3: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/3.jpg)
Let’s talk about time.
![Page 4: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/4.jpg)
![Page 5: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/5.jpg)
The Past
![Page 6: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/6.jpg)
http://wearcam.org/dundas-square/2004sep23/cement.jpg
![Page 7: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/7.jpg)
The FutureThe Past
The Present
![Page 8: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/8.jpg)
Unless you’re a yogi, you probably can’t even perceive the present.
![Page 9: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/9.jpg)
http://applemagazine.com/wp-content/uploads/2012/12/exc.jpeg
![Page 10: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/10.jpg)
- Washington Post (September 24, 2013)
“Traders may have gotten last week’s Fed news 7 milliseconds early“
![Page 11: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/11.jpg)
It’s just a question of how old.Data is always old
![Page 12: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/12.jpg)
How do APIs keep data fresh?
![Page 13: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/13.jpg)
Polling
• Simple
• But can lead to complex scheduling
• Trades efficient use of resources for fresh data.
GET /notifications?since=1382630675166
![Page 14: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/14.jpg)
- Zapier“98.5% of polls are wasted”
![Page 15: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/15.jpg)
Ping/Pull• XML-RPC
• Facebook Realtime updates
• Avoids scheduled polling
• Consumer must host an endpoint
• Moderate latency (3 hops)
• Complex
![Page 16: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/16.jpg)
Push• Github service hooks
• Content of change is pushed
• Payload can be diff or full resource
• Consumer must host an endpoint
• Lowest latency (1 hop)
![Page 17: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/17.jpg)
We are moving towards a push-based
API ecosystem
![Page 18: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/18.jpg)
“Security is abnormally slow.”Flight Delays
![Page 19: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/19.jpg)
“Dan Lynn changed his phone number”Contact Information
![Page 20: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/20.jpg)
Dynamic SubscriptionsPOST /contacts/123/subscriptions
{
"url" : "https://.../updates?contactId=123"
}
201 Created
{ "url" : "/contacts/123/subscriptions/a3b"}
![Page 21: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/21.jpg)
Dynamic SubscriptionsDELETE /contacts/123/subscriptions/a3b
200 OK
![Page 22: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/22.jpg)
So which model is right for your API?
![Page 23: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/23.jpg)
What’s the cost of acting on wrong
data?
![Page 24: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/24.jpg)
$100 per contact
Source: SiriusDecisions
If left untreated
![Page 25: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/25.jpg)
Low time sensitivity?Polling is fine.
![Page 26: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/26.jpg)
High time sensitivity?Go with push.
![Page 27: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/27.jpg)
APIs are combating information asymmetry.
![Page 28: Data decay and the illusion of the present](https://reader034.vdocument.in/reader034/viewer/2022052619/5565762fd8b42a7b518b523f/html5/thumbnails/28.jpg)
Thanks!@danklynn
See Also:http://xmpp.org/extensions/xep-0060.html
https://code.google.com/p/pubsubhubbub/http://www.resthooks.org/