yichenluan commented on issue #1047:
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-618873519
> > > > 我这边也有类似的需求,要求单链接严格有序
> > > >
yichenluan commented on issue #1047:
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-618808508
> 我这边也有类似的需求,要求单链接严格有序
>
我看socket部分的代码,epoll过来的事件,是按照fd起bthread处理的,如果前一个pipeline特别大,后一个特别小,感觉是有可能在InputManager这里有两个InputManager并发的情况出现,即使都走到Parse这里也可能是并行的Parse
yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591771131
> > >
如果必须诶个处理,不能有并发的话,可以在ComandHandler执行你的异步调用后调一个some_event.wait(),然后在DoneClosure里调some_event.signal()来做一个同步
> >
> >
> >
yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591769467
>
如果必须诶个处理,不能有并发的话,可以在ComandHandler执行你的异步调用后调一个some_event.wait(),然后在DoneClosure里调some_event.signal()来做一个同步
这样子不会阻塞整个 pthread
yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591750374
@jamesge 我现在的想法是在 ParseMessage 时,如果没有 in-flight 的消息,原地调用 Process,如果有的话,就把
InputMessageBase* 加到 context 的 list 里,然后在当前正在运行的 handle 的
yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591397556
> @yichenluan 你的需求是一个连接上的请求处理都必须有序,还是说某一批请求有序就行了?这两个问题不太一样
是前者,要求一个连接上的请求必须挨个处理,客户端会预期请求发送的顺序等同于 Server 处理的顺序。
yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591344180
或者直接使用线程池?但是这样的话原本应该是 bthread 原地调用的 handler 需要交给用户线程去处理了
This is an
yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591309147
>
看一下https://github.com/apache/incubator-brpc/blob/master/src/brpc/redis.h#L241
,如果你的协议足够简单,可以考虑直接用这套接口实现server端逻辑
我的场景会复杂点,我准备在
yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591293693
> redis场景和你的场景是一样的,可以参考下brpc redis的实现。
额,brpc 里没实现 redis server 端的协议吧
yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591266256
补充说明:我在实现 Server 端,且是自定义协议。
This is an automated message from the Apache
10 matches
Mail list logo