Why use a task queue, such as DADI Queue?
Chaos, uncertainty and disorder. These are the building blocks of our world, out of which we evolved, got smart and became capable of organizing the complex network of countless variables around us.
As civilization continued to emerge, we built dens and dwellings and then pyramids and pantheons. Our projects became increasingly complex and we needed other ways of managing the chaos.
So we planned. We wrote task lists and then delegated those jobs to our minions.
And this, if you'll excuse the rhetoric, is an example of the asynchronous task queue in action.
Okay, I'm sold, lay on the details
So having established that a task queue is, ahem, the cornerstone of human civilisation, let's talk about DADI Queue and what it can do for your app or service.
DADI Queue is one of the microservices from our open-source box of web service tricks. It's currently available from the repo on Github and is soon to be available via our decentralized cloud services platform.
Once installed, following the instructions from the repo, you'll be the proud admin of a lightweight, high-performance task queue running on Node.js and Redis.
Integrating DADI Queue into your app allows you to queue up work asynchronously so that it can be done outside the context of the initiating user request.
For example, let's say your social networking app sends 'new message' emails to all your friends when you post a message. This could be handled in one of these three ways.
- Synchronously, while-u-wait
- Asynchronously, now, using a backgrounded client-process like AJAX
- Asynchronously, later, by storing the details and running a cron job
If you choose the first option your users had better get a brew on ☕️. The other two options are feasible, but neither are inherently scalable or failure tolerant and both of these measures of quality are essential in cultivating positive user sentiment.
Knowledge
Last Updated:
September 2019

