robocanic commented on PR #1314:
URL: https://github.com/apache/dubbo-admin/pull/1314#issuecomment-3240082870

   > LGTM,The entire PR has an elegant code style, but I have a question: Why 
are the load order of the discovery/Component, engine/Component, and 
EventBus/Component components all set to math.MaxInt? Doesn't this make their 
startup order uncertain? Is there another way to ensure ordering? Or is 
ordering not really that important? I'm very curious about this and would like 
to hear your thoughts.
   
   At first, the start order of each component is hardcoded in 
[bootstrap](https://github.com/apache/dubbo-admin/blob/develop/pkg/core/bootstrap/bootstrap.go),
 so the start order is certain and ordered. The originial purpose of `Order()` 
defined in `Component` is to provide the start order: the larger the number, 
the earlier it starts. But if we defined a new component called `A` and 
   `A` is depend on `Store`, we need to look up the order of `Store`. if `A` is 
depend on many other components, we need to look up to the order of every 
components. So the design of `OOrder()` is not convenient enough. I have been 
looking for another way to resolve this issue.


-- 
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-unsubscr...@dubbo.apache.org

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


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

Reply via email to