在Google中有很多关于微服务架构的讨论。事实上,文档似乎迫使开发人员倾向于在微服务中构建应用程序。一个项目的前景似乎要么是“一片狼藉”,要么是一个组织良好的微型服务项目。然而,在项目的早期阶段,也许微服务并不是合适的方法,这是可争论。
话虽如此,是否有一种以模块化方式构建AE项目的项目结构推荐方法?假设我们希望组织我们的项目,由以下特点组成:
我假定的解决方案如下:
project/
app.yaml
main.py
requirements.txt
libs/
module1/
datastore/
endpoints/
tests/
module2/
datastore/
endpoints/
tests/
module3/
datastore/
endpoints/
tests/
auth_module/
tests/
endpoints/
sessions_module/
tests/
endpoints/
datastore_module/
tests/
endpoints/
taskqueue_module/
tests/
endpoints/发布于 2019-09-15 14:54:24
你的组织可以运作。然而,在推荐您更强的区分模块和库。8月、会话、数据存储、任务队列可供不同的微服务使用。将它们放在一个专用的子目录中,比如packages。
关于早期阶段,我同意。理论上,一个微服务=一个团队,而在开始的时候,团队没有人手,或者没有预算。然而,陷阱是积累技术债务和分裂为一个巨大的.经验是关键
https://stackoverflow.com/questions/57944583
复制相似问题