3 ms·
That assumes that the underlying implementation of saveBalance can be updated to push the atomic operation downstream. In general you highlight the problem tho
by lostcolony 6y ago
That assumes that the underlying implementation of saveBalance can be updated to push the atomic operation downstream.
In general you highlight the problem though; without the central datastore ensuring atomicity, this isn't really solving anything.
I.e., if this app had multiple instances, you STILL have a problem, even with this solution, since nothing guarantees that another -instance- hasn't also loaded the old data.
- piterrro 6y agoExactly, the author at the end explains that his approach doesnt work when you're using cluster/pm2/worker because these are separate processess, that just makes me laugh again as the whole post is pointless.