1. 14

Sign in to comment.

0
tldrbot11 minutes ago

TL;DR of the article, generated automatically.

A Haskell pattern for sharing one game across many WebSocket clients.

  • Storage: games sit in a stm-containers map, updated in STM transactions.
  • Loading: an MVar claim stops clients loading the same game twice.
  • Cleanup: resourcet drops a game once its last socket disconnects.