Hi,
I am using tornando and redis with the torandoredis client from
https://github.com/leporo/tornado-redis/tree/master/tornadoredis.
The client is painfully slow due to the fact that no tornado clients
for redis use hiredis. redis-py is way faster but is blocking. Are
there any tricks that I can use such as gevent threads or something
like that will allow me to use redis-py but yet not be blocking?
Below is my typical code for redis calls. How would I modify to use
gevent threads for redis-py?
class MyHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
@tornado.gen.engine
def get(self):
self.push='test'
yield tornado.gen.Task(r_main_writes.lpush,'global',self.push)
#most recent time user has seen add
self.set_header('Content-Type', 'test/plain')
self.write('test')
self.finish()
Thanks