Reflekt: a Library for Compile-Time Reflection in Kotlin

02/12/2022
by   Anastasiia Birillo, et al.
0

Reflection in Kotlin is a powerful mechanism to introspect program behavior during its execution at run-time. However, among the variety of practical tasks involving reflection, there are scenarios when the poor performance of run-time approaches becomes a significant disadvantage. This problem manifests itself in Kotless, a popular framework for developing serverless applications, because the faster the applications launch, the less their cloud infrastructure costs. In this paper, we present Reflekt - a compile-time reflection library which allows to perform the search among classes, object expressions (which in Kotlin are implemented as singleton classes), and functions in Kotlin code based on the given search query. It comes with a convenient DSL and better performance comparing to the existing run-time reflection approaches. Our experiments show that replacing run-time reflection calls with Reflekt in serverless applications created with Kotless resulted in a significant performance boost in start-up time of these applications.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/04/2017

Introspection for C and its Applications to Library Robustness

Context: In C, low-level errors, such as buffer overflow and use-after-f...
research
01/30/2013

Evaluating Las Vegas Algorithms - Pitfalls and Remedies

Stochastic search algorithms are among the most sucessful approaches for...
research
04/07/2021

Top Score in Axelrod Tournament

The focus of the project will be an examination of obtaining the highest...
research
02/14/2020

Sub-method, partial behavioral reflection with Reflectivity: Looking back on 10 years of use

Context. Refining or altering existing behavior is the daily work of eve...
research
07/30/2018

Comparison of Production Serverless Function Orchestration Systems

Since the appearance of Amazon Lambda in 2014, all major cloud providers...
research
12/18/2015

The interface for functions in the dune-functions module

The dune-functions dune module introduces a new programmer interface for...
research
02/20/2020

LibrettOS: A Dynamically Adaptable Multiserver-Library OS

We present LibrettOS, an OS design that fuses two paradigms to simultane...

Please sign up or login with your details

Forgot password? Click here to reset