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

这里提出两个个人认为可以改进的点, 大佬有空的话可以帮忙点评下 #110

Open
tony-is-coding opened this issue Apr 22, 2022 · 0 comments

Comments

@tony-is-coding
Copy link

tony-is-coding commented Apr 22, 2022

  1. RegistryService 这个接口有点冗余, 职责不单一了, 并且其抽象层实现会导致 client 启动一个订阅者也浪费一个线程持续阻塞在服务发布队列上, 这样是否会导致资源的浪费?
    ~F ~ORZ1U@N8S FX`O6F%}L

  2. 服务发布操作 AbstractRegistryService#doPublish0()启动了一个线程池去进行发布; 其实这个操作可以延迟到 server.start() 去做;
    这里我认为存在一个风险: 如果服务publish了,但是服务本身没有起来, ( 因为我并没有看到有 registerServer连接到 server 的代码, 意味着服务可用性无法通过 RPC连接来检查, 只有一个 RegisterService 来检查) 那这时候可能就会导致 client 连接到服务端, 但是一直连不上的行为出现;
    这里是否存在不合理?

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

1 participant