-
Notifications
You must be signed in to change notification settings - Fork 510
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
关于DB代理的一个疑问,希望可以回复一下。 #9
Comments
具体的业务决定着具体的sql操作,这做法很常见的。 |
我想的如果不在db代理中写业务,msgServer如果汲及到多个SQL查询,那就会陷入回调地狱,这样做的好处确实是有的。 |
teamtalk的db_proxy不仅仅是同一操作数据库,还有操作缓存(redis),有些热点数据从数据库取出来或者要写入数据库时会在redis中存一份,这样下次需要的时候,就不用读写数据库了。所以,db_proxy是对数据库和缓存操作统一的封装,不然其他服务有这种操作,就会比较分散。 |
是的,感谢回复,非常nice. |
对于张小方这个名字,我很早之前就熟悉了,唯一有点遗憾的是你不卖课,而是做知识星球,不太符合我的学习习惯。 |
@CPP-User 哈哈哈,你加我微信easy_coder交流吧,不然一直收到github的这样的通知。。。。。。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我理解的DB代理,应该只是负责做sql的相关的工作,可是teamtalk竟然是把业务也写在了db代理中,这样符合大公司的做法吗?
The text was updated successfully, but these errors were encountered: