The web framework is created in Kotlin and runs server-side on the JVM, while the client is a multiplatform project.
Coroutines are an approach to writing non-blocking asynchronous code, which is particularly beneficial in network applications with unpredictable response times. In simple terms, the routines may interrupt their flow, for example, waiting for the transmission of a file over the network without blocking the active thread. In Kotlin, coroutines since the end of October version 1.3 are considered stable after they were previously one and a half years experimental part of the programming language.
Server and client
The HTTP server part relies on the interaction with systems such as the web server Jetty or the client server framework Netty or Java Servlets. In combination with Jetty or Netty Ktor should already be able to process incoming connections one second after the start. Ktor relies on a slim core, which can be supplemented by extensions. The framework inherently includes JSON serialization and Web sockets. The server is currently limited to the Java Virtual Machine (JVM). It can be integrated into application servers such as Tomcat as well as in desktop or even Android applications.
Tools and documentation
Ktor is an open source project under the Apache 2 license. To create applications for the framework, there is a plug-in for the development environment IntelliJ IDEA, also from JetBrains. In addition, the creators have created a web-based generator for Ktor projects . A QuickStart guide is designed to help developers get started. In addition, there are numerous example projects .