Task Multithreading with Python for your Server

in #steemdev6 years ago (edited)

Hello coders!

I'd like to share with you my new discovery: RQ (Redis Queue)

This is such a powerful tool that I felt like writing a little introduction (I must admit it's simple nature captivated me).

This out-of-the-box python library allows you to easily queue intensive tasks with a dedicated virtual server (Redis) in a controlled manner.

Let's say you have a low budget hosting plan; with RQ you can easily schedule tasks priorities and let the server fulfill the "jobs" on its own pace without interfering with the primary http workflow. Naturally, whether you run a local or remote server, the resources will efficiently apply on the chain of tasks.

Why this is not just a great tool for budget servers


Even the most powerful server can bottleneck its http workflop while running intensive secondary activities. You always want to make sure (if you run a web app) users can still have a good experience in your site while your server performs high intensity taks in the background.

If you are interested, RQ has a wonderful documentation website.

Why I chose RQ over Celeris

Celeris seems like a very powerful task management library. The reason why I chose RQ is because of its simplicity and ease of use. Celeris requires more time and configuration and, specially in case you run a small app, RQ has probably already all you need.

Control over assigned jobs

Omg this is so great, each job you assign gets a special ID and you can track every single one. You can check the tasks results, and in case of failure, you get a special flag with the error raise information. There is also a localhost dashboard web out of the box, with which you can easily test and monitor the workflow. Within the dashboard you can also clean/repair/delete tasks and create different kind of work queues.

Sort:  

Thanks for sharing this info related to RQ. I totally agree that's its a great tool.

I also agreed with you @cryptoqu👍

Thanks for your kind reply

Thanks both for your contribution

also thanks for you @lightproject

Si crees veras la gloria de Dios.

Lo tendre en cuenta

good working friend

Congratulations @lightproject, this post is the forth most rewarded post (based on pending payouts) in the last 12 hours written by a User account holder (accounts that hold between 0.1 and 1.0 Mega Vests). The total number of posts by User account holders during this period was 2519 and the total pending payments to posts in this category was $1706.66. To see the full list of highest paid posts across all accounts categories, click here.

If you do not wish to receive these messages in future, please reply stop to this comment.

Wow, great discovery I must tell

This looks really good ....

Are you using this on production already ?

Coin Marketplace

STEEM 0.27
TRX 0.12
JST 0.033
BTC 62498.25
ETH 3177.22
USDT 1.00
SBD 3.79