3 ms·
It's Node.js - the root of the problem is also Node's strength, which is that there's effectively no stack. You can manage zillions of concurrent connections, b
by stickfigure 10y ago
It's Node.js - the root of the problem is also Node's strength, which is that there's effectively no stack. You can manage zillions of concurrent connections, but there's no easy way for the system to unwind bad behavior by one of those connections.
In a Java app you except all the way to the request response.
In a Go app you return all the way to the request response.
In a Node app, you have to call your way back to the request response. Or you don't, potentially leaving the whole process in an inconsistent state. The amazing concurrency of node comes at a price.
- jcheng 10y agoDomains were Node's answer to that, and it seemed to work pretty well. I adopted the approach for my own web framework (not JS based) and it has been an extremely useful abstraction. They're soft-deprecated in Node now though, and AFAICT work on a replacement has stalled. https://nodejs.org/api/domain.html https://nodejs.org/api/domain.html
- int_19h 10y agoAnd in async C# - which has the same "amazing concurrency" - it just works. Because the language will take that exception, and wrap it into a faulted task (promise) for you. So the stack may be spaghetti, but exceptions navigate it correctly same as everything else.