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

重构naming service #210

Open
jamesge opened this issue Jan 15, 2018 · 2 comments
Open

重构naming service #210

jamesge opened this issue Jan 15, 2018 · 2 comments
Labels
enhancement improvements on existing features official created by brpc authors

Comments

@jamesge
Copy link
Contributor

jamesge commented Jan 15, 2018

问题:

  • 代码临界区有点大,之前一个CI让NamingServiceThread.Start在锁外了,但是Watcher相关逻辑还是在锁内。
  • 去重逻辑很乱,没必要用排序,应该用hashmap简化。
  • filter的应用也相对粗暴。
  • 不支持纯异步接口。每个地址都要占用一个bthread(的内存),而这些bthread大部分时候在sleep,应该用纯异步降低开销。
@jamesge jamesge added enhancement improvements on existing features official created by brpc authors labels Jan 15, 2018
@ghost
Copy link

ghost commented Nov 9, 2018

😭这个地方不支持异步接口好痛苦, 尤其是占中一个bthread, 按照 file_naming_service 构造自己的namingservice, 每次启动都堵塞。

NamingServiceActions 透出来外部调用好像更方便。

@chenBright
Copy link
Contributor

chenBright commented Feb 19, 2023

不支持纯异步接口。每个地址都要占用一个bthread(的内存),而这些bthread大部分时候在sleep,应该用纯异步降低开销。

@jamesge 纯异步接口是指不起bthread,直接在NamingServiceThread::Start里发起异步调用请求下游节点信息,然后在回调函数更新lb吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements on existing features official created by brpc authors
Projects
None yet
Development

No branches or pull requests

2 participants