2.2. Microservices Architecture

  • Duży próg wejścia

  • Wymaga bardzo dobrego ekosystemu narzędziowego

  • Wymaga automatyzacji

  • Wymaga stworzenia i wdrożenia wielu różnych technologii

  • Tworzenie technologii, które skalują się horyzontalnie

  • Zmiana myślenia

  • Wdrożenie ludzi

  • Dla większości firm nie przynosi to korzyści (sic!)

  • SOA zrobiona porządnie (wywalone tematy związane z Enterprise)

2.2.1. Monolithic architecture

  • Build an application with a monolithic architecture

  • a single Java .war or Python .pyz file

  • a single directory hierarchy of Rails or NodeJS code

../../_images/microservices-monolithic-application.jpg

Figure 2.5. Monolithic architecture

../../_images/microservices-architecture-monolith.jpeg

Figure 2.6. Source: 1

2.2.2. Microservices architecture

  • Architect the application by applying the Scale Cube (specifically y-axis scaling) and functionally decompose the application into a set of collaborating services. Each service implements a set of narrowly, related functions. For example, an application might consist of services such as the order management service, the customer management service etc.

  • Services communicate using either synchronous protocols such as HTTP/REST or asynchronous protocols such as AMQP.

  • Services are developed and deployed independently of one another.

  • Each service has its own database in order to be decoupled from other services. When necessary, consistency is between databases is maintained using either database replication mechanisms or application-level events.

../../_images/microservices-architecture.jpg

Figure 2.7. Microservices Architecture

../../_images/microservices-architecture-microservices.jpeg

Figure 2.8. Source: 1

2.2.3. CQRS - Command Query Responsibility Segregation

  • Split the system into two parts.

  • The command side handles create, update and delete requests.

  • The query side handles queries using one or more materialized views of the application's data.

2.2.4. Further Reading

2.2.5. References

1(1,2)

ul Haq, S. Introduction to Monolithic Architecture and MicroServices Architecture. Year: 2018. Retrieved: 2022-03-28. URL: https://medium.com/koderlabs/introduction-to-monolithic-architecture-and-microservices-architecture-b211a5955c63