DEV Community

Prioritizing Concurrent Requests: Queuing system to handle distributed processes and messages with NodeJS and Bull

Vitor Braggion on March 15, 2024

Hey devs! How's it going? My name is Vitor Braggion, I'm the Co-Founder and responsible for the technology at ufrilla. A while ago, we had a litt...
Collapse
 
aminmansuri profile image
hidden_dude

Another way to accomplish the same thing is to do it with SQL like so:

UPDATE table SET sum = sum + 1

If it requires several statements you can use a Serializable transaction isolation which is the same as your queue does. But both in the case of you Queue and Serializable realize that you are severely reducing parallelism.