Friday, 23 November, 2018 UTC


Summary

The web framework is created in Kotlin and runs server-side on the JVM, while the client is a multiplatform project.
Czech toolmaker JetBrains has released version 1.0 of Ktor, a framework for asynchronous client and server applications. It uses coroutines for complex asynchronous operations and brings its own DSL (Domain-specific Language) to configure. While server applications run on the JVM, developers can additionally compile clients into JavaScript.
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.
The client is implemented as a multi-platform library and can be used, among others, in the JVM as a mobile application for iOS or Android as well as in JavaScript. Kotlin has been providing cross-platform projects since version 1.2 to address JavaScript in addition to the JVM. Regarding the coroutines and I / O architecture, the base is the same as the server part.

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 .
Source: https://www.heise.de/developer/meldung/JetBrains-veroeffentlicht-Ktor-1-0-fuer-asynchrone-Server-und-Clients-4225724.html

Share This:

The post JetBrains releases Ktor 1.0 for asynchronous servers and clients appeared first on FrontNet Blog.