TechEmpower just released their latest round (19) ...
# feed
j
TechEmpower just released their latest round (19) of their server middleware benchmark. You can check the results here: https://www.techempower.com/benchmarks
z
Ktor is 219th, about halfway down the list. 😬
j
Performance is not everything… for some scenarios half the performance is good enough, for others it only means you pass from 1 instance to 2… Maybe you need that peak performance only for one or two of your services. So you shouldn’t compromise productivity on the other modules. At least for me, it is more important to pick the tool more suit for the job, than to select “the best” one and stick to it no matter what :)
a
Are there any people using this drogon or it is developed only to win such competitions?
I just made a quick search and found that the main bottleneck is the optimization of non-blocking io. It is different on different systems and on linux there should be additional optimizations to make it fast.
k
Drogon is c++ based Actix is Rust You'll notice that the fastest ones have async/await support (aka coroutines) and use them properly.
a
@kenkyee I do understand that. The comparison looks like "C/Rust is fast and Java is slow", but actually it is not. You can see that wizzardo's engine is at the top, but one need to remember that main difference of wizzardo-http is that it fixes linux problem with async io. So it is not about lanugage, it is about OS optimization. And if we run those examples on Windows, the results could be quite different (It had async io suuport for a long time).
k
Vertx beats most Java frameworks and has always been in the top 10. Uses async await concept too
a
Yeah. I mean that if we look at Ktor it is not that up the winner lists, but it relies on on Java-nio so it is quite possible that it is not that fast because java-nio lacks optimizations for linux. Also I agree, that those comparisons are useless in the real life.
k
AFAIK, vert.x also relies on NIO. It's an old time tested framework though...
The comparisons on that site are probably some of the better ones...each framework can write their own benchmark or improve the one there. And the basic tests are common parts of a backend.
s
But there are other java/kotlin frameworks near the top. Jooby, http4k, ratpack, hexagon, micronaut, dropwizard.. most of them not using reactive model
a
Reactive model is important for disk IO, otherwis it is not that important.
s
or network io, or db io, or any io. but still, non reactive apps in the java world, written well, perform very very good
a
Of course. Reactivity is a compromised term. We should call it asynchronous. Usually you want your code to be asynchronous to avoid thread blocking, but you can do that with good old callback style. Tools like coroutines just make it simpler. By the way, ktor io core is not based on coroutines, it is a classic blocking API.
j
Someone should provide a Drogon intregration with Kotlin Native… It could be Drokon (or Drokot)
c
why do you think that ktor core is blocking? its definately not.
a
I said IO core. Unless they changed something dramatically since kotlinx-io fork, operations on Input and Output are blocking.
c
and IO being socket IO?
a
c
seems it can do blocking and non blocking
a
There are no callbacks so it uses nio in a blocking way. I am not saying that there should be necessary blocking code, I just say that it is not necessary non-blocking.