Skip to content

Architecture overview ​

Meris has three moving parts: the app server, the workers on contributor machines, and Postgres. There is no blockchain in the request path and no token.

text
 AI labs                         app.meris.network                         contributors
 ──────────                      ─────────────────                         ────────────
                     ┌───────────────────────────────────────┐
 lab code   ──HTTPS──▶  /v1 compute   ──▶ scheduler ──▶ registry ◀──WebSocket── worker ──▶ GPU
                     │      │                                 │            (outbound only)
 browser  ───HTTPS──▶  dashboard + /api                       │
                     │      │                                 │
                     │      ▼                                 │
                     │  Postgres: users, workers, jobs,       │
                     │  credits, payouts, hourly rollups      │
                     └───────────────────────────────────────┘

App server ​

One Node.js process serves everything at app.meris.network:

  • /v1: the compute API labs use to rent GPUs.
  • /api: the dashboard's JSON API (accounts, pairing, settings, analytics) and the worker pairing endpoint.
  • /api/worker/ws: the WebSocket every worker keeps open.
  • /install.sh, /install.ps1, /downloads/meris-worker.mjs: the worker and its installers.
  • Everything else: the dashboard, a React single-page app.

Workers ​

A worker is a Node.js program on a contributor's machine. It opens one outbound WebSocket to the server; it never listens on a port, so it works behind home routers and NAT without configuration. Over that connection it reports its GPU and its state every five seconds. See Worker protocol.

Registry and scheduler ​

The server keeps every connected worker in memory: its VRAM, allocation, current jobs and whether it is paused or busy. When a lab submits a job, the scheduler matches it against this registry with no database round trip.

Postgres ​

The database is the source of truth for money and history:

TableHolds
users, sessionsAccounts (linked to a Privy user), allocation settings, totals earned and spent
workers, pair_codesPaired machines (only a hash of each device token), one-time pairing codes
api_keysLab API keys (only a SHA-256 hash of each key)
jobsOne row per piece of work: GPU, duration, price split. No lab code or data.
credits, payoutsMoney in from labs, money out to contributors
network_hours, network_samplesHourly totals and five-minute samples of GPUs online, for analytics

See Ledger and analytics for how these add up.