SlideShare a Scribd company logo
1 of 18
Scaling API Design 
Jason Harmon, Head of API Design 
September 2014 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary.
About me 
Scaling API Design 
Jason Harmon 
• Leads API design at Paypal 
• Design phase of the “PPaaS” aka “Paypal as a Service" program 
• Engineering-wide initiative 
• Collaborate on designs for all internal/external/partner/whatever APIs 
• Maintain style/standards 
• Stakeholder for internal developer portal & tools teams 
• Internal API design training/evangelism 
@jharmn 
Jasonh-n-austin 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 2
Let’s think big 
What if your startup takes off? 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 3
Distributed architecture 
Breaking down the monolith 
Everyone starts with a monolith 
Defining uniform interfaces helps define bounded contexts 
• Define interfaces, then perform surgery 
Allows for scaling per capability 
• When one component is overloaded, scale it! 
• Harder to DDoS a distributed platform 
Increases team autonomy 
• Implementations can fit the need 
• Languages & data don’t have to be all the same 
Discoverability is a hard problem in big systems 
• Reduce duplication of efforts 
• Create visibility to weak spots in capabilities 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 4
Portfolio 
Think about the big picture 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 5
Portfolio 
Organizing your APIs 
Group operations by goals/usage 
API Product Managers are key, but they’re hard to find 
Start with capabilities, not resources 
• Identify capabilities by way of use cases 
Provide internal/external/partner developer portals to provide visibility 
Use caution with product names 
Respect customer language 
Inverse Conway’s Law 
“Organizations which design systems are constrained to produce designs which are 
copies of the communication structures of these organizations.” 
• Don’t design your APIs to reflect your systems or organizations 
• Make your software look like your customers see you 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 6
Portfolio 
Business decides, developers implement 
Business 
• Identify capabilities 
• How will business understand what your API can do? 
• Sometimes a capability is a resource collection 
• More often it’s a package of resources & operations 
• Level 1 Categories + Package/Spec/Level 2 
Developers 
Use ‘namespaces’ to designate functional areas: /v1/factory/widgets 
• Not always the same as capabilities/packages 
URIs relay data relationships 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 7
Design first 
Right after portfolio 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 8
Design first 
Building backend is expensive 
Break changes early, before you build it 
Specification formats 
• Swagger, RAML, Blueprint: whatever suits you 
• Portal/Docs/Reference 
• Codegen server/client/SDK 
• Mocking 
• Consistency Validation 
Respect spec storage 
• Separate from implementation, track minor versions on iterations 
• All in one place – Platform skeleton 
• Docs are specs too 
Get API client feedback on mock APIs 
• Real usability is only measurable with tactile feedback 
• Weakness: multi-scenario and errors are hard to mock 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 9
Design first: Parallelize 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 10
Fundamentals 
Core elements of API design 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 11
Sustainability 
Long live v1! 
• Rapid iteration/fundamental changes are off-limits once it’s released 
• Extensible API designs aren’t really a thing 
• Rule #1 of API versioniong: try not to 
Can we grow this design without starting over? 
Hide implementation details 
• Today’s backend is tomorrow’s scrap heap 
• Watch errors 
Add URIs, deprecate URIs; new designs are usually new resources 
• APIUX: http://apiux.com/2014/09/05/api-design-sustainability 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 12
Usability 
Think about API clients’ perspective 
Nouns matter 
• Resource-orientation 
http://softexpert.files.wordpress.com/2007/10/526604 
• Avoid RPC unless you can rationalize optimized DX 
• Understandable terminology 
• Use industry-standard terminology where possible 
• Avoid vague terms: metadata, context, etc 
Get your flow on 
• Capture current and future use cases 
• Identify goals 
• Analyze chain of calls required to get there 
86_6ca085f7a8.jpg?w=780 
• Pay attention to identifiers in each API to ensure they chain smoothly 
REST != CRUD 
• Think beyond data structures, think resources 
• Resources should quickly reach client goals without excessive complexity 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 13
Scalability 
We’re talking design scale, not system scale…or both 
The Goldilocks principle 
Be smart about “just right” sized resources 
Big resources can be a problem 
• System overload/performance issues 
• Coupling concerns 
• Long, unreliable HTTP connections 
• Bandwidth overhead 
• Complexity! 
Tiny resources can be just as bad 
• N+1 calls tend to proliferate 
• Lots of TCP sockets https://img1.etsystatic.com/000/0/5414982/il_fullxfull.191 
894533.jpg 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 14
Consistency 
Stick to the plan 
Standards, guidance, patterns 
Naming conventions: Field, parameter, URI 
Define HTTP interactions 
• Common patterns 
Identify common components 
• Addresses, user info etc 
Headers are platform plumbing 
• Use them sparingly 
Ensure consistent identity mechanisms 
• Preserve external identity through 
internal platform calls http://minorcreations.files.wordpress.com/2012/07/one.png 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 15
Decentralize 
Educate and cooperate 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 16
Decentralize 
Educate and cooperate 
Internal evangelism 
Educate developers on program/process, standard, and principles 
Identify thought leaders and fast learners 
• Develop API design mentorship 
• Ongoing communication 
Listen to feedback on gaps in understanding 
• Conduct regular feedback sessions from frontend and backend devs 
• Hackathons inside & out 
• Dedicate to document anything you have to answer twice 
• Standards are nice, but guidance is better 
Highlight outstanding design and collaboration examples 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 17
Scaling API Design 
Thanks! 
Jason Harmon 
Head of API Design 
Paypal 
@jharmn 
Jasonh-n-austin 
© 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 18

More Related Content

What's hot

API-first development
API-first developmentAPI-first development
API-first developmentVasco Veloso
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SitePronovix
 
Pain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywherePain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywhereNordic APIs
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookKaty Slemon
 
Your API Strategy: Why Boring is Best
Your API Strategy: Why Boring is BestYour API Strategy: Why Boring is Best
Your API Strategy: Why Boring is BestNordic APIs
 
Welcome Note by Abhinav Asthana, CEO at Postman
Welcome Note by Abhinav Asthana, CEO at PostmanWelcome Note by Abhinav Asthana, CEO at Postman
Welcome Note by Abhinav Asthana, CEO at PostmanPostman
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Nordic APIs
 
Continuous Integration and Delivery at Shapeways (Matt Boyle)
Continuous Integration and Delivery at Shapeways (Matt Boyle)Continuous Integration and Delivery at Shapeways (Matt Boyle)
Continuous Integration and Delivery at Shapeways (Matt Boyle)Nordic APIs
 
API 101 - Understanding APIs
API 101 - Understanding APIsAPI 101 - Understanding APIs
API 101 - Understanding APIs3scale
 
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays
 
What Postman Did for a CEO Who Can’t Code by Craig Balkin
What Postman Did for a CEO Who Can’t Code by Craig BalkinWhat Postman Did for a CEO Who Can’t Code by Craig Balkin
What Postman Did for a CEO Who Can’t Code by Craig BalkinPostman
 
{Re}designing a Developer Portal
{Re}designing a Developer Portal{Re}designing a Developer Portal
{Re}designing a Developer PortalPronovix
 
Advanced Mocking for Swagger APIs
Advanced Mocking for Swagger APIsAdvanced Mocking for Swagger APIs
Advanced Mocking for Swagger APIsSmartBear
 
Drive API Adoption: Reach Over 13 Million Developers
Drive API Adoption: Reach Over 13 Million DevelopersDrive API Adoption: Reach Over 13 Million Developers
Drive API Adoption: Reach Over 13 Million DevelopersPostman
 
INTERFACE, by apidays - Low code APIs that don't break by Zdenek Nemec, Supe...
INTERFACE, by apidays  - Low code APIs that don't break by Zdenek Nemec, Supe...INTERFACE, by apidays  - Low code APIs that don't break by Zdenek Nemec, Supe...
INTERFACE, by apidays - Low code APIs that don't break by Zdenek Nemec, Supe...apidays
 
apidays LIVE New York 2021 - Designing embedded platforms: Lessons from indus...
apidays LIVE New York 2021 - Designing embedded platforms: Lessons from indus...apidays LIVE New York 2021 - Designing embedded platforms: Lessons from indus...
apidays LIVE New York 2021 - Designing embedded platforms: Lessons from indus...apidays
 
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...Nordic APIs
 
A Connector, A Container and an API Walk into a Bar… Microservices Edition
A Connector, A Container and an API Walk into a Bar… Microservices EditionA Connector, A Container and an API Walk into a Bar… Microservices Edition
A Connector, A Container and an API Walk into a Bar… Microservices EditionSteven Willmott
 
Webinar: “Introduction to the Postman API Network”
Webinar: “Introduction to the Postman API Network”Webinar: “Introduction to the Postman API Network”
Webinar: “Introduction to the Postman API Network”Postman
 
I Love APIs 2015: Create Design-driven APIs with Node.js and Swagger
I Love APIs 2015: Create Design-driven APIs with Node.js and SwaggerI Love APIs 2015: Create Design-driven APIs with Node.js and Swagger
I Love APIs 2015: Create Design-driven APIs with Node.js and SwaggerApigee | Google Cloud
 

What's hot (20)

API-first development
API-first developmentAPI-first development
API-first development
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc Site
 
Pain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re EverywherePain Points In API Development? They’re Everywhere
Pain Points In API Development? They’re Everywhere
 
Rest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbookRest api best practices – comprehensive handbook
Rest api best practices – comprehensive handbook
 
Your API Strategy: Why Boring is Best
Your API Strategy: Why Boring is BestYour API Strategy: Why Boring is Best
Your API Strategy: Why Boring is Best
 
Welcome Note by Abhinav Asthana, CEO at Postman
Welcome Note by Abhinav Asthana, CEO at PostmanWelcome Note by Abhinav Asthana, CEO at Postman
Welcome Note by Abhinav Asthana, CEO at Postman
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)
 
Continuous Integration and Delivery at Shapeways (Matt Boyle)
Continuous Integration and Delivery at Shapeways (Matt Boyle)Continuous Integration and Delivery at Shapeways (Matt Boyle)
Continuous Integration and Delivery at Shapeways (Matt Boyle)
 
API 101 - Understanding APIs
API 101 - Understanding APIsAPI 101 - Understanding APIs
API 101 - Understanding APIs
 
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
apidays LIVE Hong Kong 2021 - GraphQL : Beyond APIs, graph your enterprise by...
 
What Postman Did for a CEO Who Can’t Code by Craig Balkin
What Postman Did for a CEO Who Can’t Code by Craig BalkinWhat Postman Did for a CEO Who Can’t Code by Craig Balkin
What Postman Did for a CEO Who Can’t Code by Craig Balkin
 
{Re}designing a Developer Portal
{Re}designing a Developer Portal{Re}designing a Developer Portal
{Re}designing a Developer Portal
 
Advanced Mocking for Swagger APIs
Advanced Mocking for Swagger APIsAdvanced Mocking for Swagger APIs
Advanced Mocking for Swagger APIs
 
Drive API Adoption: Reach Over 13 Million Developers
Drive API Adoption: Reach Over 13 Million DevelopersDrive API Adoption: Reach Over 13 Million Developers
Drive API Adoption: Reach Over 13 Million Developers
 
INTERFACE, by apidays - Low code APIs that don't break by Zdenek Nemec, Supe...
INTERFACE, by apidays  - Low code APIs that don't break by Zdenek Nemec, Supe...INTERFACE, by apidays  - Low code APIs that don't break by Zdenek Nemec, Supe...
INTERFACE, by apidays - Low code APIs that don't break by Zdenek Nemec, Supe...
 
apidays LIVE New York 2021 - Designing embedded platforms: Lessons from indus...
apidays LIVE New York 2021 - Designing embedded platforms: Lessons from indus...apidays LIVE New York 2021 - Designing embedded platforms: Lessons from indus...
apidays LIVE New York 2021 - Designing embedded platforms: Lessons from indus...
 
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
 
A Connector, A Container and an API Walk into a Bar… Microservices Edition
A Connector, A Container and an API Walk into a Bar… Microservices EditionA Connector, A Container and an API Walk into a Bar… Microservices Edition
A Connector, A Container and an API Walk into a Bar… Microservices Edition
 
Webinar: “Introduction to the Postman API Network”
Webinar: “Introduction to the Postman API Network”Webinar: “Introduction to the Postman API Network”
Webinar: “Introduction to the Postman API Network”
 
I Love APIs 2015: Create Design-driven APIs with Node.js and Swagger
I Love APIs 2015: Create Design-driven APIs with Node.js and SwaggerI Love APIs 2015: Create Design-driven APIs with Node.js and Swagger
I Love APIs 2015: Create Design-driven APIs with Node.js and Swagger
 

Similar to Scaling API Design

Building the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemBuilding the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemMitch Colleran
 
Scaling API Design @restfest
Scaling API Design @restfestScaling API Design @restfest
Scaling API Design @restfestJason Harmon
 
Making Sense of Hypermedia APIs – Hype or Reality?
Making Sense of Hypermedia APIs – Hype or Reality?Making Sense of Hypermedia APIs – Hype or Reality?
Making Sense of Hypermedia APIs – Hype or Reality?Akana
 
Building a REST API for Longevity
Building a REST API for LongevityBuilding a REST API for Longevity
Building a REST API for LongevityMuleSoft
 
5 Keys to API Design - API Days Paris 2013
5 Keys to API Design - API Days Paris 20135 Keys to API Design - API Days Paris 2013
5 Keys to API Design - API Days Paris 2013Daniel Feist
 
Building Your API for Longevity
Building Your API for LongevityBuilding Your API for Longevity
Building Your API for LongevityMuleSoft
 
Do's and Don'ts of APIs
Do's and Don'ts of APIsDo's and Don'ts of APIs
Do's and Don'ts of APIsJason Harmon
 
Foundations of a Successful Developer Platform - DeveloperWeek 2015
Foundations of a Successful Developer Platform - DeveloperWeek 2015Foundations of a Successful Developer Platform - DeveloperWeek 2015
Foundations of a Successful Developer Platform - DeveloperWeek 2015Kamyar Mohager
 
DataHero / Eventbrite - API Best Practices
DataHero / Eventbrite - API Best PracticesDataHero / Eventbrite - API Best Practices
DataHero / Eventbrite - API Best PracticesJeff Zabel
 
Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Daniel Feist
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...jaxLondonConference
 
APIs in the Enterprise - Lessons Learned
APIs in the Enterprise - Lessons Learned APIs in the Enterprise - Lessons Learned
APIs in the Enterprise - Lessons Learned Apigee | Google Cloud
 
Hack for Good and Profit (Cloud Foundry Summit 2014)
Hack for Good and Profit (Cloud Foundry Summit 2014)Hack for Good and Profit (Cloud Foundry Summit 2014)
Hack for Good and Profit (Cloud Foundry Summit 2014)VMware Tanzu
 
What is SaaS vs Open Source | Open Source CMS (Content Management System) vs ...
What is SaaS vs Open Source | Open Source CMS (Content Management System) vs ...What is SaaS vs Open Source | Open Source CMS (Content Management System) vs ...
What is SaaS vs Open Source | Open Source CMS (Content Management System) vs ...ClickTecs
 
API Workshop Amsterdam presented by API Architect Ronnie Mitra
API Workshop Amsterdam presented by API Architect Ronnie MitraAPI Workshop Amsterdam presented by API Architect Ronnie Mitra
API Workshop Amsterdam presented by API Architect Ronnie MitraCA API Management
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxapidays
 
Practical Application of API-First in microservices development
Practical Application of API-First in microservices developmentPractical Application of API-First in microservices development
Practical Application of API-First in microservices developmentChavdar Baikov
 
Recipes for API Ninjas
Recipes for API NinjasRecipes for API Ninjas
Recipes for API NinjasNordic APIs
 
Vasudevan_Bhaskar.pdf
Vasudevan_Bhaskar.pdfVasudevan_Bhaskar.pdf
Vasudevan_Bhaskar.pdfssuser57cef8
 

Similar to Scaling API Design (20)

Building the Eventbrite API Ecosystem
Building the Eventbrite API EcosystemBuilding the Eventbrite API Ecosystem
Building the Eventbrite API Ecosystem
 
Scaling API Design @restfest
Scaling API Design @restfestScaling API Design @restfest
Scaling API Design @restfest
 
Making Sense of Hypermedia APIs – Hype or Reality?
Making Sense of Hypermedia APIs – Hype or Reality?Making Sense of Hypermedia APIs – Hype or Reality?
Making Sense of Hypermedia APIs – Hype or Reality?
 
Building a REST API for Longevity
Building a REST API for LongevityBuilding a REST API for Longevity
Building a REST API for Longevity
 
5 Keys to API Design - API Days Paris 2013
5 Keys to API Design - API Days Paris 20135 Keys to API Design - API Days Paris 2013
5 Keys to API Design - API Days Paris 2013
 
Building Your API for Longevity
Building Your API for LongevityBuilding Your API for Longevity
Building Your API for Longevity
 
Do's and Don'ts of APIs
Do's and Don'ts of APIsDo's and Don'ts of APIs
Do's and Don'ts of APIs
 
Foundations of a Successful Developer Platform - DeveloperWeek 2015
Foundations of a Successful Developer Platform - DeveloperWeek 2015Foundations of a Successful Developer Platform - DeveloperWeek 2015
Foundations of a Successful Developer Platform - DeveloperWeek 2015
 
DataHero / Eventbrite - API Best Practices
DataHero / Eventbrite - API Best PracticesDataHero / Eventbrite - API Best Practices
DataHero / Eventbrite - API Best Practices
 
Intel Cloud Foundry and OpenStack
Intel Cloud Foundry and OpenStackIntel Cloud Foundry and OpenStack
Intel Cloud Foundry and OpenStack
 
Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?Are hypermedia API's Just Hype?
Are hypermedia API's Just Hype?
 
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
Are Hypermedia APIs Just Hype? - Aaron Phethean (Temenos) & Daniel Feist (Mul...
 
APIs in the Enterprise - Lessons Learned
APIs in the Enterprise - Lessons Learned APIs in the Enterprise - Lessons Learned
APIs in the Enterprise - Lessons Learned
 
Hack for Good and Profit (Cloud Foundry Summit 2014)
Hack for Good and Profit (Cloud Foundry Summit 2014)Hack for Good and Profit (Cloud Foundry Summit 2014)
Hack for Good and Profit (Cloud Foundry Summit 2014)
 
What is SaaS vs Open Source | Open Source CMS (Content Management System) vs ...
What is SaaS vs Open Source | Open Source CMS (Content Management System) vs ...What is SaaS vs Open Source | Open Source CMS (Content Management System) vs ...
What is SaaS vs Open Source | Open Source CMS (Content Management System) vs ...
 
API Workshop Amsterdam presented by API Architect Ronnie Mitra
API Workshop Amsterdam presented by API Architect Ronnie MitraAPI Workshop Amsterdam presented by API Architect Ronnie Mitra
API Workshop Amsterdam presented by API Architect Ronnie Mitra
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptx
 
Practical Application of API-First in microservices development
Practical Application of API-First in microservices developmentPractical Application of API-First in microservices development
Practical Application of API-First in microservices development
 
Recipes for API Ninjas
Recipes for API NinjasRecipes for API Ninjas
Recipes for API Ninjas
 
Vasudevan_Bhaskar.pdf
Vasudevan_Bhaskar.pdfVasudevan_Bhaskar.pdf
Vasudevan_Bhaskar.pdf
 

Recently uploaded

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 

Recently uploaded (20)

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 

Scaling API Design

  • 1. Scaling API Design Jason Harmon, Head of API Design September 2014 © 2014 PayPal Inc. All rights reserved. Confidential and proprietary.
  • 2. About me Scaling API Design Jason Harmon • Leads API design at Paypal • Design phase of the “PPaaS” aka “Paypal as a Service" program • Engineering-wide initiative • Collaborate on designs for all internal/external/partner/whatever APIs • Maintain style/standards • Stakeholder for internal developer portal & tools teams • Internal API design training/evangelism @jharmn Jasonh-n-austin © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 2
  • 3. Let’s think big What if your startup takes off? © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 3
  • 4. Distributed architecture Breaking down the monolith Everyone starts with a monolith Defining uniform interfaces helps define bounded contexts • Define interfaces, then perform surgery Allows for scaling per capability • When one component is overloaded, scale it! • Harder to DDoS a distributed platform Increases team autonomy • Implementations can fit the need • Languages & data don’t have to be all the same Discoverability is a hard problem in big systems • Reduce duplication of efforts • Create visibility to weak spots in capabilities © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 4
  • 5. Portfolio Think about the big picture © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 5
  • 6. Portfolio Organizing your APIs Group operations by goals/usage API Product Managers are key, but they’re hard to find Start with capabilities, not resources • Identify capabilities by way of use cases Provide internal/external/partner developer portals to provide visibility Use caution with product names Respect customer language Inverse Conway’s Law “Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations.” • Don’t design your APIs to reflect your systems or organizations • Make your software look like your customers see you © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 6
  • 7. Portfolio Business decides, developers implement Business • Identify capabilities • How will business understand what your API can do? • Sometimes a capability is a resource collection • More often it’s a package of resources & operations • Level 1 Categories + Package/Spec/Level 2 Developers Use ‘namespaces’ to designate functional areas: /v1/factory/widgets • Not always the same as capabilities/packages URIs relay data relationships © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 7
  • 8. Design first Right after portfolio © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 8
  • 9. Design first Building backend is expensive Break changes early, before you build it Specification formats • Swagger, RAML, Blueprint: whatever suits you • Portal/Docs/Reference • Codegen server/client/SDK • Mocking • Consistency Validation Respect spec storage • Separate from implementation, track minor versions on iterations • All in one place – Platform skeleton • Docs are specs too Get API client feedback on mock APIs • Real usability is only measurable with tactile feedback • Weakness: multi-scenario and errors are hard to mock © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 9
  • 10. Design first: Parallelize © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 10
  • 11. Fundamentals Core elements of API design © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 11
  • 12. Sustainability Long live v1! • Rapid iteration/fundamental changes are off-limits once it’s released • Extensible API designs aren’t really a thing • Rule #1 of API versioniong: try not to Can we grow this design without starting over? Hide implementation details • Today’s backend is tomorrow’s scrap heap • Watch errors Add URIs, deprecate URIs; new designs are usually new resources • APIUX: http://apiux.com/2014/09/05/api-design-sustainability © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 12
  • 13. Usability Think about API clients’ perspective Nouns matter • Resource-orientation http://softexpert.files.wordpress.com/2007/10/526604 • Avoid RPC unless you can rationalize optimized DX • Understandable terminology • Use industry-standard terminology where possible • Avoid vague terms: metadata, context, etc Get your flow on • Capture current and future use cases • Identify goals • Analyze chain of calls required to get there 86_6ca085f7a8.jpg?w=780 • Pay attention to identifiers in each API to ensure they chain smoothly REST != CRUD • Think beyond data structures, think resources • Resources should quickly reach client goals without excessive complexity © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 13
  • 14. Scalability We’re talking design scale, not system scale…or both The Goldilocks principle Be smart about “just right” sized resources Big resources can be a problem • System overload/performance issues • Coupling concerns • Long, unreliable HTTP connections • Bandwidth overhead • Complexity! Tiny resources can be just as bad • N+1 calls tend to proliferate • Lots of TCP sockets https://img1.etsystatic.com/000/0/5414982/il_fullxfull.191 894533.jpg © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 14
  • 15. Consistency Stick to the plan Standards, guidance, patterns Naming conventions: Field, parameter, URI Define HTTP interactions • Common patterns Identify common components • Addresses, user info etc Headers are platform plumbing • Use them sparingly Ensure consistent identity mechanisms • Preserve external identity through internal platform calls http://minorcreations.files.wordpress.com/2012/07/one.png © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 15
  • 16. Decentralize Educate and cooperate © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 16
  • 17. Decentralize Educate and cooperate Internal evangelism Educate developers on program/process, standard, and principles Identify thought leaders and fast learners • Develop API design mentorship • Ongoing communication Listen to feedback on gaps in understanding • Conduct regular feedback sessions from frontend and backend devs • Hackathons inside & out • Dedicate to document anything you have to answer twice • Standards are nice, but guidance is better Highlight outstanding design and collaboration examples © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 17
  • 18. Scaling API Design Thanks! Jason Harmon Head of API Design Paypal @jharmn Jasonh-n-austin © 2014 PayPal Inc. All rights reserved. Confidential and proprietary. 18