3 ms·
I am sorry, but event-based programming is the wrong way to tackle the problem of scaling up blocking I/O code. Event-based programming more or less forces one
by FixedPoint 16y ago
I am sorry, but event-based programming is the wrong way to tackle the problem of scaling up blocking I/O code. Event-based programming more or less forces one to write in CPS style, which soon becomes a nightmare to reason about. I speak from the experience of having written several thousand lines of such code.
A better solution is to pick a language that has light-weight threads (Haskell, Erlang, ...), and let the language handle the events (and call-stacks!) under the hood. Cf the caffeine/percolator paper (even though they do end up using heavy-weight Java threads).