4 ms·
Again, this is a really cool 300 loc snippet. No need to pull in the jvm if you're going to do something simple. As for performance, a reproducible benchmark i
by matthewaveryusa 10y ago
Again, this is a really cool 300 loc snippet. No need to pull in the jvm if you're going to do something simple.
As for performance, a reproducible benchmark is the minimum requirement to even start the conversation.
- tyingq 10y agoNot sure if the 300 loc is really a fair comparison, as it is using ASIO (https://think-async.com/ https://think-async.com/) under the covers, which is far more than 300 loc.
- eropple 10y agoAnd yet by "pulling in the JVM" (which is a rounding error in 2017), it's remarkably easy to generate a proxy that actually works as people expect a TCP proxy to work. This doesn't even so much as wait for connections to drain before terminating. This "300-line snippet" (which is reliant on Asio, which is not 300 lines by any stretch) is, as near as I can tell, not viable in real-world conditions and the spirited defenses of it that put it as competitive with real-world, battle-tested solutions are profoundly weird. (Similarly, because I don't really care about JVM versus not, HAProxy--which I'd probably use for something like this because I have better things to do with my programming time--is 90Kloc because it has stuff to do and does it right. Simple is only better if simple can actually get the job done.)
- deleted 10y ago[deleted]