Data decay and the illusion of the present

28
Data Decay and the Illusion of the Present Dan Lynn @danklynn

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 of Data decay and the illusion of the present

Page 1: Data decay and the illusion of the present

Data Decay and the Illusion of the PresentDan Lynn

@danklynn

Page 2: Data decay and the illusion of the present

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

Let’s talk about time.

Page 4: Data decay and the illusion of the present
Page 5: Data decay and the illusion of the present

The Past

Page 7: Data decay and the illusion of the present

The FutureThe Past

The Present

Page 8: Data decay and the illusion of the present

Unless you’re a yogi, you probably can’t even perceive the present.

Page 10: Data decay and the illusion of the present

- 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

It’s just a question of how old.Data is always old

Page 12: Data decay and the illusion of the present

How do APIs keep data fresh?

Page 13: Data decay and the illusion of the present

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

- Zapier“98.5% of polls are wasted”

Page 15: Data decay and the illusion of the present

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

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

We are moving towards a push-based

API ecosystem

Page 18: Data decay and the illusion of the present

“Security is abnormally slow.”Flight Delays

Page 19: Data decay and the illusion of the present

“Dan Lynn changed his phone number”Contact Information

Page 20: Data decay and the illusion of the present

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

Dynamic SubscriptionsDELETE /contacts/123/subscriptions/a3b

200 OK

Page 22: Data decay and the illusion of the present

So which model is right for your API?

Page 23: Data decay and the illusion of the present

What’s the cost of acting on wrong

data?

Page 24: Data decay and the illusion of the present

$100 per contact

Source: SiriusDecisions

If left untreated

Page 25: Data decay and the illusion of the present

Low time sensitivity?Polling is fine.

Page 26: Data decay and the illusion of the present

High time sensitivity?Go with push.

Page 27: Data decay and the illusion of the present

APIs are combating information asymmetry.