KTor or Spark? What products are ready for Kotlin web services?

I am writing an enterprise web service application using Kotlin. I am using KTor now as it is asynchronous and highly efficient. But as you know, Ktor is somewhat young and the "coroutine" function is experimental in Kotlin! Is it right to use Ktor?

+3


source to share


1 answer


Despite the status experimental

, Kotlin coroutines are completely exempt and are guaranteed to work in the future.

The flag is experimental

intended mainly for libraries. Since you are making an application, there will be no problem using coroutines even after the final version is released. Your code will continue to work with the library kotlinx.coroutines.experimental

so that it is.



As for Ktor, I can say that he does it well. Since this is a relatively lightweight structure, I would not expect any errors from it. So, if you like its API, there is no reason not to use it. In the end, the Kotlin integration is far superior to the Iskra integration.

+2


source







All Articles