Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Consolidating services with middleware - NDC London 2017

185 visualizaciones

Publicado el

Have many services? Writing new ones often? If so middleware can help you cut down on the ceremony for writting new services and at same time consolidate the handling of cross cutting concerns. But what is middleware? OWIN and ASP.NET Core both have a concept of middleware. What are they? How do they help? In this talk we will dive into the code, write some middleware and show how middleware helps you handle cross-cutting concerns in an isolated and re-usable way across your services. I'll compare and contrast the OWIN and ASP.NET Core middleware concepts and talk about where each is appropriate.

Publicado en: Software
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Consolidating services with middleware - NDC London 2017

  1. 1. CONSOLIDATING SERVICES WITH MIDDLEWARE CHRISTIAN HORSDAL HORSDAL CONSULT @CHR_HORSDAL
  2. 2. Flexible Componentized Reusable Testable
  3. 3. STUFF FROM THE REAL WORLD
  4. 4. 5 MICROSERVICES
  5. 5. WHY MICROSERVICES? • ENABLES CONTINUOUS DELIVERY • HIGHLY MAINTAINABLE SERVICES • EFFICIENT DEVELOPER WORKFLOW • ROBUST BY DESIGN • FLEXIBLE SCALABILITY
  6. 6. ALL HTTP
  7. 7. Listing Store Dealer App Partner site Vertical Classifieds site Classifieds site Vertical Listing store Search index Search index ALL HTTP
  8. 8. WHEN CAN YOU USE MICROSERVICE? AUTOMATED DEPLOYS FAST PROVISIONING AUTOMATED BUILDS AUTOMATED TESTS LOGGING AND MONITORING CLOSE DEV-OPS RELATIONSHIP
  9. 9. WEB APIS AND MIDDLEWARE
  10. 10. WEB APIS HANDLE HTTP REQUESTS 12
  11. 11. ASP.NET CORE: PIPELINE 13 Kestrel Application
  12. 12. ASP.NET CORE: PIPELINE • USE PIPES AND FILTERS • A CONTEXT IS PIPED THROUGH MIDDLEWARE 14
  13. 13. ASP.NET CORE: PIPELINE 15 Kestrel Throttling Middleware OAuth Middleware Application
  14. 14. MIDDLEWARE • MIDDLEWARE TRANSFORMS THE REQUEST AND RESPONSE • TAKES A CONTEXT IN • CAN CALL NEXT STEP IN PIPELINE • OR NOT • UNIFORM INTERFACE 16
  15. 15. THINGS YOU MIGHT DO IN THE PIPELINE • OPEN & DISPOSE RESOURCES • LOGGING • AUTHENTICATION • AUTHORIZATION • QUICK MONITORING ENDPOINTS • SANITIZE INPUTS • CONTENT NEGOTIATION • CORS 17
  16. 16. THINGS YOU MIGHT DO IN THE PIPELINE • OPEN & DISPOSE RESOURCES • LOGGING • AUTHENTICATION • AUTHORIZATION • QUICK MONITORING ENDPOINTS • SANITIZE INPUTS • CONTENT NEGOTIATION • CORS 18 Cross-cutting concerns Re-use Test separately Update separately Distribute separately
  17. 17. A MICROSERVICE PLATFORM Kestrel Correlation Id Request Logging Performance Logging Monitoring endpoints Authentication Application
  18. 18. CODE
  19. 19. Flexible Componentized Reusable Testable
  20. 20. ABOUT ME Christian Horsdal Independent Consultant www.horsdal-consult.dk c.horsdal@gmail.com @chr_horsdal

×