Remix.run Logo
▲ self_awareness 5 hours ago

Anyone brave enough to write a webapp in C++?

▲pjmlp 3 hours ago | parent | next [-]

It used to be the way before Java, .NET took off, only to be replaced by slow interpreted languages, because who cares, the database is the bottleneck.

Note that PHP and Perl also had enough C code, and Apache/IIS plugins, with enough C and C++ extensions.

Now all those "who cares scripting languages" are getting JIT compilers, or being rewritten into Go and Rust.

▲gpvos an hour ago | parent | prev | next [-]

Yes, earned my living with that for most of my career. Would do again tomorrow.

▲cowboylowrez 4 hours ago | parent | prev | next [-]

I play with c some but I just could not stand the libraries I could find to work with fast cgi, just totally opaque and I would get hung up on things like handling some socket a doohicky would hand over and I'm supposed to work with it and I could never figure it out.

Once I ditched the library idea and just coded to the spec things went much nicer lol it turned out to be a relatively normal socket coding project. Just hobby code tho.

▲Ono-Sendai 2 hours ago | parent | prev | next [-]

sure. https://substrata.info/

▲rfgplk 4 hours ago | parent | prev | next [-]

Yep, me. In fact, I wrote a whole netstack in C++, meaning everything from opening sockets to the web server to the tls crypto code to the sse/middleware layer of the framework. Quite literally, there is _ZERO_ externally used third-party code anywhere in the netpath. Performance is amazing, I can serve effectively ~600k full HTTPS requests per second on a single Skylake core.

▲lukaslalinsky 2 hours ago | parent [-]

How fast does it go when you do a few PostgreSQL queries per request?

Look at https://www.http-arena.com/. For raw throughput on keep-alive requests, low-level languages are going to win without a question. But once you put database roundtrip into the mix, the distance gets much smaller.

And I'm saying this as an author of another HTTP server in a low-level language.

▲forgotmypw17 5 hours ago | parent | prev [-]

OkCupid did it back in the day...