top | item 28274266

(no title)

sobakistodor | 4 years ago

It is good idea in terms of long-term money spendings: if you already have good C++ HTTP framework, you spend less cpu/memory and can make web-service\site that can live forever for 0.00001 dollars a month. Of if you planning to serve lost of requests AND want users to feel low latency responce, you have no options: Rust, Go, C++, maybe something else. Main fight must occur on the "C++ vs Rust" scene, but C++ certainly wont die in another 20 yers, so you happy using it for long-term projects.

discuss

order

masklinn|4 years ago

> Of if you planning to serve lost of requests AND want users to feel low latency responce, you have no options: Rust, Go, C++, maybe something else.

That sounds like a lot of options. While I don't exactly like Go, that's very much the sort of things it was designed for, "stdlib-only" go will give you everything you need with pretty much guaranteed safety.

> Main fight must occur on the "C++ vs Rust" scene, but C++ certainly wont die in another 20 yers, so you happy using it for long-term projects.

The concern is less the death of C++ and more exposing C over the web, which exponentially increases the damage of any mistake you make (likewise C++ though likely with a lower exponent).

sobakistodor|4 years ago

As I remember, Go was "invented" to allow writing SMALL projects, where people previously used Bash/C/Perl. Like all these small command-line utilities and scripts to solve Site-Reliability-Engineer-tasks or DevOps-tasks. Using Go in projects larger than "multithreaded custom-binary-format to CSV converter" or "daemon watching sensors and inserting ROWS to some DB" is not very good. Big thing about GO is lots of libs available for everything (but in that view Python is better).

adrianN|4 years ago

The boring, memory safe, option seems to be Java, but I haven't touched java for web stuff in a number of years. Is the performance much worse than Go? Go seems to be really nice for web stuff, afaik it's one of the things it was designed for.

Cthulhu_|4 years ago

I'm sure performance can be comparable (in terms of requests / second) with enough tweaking and sane design choices, but Java has much longer startup times (especially if you use a framework like Spring) and much higher memory usage, so those are things to keep in mind.

Go is / feels a lot more minimalistic, much less drama and more direct code. Less opportunities to be clever.

sobakistodor|4 years ago

Java makes you think about its GC. "What i must do to prevent GC wake up". Always re-use allocated objects and so on. Or you turn off GC. So, you got C++. But with C++ you write smaller code (considering C++11...C++20 standards) compared to Java, so why you need "bloated C++-like language (Java is) if you can use C++".