Alexander Sysoev | KotlinConf 2024, May 22–24, Copenhagen
all speakers

Alexander Sysoev

Alexander Sysoev

Software developer at JetBrains

I studied for my Bachelor of Computer Science degree at the ITMO University in Saint Petersburg. I started to work at JetBrains after my second year. I joined the company as an intern in the Space project. I've been with the company for over 2 years and now I'm developing a new RPC library for Kotlin and working to provide better tooling for the Ktor project.

kRPC – a brand new approach for multiplatform RPC

kRPC is a multiplatform library that allows its users to easily set up RPC (Remote Procedure Calls) services for their needs. The talk will be divided into two parts: library APIs overview and how they can be used and the internals of how it all was achieved.

A brief description of the first part: The library is purely Kotlin, and that is more than just being written in Kotlin - we use native language constructs to represent the work with the network. For example, we use Kotlin interfaces to declare a service and then we use its implementation to provide server functionality. This makes the setup very straightforward and also works for seamless navigation in your IDE. We utilize the power of Kotlin Multiplatform to provide the best code-sharing experience. We use suspend functions to make network calls and use built-in coroutines cancellations to cancel requests. We forward exceptions from the server and form the stacktrace as there were no intermediate steps in between. And many more.

In the second part we will talk about the internals of the library: how we use Kotlin compiler plugin to generate code for services, how we provide compatibility with more than 14 stable versions of the compiler for every version of the library, and some other interesting nitpicks!

All of this will familiarize the audience with the library and will give them the knowledge of how to start using it in their projects, making their network code even more concise and easy to understand. The audience will have a brief knowledge of how it all works internally without the need to dive deep into the source code.