As we work on Kotlin, we implement many features that help build idiomatic and high-performing APIs. We’ve been dreaming of seeing a Web framework that utilizes these features to the max. Today, we can finally say we’ve built that kind of framework! Please welcome Ktor, which has just reached 1.0.
Ktor is a Kotlin framework for building asynchronous servers and clients in connected systems. It is being created by the Kotlin team, and as such, it takes full advantage of the language in order to provide a great developer experience and excellent runtime performance.
Ktor is built from the ground up using coroutines, which make it possible to express complex asynchronous constructs as if they were simple sequential code. Coroutines are also quite efficient at runtime. In addition, the use of Kotlin features allows us to provide a domain-specific language (DSL) — a concise and developer-friendly API for configuring your application with no magic, just code.
Of course, Ktor is not the only option for building server-side applications in Kotlin. We’re pleased to see that other frameworks such as Spring and Vert.x are providing first-class support for Kotlin, and using these frameworks is a great way to preserve your existing investment and experience. At the same time, Ktor offers unique advantages thanks to its use of coroutines and DSLs, which makes it a great option when you’re starting a new backend project or a microservice. Learn more