First milestone reached

Ktor 1.0 is here – Built from the ground up using coroutines

Eirini-Eleni Papadopoulou
© Shutterstock / Edward Parker  

We are already familiar with Ktor but it is time to welcome it officially with this first milestone release. Ktor 1.0 is live so let’s waste no more time and see what it has to offer.

We first learned about Ktor 1.0 beta with the release of Kotlin 1.3 but now it’s time to see the results of the team’s hard work!

Ktor 1.0 is here.

In case you haven’t heard the news, “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.”

With no further ado, let’s see what Ktor 1.0 brings.

Server – Provides a rich and easy-to-use extensibility mechanism, on top of which most of the built-in functionality is implemented. Third-party features look no different from the built-in ones. Out of the box, Ktor includes all the essential features like sessions, authentication, JSON serialization, popular template engines, Web sockets, metrics, and many others. It also supports a productive development workflow, with a fast start, automatic reloading, and easy-to-use facilities for writing unit and integration tests.

SEE ALSO: Kotlin 1.3 is out: Coroutines graduate to stable, plus betas for Kotlin/Native & Ktor 1.0

Client – Built using the same coroutines and IO primitives that drive the server. This makes it perfect for building asynchronous microservice architectures, connecting all the backend functionality into asynchronous pipelines. The client is implemented as a multiplatform library, which currently supports JVM, JS, Android, and iOS. This makes it possible to retrieve data on mobile devices and web pages in a uniform way, without blocking application execution or building complex chains of anonymous functions to handle successes or failures.

Tools – You can now select the features you need and get a fully working starter app with Ktor. This works both on the Web and via a plugin for IntelliJ IDEA.

Here’s how ‘hello world’ looks like:

fun main() {
    embeddedServer(Netty, port = 8080) {
        routing {
            get("/") {
                call.respondText("Hello World!")
    }.start(wait = true)

Getting started

Ktor is free and open-source and it’s available on GitHub. You can check out the quickstart guide here.

For more information on the tool, you can have a look at the extensive documentation for writing servers and clients here and here.

Eirini-Eleni Papadopoulou
Eirini-Eleni Papadopoulou was the editor for Coming from an academic background in East Asian Studies, she decided that it was time to go back to her high-school hobby that was computer science and she dived into the development world. Other hobbies include esports and League of Legends, although she never managed to escape elo hell (yet), and she is a guest writer/analyst for competitive LoL at TGH.

Inline Feedbacks
View all comments