Hacker News new | ask | show | jobs
by closeparen 2311 days ago
There's a pretty simple rule of thumb: use synchronous RPC when a UI-level transaction is waiting, otherwise use queues.
2 comments

I agree you should do this from the user's perspective, but what about when a message handler (which is already async and not blocking the user) needs to call into an api? You could rewrite it to use queues for the request and response, but then you're convoluting control flow.
Would RPC include stateless/RESTful but synchronous calls in this context?
Absolutely!