Get the latest tech news

Running a million-board chess MMO in a single process


How one million chessboards works

Moves are fed into a go channel (roughly a threadsafe queue), where a single writer validates them (making sure they follow chess rules), applies them, and distributes them to the relevant clients. To deal with this for One Million Chessboards, I use reservoir sampling (which I learned about from my friend Sam’s phenomenal blog post13) to place new players next to someone who has made moves within the last few seconds - that way there’s some activity when you join. I wasn’t able to record similar footage for One Million Chessboards; even with a thousand players online it didn’t feel like there were lots of people on the site.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of MMO

MMO

Photo of single process

single process

Photo of board chess MMO

board chess MMO

Related news:

News photo

Zenimax Online Studios head Matt Firor announces departure, following widespread layoffs and the cancellation of in-development MMO

News photo

The appeal of serving your web pages with a single process

News photo

Looks like Horizon's unannounced MMO has been quietly cancelled