/plushcap/analysis/temporal/temporal-the-making-of-temporal-trivia

The Making of Temporal Trivia

What's this blog post about?

In Spring 2023, Temporal held its second annual Hackathon where a team of three solution architects developed a trivia game using Temporal and incorporating ChatGPT for question generation. The game was designed to scale to millions of users, support multiplayer and unlimited games, built with polyglot languages, maintain game state and durability when things break, have a timeout mechanism for questions, provide a single source of truth for game logic, and be accomplished in just a few hundred lines of code. The backend infrastructure was implemented using two workflows: GameWorkflow and AddPlayerWorkflow. Two frontend versions were created - the first one used SMS to join games and make one player host on their computer, while the second version added browser support for both desktop and mobile users. Key learnings included keeping logic in one place, using two workflows instead of one, implementing moderation, iterating with small pieces to create an MVP at each stage, and optimizing performance through synchronous Workflow Updates. The game is available on GitHub and a hosted version for playing.

Company
Temporal

Date published
Aug. 30, 2023

Author(s)
Solution Architect Team

Word count
1478

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.