Hi all, I'm implementing a new client in python, that will reside inside a tornado web server. tornado is an async web server that usually only has a few workers working in non blocking mode. these workers will have to issue requests to a backend thrift server. now, using the existing thrift clients, I would block the workers and get really bad performance. so I'd like to implement a client on top of tornado's own io loop, which can act much like twisted and friends. now, of course I can use the twisted client, but I don't want to use 2 async io loops inside my program.
how would you suggest I approach this? it seems non trivial as the generated python client code seems to assume a blocking mode: we send the data, we wait for response, we return it... what I have is a way to add callbacks to an existing socket, and wake when data is sent or received. it seems that the twisted client basically wraps the memory buffer transport. is that the only way to go with this? any ideas?
