You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "chickenlj (via GitHub)" <gi...@apache.org> on 2023/10/27 08:46:48 UTC

[I] [DISCUSS] should `server` package support configuring more RPC features? [dubbo-go]

chickenlj opened a new issue, #2462:
URL: https://github.com/apache/dubbo-go/issues/2462

   ```
   刘军:@王宇轩  api 那块,下面这两个流程的启动好像差异比较大。有个疑问是,我最终没找到它们都走到一个启动逻辑,比如 instance 会设置 rootconfig 后启动,但是我好像没看到server那个模式设置 rootconfig
   
   srv := server.NewServer(); 
   srv.serve()
   
   ins := dubbo.NewInstance();
   srv := ins.NewServer(); 
   srv.serve()
   王宇轩:@刘军  instance设置rootConfig,是和之前的config.Load逻辑基本一样,把所有配置的东西都初始化一遍;不用instance,直接启动server,具体的初始化流程在ServerOptions.init()和ServiceOptions.init()流程里,只初始化它用到的
   王宇轩:这样会有点冗余,如果我们界定好裸server启动不能使用meta/registry功能的话,就可以把这些功能的init放在instance里做,而server只关注好自己rpc这层的功能
   刘军:@王宇轩  是的。我刚才想到,如果我们后面server上支持更多rpc层面配置的话,比如metrics/tls/tracing(不包含registry/meta),怎么让这些配置在ServerOptions.init()和ServiceOptions.init()生效,因为目前好像都是走rootconfig工作的
   刘军:最终只能都走 instance 可能也没问题。但现在 server 有一部分配置支持,却不知道边界是哪些
   王宇轩:其实就是考虑下,假如裸server启动不能用这些功能,那这些功能的init就都只放在instance里来做;如果裸server启动也可以,那么每个配置加一个isInitialized字段帮助server/service判断是否已经初始化过了。
   王宇轩:@刘军  边界确实有点难找。。比如说裸server启动得去配置下Graceful_Shutdown,不然会直接panic,因为invoker链会直接去config包里拿这个配置,得通过测试用例去覆盖
   刘军:可能不止是isInitialized字段的问题,当前的配置加载和启动机制的入口都设置在了rootconfig,到时候得每一个配置类型怎么初始化工作的过一遍
   刘军:我把这个记录一下,咱们后面版本再看应该是可以的
   
   ```


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org