5 ms·
If server-side (web)apps were written in C++ instead of Ruby/Python/..., I believe they can sustain much more users before they need to consider horizontal scal
by xjia 12y ago
If server-side (web)apps were written in C++ instead of Ruby/Python/..., I believe they can sustain much more users before they need to consider horizontal scalability seriously, since we can fully utilize the machine in C++. AFAICT it is nearly impossible to optimize to the level of cache efficiency (and etc.) in Ruby/Python/..., and a distributed system is much harder to cope with, and when you need to work on that, the choice of programming language becomes less important.
However, building a not-so-bad prototype in Ruby/Python/... is much easier. So probably something needs to be done (e.g. "frameworks", libraries, tutorials) for C++.
[EDIT] C++ (templates) can provide abstractions with zero run-time cost. C doesn't have such abstractions. Ruby/Python/... don't have such low cost.
- jayvanguard 12y agoBut most (or at least a huge percentage of) server-side web apps are written in Java. While I don't love Java it is better in every way shape and form for server-side web apps than C++.
- xjia 12y agoThat's probably due to the lack of resources (as I mentioned, libraries, tutorials, etc.) for programming server-side webapps in C++. However, this could be a chicken and egg problem. People use Java more often so they produce more resources.
- pjmlp 12y agoTrue, but early C++ libraries were tainted with a C mindset so althouth C++ could provide a Java like confort, you were stuck with C with classes libraries instead. Just look at MFC vs OWL vs VCL, or Visual C++ vs C++ Builder.
- CountSessine 12y agoThis really seems like the sweet-spot for Go - nearly the same runtime performance as C/C++, and no single-threaded memory leaks or stomps. Low memory overhead, fast startup time, and the time amortization inherent in garbage collection doesn't matter a whit.