Architecture mode: API combination

Architecture pattern: API combination

Context

You have applied the microservice architecture pattern and the per-service database pattern. Therefore, realizing queries that connect data from multiple services is no longer straightforward.

Question

How to implement query in microservice architecture?

Conclusion

The query is implemented by defining the API Composer, which calls the service with the data and executes the in-memory connection of the result. Share a pictureshare picture?

Example

API Gateway usually performs API combination.

Result context

This model has the following benefits:

  • This is a way to query data in a microservice architecture The simple way

This model has the following disadvantages:

  • Some queries will cause inefficient memory connections for large data sets.

Associated mode

    • Each service database mode creates requirements for this mode
    • CQRS mode is an alternative Solution

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2916 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.