3 ms·
It's about time someone put this into perspective with figures before more and more people rush to implement business apps in async style (= 80's cooperative mu
by tannhaeuser 6y ago
It's about time someone put this into perspective with figures before more and more people rush to implement business apps in async style (= 80's cooperative multiprocessing). There are exceptions of course; for example Node.js was originally envisioned for eg. game servers where async's purported robustness in the presence of a massive number of open sockets supposedly helps. But I think for the vast majority of workloads going async has a terrible impact to your codebase (either with callback hell or by deprecating most of the host language's flow control primitives like try/catch in favour of hard-to-debug ad-hoc constructs such as Promises). Another price to pay is groking Node.js' streams (streams2/streams3) and domain APIs and unhelpful exception handling story with subtle changes even as late as in v13. As I hear, Python's async APIs aren't uncontroversial either.
Now the next thing I'd be interested to get debunked is multithreading vs multiple processes with shared memory (SysV shmem). I'm not very sure, but I'd not been surprised to hear that the predominance of multithreaded runtimes (JVM, most C++ appservers) is purely a cargo-cult effect. As far as I remember, threads were introduced for small and isolated problems in GUI programs, like code completion in IDEs; they were never intended for replacing O/S processes and their isolation guarantees.
- waheoo 6y agoKevlin henney has a lot to say about concurrent processing ithink it was one of thesr talks: https://youtu.be/2yXtZ8x7TXw https://youtu.be/2yXtZ8x7TXw https://youtu.be/ZsHMHukIlJY https://youtu.be/ZsHMHukIlJY Threading is faster, but really only if youre willing to give up your locks and design for it properly.