bailiyang commented on issue #1047:
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-618822086


   > > 我这边也有类似的需求,要求单链接严格有序
   > > 
我看socket部分的代码,epoll过来的事件,是按照fd起bthread处理的,如果前一个pipeline特别大,后一个特别小,感觉是有可能在InputManager这里有两个InputManager并发的情况出现,即使都走到Parse这里也可能是并行的Parse
   > 
   > 这个不会呀,InputMessenger 中是 OnNewMessages 来循环处理 socket 的读 event,我现在的处理方式就是在 
Parse 阶段完成消息的 decode、process,对于异步处理,会通过 bthread 的 CountdownEvent 来将 bthread 休眠
   
   也就是说你完全不再用brpc::server、brpc::client嘛,自己轮一个accetper这样的小型轮子?复用socket部分?
   我以为你是想要跟redis 
server那样实现一个新的protocl,在protocl结构体的回调的parse部分完成,因为我看大部分的并发是在调用parse函数执行CutMessage之后并发触发用户重载的回调(就是继承pb类的这个)


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to