Kotlin-based web framework introduces a new command-line tool to create projects and enhances server-sent events with serialization, reconnection, and heartbeat features.
JetBrains’ Ktor 3.1.0, an update
The 3.1.0 version, described by JetBrains as a minor release, was unveiled February 13. Instructions on getting started with Ktor can be found at ktor.io.
The new Ktor CLI tool offers an easy-to-use interface to generate project templates with the user’s preferred features, reducing boilerplate and setup times, JetBrains said. Running the ktor new command
Also in Kotlin 3.1.0, server-side events (SSE) support has been upgraded with built-in serialization for both client and server, enabling them to handle SSE streams with automatic serialization and deserialization. SSE support
now includes the ability to specify a heartbeat event to keep a session active, and the ability to enable a reconnection feature by setting the maxReconnectionAttempts property to a value greater than zero. If the client’s connection to the server is lost, it will wait for a specified reconnectionTime, then make maxReconnectionAttempts to reestablish the connection.
Explore IT Tech News for the latest advancements in Information Technology & insightful updates from industry experts!
Source : https://www.infoworld.com/article/3824315/jetbrains-ktor-adds-cli-for-simpler-project-creation.html