Problem statement:
The main problem statement is similar to that of the CRUD API service pattern. However, in this instance, some or all of the following challenges might be true:
- Expected throughput is high and will continue to grow over time.
- The vast majority of calls are expected to be reads (for example, searches).
- Changes to the API resource(s) in context (for example, new records or updates) must be propagated to other systems.
- Different data representations are required in order to address the multiple API consumer needs.
Solution:
Adopting a Command Query Responsibility Segregation (CQRS) pattern helps, as instead of having a common service and storage supporting traditional CRUD operations, query and upsert (updates ...