athena-test/Workflow/Architecture patterns.md
2023-03-09 19:59:42 +03:00

1.8 KiB

Architectural patterns

To write quality code, you must read a lot about the architectural patterns we use.

Microservice architecture

A microservice architecture involves dividing an application into independent microservices, each responsible for a certain part of the business logic. During deployment, depending on the load on a particular microservice, a certain number of microservice instances can be created, which allows you to adjust the application load. For example, if the application frequently uses smart home device management functionality, but rarely uses messaging or SMS functionality, you can increase the number of microservice instances that are responsible for device management and reduce the number of notifier microservice instances. Each microservice is independent of the written language and is connected to each other using an HTTP connection or message brokers such as Kafka, RabbitMQ or MQTT.

You can read about microservice architechture here.

Domain-driven design architecture

You can read about domain-driven architecture here.

Event-driven design architecture

You can read about event-driven architecture here.

CQRS

NestJS has own instruments for CQRS implementation. You can study an example implementation of NestJS here.

Design patterns

Design patterns are a powerful tool for writing reusable and comprehensive code. Here you can find a good guide for all of them.