by isuckatcoding · 10y ago · 0 comments
However, C is one of those "double-edged sword" kinds of languages. What kind of trade offs between performance and "safety" would one be making here? Are they worth it?
FWIW, everyone I know who moved web-serving things to C did so primarily because of latency, and then secondarily to avoid GC time delays. Higher transactions per server was a bonus, but no one did it for that.
Also, if you have to hit a database, then any efficiency you get from switching to C will probably be swallowed up by that.
I can only think of one case where that is pretty much always true - CRUD with a network connected db backend, several cases where it is debatable, and a bunch of cases where that is wrong. See sqlite3, situations where you can use unix sockets, dynamically loaded modules, etc.
I'm finishing up a project that basically builds state models from log events, automatically, and robustly enough that hopefully the end users wouldn't notice if I were run down by a bus. With the massive amount of data and high dimensionality of the problem, I have a hard time seeing how to pull it off but with C and statically compiled sqlite... or a big bag of money to throw at IBM.
That sounds really cool, but I'm not quite sure what it means.
[0] https://en.wikipedia.org/wiki/Business_process_modeling [1] https://en.wikipedia.org/wiki/Directed_acyclic_graph
The choice of programming language affects performance much less than the quality of the architecture, algorithms, data structures and just plain coding skills.
> "With balde you can serve hundreds of requests per second"
A simple Netty-based Java web server can do tens of thousand requests per second easily on a laptop (I'm taking these numbers from our current project, and we didn't spend any time on any real optimizations for speed yet).