your api spec isn’t worth the paper it’s written on @nordicapis … · 2019. 10. 28. · your...

Post on 08-Oct-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

YOUR API SPEC ISN’T WORTH THE PAPER IT’S WRITTEN ON

@APIWORLD 2019 SAN JOSE

GARETH JONES

PRINCIPAL API ARCHITECT

@GARETHJ_MSFT

This Photo by Unknown Author is licensed under CC BY-SA

UNDERSPECIFIED CONTRACT

This Photo by Unknown Author is licensed under CC BY

DESIGN YOUR BREAKING CHANGE BAR

@garethj_msft

HYRUM’S LAW

With a sufficient number of users of an API,

it does not matter what you promise in the

contract:

all observable behaviors of your system

will be depended on by somebody.

NUMBER OF THINGS GROWS

• Array size grows from 0 to 1

• Array size grows from 1 to n

• Array size grows from < 1 page to >

1 page

This Photo by Unknown Author is licensed under CC BY-SA

SIZES OF THINGS GROW

Image sizes get big

Overall packet sizes get too big

Example: major retailer 10mb packet

Android device can’t handle it with some json stacks

PERFORMANCE, UP DOWN

Lower or higher latency

New race conditions

Higher latency

Unresponsive UI

Batch exceeds acceptable timeframe

This Photo by Unknown Author is licensed under CC BY

HOW CAN WE PROTECT OURSELVES?

PROVIDE A CHAOS MOCK ENDPOINT STRETCH EVERY BOUNDARY CASE

This Photo by Unknown Author is licensed under CC BY

RANDOMLY DISOBEY CONSUMER PREFERENCES

This Photo by Unknown Author is licensed under CC BY

WATCH THOSE LOGS AFTER A DEPLOYMENT

This Photo by Unknown Author is licensed under CC BY

Oh, one last thing…

21

THANK YOU @garethj_msft

top related