I use Tornado as the web server. I write some daemons with Python, which run in the server hardware. Sometimes the web server needs to send some data to the daemon and receives some computed results. There are two working:
1. Asynchronous mode: the server sends some data to the daemons, and it doesn't need the results soon. Can I use message queue to do it perfectly?
2. Synchronous mode: the server sends data to the daemons, and it will wait until it get the results. Should Iuse sockets?
So what's the best way of communication between tornado and Python based daemon?
Depending on the scale - the simple thing is to just use HTTP and the AsyncHTTPClient in Tornado.  For the request<->response case in our application we're going 300 connections/second with such an approach.  
For the first case Fire and forget, you could also use AsyncHTTP and just have the server close out the connection and continue working...
What's the best way of communication between tornado and Python based daemon?