O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Kontent.ai DevMeetup #1 - Evoluce prvního veřejného API v hotelovém světě

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio

Confira estes a seguir

1 de 19 Anúncio

Mais Conteúdo rRelacionado

Mais recentes (20)

Anúncio

Kontent.ai DevMeetup #1 - Evoluce prvního veřejného API v hotelovém světě

  1. 1. + Make it remarkable. 24.11.2022 Evolution of the first public API in the hospitality industry Peter Vitéz
  2. 2. Make it remarkable. + Agenda ﹢What is Mews? ﹢Why public API? ﹢Design API ﹢EncounteredProblems ﹢Polling is a problem ﹢Missing categorization ﹢Fetchingrelated entities ﹢Frequent outages ﹢General advices / best practices ﹢Change management ﹢Documentation ﹢Quality assurance ﹢Summary
  3. 3. What is Mews? ﹢Not only hotel software ﹢3100 hotels around the globe ﹢650 employees – HQ Prague ﹢80.000 daily bookings Tech: ﹢.NET + React ﹢Azure ﹢Stateless Monolith ﹢Single multi-tenant SQL Database
  4. 4. Make it remarkable. + Why public API? • Expand current functionality • Domain expertise outside Mews • Engineers' shortages • Process automation • Speed up companygrowth
  5. 5. Make it remarkable. + Design API • Simplicityand convenience • Inspired by JSON Pure • Everything in body • POSTonly • Avoid using headers • Flat API structure • Marketplace
  6. 6. Make it remarkable. + Encountered issues
  7. 7. Make it remarkable. + Polling is a problem Encountered issues • Data synchronizationin external systems • Polling mechanism • Increased traffic on our API • Not scalable& inefficient
  8. 8. Make it remarkable. + Addressing polling issue Encountered issues • Websocket • Server holds the connection • Webhook v1 • Serialize only changed entities • Clients swamped with data • Webhook v2 • Serialize only IDs of changed entities • On-demand data consumption
  9. 9. Make it remarkable. + Poor security & discoverability Encountered issues • Increasing amount of integrationpartners • Variousdomainsavailablethrough API • Security threat • Poor categorizationand discoverability
  10. 10. Make it remarkable. + Adding permissions Encountered issues • Each entity RO/RW/None permissions • Introduce certificationprocess • Better categorization • Better control
  11. 11. Make it remarkable. + Fetching related entities Encountered issues • Too many “get” calls • Subsequent callsto retrieve relatedand nested entities • Not idealuser experience
  12. 12. Make it remarkable. + Introducing “extent”s Encountered issues • Define whatyou wantto receive • Simplicity and convenience • Logic similar to SQL and GraphQL • Clients love this addition • Problems with Extents • Limit 1:M relationshipsin API • Performance issues • Difficultto paginaterelated entities
  13. 13. Make it remarkable. + Frequent outages Encountered issues • Cloud resources are expensive • Clients misusing our API • Overprovisionedinfrastructure • Outages or system slowness
  14. 14. Make it remarkable. + Rate Limiting Encountered issues • Throttling & Quotas • Async cancellation • Reward early adopters • Lesson learned: Cut before reaching our code • Ideally consider using API management tools • Azure • Gravitee
  15. 15. Make it remarkable. + General advices
  16. 16. Make it remarkable. + Change management Generaladvices • API mustevolve • How to communicatechanges • Newsletter • Distributionlist • Monitor usages • Establish the process with peers • Lesson learned: deprecated codefor 5+ years
  17. 17. Make it remarkable. + Documentation Generaladvices • Documentation • Describes the API • Documentation as Code • Technical writer • Open API Specification (Swagger) • Automatic SDK generation
  18. 18. Make it remarkable. + Maintainability Generaladvices • Monitoring & Observability • Log every request • Dashboards & alerts • Traces & metrics • Anonymization
  19. 19. Make it remarkable. + Summary ﹢Sometimes less is more– don’t reinventthe wheel ﹢Hard to do systematic changes – evolution is a must ﹢Performance–polling is bad, outages hinder reputation ﹢If you wantto improvesomething, measureit Mews Open API documentation

×