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.

Microservices In Practice

1.450 visualizaciones

Publicado el

Implementing Microservices architecture introduces certain operational challenges. One of the most common is: decentralized data management and embedding dependencies. In this talk at APIDays London (Banking APIs) Irakli discussed three powerful tools you can use to help with the challenge.

Publicado en: Tecnología
  • Inicia sesión para ver los comentarios

Microservices In Practice

  1. 1. Microservices In Practice Irakli Nadareishvili, Director of Strategy, API Academy CA Technologies
  2. 2. 2 © 2015 CA. ALL RIGHTS RESERVED. inadarei
  3. 3. 3 © 2015 CA. ALL RIGHTS RESERVED. inadarei But, why?
  4. 4. 4 © 2015 CA. ALL RIGHTS RESERVED. inadarei Microservices can greatly improve your capabilities in: CONTINUOUS DELIVERY PRODUCING EVOLVABLE AND SCALABLE ARCHITECTURE ENABLING AGILE SOFTWARE DEVELOPMENT LIFECYCLE 1 2 3
  5. 5. 5 © 2015 CA. ALL RIGHTS RESERVED. inadarei
  6. 6. 6 © 2015 CA. ALL RIGHTS RESERVED. inadarei COMMUNICATE USING LANGUAGE-AGNOSTIC APIS ARE INDEPENDENTLY DEPLOYABLE VIA UNIVERSAL CONTAINERS PRACTICE DECENTRALIZED DATA MANAGEMENT 1 2 3 Microservices is an architectural style, in which a complex software application is de- composed into smaller components ("micro services") that:
  7. 7. 7 © 2015 CA. ALL RIGHTS RESERVED. inadarei Challenge: De-centralized Data Management
  8. 8. 8 © 2015 CA. ALL RIGHTS RESERVED. inadarei Tool 1: Think of Capabilities, not: Data Models
  9. 9. 9 © 2015 CA. ALL RIGHTS RESERVED. inadarei Bounded Contexts
  10. 10. 10 © 2015 CA. ALL RIGHTS RESERVED. inadarei Eric Evans: Bounded Contexts An application domain consists of multiple bounded contexts. Residing within each BC are models that do not need to be shared outside, as well as other models that are shared externally.
  11. 11. 11 © 2015 CA. ALL RIGHTS RESERVED. inadarei Bounded Context = Capabilities. “In your organization, you should be thinking not in terms of data that is shared, but about the capabilities those contexts provide the rest of the domain.” – Sam Newman, Building Microservices
  12. 12. 12 © 2015 CA. ALL RIGHTS RESERVED. inadarei Caution: DDD and Bounded Context Identification Are Far From Trivial or Easy Tasks
  13. 13. 13 © 2015 CA. ALL RIGHTS RESERVED. inadarei Domain-Driven Design – More Information Eric Evans: "Domain-Driven Design: Tackling Complexity in the Heart of Software" - 2003 Vaughn Vernon: "Implementing Domain-Driven Design" - 2013 Scott Millett: "Patterns, Principles, and Practices of Domain-Driven Design" - 2015
  14. 14. 14 © 2015 CA. ALL RIGHTS RESERVED. inadarei Tool 2: Event Sourcing & CQRS
  15. 15. 15 © 2015 CA. ALL RIGHTS RESERVED. inadarei Event Sourcing Use an append-only store to record the full series of events that describe actions taken on data in a domain, rather than storing just the current state, so that the store can be used to materialize the domain objects. https://msdn.microsoft.com/en-gb/library/dn589792.aspx
  16. 16. 16 © 2015 CA. ALL RIGHTS RESERVED. inadarei Command and Query Responsibility Segregation (CQRS) Segregate operations that read data from operations that update data by using separate interfaces. This pattern can maximize performance, scalability, and security; support evolution of the system over time through higher flexibility; and prevent update commands from causing merge conflicts at the domain level. https://msdn.microsoft.com/en-us/library/dn568103.aspx
  17. 17. 17 © 2015 CA. ALL RIGHTS RESERVED. inadarei Deposit Money Microservice Deposit Message Queue Event Store (e.g. Cassandra) Transactions List/Query Microservice Query Index Store (e.g. ElasticSearch) Validation
  18. 18. 18 © 2015 CA. ALL RIGHTS RESERVED. inadarei What About Them Transactions?
  19. 19. 19 © 2015 CA. ALL RIGHTS RESERVED. inadarei Tool 3: Sagas (Long-Lived Distributed Transactions)
  20. 20. 20 © 2015 CA. ALL RIGHTS RESERVED. inadarei Booking Travel
  21. 21. 21 © 2015 CA. ALL RIGHTS RESERVED. inadarei No Shared State = No Distr. Transactions Source: http://vasters.com/clemensv/2012/09/01/Sagas.aspx We ♥ Sagas! Designed by: Hector Garcia-Molina & Kenneth Salem, Princeton, 1987
  22. 22. 22 © 2015 CA. ALL RIGHTS RESERVED. inadarei One More Thing…
  23. 23. 23 © 2015 CA. ALL RIGHTS RESERVED. inadarei
  24. 24. 24 © 2015 CA. ALL RIGHTS RESERVED. inadarei “Bounded context should be as big as it needs to be in order to fully express its complete Ubiquitous Language” – Vaughn Vernon, Implementing Domain –Driven Design.
  25. 25. 25 © 2015 CA. ALL RIGHTS RESERVED. inadarei Many start coarse-grained and become more granular over time. That said, companies that have been building Microservices for long, report that they end with hundreds of Microservices.
  26. 26. 26 © 2015 CA. ALL RIGHTS RESERVED. inadarei Where do we get hundreds of servers?
  27. 27. 27 © 2015 CA. ALL RIGHTS RESERVED. inadarei How do we afford so many servers?
  28. 28. Director of Strategy, API Academy Irakli Nadareishvili @inadarei @apiacademy @cainc

×