Live data from Hacker News

Web Framework Benchmarks

techempower.com

101–110 of 116 posts

Re: Web Framework Benchmarks

#101

I have been working with .NET Core since RC1 and I am so excited about the performance it's getting. Ranked 7? That's seriously impressive. Just go look at some of the past benchmarks.

I think it would have been even faster if they'd test with SQL Server because you can do things with SQL Server that you simply cannot do in PG such as stored procedures that return multiple resultsets, which saves a ton of round-trips.

SQLServer might be in next round https://github.com/TechEmpower/FrameworkBenchmarks/pull/3807

Re: Web Framework Benchmarks

#102
post #7

I had not checked these for a good long while. (Probably around round 10 or 11.) Looking back in on it now, holy MAN! C (C++) and Java. Wow. Even though I'm old, I'd sort of forgotten how speedy they can be. It's strange, because I actually work with Java and C in making streaming game engines. And you kind of get used to thinking in terms of millions on a set of hardware. So you think Java and C are slow. Then you r…

I find it very frustrating that Scala, a language that is entirely capable of running just as fast as Java, is full of frameworks that are relatively slow compared to the java frameworks. It has to be some sort of fixation on reinventing everything from scratch in order to fit into some idealized idiomatic scala way (ignoring the fact that there are a million different versions of "idiomatic" in the scala community). Even the Play Framework, which used to be based on Netty and was pretty damn fast, ended up spending entire release cycles focused on migrating to an akka-based backend and they ended up with shittier performance and now they have to maintain two backends because nobody wants anything to do with their new akka backend.

Sometimes mutability and imperative code are okay, even in scala.

Re: Web Framework Benchmarks

#103
post #100

Earlier quoted context omitted.

I think it would have been even faster if they'd test with SQL Server because you can do things with SQL Server that you simply cannot do in PG such as stored procedures that return multiple resultsets, which saves a ton of round-trips.

You can do even more advanced stuff in Postgres, but they've changed the rules to dissalow it since it much more faster than the the current best ones. Something about being fair to other frameworks...

Can you request multiple heterogeneous result-sets from PG now, with something that looks like a stored procedure?

I'd love to see what that looks like. In SQL Server it's as easy as putting 2 SELECT statements in the same procedure.

Re: Web Framework Benchmarks

#104
post #100

Earlier quoted context omitted.

You can do even more advanced stuff in Postgres, but they've changed the rules to dissalow it since it much more faster than the the current best ones. Something about being fair to other frameworks...

Can you request multiple heterogeneous result-sets from PG now, with something that looks like a stored procedure? I'd love to see what that looks like. In SQL Server it's as easy as putting 2 SELECT statements in the same procedure.

Here is an old post of mine about that: https://blog.dsl-platform.com/multiple-result-sets-alternati...

Re: Web Framework Benchmarks

#105
post #100

Earlier quoted context omitted.

You can do even more advanced stuff in Postgres, but they've changed the rules to dissalow it since it much more faster than the the current best ones. Something about being fair to other frameworks...

Can you request multiple heterogeneous result-sets from PG now, with something that looks like a stored procedure? I'd love to see what that looks like. In SQL Server it's as easy as putting 2 SELECT statements in the same procedure.

> Can you request multiple heterogeneous result-sets from PG now, with something that looks like a stored procedure?

Not prettily. You can return cursors, you can use json etc, ...

But you can pipeline SQL statements. I.e. just send N SQL statements (including bind parameters etc, the protocol is the same) without waiting for results, and then process the results as they come in. If you want to avoid latency penalties that makes much more sense in my opinion than having to wrap multiple statements in a function.

Re: Web Framework Benchmarks

#106
post #8

I've been following these benchmarks for some time, and am always shocked that Spring does so poorly (it's 7% here). I haven't had any performance issues with Spring in production, so these benchmarks are puzzling. Are the other frameworks really that much faster in practice?

I wonder how a Spring WebFlux [1] variant of the spring benchmark would perform in comparison. Also the spring benchmark has been updated to use a recent spring boot release about a month ago [2]. Before that it was using spring boot 1.3.5.

[1] https://docs.spring.io/spring/docs/current/spring-framework-... [2] https://github.com/TechEmpower/FrameworkBenchmarks/commits/m...

Re: Web Framework Benchmarks

#107
post #77
post #60

Earlier quoted context omitted.

It is not millions of requests a second, rather what you can put into something with 512 KB or less while providing a minimal Web management interface. For example, https://www.hcc-embedded.com/embedded-systems-software-produ...

Ahh yes. I do have some familiarity with HCC - albeit limited to a hobby project rather than anything professional. It's interesting stuff but I'd argue that's a completely different target industry to the ones that would use any of the web frameworks in the discussed referenced benchmark. So not really on point to the question raised by the GP with regards to C vs the more rapid development frameworks like node. Not…

I don't have actual experience with HCC, it was just one random example.

Embedded is one of my interests, so I do keep an eye on news about what is going on.

On my case I would rather try to bend my answer to be either C++ with embedded STL or Pascal, failing that C as well, in spite of my prejudices against it.

Hopefully they would at least allow C99. :)

Re: Web Framework Benchmarks

#108

Earlier quoted context omitted.

Speaking of which, a few hours ago Futures were added to the standard library, so the next nightly will have them in. We're quite close to that standardization!

Just adding for clarity: this isn't async io, but the foundation trait for building promise/future combinators in Rust. Tokio, an async io library, is built around this trait.

Yes. It's the Future and executor stuff, but doesn't provide an executor. You'd do that via Tokio or whatever else.

Re: Web Framework Benchmarks

#109
post #98

Earlier quoted context omitted.

Yep. It took me about six months to write a replacement of ActiveRecord with an identical API (for what was needed) that could scale to arbitrarily large number of writes. Shit, pre-A16Z raise 500px ran on Rails and they were a social network around photography . You think Twitter is bad? Try timelines where you have half a million photographers liking hundreds of photos an hour and every like gets pushed into every…

>Yep. It took me about six months to write a replacement of ActiveRecord with an identical API (for what was needed) that could scale to arbitrarily large number of writes Sorry to ask, would that be open sourced? >It was 5 application servers, 4 MongoDB servers for the timeline with some crazy data structures, one or two MySQL DBs. That is a little hard to warp my head around, because pre-A16z 500px was a long time…

> Sorry to ask, would that be open sourced?

No. I would have if I owned the code personally, but it wasn't in the companies interests to open source it.

> That is a little hard to warp my head around...

I was there between was 2012—2013. The hardware wasn't bad, I don't remember the exact specs but it was colocated at a place in downtown TO on some decent but not crazy gear. It wasn't perfect, but it worked pretty well.

For the actual image processing we just shelled out to imagemagick and I vaguely recall some fancy batch write code for keeping things like photo view counts from completely destroying the DB. We had a hardware load balancer that worked pretty good and we compiled ruby ourselves for a performance boost, though that ended up killing us this one time when there was a bug that only showed up in the compiled version of Ruby when all the dev boxes ran the universal binary.

People care so much about performance, and in some cases like computer games it's totally warranted, but if at the end of the day you have a DB the DB is going to be the problem long, long, long before the application code.

Re: Web Framework Benchmarks

#110

Earlier quoted context omitted.

I'll tell you what. When I'm a fortune 10,000 company, we can afford to rewrite the web app.

But do they rewrite ? Twitter did. Facebook didn't.

> Facebook didn't.

You have no idea what you're talking about. Not only did they produce TWO different implementations of PHP (HHVM and Hack), a vast majority of their infrastructure is NOT in PHP (which is mostly reserved for the front-end/web tier).

Post reply on HN