How we use Kotlin for backend services at Zalando
Zalando moved Kotlin from TRIAL to ADOPT on its Tech Radar, making it the third supported JVM language alongside Java and Scala after 100+ new Kotlin applications were written in a year. A Kotlin Guild with 250+ members produced guidelines, templates and default tooling recommendations for backend services. These defaults include Spring Boot (with Ktor as a rising option), Gradle with Kotlin build scripts, ktlint, kotlin-logging, Lettuce for Redis, JPA or jOOQ for relational databases, and opentracing-toolbox. APIs are defined in OpenAPI and linted with Zally, and auth is handled at the Skipper ingress rather than with Spring Security.
Related posts
- From zero to 10 million lines of Kotlin
Meta Engineering mediumAdeptMeta has converted its Android codebase to over 10 million lines of Kotlin by wrapping JetBrains' J2K converter in an automated pipeline called Kotlinator. The pipeline preprocesses Java packages, runs J2K headlessly through Android Studio, then applies automated refactors and linters built on the Kotlin compiler's PSI AST. Those refactors fix issues such as JUnit @Rule annotations needing @JvmField or @get:Rule, and replace TextUtils.isEmpty with isNullOrEmpty. Meta chose a full conversion over Kotlin-for-new-code-only to avoid platform-type null risks from Java interop. Results: about 11% fewer lines, no runtime performance regression in A/B tests, negligible APK size impact after Proguard/Redex, and longer build times as the main cost.
- Kotlin Multiplatform in Production: Two Real-World Use Cases from Booking.com
Booking.com Engineering mediumAdeptBooking.com applied Kotlin Multiplatform in two production cases: a shared experimentation library replacing drifting Java/Kotlin and Objective-C implementations, and a Compose Multiplatform (Kotlin/JS) web playground that renders the real Android BUI design-system components in a browser. The experimentation library ships as a Gradle dependency on Android and an XCFramework via CocoaPods on iOS, and was validated by running old and new implementations side by side behind experiment flags. During that parallel phase iOS saw roughly +140 ms p90 startup and +2.5 MB download size, but startup improved once the legacy code was removed, which shows migration-time performance data can mislead. iOS engineers were brought on board through an evaluation framework with an explicit exit ramp, and some later became contributors, though Xcode's lack of Kotlin support remains a tooling gap.
- Translating Java to Kotlin at Scale
Meta Engineering mediumAdeptMeta is translating roughly ten million lines of Android Java to Kotlin using the Kotlinator, an automated pipeline built around a headless version of JetBrains' J2K. It runs six phases: a deep build, about 50 preprocessing steps, headless J2K, about 150 postprocessing steps, linters with autofixes, and fixes driven by compiler errors. A daily cron system produces the conversion diffs for human review. Null safety comes first, because Kotlin inserts runtime null checks at the Java interop boundary, so the Kotlinator errs toward nullable types to avoid introducing new NPEs. Meta is also working with JetBrains to add extension hooks to J2K for better symbol resolution and to open-source some of its steps.
- How we use GraphQL at Europe's largest fashion e-commerce company
Zalando Engineering easyNoviceZalando replaced a sprawl of per-page and per-platform Backend-for-Frontend services with a single unified GraphQL API owned via a shared monorepo across 12+ domain teams. The BFFs had duplicated effort, fragmented security and observability, and produced inconsistent data across web and app. The graph is built on Entities such as Product and Campaign and runs on their own GraphQL engine, graphql-jit, under a strict no-business-logic rule. Since 2018 it has grown to serve over 80% of web and 50% of app use cases, with adoption driven by documentation, training and schema consultation, and god-component risk handled through contribution principles, circuit breakers, timeouts, retries and per-platform bulkhead deployments.
- Extending Anvil for Fun and Profit
Slack Engineering hardMasterSlack's Android app replaced dagger-android activity injection with a custom Anvil code generator: annotating an activity with @InjectWith(scope) generates an AnvilInjector wrapping Dagger's intrinsic MembersInjector plus a @ContributesTo binding module that adds it to a scope-level multibinding map. BaseActivity looks up the injector from the scoped component in onCreate() and calls inject(). Built on Anvil 2.3.0's compiler-api, it runs inside kotlinc with no kapt or dagger-android-processor, avoids runtime reflection, and generalizes to any member-injected type such as services and jobs. Anvil's factory generation alone cut incremental build times by up to 25%.