You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "TousakaRin (via GitHub)" <gi...@apache.org> on 2023/02/21 01:46:01 UTC

[PR] WIP: mongo client (brpc)

TousakaRin opened a new pull request, #2130:
URL: https://github.com/apache/brpc/pull/2130

   ### What problem does this PR solve?
   
   原PR: [mongo client ](https://github.com/apache/brpc/pull/1808)
   
   Issue Number:
   
   https://github.com/apache/brpc/issues/1807
   
   Problem Summary:
   
   ### What is changed and the side effects?
   
   Changed:
   
   原PR:
   - 引入了bson库并将相关操作封装到butil
   - 在mongo.{h|cpp} 中为 Mongodb 的 curd 操作增加了对应的protobuff message
   - 为 mongo protocol 增加了客户端的支持
   - 为 mongo 多副本集群增加了 mongo naming service,定期更新集群中的主节点
   
   后续修改:
   - 去掉了原PR中一些不必要的缩进修改,避免diff被干扰
   - 将 MongoQueryRequest/MongoInsertRequest 等消息做了简单抽象
   - 让 mongo_protocol.cpp 的相关代码更简洁
   - 支持直接使用 Makefile 编译
   
   已知的问题/讨论:
   -  debian/ubuntu下bson库的目录及文件带着'-1.0'这样的后缀,会导致从config_brpc._sh报错,目前手动去掉这个后缀在work around, 后续修复
   - mongo 协议自身前后不兼容,brpc 现在已有的服务端的支持版本很旧,而且意义不明(应该不会有人再在自己写个mongodb了吧), 原来的pr是按照较新的协议实现的,eg, 新版协议仅支持OP_MSG 和 OP_COMPRESSED,OP_MSG的枚举值还变了
   - MongoRquest/MongoResponse的消息名字和服务端的pb定义重名了,这里因为不太清楚服务端支持的mongo协议的背景,先就没有做修改
   - 协议解析部分看issue是通过抓包测出来的,目前看支持的不太全,我尽量找找文档或者官方client的处理吧。
   - 一些todo和缩进没来得及改
   
   Side effects:
   - Performance effects(性能影响):
   no
   - Breaking backward compatibility(向后兼容性): 
   no
   ---
   ### Check List:
   - Please make sure your changes are compilable(请确保你的更改可以通过编译).
   - When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
   - Please follow [Contributor Covenant Code of Conduct](../../master/CODE_OF_CONDUCT.md).(请遵循贡献者准则).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] WIP: mongo client (brpc)

Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm commented on PR #2130:
URL: https://github.com/apache/brpc/pull/2130#issuecomment-1438081737

   master修复了CI失败,可以rebase一下


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


Re: [PR] WIP: mongo client (brpc)

Posted by "TousakaRin (via GitHub)" <gi...@apache.org>.
TousakaRin closed pull request #2130: WIP: mongo client
URL: https://github.com/apache/brpc/pull/2130


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org