Featured in Architecture & Design

Monal Daxini presents a blueprint for streaming data architectures and a review of desirable features of a streaming engine. He also talks about streaming application patterns and anti-patterns, and use cases and concrete examples using Apache Flink.

Featured in AI, ML & Data Engineering

Joy Gao talks about how database streaming is essential to WePay's infrastructure and the many functions that database streaming serves. She provides information on how the database streaming infrastructure was created & managed so that others can leverage their work to develop their own database streaming solutions. She goes over challenges faced with streaming peer-to-peer distributed databases.

Kotlin 1.2 Introduces Multi-Platform Projects

The latest version of Kotlin makes it possible to share code for the JVM and the JavaScript platform using multi-platform projects. Additionally, it includes a number of language and library improvements, and better compiler performance.

After introducing support for the JavaScript target in Kotlin 1.1, Kotlin now brings developers the possibility to easily manage projects meant to run both on the JVM and the JavaScript platforms. In future, support for native binary will also be included thanks to Kotlin Native.

The basic idea with multi-platform projects is organizing your modules into a set of common and platform-specific modules. Platform-specific modules contain code that either runs on the JVM or on JavaScript and can freely access platform-specific libraries. For each platform-specific module, a common module shall exist that provides so called “expected declarations”, i.e., declarations that must be implemented in the platform-specific module. Thanks to this mechanism, you can call platform-specific code from platform-independent code. While common modules can only contain Kotlin code and use Kotlin libraries, platform modules can also contain code in either Java or JavaScript and are compiled into target-specific format.

As an example of this here, is how you can define a common module and its corresponding platform module:

On the language front, Kotlin 1.2 provides improved smart casts and type inference in certain cases; a new kotlin.math package in the standard library; and new standard library functions to work with sequences and collections.

As a last note, Kotlin’s compiler has become significantly faster in version 1.2, outperforming Kotlin 1.1’s by 25%. Further improvement is planned for future minor releases of 1.2.