-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
作为开发,多个微服务都引用了mongodb,需要一个统一的mongodb boot插件来完成mongoclient拉起,这样可以节省开发时间,减少维护的代码 #926
Comments
我留意到servicecomb-kie那边有一个decouple mongodb completely as a plugin的commit,不知道这个issue的功能实现了没有? |
现在kie只需要实现这些数据访问层interface https://github.com/apache/servicecomb-kie/blob/master/server/datasource/dao.go 插件实现参考https://github.com/apache/servicecomb-kie/blob/master/server/datasource/etcd/init.go |
插件的实现必须要包含基本的数据操作吗?在我们项目里,mysql和redis的package只返回client,数据操作都是用第三方package(gorm和go-redis),如果再封装是不是有点不合适? |
关于go chassis的存储规范,其实和kie的目标不一样,kie是带业务的,go chassis不会带,只是为了做统一的配置管理,屏蔽不同数据库实现。没错,如你所理解的,go chassis应该抽象一种client也就是adaptor屏蔽不同的数据存储即可,不必带业务API。这部分还没有人贡献,是否有兴趣搞 |
配置文件大致如下
目前我们都在自己实现一套代码,无法规范化,沉淀基线能力
比如
apache/servicecomb-service-center#760 (review)
https://github.com/apache/servicecomb-kie/blob/master/server/service/mongo/session/session.go
2个微服务都在拉起mongo,代码基本都一样
The text was updated successfully, but these errors were encountered: