The easiest solution would be to create multiple connections / client objects... possibly even one client object per request. You should see if that will perform well enough for your requirements first. If it doesn't, then you will need to do some code generator work to make a thread safe client object, and a server that can process multiple requests from the same connection in parallel. Thrift's current C++ servers will only process one request at a time on a given connection, though multiple connections are processed in parallel.
All of the current C++ servers respect the sequence id that is handed to them, but the current C++ clients always set a sequence id of zero. Until you have a thread safe client object, you don't really need the sequence id. Jaguar Xiong <[email protected]> wrote on 08/09/2014 10:40:06 AM: > From: Jaguar Xiong <[email protected]> > To: [email protected], > Date: 08/09/2014 10:40 AM > Subject: Need advice for parallel requests > > Hi, > We are considering using thrift for peer to peer communicaiton, the > system contains multiple nodes, and each node could send multiple > requests (without waiting for response from previous requests) to any > other nodes. > But looking into message definition, I could find message > type(call,response,exception,etc), sequence number, which seems fit the > purpose. But I don't know if any of the existing Server (TSimpleServer, > TNonblockingServer, etc) really fit my need. > Could you share some ideas on existing components, or any starting > point for implement such feature? > > Thanks! > Jaguar
