Get the latest tech news
The Scalar Select Anti-Pattern
I've written a number of stateful services starting with an event loop at the core:
file modifications from user typing code in or git operations, requests from the client (“give me completions!”), output from compilation jobs running in the background with error messages and such. For example, if we have two incremental file modification events (like “insert'hello' at offset 92 ”), it makes sense to union them into one large change first. Once you see the problem (the hard part), the solution is as expected: always be batching, forget the singulars, push the for s down, become multitude!
Or read this on Hacker News