4 ms·
But every async platform I know of has a non-async way of handling long running tasks so you can background them. The async model is good for responding to thin
by ianstallings 12y ago
But every async platform I know of has a non-async way of handling long running tasks so you can background them. The async model is good for responding to things in a quick fashion, such as http calls to a simple API. If the process you want to accomplish takes a long time the standard operating procedure is to background it and send a callback for (possibly to another api) when it's completed.
And yes the threading model works, on one machine. But across machines or OS instances? For that you'll need some kind of mutex syncing and you're basically back in the same boat you were in with the methods mentioned above. So why not use a platform specifically tailored to multi-instance clusters and save yourself some hassle?
- overgard 12y agoWhether or not you can scale across machines has nothing to do with the thread model you choose. It's just about whether or not your server is stateless across requests, but you can do that with both async and non-async servers.