It seems that these days they are talking about an active application, and the reactive manifest seems to encourage non-blocking / asynchronous code. I saw a ton of video on youtube where speakers welcome non-blocking code, but no one talks about the benefits of writing non-blocking code over locking, except in saying
"using futures is good because it is not blocking your code" - some speaker
It just makes the “ blocking code ” a sound word.
My question is simple: If I have a task and I start it with
- Lock code - where the task is executed in one thread
- Non-blocking code. If one thread delegates the task to another thread.
The fact is that the actual task that I want to run will always work in 1 thread in the two above cases. The second option simply adds more complexity to the application, and the first one is simpler and probably faster since I do not need to delegate.
I understand that at some point during the execution of the task it will be necessary to perform several parallel tasks, so the Threads / non blocking / async code helps here. But why does the Reactive manifest encourage non-blocking applications? What is the use, besides the whole group of Futures and Promises in your applications, which just makes the code more and more difficult to debug?
source
share