Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Otra Charla de Microservicicios #Bilbostack2020

194 views

Published on

Isabel Garrido & Sergi Gonzalez
Charla sobre patrones de comunicación en MS.

Published in: Software
  • Be the first to comment

Otra Charla de Microservicicios #Bilbostack2020

  1. 1. https://app.bilbostack.com
  2. 2. 🐶 + 🎮 + 🚴 + 🔭 @SergiGP
  3. 3. 🚅🚁🚀🗼🗽 🗿✈ 📸 🐶🐶🐶 @isabeliita90
  4. 4. ¿Cuántos trabajáis a día de hoy con (micro)servicios?
  5. 5. La historia de ACME
  6. 6. Return On Investment
  7. 7. Dominio
  8. 8. “organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations” - Melvin Conway ¡ OLI !
  9. 9. Conflictos
  10. 10. /users /products /retention …
  11. 11. Facilidad Complejidad “Doing abstraction on code is like finding a delicate balance between complexity and easiness” - Paulo Coelho Abstracción Denormalización
  12. 12. Fragilidad
  13. 13. /users /products /retention …
  14. 14. /users /products
  15. 15. /users /products
  16. 16. /users /products CONTRATO CONTRATO
  17. 17. Procesos Compartidos
  18. 18. /users /products /retention …
  19. 19. users products retention
  20. 20. users products retention
  21. 21. ¿Os acordáis de mi?
  22. 22. Modelos Compartidos
  23. 23. users products retention
  24. 24. users products retention HTTP GET HTTP GET HTTP GET HTTP POST
  25. 25. MICROSERVICIOS IMPERATIVOS
  26. 26. usersproducts 100 req/s 10000 req/s
  27. 27. Monolito Distribuido
  28. 28. users products retention HTTP GET HTTP GET HTTP GET HTTP POST
  29. 29. Escalabilidad Testing Monolito Distribuido
  30. 30. users products retention HTTP GET HTTP GET HTTP GET HTTP POST
  31. 31. users products retention Event Bus
  32. 32. users products Event Bus users id name sellers id avatar email avatar PO ST /users user_registered !
  33. 33. MICROSERVICIOS IMPERATIVOS MICROSERVICIOS REACTIVOS
  34. 34. Servicio de Productos Vendedor Servicio de Usuarios Usuario
  35. 35. users users id name … POST /usersPOST /users 200, 201 409 Conflict ?200, 201 user_registered
  36. 36. Monolito Carpetas Contratos Repositorios separados Infraestructura separada Comunicación asincrona Más abstracción Más desacoplamiento Más complejidad
  37. 37. Algunos antipatrones comunes…
  38. 38. Eventos como intenciones
  39. 39. Servicio de Usuarios Event Bus Servicio de Email send_em ail user_registered ¿usuario_registrado? Ok, pos mando email
  40. 40. No asegurarnos de la integridad de los Eventos
  41. 41. { “my_property”: null, “another_property”: “”, “another_one”: “null” }
  42. 42. No tener un plan B
  43. 43. Estado Eventos id name age email 1 john doe 34 john@doe.com user_registered user_email_updated user_age_updated
  44. 44. No consumir tus propios eventos
  45. 45. Servicio de Usuarios Event Bus user_registered
  46. 46. MUCHAS GRACIAS

×