Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5466

How to implement a high-efficiency long connection to thrift server?

    XMLWordPrintableJSON

Details

    • Question
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.15.0
    • None
    • C++ - Library
    • None

    Description

      【version: 0.15.0  language: c++】as you know,  for long connection, all generated thrift servers (noblocking server, threadpool server...)  cannot handle multi requests from the same client at the same, the server processor always performs the loop pattern at the same thread:

      read message  ->  dispatch call  ->  execute user's virtual funciton implement -> return exec result -> write message

      but,  if i send reqA  and reqB by the same concurrent client in two different threads ,  and server will cost more time while handling reqA,  this will result in,  I can not get reqB's result before reqA is handled by server,   unbelievable !

      help me fix it. thanks~

      besides , in file: TNonblockingServer.cpp, row: 625 , desc:" we're still waiting for the ...." why we must wait the threadmanger to finish?

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            cfersneo cfers neo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: