Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KTor or Spark? Which is production ready for Kotlin web services? [closed]

Tags:

java

rest

kotlin

I am writing an enterprise web service application using Kotlin. I am now using KTor since it is async and high performant But as you may know, Ktor is somewhat young, and the feature 'coroutine' is experimental in Kotlin! Is it wise to use Ktor anyway?

like image 294
Kamyar Avatar asked Jul 04 '17 20:07

Kamyar


1 Answers

Despite the experimental status, Kotlin coroutines are fully released and guarantied to work far in the future.

The experimental flag is mostly for library writers. Since you are doing an application, there will be no problem in using coroutines even after the final version is released. Your code will continue to work with the kotlinx.coroutines.experimental library, that's it.

As for the Ktor, then I can say that what it does it does well. Since it is a relatively light framework, I would not expect any bugs from it. So, if you like its API, there is no reason not to use it. After all, the integration with Kotlin is far beyond that of Spark.

like image 71
voddan Avatar answered Nov 03 '22 19:11

voddan