Microservice Patterns | Design Patterns | Micro Task Segregation


Microservice and Containerization Patterns > Fundamental Microservice and Container Patterns > Micro Task Segregation

 

Home > Design Patterns > Micro Task Segregation

Micro Task Segregation (Erl, Naserpour)

How can data access functions be organized into micro tasks in order to preserve the granular functional scope of a microservice?

Micro Task Segregation

Problem

A range of required data access functions may be collectively too coarse-grained for encapsulation by a single microservice, thereby compromising its micro focus. Additionally, services that do not have permission may be able to update or change the data, which can result in data corruption or inconsistent data.

Solution

Related data access functions are categorized into micro tasks that are segregated and assigned to different microservices, depending on the type of function they perform.

Application

A design approach is followed whereby a set of microservices is created to host the segregated micro tasks, each solving a distinct set of consumer requirements.

A design approach is carried out whereby the data access functions are separated into micro tasks that are then allocated to multiple microservices. This supports the application of the Micro Focus principle by preserving the single purpose scope of each microservice.

Micro Task Segregation: Commands and queries are sent to the database through the two fine-grained microservices. 

Commands and queries are sent to the database through the two fine-grained microservices.

This pattern is applied by focusing on the design of the microservice API, as explained in the complete pattern description.

Module 10: Advanced Microservice Architecture & Containerization.

This pattern is covered in Module 10: Advanced Microservice Architecture & Containerization..

For more information regarding microservice and containerization courses and accreditation,
visit the Microservice Architect Certification program page..