Skip to main content
DB

Drivers & integrations

Drivers and protocol

How clients reach a NYXDB node — HTTP and WebSocket routes and the TypeScript client.

A node speaks two transports on its client listener: HTTP for session exchange, one-shot SQL and bulk writes, and a multiplexed WebSocket session for everything else, including streaming reads.

TypeScript client

@nyxdb/client runs in browsers and Node and covers the whole public protocol:

  • decodes the HTTP result document nyxdb.query-result/2 and the WebSocket exact result batches, keeping every value lossless (integers as bigint, decimals with their precision and scale, binary values as Uint8Array);
  • exchanges a bearer for a session, and logs in with a password or an API key when the node has an issuer;
  • sends bounded write batches and resumable bulk-load frames;
  • multiplexes independently cancellable queries over one WebSocket session, replenishes demand and reports progress;
  • decodes system relations, including the federation relations.

It sends a password or API key only over https://, or over http:// to a loopback host, and it never follows an HTTP redirect.

On this page