Hello, I’m writing a thesis on nodzhs I write and the following question arose: in theory, everything should be non-blocking, and functions should be called solely by callbacks, or by events, but there are such small functions, such as counting the sum of an array (conditionally), which are performed very quickly and for their sake you do not want to cut one large, beautiful, logical function into a chain of callbacks. So this is: can such small functions be left with retourns, and wait for an answer from them, like they are inline type?
I can advise you to google about the words "Node.js is a cancer". There was such a provocative article , after which everyone rushed to write the server to calculate the Fibonacci numbers, measure the results and argue that this is more correct. Here, for example, https://github.com/glenjamin/node-fib
If I correctly understood the idea, the point is that with an intense flow of heavy (mathematical) queries, the time spent on calculating the answer becomes not so important. Anyway, the answer you will calculate a long time. It is much more important that clients receive a response at the same time, and for this very reason you need to use many asynchronous calls.