Motivation
I picked up chess as a hobby during lockdown and I’ve since developed into a comfortably amateur (crap) player. I’m curious to learn about the technology that allows for containerised apps to “pop into existence” when two clients are paired for a game, or an analysis engine is required temporarily as I assume happens on certain chess sites. This is a common infrastructure pattern called “Ephemeral computing”, where containers and their compute resources are created on demand to perform a task and then destroyed. I’ll be using Kubernetes to orchestrate and Docker to containerise.
My goal with this series is to deploy an ephemeral compute engine where I can play against stockfish through a web ui, hosted on my Raspberry Pi. I could more easily do this via Docker but my idea is to get some experience with container orchestration - I admit that I’m overengineering this!
My longer term aim is to develop a chess engine myself and securely deploy it over the internet as a piece of portfolio work for ML which would directly require ephemeral computing; if I were to do that now that would be a bit like learning how to drive whilst learning how to build the car I’d be driving in.
So a success here will look like:
- A very simple front end that renders the initial login window and then renders the board after authentication
- I’m setting up auth so that I can deploy this over the internet without being immediately DOSd
- A backend that handles the authentication and then calls K8s for the assignment of a pod/job (not decided which is more appropriate)
- A database to preserve game state
- All of these containerised with Docker
Over these coming posts I’ll explore and document the challenges I face and how I overcome them.