Kingdom Server! Tutorial
Key point
The Kingdom Server team unveiled a systematic 3-stage onboarding system for developers unfamiliar with Scala functional programming.
Details
The Kingdom Server team operates a functional programming (FP) codebase based on Scala, and has introduced a systematic onboarding process for new hires lacking FP experience. This guide aims to lower the technical barrier and help newcomers quickly adapt to the development process.
3-Stage Learning and Practical Application
The onboarding consists of three main stages. First, in Stage 1, participants learn basic Scala syntax and Immutability, the core of FP. Unlike state mutation in imperative languages such as Java, they learn how Scala guarantees consistent output for given input through pure functions and controls side effects.
In Stage 2, participants understand the actual code structure, ZIO and ZPure. ZPure is a pure computation layer fully isolated from side effects, likened to a 'cooking recipe', while ZIO is the Effect layer responsible for actual execution such as DB queries or network communication. This Tri-Z structure contributes to increasing the predictability of logic and minimizing bugs.
In the Final Stage, participants write code directly for the live service. Instead of being immediately assigned to complex episode content development, new hires grasp the system context by writing Unit Tests and Scenario Tests for specific features such as the 'Wish Tree'. They then build practical skills through small bug fixes and work on data validation logic.
Strengthening Practical Skills and Deployment
In the practical application stage, participants learn to leverage ZIO's Lazy Evaluation characteristics to implement random value generation or shuffle logic so that it is determined at execution time rather than at declaration time. After writing code, it goes through QA and review before being deployed to the live server; after deployment, developers discuss unexpected issues, such as currency payout errors, with the planning team and carry out follow-up responses. Through this process, developers naturally acquire not only technical competence but also the team's direction and collaborative culture.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.