Skip to content

Architecture Documentation

hamed shirbandi edited this page Oct 2, 2023 · 39 revisions

Previously, our application was built using a Monolithic architecture. After reaching a stable state, we made the strategic decision to transition from Monolith to Microservices architecture, following the Strangler Application pattern.

In alignment with Microservices architecture principles, we extracted specific services by applying the concepts of Aggregates and Bounded Contexts from Domain-Driven Design (DDD). These services were then developed independently, adhering to the Clean Architecture.

You can explore the code related to the Monolithic version of TaskoMask by visiting this commit.

Development Architecture

As the initial step in refactoring our architecture from Monolithic to Microservices, we designed the development architecture as depicted in the diagram below. This approach allowed us to view the monolith as a single service, facilitating the gradual extraction of individual services over time.

Development architecture

Deployment Architecture

We opted to segregate each service into Read and Write components, a decision made to enhance clarity, maintainability, and flexibility. This separation also empowers us to make informed scaling decisions in a production environment by considering the loads on both the Read and Write sides of a service.

Deployment architecture

Vertical Slice Architecture

As seen in the Development Architecture diagram, we initially adopted the Clean Architecture for implementing each microservice Horizontally. However, after extracting all the microservices, we made the decision to refactor to a Vertical Slice Architecture. This choice was motivated by the increasing complexity of maintaining the source code, which had become challenging with the multitude of layers, abstractions and merge conflicts.

Vertical Slice Architecture