Hacker News new | ask | show | jobs
by scottlf 3076 days ago
I, too, have a bit of experience with backpressure implementations in both Erlang and Pony. Erlang's "penalize the sender" doesn't work in many cases, so I'm not surprised that it's being removed. Erlang's remote distribution implementation & messaging semantics are Mostly Great but is definitely not Perfect.

1. Head-of-line blocking caused by congestion on the single TCP connection used for message transmission between any two Erlang nodes. This can cause major problems for apps control vs. data plane design, such as Riak and Lasp. Work on Partisan (https://github.com/lasp-lang/partisan) appears to be a substantial improvement.

2. If the single remote distribution TCP connection between two nodes is broken, then the first Erlang process to send a message to the remote node is, hrrm, well, borrowed/co-opted by the BEAM VM to connect the new TCP session. IIRC that process is marked unrunnable by the scheduler until the connection is set up or perhaps there's an error. If that process is really important to the functioning of your app, for example, an important system manager in the control plane of the app, then you have a very difficult-to-diagnose latency Heisenbug to cope with.

-Scott

1 comments

'penalize the sender' has the benefit of being very clean; it doesn't work in >1 machine distributed cases, but then neither do go or pony yet. I'm surprised to discover that it's being removed. I wonder what the thinking is for the local case.
> it doesn't work in >1 machine distributed cases

More generally, it doesn’t work when you have multiple schedulers, which nowadays is true for nearly all Erlang systems.