Skip to main content
Design document, not shipped code. adapters/web2, adapters/web3 and adapters/legacy each contain a single doc comment and no implementation. Nothing on this page can be configured or run today.What does exist is the contract they will implement: the Adapter trait in ntl-core (spec/adapter-contract) is real, normative and tested. This page describes the intended behaviour on top of it, and the configuration keys below are proposed rather than parsed — no [adapter.*] table is read by any binary.Tracking: openNTL/ntl#14.
The Web2 adapter translates traditional web protocols into NTL signals and back. It enables existing web applications, microservices, and APIs to participate in the NTL network without modification.

Supported Protocols

HTTP Translation

Request → Signal

Signal → Response

Configuration

Request-Response Correlation

HTTP is inherently request-response. NTL is signal-based. The Web2 adapter bridges this gap using correlation:
  1. HTTP request arrives, adapter creates a Signal with a unique ID
  2. Adapter holds the HTTP connection open
  3. Signal propagates through NTL
  4. A response Signal arrives with correlation_id matching the original
  5. Adapter translates the response Signal back to HTTP and sends it
The adapter maintains a correlation table with configurable timeout (default: 30 seconds).

WebSocket Mode

For WebSocket connections, the adapter operates in true bidirectional mode:
  • Each WebSocket message becomes a Signal
  • Signals addressed to the WebSocket client are pushed immediately
  • No correlation needed — the connection is persistent
This makes WebSocket the closest Web2 protocol to NTL’s native model.
Last modified on September 11, 2026