2 ms·
You're getting a lot of downvotes but I think it's mostly because of a misunderstanding of the bigger picture. Erlang can provide a low median latency and won't
by 59nadir 3y ago
You're getting a lot of downvotes but I think it's mostly because of a misunderstanding of the bigger picture. Erlang can provide a low median latency and won't be very sensitive to outliers where many other languages will have schedulers that are much more sensitive to outliers (because they'll steal too many resources and can potentially steal an entire core for too long) while they can still have lower minimum latency.
It's not that hard to accidentally exhaust the thread pool of some runtimes whereas you have to end up in pretty deep pathological areas in Erlang in order to do so. Notably `term_to_binary` on massive structures has historically been mis-bookkept (if you can call it that) by the runtime and will only count as one function call despite its high cost. This means the scheduler can't preempt it and wouldn't be able to nicely schedule N processes (where N is the amount of schedulers you have currently running, i.e. usually your core count) that were executing it.
But again, these are much deeper pathological cases than you'd find causing issues in most runtimes.
- mikhailfranco 3y agoIt is good practice for (soft) realtime systems to keep data messages under the Ethernet MTU of ~1500 bytes. This especially applies to UDP, Erlang and any other distributed computing system. Send many small non-blocking notification messages, usually delta state, not huge blocking RPC data structures.
- 59nadir 3y ago`term_to_binary`/`binary_to_term` is used (probably more) outside of just transmission; the same caveats about those functions apply no matter the context.