Skip to content
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

建议用tarscpp里面的类替换boost,不要引入boost库了 #15

Open
jcy1001 opened this issue Apr 23, 2023 · 1 comment
Open

Comments

@jcy1001
Copy link

jcy1001 commented Apr 23, 2023

建议用tarscpp里面的类替换boost,不要引入boost库了

@zhixiongdu027
Copy link
Collaborator

zhixiongdu027 commented Apr 25, 2023

引入 boost 的现实考量是因为 ”需要在 cpp 部分的代码中方便的 对 tserver, tendpoints 等资源进行 json 编解码“

tarscpp 中有 json 相关的工具类, 但在完成该目标时有点力不从心
rapidjson 可以很好的序列化 json ,但是反序列 以及 根据情况 动态 修改,添加字段时很繁琐

我们还对比过其他 json库,总体来说 boost json 是最合适的

至于您对 引入 boost 库有顾虑:

  1. framework 程序的编译都是在 complier 容器环境中,不会污染业务开发环境

  2. framework 程序是由框架开发人员构建和提供,与业务开发人员交集很少.
    换句话说,引入 boost json 对业务开发人员是透明的

  3. framework 程序链接的是静态库, 对服务部署人员的也是透明的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants