首页 > 解决方案 > Microserivce on database level

问题描述

hat is the standard pattern of orchestrating microservices?

If a microservice only knows about its own domain, but there is a flow of data that requires that multiple services interact in some manner, what's the way to go about it?

Let's say we have something like this:

Invoicing Shipment And for the sake of the argument, let's say that once an an order has been shipped, the invoice should be created.

Somewhere, someone presses a button in a GUI, "I'm done, let's do this!" In a classic monolith service architecture, I'd say that there is either an ESB handling this, or the Shipment service has knowledge of the invoice service and just calls that.

But what is the way people deal with this in this brave new world of micro-services?

I do get that this could be considered highly opinion-based. but there is a concrete side to it, as micro-services are not supposed to do the above. So there has to be a "what should it by definition do instead", which is not opinion-based.

Shoot.

标签: microservices

解决方案


在处理微服务时,有多种最佳数据库实践方式,它可能会因所使用的实体的域以及应用程序使用的范围而有所不同。

微服务中数据库设计的最佳实践很少,首先列出其中的几个。

1 - Private-tables-per-service – each service owns a set of tables that must only be accessed by that service
2 - Schema-per-service – each service has a database schema that’s private to that service
3 - Database-server-per-service – each service has it’s own database server.

您可以根据您的数据大小和数据计数混合和匹配这些。

我希望您参考并浏览此页面以获得一个完美的示例。

微服务数据库最佳实践


推荐阅读