(no title)
bobnamob | 11 months ago
A system built on purely synchronous calls is infinitely easier to reason about and design in all aspects other than e2e latency.
I'd almost approach from the opposite direction, defaulting to sync calls till you have concrete performance reasons not to.
bob1029|11 months ago
1. You are making an I/O bounded call and most of the CPU time would otherwise be spent idle.
2. You are making a CPU bounded call that the UI thread cannot directly await.
3. You need to propagate an asynchronous call context for one of the 2 above scenarios.
There are situations where you can put yourself in a position where it seems async needs to be everywhere (i.e., sharding a monolith to a bunch of separate networked elements).