基于无服务器框架的可独立部署微服务的样板

Boilerplate for independently deployable microservices based on Serverless framework

遵循微服务的原则,

Defined domain: Each microservice has a defined domain of responsibility (sometimes referred to as a bounded context). The microservice manages this domain itself, without concerning itself about other domains.

Self-contained: Each microservice is a self-contained unit. It may contain multiple components that all work together.

Independently deployable: Each microservice can be built and deployed as an independent entity. Deploying one microservice does not affect another microservice.

Manages data stores: The data store or stores used by each microservice should be contained within the microservice boundary, thereby ensuring that there are no hidden dependencies caused by data stores being shared.

Loosely coupled: Microservices should be loosely coupled, and ideally communication will occur asynchronously using event sourcing or queues.

Highly automated: The build, deployment, and ongoing management of microservices should emphasize automation wherever possible.

我正在寻找代码 structure/boilerplate 的建议来实现这些原则,尤其是 - 可独立部署、松散耦合和包含的数据存储。在 AWS 上使用无服务器框架。如果能参考运行良好的样板并实现这些原则,这样部署顺序就无关紧要,那就太好了。

我遇到了 https://github.com/trilom/sls-microservice,但这有 makefile。不喜欢必须使用它们的想法。

我发现这正是达到目的的正确方法: https://github.com/zotoio/generator-mono-serverless