Ktor 3.0, the latest version of the Kotlin-based framework for building asynchronous client- and server-side applications, is now available. Ktor 3.0 transitions to: kotlinx.io
A library for processing data sources. This release also highlights support for Server Sent Events (SSE).
JetBrains Ktor 3.0 technology, released on October 10, can be accessed at start.ktor.io. The biggest change in version 3.0 is the switch to the kotlinx.io multiplatform library. This library provides a multi-platform API for handling data sources and provides features including working with files, using compression, and more. that kotlinx.io
The library also reduces unnecessary byte copying between ByteReadChannel
, ByteWriteChannel
and network interface. This allows for more efficient byte conversion and parsing, leaving room for future performance improvements.
SSE is now supported on both servers and clients. With SSE, the server pushes the client over an HTTP connection, and SSE provides a one-way communication channel. This approach is useful in scenarios where the server needs to send event-based updates without the client having to repeatedly poll for new information.