4 ms·
I think they are, though. Off the top of my head: * Network calls are traceable by default — logging all incoming queries is easy, logging all function calls i
by neongreen 4y ago
I think they are, though. Off the top of my head:
* Network calls are traceable by default — logging all incoming queries is easy, logging all function calls is harder.
* Network calls are easily made — function calls in a backend can require passing some kind of a huge config structure, or might be entirely unavailable if you're using a compiled language, while network calls can be done with nothing more than curl/grpcurl/etc.
The downsides are a) decreased performance b) you have to handle failures c) dev ergonomics, but eh. I would still choose network calls over function calls for a big backend, probably.
- brundolf 4y ago> logging all function calls is harder It's really not though. Many (most?) languages have some way to annotate function calls with logging logic > function calls in a backend can require passing some kind of a huge config structure, or might be entirely unavailable if you're using a compiled language Not really sure what you're referring to here
- duped 4y ago> Network calls are easily made — function calls in a backend can require passing some kind of a huge config structure, or might be entirely unavailable if you're using a compiled language, while network calls can be done with nothing more than curl/grpcurl/etc. Define "easy" because curl is not "easy" compared to a function call and involves building a few large datastructures to work at all.
- rco8786 4y agoOof. Everything in my 12-13 years of engineering has led me to the exact opposite conclusion of literally every point you made here. Are you genuinely suggesting that making a network call is easier than calling a function in the same code base running in the same process?
- xwolfi 4y agoCompletely disagree if you work on low latency systems, or a high volumes of requests: functions are traceable if you need to in a crisis: plug a profiler, run like prod, see the hot paths. Dev ergonomics explode the cost of everything and you spend your time trying to figure out what the hell is going on where rather than just... plugging the profiler and sending the input, then observe the internals moving around. If the system can work without micro services, it should.