TicTacToe — the smallest real-time game server

manual peer connection · client STREAMs directly to Play

TicTacToe — the smallest real-time game server manual peer connection · client STREAMs directly to Play client · Architecture component client Api A · Architecture component Api A Api B · Architecture component Api B Play A · session · actor · room · Architecture component Play A session · actor · room Play B · session · actor · room · Architecture component Play B session · actor · room Location Store · Architecture component Location Store HTTP create room create room Spot STREAM direct connect manual peer · milestone LM location lookup

Connection flow

  • • With no separate Session server, each Play owns the stream session · actor · Entry Spot · room Spot together
  • • client creates a room over HTTP via Api → Api creates a room User Spot on Play
  • • client connects directly to each Play by STREAM using the Play endpoints it got from Api (emphasis)
  • • the dashed path to Api B / Play B is the alternate route · the second player's share

peer · location

  • • Play A ↔ Play B is a manual peer connection (bidirectional) — publishes the win-count milestone by Logical Multicast
  • • room·actor location is resolved by Location Store lookup (dashed) — only the connection between nodes is manual, object location is resolved by the store