ParlorNet
Turn-based game server for any computer, old or new
Clients | Protocols | Browsers | Telnet programs | Docs | Source

Architecture and layers (draft 0)

Four layers. Each talks only to the one below it through a narrow interface.

  1. Games (plugins, docs/plugins.md): rules and state only. They know nothing of sockets, users, servers or federation. Pure functions in, state and events out.
  2. Table host (the core server): owns tables. Each table is one game instance, and the server hosting it is authoritative for it: it runs the plugin, orders moves, keeps the log, ends the game. Servers host whatever games they choose. The core knows seats and players as opaque ids; it knows no transport.
  3. Transport layer: moves requests and events between players (or other servers) and the table host. Everything that is not a game or a table lives here, as separate swappable pieces:
  4. the 8-bit line protocol on a TCP port (docs/protocol.md),
  5. bridges (TLS, modern identity, rate limits) for the open internet,
  6. server-to-server federation (see below),
  7. server extensions (docs/adapters.md): web, telnet and game-network extensions, each speaking one protocol to players' frontends; they run beside the server but are not part of it.
  8. Notification layer (punted): human-readable reach-outs such as "it's your turn", via ActivityPub/Mastodon posts, email or anything else. Optional and separate; it observes table events and is never part of game or federation traffic. Nothing is designed here yet.

Identity and the extension channel

Who a connection is belongs to one component, the accounts component (parlord/accounts.py), which runs the operator's sign-in method (parlord/auth.py) and owns sessions. Neither the table host's game code nor any server extension checks a credential or keeps one. docs/security-design.md has the threat model; in short:

Frontends and server extensions

Federation is not notification

Rules of the seams

This doc on GitHub


 These pages cover every ParlorNet server. | Source code | ParlorNet is free software.