Skip to content

Milestone: Airframe 22 #2006

@xerial

Description

@xerial

Airframe Development Roadmap for 2022 Airframe Roadmap

We only have three major goals for 2022: RPC, Documentation, and Scala 3.

Finalizing the RPC Framework

Airframe RPC has been battle tested and becomes comfortable enough for building production applications. It's time to standardize RPC programming, error handling, logging, etc. If you are interested see also the presentation: Unifying Frontend and Backend Application Development with Scala (ScalaCon 2021) (slides)

Better Documentation

So far, we only have documentations for individual modules and these documentations are bit isolated. To have a comprehensive view of these modules, we need a walk-through documentation so that we can learn how to build applications using Airframe starting from logging, web application development, RPC, runtime DI, building UI with Scala.js, etc. #2169

Better Scala 3 Support

Related: #1077

Scala 3 does not fully support runtime-reflection. Airframe is heavily using airframe-surface (e.g., Surface.of[X]) to extract type information (constructor parameters, generic types, alias, and public methods) at runtime.

There are several challenges:

The usage of runtime-reflection in Airframe is quite limited and it already can support Scala.js, so even if we only use compile-time only macros for extracting type information, there should be no major obstacles. Some redesign of Surface (or recreation as a new module) might be necessary to effectively limit the scope of Surface.

Details: How Is Surface loaded from a given class?

A notable usage of runtime-reflection in Airframe is Surface.ofClass(cl), which is used in AnyCodec for resolving Surface from a given class:

This feature is added in #1098 and used for encoding RPC argument classes in the logs. Another usage is scanning Route classes in airframe-http for finding RPC APIs from the class path.

To avoid using runtime-reflection, we need a way to pre-register Surfaces of these classes that need to be serialized. An approach for providing runtime-reflection for Scala 3 can be found in https://github.com/gzoller/scala-reflection, but without a help from Scala compiler plugin, the performance for looking up type information will be quite slow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    roadmapMajor milestones

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions