pricingassistant / mrq

Mr. Queue - A distributed worker task queue in Python using Redis & gevent
MIT License
877 stars 123 forks source link

Why not saving result to Redis firstly instead of MongoDB directly? #166

Open jkryanchou opened 7 years ago

jkryanchou commented 7 years ago

I have got insighted into your worker implementation. While I found that worker has heavily write to Mongo. I thought it might not be a good performance on saving result. Why not writing to redis (cache) firstly to instead of saving to MongoDB in order to handle more I/O operations to gain more performance.

sylvinus commented 6 years ago

This should be possible with simple overloading of the Job class. Add it as an example/recipe ?

jkryanchou commented 6 years ago

@sylvinus I would post it later. I mean that using cache (redis or any other cache-db) to handle concurrent reads/writes before writing to MongoDB.