Friday 7 April 2017

ELI5 - when is concurrency/asynchronousity awesome?

I'm relatively new to node, and finding out a lot about when concurrency/asynchronously is not awesome.One thing plaguing me is the multiple asynchronous database calls. If they are related, I want them all to work, or none at all. But as they all go at once, or else are chained together in Promise.all, or a try block, or a christmas tree of .then() statements, or awaiting on each other they are still independent, and that's a real problem for me, a partial success in terms of only a few out of multiple calls being successful is an issue in terms of ruining the dependent data, and none of these strategies seem to handle a rollback.But I know there is awesomeness. Where is the awesomeness? How does it work, and when does it come into play?

Submitted April 07, 2017 at 03:00PM by coderbee

No comments:

Post a Comment