Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Airbnb’s API:
The Source-of-Truth
COMMUNICATIONS INFRASTRUCTURE / ZANE CLAES
Airbnb Mobile Evolution
(2011 - 2015)
Ghosts of Airbnb Past
Or: How we Became API-Centric
The Dangers of Hockey Sticks
API v1
(Ruby / Monorail)
API v1 Web Controller
• Duplicated Work: Web. Mobile Apps. MoWeb. Lantern. Etc.
• Inconsistent Behavior: Entirely different code paths.
Payments...
API v1 Web Controller
Graphist
(A Ruby Gem/Framework for Building APIs)
• Code Reusability: Write once. Share with web, mobile, etc.
• Consistency: Everything works the same across platforms.
• ...
• Hundreds of Developers
• Thousands of Endpoints
• Dozens of Services
Where it’s Used
Graphist: Our Ruby Gem for APIs
(2016 and Beyond)
Android
Javascr
ipt
iOS
Graphist
Ruby
HTTP
Inline
Service
s
Graphist is a DAO (“Data Access Object”)
REST
or
GraphQL
REST and GraphQL are Interchangeable
Client
Graphis
t
No need to change a single line of code.
Client-Centric
Shifts the impetus of
“formats” to the client;
no more dev back-
and-forth.
Efficient
Solves over-fetching,...
Client
User Service
Client
Listing
Service
Review
Service
Client
Microservice Distributed DAOs
Questions?
Want to Talk APIs?
zane.claes@airbnb.com
APIs as The Source of Truth (Zane Claes)
APIs as The Source of Truth (Zane Claes)
APIs as The Source of Truth (Zane Claes)
APIs as The Source of Truth (Zane Claes)
Prochain SlideShare
Chargement dans…5
×

APIs as The Source of Truth (Zane Claes)

This is a session given by Zane Claes at Nordic APIs 2016 Platform Summit on October 25th, in Stockholm Sweden.

Description:

Too often, APIs are only consumed by mobile apps and external services. This leads to inconsistencies between web and API implementations of core business logic. This talk will discuss how Airbnb created an API infrastructure that also powers our website, to create a single source of truth.

  • Soyez le premier à commenter

APIs as The Source of Truth (Zane Claes)

  1. 1. Airbnb’s API: The Source-of-Truth COMMUNICATIONS INFRASTRUCTURE / ZANE CLAES
  2. 2. Airbnb Mobile Evolution (2011 - 2015)
  3. 3. Ghosts of Airbnb Past Or: How we Became API-Centric
  4. 4. The Dangers of Hockey Sticks
  5. 5. API v1 (Ruby / Monorail)
  6. 6. API v1 Web Controller
  7. 7. • Duplicated Work: Web. Mobile Apps. MoWeb. Lantern. Etc. • Inconsistent Behavior: Entirely different code paths. Payments on mobile, different than payments on web. • Difficult to Scale: Direct data access prevents moving to Service-oriented Architecture. Monorail contains too many tables. • Poor Security: Access enabled by default. Leaks PII. Difficult to have good security policy. • No Type Safety: Crashes app, due to unpredictable types in returned fields. • More Website Downtime: Due to cascading updates, and service entanglement. Problems
  8. 8. API v1 Web Controller
  9. 9. Graphist (A Ruby Gem/Framework for Building APIs)
  10. 10. • Code Reusability: Write once. Share with web, mobile, etc. • Consistency: Everything works the same across platforms. • Security: Security is at the forefront: do not leak sensitive data. • Performance: Process more stuff, faster. API v2 is continuously improved and optimized. • Scalability: Easier to move to Service-oriented Architecture. Free to change and improve underlying functionality. • Better Debugging: Now you can actually debug. Benefits of API v2 (“Graphist”)
  11. 11. • Hundreds of Developers • Thousands of Endpoints • Dozens of Services Where it’s Used
  12. 12. Graphist: Our Ruby Gem for APIs (2016 and Beyond)
  13. 13. Android Javascr ipt iOS Graphist Ruby HTTP Inline Service s Graphist is a DAO (“Data Access Object”)
  14. 14. REST or GraphQL REST and GraphQL are Interchangeable Client Graphis t No need to change a single line of code.
  15. 15. Client-Centric Shifts the impetus of “formats” to the client; no more dev back- and-forth. Efficient Solves over-fetching, under-fetching, even versioning; cross- platform tools. Community Ready-made developer tools: sandbox, documentation explorer. Flexible Allows for arbitrary functions, renamed attributes, and more. Why GraphQL?
  16. 16. Client User Service Client Listing Service Review Service Client Microservice Distributed DAOs
  17. 17. Questions? Want to Talk APIs? zane.claes@airbnb.com

×