Building an open source Scala gRPC/REST HTTP Proxy for Kafka (II)

Tom Lous
6 min readMar 17, 2021

Day 1 of the journey on building my first Scala GraalVM ZIO application

» Day 0
» Day 1

Continued from Day 0

The Iron Rolling Mill — Adolph Menzel

Day 1: Getting builds under control

Now that we have a basic project setup and somewhat building, we need to stabilise it a bit more, so we can spend all our future energy on actually writing the code. This means CI/CD, dockerising, versioning, but more important getting the binary stable on *nix and mac environments. This means diving deeper into GraalVM and it’s available build tools. So far we (the native packager) only used the native-imagetool from graal, but we need a way to start defining the scala/java reflections via the native-image-agent
Fortunately reflections are not encouraged in Scala and many libraries have few, but few is not the same as none.

Local & remote

As we’ve seen we can build the native image locally (on mac) if we do all these prerequisite steps, but I just discovered this awesome sbt library, sbt-native-image, that basically does everything for you, downloading all binaries using coursier, without needing to install & run graal and subsequent tools project local. This would have saved me a…

--

--

Tom Lous

Freelance Data & ML Engineer | husband + father of 2 | #Spark #Scala #ZIO#BigData #ML #Kafka #Airflow #Kubernetes | Shodan Aikido