Web2 Adapter
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
| Protocol | Ingest | Emit | Bidirectional |
|---|---|---|---|
| HTTP/HTTPS | ✅ | ✅ | Via correlation |
| gRPC | ✅ | ✅ | Via streaming |
| WebSocket | ✅ | ✅ | ✅ Native |
| GraphQL | ✅ | ✅ | Subscriptions |
| Server-Sent Events | — | ✅ | One-way |
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:- HTTP request arrives, adapter creates a Signal with a unique ID
- Adapter holds the HTTP connection open
- Signal propagates through NTL
- A response Signal arrives with
correlation_idmatching the original - Adapter translates the response Signal back to HTTP and sends it
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