evolve`13 keynote: scrambled eggs

46
1 Scrambled Eggs Roy T. Fielding, Ph.D. | Senior Principal Scientist, Adobe

Upload: roy-fielding

Post on 28-Nov-2014

14.459 views

Category:

Technology


0 download

DESCRIPTION

A scrambled talk on some of the major issues I am working on at Adobe, including HTTPbis, DNT, advice on the REST architectural style and API versioning, software evolvability, and a sneak peek at a potential feature for Adobe AEM (CQ) to support continuous deployment.

TRANSCRIPT

Page 1: EVOLVE`13 Keynote: Scrambled Eggs

1

S c ra m b l e d E g g s• Roy T. Fielding, Ph.D. | Senior Principal Scientist, Adobe

Page 2: EVOLVE`13 Keynote: Scrambled Eggs

I T ’ S A M Y ST E R Y

2

Page 3: EVOLVE`13 Keynote: Scrambled Eggs

I T ’ S A M Y ST E R Y

Open SourceApache

2

Page 4: EVOLVE`13 Keynote: Scrambled Eggs

I T ’ S A M Y ST E R Y

Open SourceApache

StandardsHTTPbis + HTTP/2Do Not Track

2

Page 5: EVOLVE`13 Keynote: Scrambled Eggs

I T ’ S A M Y ST E R Y

Open SourceApache

StandardsHTTPbis + HTTP/2Do Not Track

So!ware Architecture

REST

2

Page 6: EVOLVE`13 Keynote: Scrambled Eggs

I T ’ S A M Y ST E R Y

Open SourceApache

StandardsHTTPbis + HTTP/2Do Not Track

So!ware Architecture

REST

2

Page 7: EVOLVE`13 Keynote: Scrambled Eggs

I T ’ S A M Y ST E R Y

Open SourceApache

StandardsHTTPbis + HTTP/2Do Not Track

So!ware Architecture

REST

Wouldn’t it be nice if CQ supported …

2

Page 8: EVOLVE`13 Keynote: Scrambled Eggs

STA N D A R D S : H T T P

HTTP/1.1Almost done, reallyIESG last call next week or so

HTTP/2.0Standardization of Google’s SPDYSession-layer Tunnel for HTTP with Compression (?)

• Should have been called TCP++, or TLS++

Improvement for session-heavy, authenticated sites• http://trac.tools.ietf.org/wg/httpbis/trac/wiki

3

Page 9: EVOLVE`13 Keynote: Scrambled Eggs

STA N D A R D S : D O N OT T R A C K

Tracking is pervasivebecause it feeds personalization and UX

4

Page 10: EVOLVE`13 Keynote: Scrambled Eggs

5

profile data

Green arrows represent the flow of consumer data.Blue arrows represent the flow of 3rd party information & offerings.

This diagram represents a typical flow of information related to some online behavioral advertising. Not all online behavioral advertising operates exactly like this diagram.

..

Browser on Personal Computer

Ad Network

BUY ONE,

GET ONE!SPECIALOFFER!

Web Analytics Provider

News Website

Other Websites

Merchant

Secondary Ad Networks

Profiling Service

AGE

INCOMELEVEL

HOBBIES

statistics & consumer behavior

contextual &tailored ads

contextual &tailored ads

demographics &online activity

demographicdata

(from registration)

demographics,past purchases

aggregateanalytics data

* depending on contract limitations

webpage

interestsegments

BUY ONE,

GET ONE!SPECIALOFFER!

URL + analyticscookie

URL + ad cookie1

URL + pre-existing

cookie

redirect URL

Online Behavioral Advertising

URL + ad cookie2

URL + news site

cookie

Page 11: EVOLVE`13 Keynote: Scrambled Eggs

STA N D A R D S : D O N OT T R A C K

Tracking is pervasivebecause it feeds personalization and UX

Data collection across unrelated contexts is a privacy concern

6

Page 12: EVOLVE`13 Keynote: Scrambled Eggs

7

Doctor

Medical Prescriptions

Green arrows represent the flow of consumer data.Blue arrows represent the flow of 3rd party information & offerings.

This diagram represents a typical flow of information related to some medical and pharmaceutical companies. Not all medical and pharmaceutical companies operate exactly like this diagram.

Patient

Pharmaceutical Company

Health Insurance

Pharmacy Public Health Agency

(disease tracking)

prescription

billing

marketing

prescription

refill reminders

Pharmacy AnalyticsCompany

marketing

prescriptiondata

aggregateprescription

statistics

aggregateprescription

statistics

aggregateprescription

statistics

personalprofile data

[FTC]

Page 13: EVOLVE`13 Keynote: Scrambled Eggs

7

Doctor

Medical Prescriptions

Green arrows represent the flow of consumer data.Blue arrows represent the flow of 3rd party information & offerings.

This diagram represents a typical flow of information related to some medical and pharmaceutical companies. Not all medical and pharmaceutical companies operate exactly like this diagram.

Patient

Pharmaceutical Company

Health Insurance

Pharmacy Public Health Agency

(disease tracking)

prescription

billing

marketing

prescription

refill reminders

Pharmacy AnalyticsCompany

marketing

prescriptiondata

aggregateprescription

statistics

aggregateprescription

statistics

aggregateprescription

statistics

personalprofile data

[FTC]

profile data

Other Websites

Profiling Service

AGE

INCOMELEVEL

HOBBIES

demographics &online activity

Page 14: EVOLVE`13 Keynote: Scrambled Eggs

STA N D A R D S : D O N OT T R A C K

Tracking is pervasivebecause it feeds personalization and UX

Data collection across unrelated contexts is a privacy concern

Governments want to stop it,but they don’t know how

Privacy advocates incite fear and doubt

Poor business data practices justify them!

This should bean easy problem to fix

8

Page 15: EVOLVE`13 Keynote: Scrambled Eggs

9

Online Advertising Industry

US FTC European Commission

Privacy Advocates

B U T O N LY I F W E W O R K TO G E T H E R

… and now state governments are getting involved too …

Page 16: EVOLVE`13 Keynote: Scrambled Eggs

S O F T W A R E A R C H I T E C T U R E

What isthe best practice for

versioninga REST API?

10

Page 17: EVOLVE`13 Keynote: Scrambled Eggs

S E R I O U S LY, W H I C H I S B E T T E R ?

Should I include a version number in the URL hierarchy?• http://example.com/v1/users

Should I include a version number on the resource name?• http://example.com/users.v1

Should I include a version number as a query parameter?• http://example.com/users?api=v1

Should I include a version number in the media type?• Content-Type: application/vnd.myname.v1+json

11

Page 18: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

RESTis so!ware engineering on the scale of

DECADES

12

Page 19: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

RESTis designed primarily to improve

EVOLVABILITY

13

Page 20: EVOLVE`13 Keynote: Scrambled Eggs

14

E V O LV A B I L I T Y

Evolvability is the ability to change over time, in response to changing user needs

or a changing environment,without starting over

Page 21: EVOLVE`13 Keynote: Scrambled Eggs

15

Degree of Evolvability

Arch

itect

ural

Sca

le

So!wareEvolution

IndependentEvolution

Self-ModifyingSo!ware

Page 22: EVOLVE`13 Keynote: Scrambled Eggs

15

Degree of Evolvability

Arch

itect

ural

Sca

le

So!wareEvolution

IndependentEvolution

Self-ModifyingSo!ware

Page 23: EVOLVE`13 Keynote: Scrambled Eggs

15

Degree of Evolvability

Arch

itect

ural

Sca

le

So!wareEvolution

IndependentEvolution

Self-ModifyingSo!ware

Page 24: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

Hypertext as the Engine of Application State

16

S0 S2S1 S3R o y

*

*

Page 25: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

Follow Your Nose

17

S0 S2S1 S3R o y

*

*

Page 26: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

Follow Your Nose

18

S0 S2S1 S3R o y

*

*

Page 27: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

Follow Your Nose

19

S0 S2S1 S3R o y

*

*

Page 28: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

Follow Your Nose

20

S0 S2S1 S3R o y

*

*

Page 29: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

Hypertext as the Engine of Application State

each state can be dynamiceach transition can be redirected

21

S0 S2S1 S3R o y

*

*

Page 30: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

What isthe best practice for

versioninga REST API?

22

Page 31: EVOLVE`13 Keynote: Scrambled Eggs

R E ST

What isthe best practice for

versioninga REST API?

22

DON’TVersioning an interface

is just a “polite” wayto kill deployed applications

Page 32: EVOLVE`13 Keynote: Scrambled Eggs

S E R I O U S LY ?

23

Page 33: EVOLVE`13 Keynote: Scrambled Eggs

S E R I O U S LY ?

When was the last time you sawa version number on a website?

23

Page 34: EVOLVE`13 Keynote: Scrambled Eggs

S E R I O U S LY ?

When was the last time you sawa version number on a website?

a REST API is just a websitefor users with a limited vocabulary(machine to machine interaction)

23

Page 35: EVOLVE`13 Keynote: Scrambled Eggs

B R E A K I N G CO M PAT I B I L I T Y I S B A D

Websites are supposed to retainbackwards compatibility

(avoid broken links)

If you want to break with the past,use a different hostname,

with new branding!

24

Page 36: EVOLVE`13 Keynote: Scrambled Eggs

25

A LW A Y S S H I P T R U N K

why web applications are different …

problems that none of therevision control systems solve …

how you can solve some of them yourself

[Paul Hammond (Typekit)] http://www.paulhammond.org/2010/06/trunk/based on real deployment experience at Flickr, Etsy, Typekit, ...

Page 37: EVOLVE`13 Keynote: Scrambled Eggs

26

A LW A Y S S H I P T R U N K

Page 38: EVOLVE`13 Keynote: Scrambled Eggs

26

A LW A Y S S H I P T R U N K

What would a revision control system built for supporting deployed web applications be like?

Page 39: EVOLVE`13 Keynote: Scrambled Eggs

26

A LW A Y S S H I P T R U N K

What would a revision control system built for supporting deployed web applications be like?

right?

Page 40: EVOLVE`13 Keynote: Scrambled Eggs

26

A LW A Y S S H I P T R U N K

What would a revision control system built for supporting deployed web applications be like?

right?

Wouldn’t it be nice if CQ supported …

Page 41: EVOLVE`13 Keynote: Scrambled Eggs

F R A G S

Feature Flags

for conditional activationof content fragments during

continuous deployment

27

Page 42: EVOLVE`13 Keynote: Scrambled Eggs

G LO B A L CO N F I G U R AT I O N S E T T I N G S

28

if (frags(“saml_auth”)) {credentials = saml.authenticate(user);

}else {credentials = httpAuth.check(user);

}

• testable for conditional content (i.e., everything)• readable via all development interfaces• writable with ops authority

Page 43: EVOLVE`13 Keynote: Scrambled Eggs

F L I P S W I TC H E S V I A CO N S O L E

29

• easy UI for (proportional) enabling or disabling of frags• activation by frag, recorded with timestamps• activation by AB testing, recorded for comparative analytics

[Ross Harmes, http://www.flickr.com/photos/rossharmes/4153769740/]

Page 44: EVOLVE`13 Keynote: Scrambled Eggs

A C T I V AT I O N - A W A R E M O N I TO R I N G

30

• dashboard interfaces for time-series graphs with activation markers• AB comparisons based on automated percentile activation• data available as more resources, for reuse by enterprise monitoring

Page 45: EVOLVE`13 Keynote: Scrambled Eggs

F R A G S

Are you a CQ/AEM customer/prospect?

Do you want a feature like Frags?

Do you need more than what I described?

Ask for it!

(we prioritize features by customer demand)

31

Page 46: EVOLVE`13 Keynote: Scrambled Eggs

32