
node.js vs. kotlin as a server side development - idreamer
Hello.<p>I have developed services with nodejs and I wonder a performance comparison between nodejs and kotlin as a server side development.
======
vikingcaffiene
Want to first say that I've been using and working professionally with node
since v0.10. I love it and don't want to give the impression that I am a hater
at all.

That said, at my place of employment I am currently in the middle of migrating
OFF a node server (your typical express stack) to a Kotlin/Spring based one. I
think I have the perspective you want in other words.

My recommendation is use Kotlin. Its fast, interops with the entire Java
ecosystem and all its libraries, has a fantastic and sane type system (think
TypeScript on steroids) and fantastic tooling. Its also pretty easy to pick
up. I had never worked with it before and I was up and running on day one with
it.

------
gervu
This article hits most of what I'd have to say on and around a question like
this. It does discuss Java, not Kotlin, but Kotlin is JVM so it really doesn't
change the answer meaningfully.

[https://rclayton.silvrback.com/speaking-intelligently-
about-...](https://rclayton.silvrback.com/speaking-intelligently-about-java-
vs-node-performance)

------
s4n1ty
If you're thinking about web development in Kotlin, check out
[https://kweb.io/](https://kweb.io/).

It takes full advantage of powerful Kotlin features like coroutines to make
the barrier between browser and server almost invisible.

------
sidcool
I would go with Kotlin 90% of the time. It's faster, has better syntax, strong
type checks, great ecosystem and community (Jetbrains, Spring, Google support
it). It has some wicked cool Reactive support and scales pretty well. So I
would go with Kotlin.

Unless, you want to build a prototype and do not know the language. NodeJS may
help you get started quickly.

------
taf2
this page might help
[https://www.techempower.com/benchmarks/](https://www.techempower.com/benchmarks/)

But is raw cpu time really what matters most for you or solving a problem in
away that can be scaled and maintained in away that you understand maybe more
important?

------
supergilbert
Kotlin is easier to work with for large projects. You're less inclined to
write messy code than JS.

------
pepper_sauce
If you make use of the NPM ecosystem you are inviting security holes into your
product. Stay away.

------
nullwasamistake
In general, Kotlin is 5-10x faster than JS and uses 1/2 the memory.

The speed difference depends on what you're doing, but I would guess it's rare
to find situations where Kotlin is less than twice as fast

