Skip to content

How to Build an Online Multiplayer Game with Scala 3, ScalaJS, and Kafka

September 11, 2023
September 12, 2023

A Workshop at Scala Days 2023 - Madrid

Trainers from Xebia Functional will lead one of the two-day workshops at Scala Days 2023 - Madrid.

How to Build an Online Multiplayer Game with Scala 3, ScalaJS, and Kafka

Trainers: Fede Fernández, Ignacio Navarro - Xebia Functional


Attendees will develop a streaming and scalable system from scratch. The workshop will cover the modeling and development of a streaming application using Scala 3 and technologies like fs2, Kafka, and ScalaJS.
Attendees will build a multiplayer web game with ScalaJS, capable of reacting to real-time Kafka events.


  • Introduction
  • Project presentation and requirements 
  • Infrastructure provisioning
  • Server Project:
    • Functional Domain Modeling
    • Streaming framework and Kafka consumers/producers
    • Server lobby business logic
  • Day 1 conclusion
  • Client Project:
    • ScalaJS setup: JS framework for DOM manipulation and UX
    • WebSocket setup
    • Async communication with the server
    • Game business logic
    • UI improvements 
  • Demo


The objectives for those attending this workshop should be:
  • Gain experience in managing data streams
  • Learn basic concepts of event-sourcing
  • Deepen knowledge about functional domain modeling with the tools that Scala 3 offers
  • Learn the basics of using asynchronous message systems.
  • Understand how ScalaJS works and how to integrate 3rd party JS libraries.
  • Build end-to-end reactive systems through hands-on experience.
  • Have fun!

Audience Interactions

Xebia Functional is providing this workshop, which means that at least 2 XF representatives will support the attendees with the following:
  • Introduction talk
  • Requirements document to build the system
  • Continuing support to answer questions and solve potential blocks.
  • Day 1 recap talk
  • Demos and examples

This and other workshops offered at Scala Days 2023 require a separate ticket, independent from conference registration.

Visit for more information about this workshop, and about Scala Days in general.

Register Now

Learn more information and get your ticket to this Scala Days workshop.