You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/01/20 08:32:30 UTC

[GitHub] [incubator-brpc] guangpec1 opened a new issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

guangpec1 opened a new issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035
 
 
   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   由于项目需要,服务需要保留原有的Task Control 的基础上,新增加一个Task Control,两个task control 对bthread 进行调度,不知道这样的方案是否有风险? 多谢 @jamesge 
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   
   
   **Additional context/screenshots (更多上下文/截图)**
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] guangpec1 edited a comment on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
guangpec1 edited a comment on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-576208924
 
 
   戈神,我们自己内部实现了,现在测试还没有发现问题,我详细描述一下场景. 建立两个 Task Control 分别是 T1 和 T2.  T1 中处理网络请求,然后T1将“算力较大”的部分发给 T2, T1 发给T2的只是function和arg, T2 执行funciton (本质上调度 start_background<false>(tid, attr, fn, arg)),T2 任务结束后通过signal 通知 T1.  我理解Task Control 本质上是bthread 调度引擎,与bthread 的资源解耦.   同时Task Control 每一个Thtread Worker (pthread) 是资源独立的,因此可以建立两个task control. 我的想法如上,有时间帮忙看一下,多谢@jamesge 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] guangpec1 closed issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
guangpec1 closed issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] guangpec1 commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
guangpec1 commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-576510871
 
 
   主要将计算的部分拆分出来,主要是业务架构的需要.  比如说既有重调度的任务,又有重计算的任务.  将重计算和调度分开成两个Task Control.  降低互相影响. @cdjingit 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] guangpec1 edited a comment on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
guangpec1 edited a comment on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-576208924
 
 
   戈神,我们自己内部实现了,现在测试还没有发现问题,我详细描述一下场景. 建立两个 Task Control 分别是 T1 和 T2.  T1 中处理网络请求,然后T1将“算力较大”的部分发给 T2, T1 发给T2的只是function和arg, T2 执行funciton (本质上调度 start_background<false>(tid, attr, fn, arg)),T2 任务结束后通过signal 通知 T1.  我理解Task Control 本质上是bthread 调度引擎,与bthread 的资源解耦.   同时Task Control 每一个Thtread Worker (pthread) 是资源独立的,因此可以建立两个task control. @jamesge 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] guangpec1 commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
guangpec1 commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-576208924
 
 
   戈神,我们自己内部实现了,现在测试还没有发现问题,我详细描述一下场景. 建立两个 Task Control 分别是 T1 和 T2.  T1 中处理网络请求,然后T1将“算力较大”的部分发给 T2, T1 发给T2的只是function和arg, T2 执行funciton (本质上调度 start_background<false>(tid, attr, fn, arg)),T2 任务结束后通过signal 通知 T1.  我理解Task Control 本质上是bthread 调度引擎,与bthread 的资源解耦.   同时Task Control 每一个Thtread Worker (pthread) 是资源独立的,因此可以建立两个task control.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cdjingit commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-576568156
 
 
   > 主要将计算的部分拆分出来,主要是业务架构的需要. 比如说既有重调度的任务,又有重计算的任务. 将重计算和调度分开成两个Task Control. 降低互相影响. @cdjingit
   
   目前brpc的设计,一般不需要区分io线程和工作线程。直白说如果工作线程超负荷了,io线程继续接受请求也只是会加剧系统压力。

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] jamesge commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
jamesge commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-576169081
 
 
   不可行,不要尝试。有一些变量是在pthread-local中的,如果要支持多套TaskControl,那些变量就得组织成数组,很麻烦。

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] guangpec1 commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
guangpec1 commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-579781687
 
 
   好的,多谢 @cdjingit @jamesge 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cdjingit commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-576491790
 
 
   > 戈神,我们自己内部实现了,现在测试还没有发现问题,我详细描述一下场景. 建立两个 Task Control 分别是 T1 和 T2. T1 中处理网络请求,然后T1将“算力较大”的部分发给 T2, T1 发给T2的只是function和arg, T2 执行funciton (本质上调度 start_background(tid, attr, fn, arg)),T2 任务结束后通过signal 通知 T1. 我理解Task Control 本质上是bthread 调度引擎,与bthread 的资源解耦. 同时Task Control 每一个Thtread Worker (pthread) 是资源独立的,因此可以建立两个task control. 我的想法如上,有时间帮忙看一下,多谢@jamesge
   
   现在io也是在bthread中执行的,这个把io拆分开来应对什么具体的问题呢?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] guangpec1 commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?

Posted by GitBox <gi...@apache.org>.
guangpec1 commented on issue #1035: 在一个服务中使用两个Task Control 是否会有影响?
URL: https://github.com/apache/incubator-brpc/issues/1035#issuecomment-604169887
 
 
   @cdjingit 上面的方案,我们经过实践验证是可行,多谢.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org