Skip to main content
View source

Remote Processing

View as Markdown

A RocketRide infrastructure node that forwards execution of a sub-pipeline to a separate RocketRide server.

What it does

Forwards pipeline execution to a separate RocketRide server. The sub-pipeline configuration is sent to the remote server over HTTP, data streams through a persistent WebSocket connection, and results are returned to the local pipeline as they are produced. Use this to run GPU-heavy or resource-intensive sub-pipelines on a dedicated machine.

The node directory ships two services:

ServiceProtocolRole
Remote Processing (services.client.json)remote://The node you place in a pipeline. Holds the sub-pipeline and the connection settings.
Remote Server (services.server.json)remote_server://Internal counterpart instantiated inside the remote pipeline. Marked internal -- never added by users directly.

Built on fastapi (server-side WebSocket endpoint), websockets (synchronous client connection), and nest-asyncio (running async coroutines from the synchronous engine context).

Both services carry the nosaas capability -- the node is available on self-hosted deployments only, not on RocketRide Cloud.


How it works

preparePipeline (in client/prepare_pipeline.py) rewrites the user's simplified pipeline before execution, based on the selected profile:

  • local profile -- the remote node is removed and its sub-pipeline components are inlined into the local pipeline at the same position. Nothing leaves the machine.
  • remote profile -- lanes that cross the local/remote boundary are rewired through the remote (client) and remote_server nodes, and a remote_source_stub source is inserted at the head of the remote pipeline:
    • local to remote: local component -> remote -> remote_server -> remote component
    • remote to local: remote component -> remote_server -> remote -> local component

Every component placed inside the sub-pipeline must support remote execution (PROTOCOL_CAPS.REMOTING); preparation fails with The component '<provider>' does not support remote execution otherwise. The remote node itself must not have any input entries of its own in the simplified configuration.

At runtime (remote profile) the client:

  1. Sends POST http://<host>:<port>/use?name=remote to load the remote node on the server.
  2. Creates the remote pipe with POST http://<host>:<port>/remote?pipe=<taskId>, posting the sub-pipeline JSON. The task ID of the running job identifies the pipe.
  3. Opens ws://<host>:<port>/remote/pipe?pipe=<taskId> and keeps it open for the lifetime of the instance.
  4. Deletes the remote pipe with DELETE on the same control URL when the pipeline ends.

All HTTP and WebSocket requests carry an Authorization: Bearer <apikey> header.


Configuration

Lanes

services.client.json declares no static lanes ("lanes": {}); lane wiring is derived from the sub-pipeline by preparePipeline. At runtime the client forwards these calls over the WebSocket when the lane is listed in input:

LanePayloadSent when
tagsbyteswriteTag -- only if tags is in input (default)
textstringwriteText -- only if text is in input
wordsstring listwriteWords -- only if words is in input
documentsdocument listwriteDocuments -- only if documents is in input

Lifecycle calls open, closing, and close are always forwarded so the remote pipeline tracks the local object lifecycle. Responses from the remote pipeline (writeText, writeDocuments, etc.) are dispatched back into the local pipeline as they arrive.

Fields

Settings live under the node's remote configuration block; the sub-pipeline lives under pipeline.

FieldType / defaultDescription
profileenum, default localExecution mode: local or remote (see profiles below).
hoststringHostname or IP of the remote RocketRide server. Required in remote mode.
portnumberServer port. Required in remote mode (remote profile preset uses 5565).
apikeystringBearer token for authenticating against the remote server. Required in remote mode.
pipelineobjectThe sub-pipeline definition to execute remotely. Required.
inputstring list, default ["tags"]Lanes forwarded from the local pipeline to the remote one.
outputstring list, default ["documents"]Lanes expected back from the remote pipeline.

Startup fails fast with an explicit exception if host, port, apikey, pipeline, or the job's task ID is missing.


Profiles

ProfileDescription
local (default)Runs the sub-pipeline on the same machine -- components are inlined, no network involved.
remoteRuns the sub-pipeline on a separate host. Preset values: host: localhost, port: 5565, apikey: xxx -- override all three before use.

Error handling and limits

  • Every forwarded call is acknowledged: after processing, each side sends an error lane message containing an APERR result. A non-success code is re-raised on the caller's side, so remote failures surface in the local pipeline with the original error code (Ec.RemoteException wraps errors that originate locally while handling a remote response).
  • List payloads are split into chunks whose estimated JSON size stays under ~0.98 MiB, keeping each WebSocket message below the default 1 MiB max_size. Large document batches therefore transfer as multiple messages transparently.
  • The WebSocket is opened with no open/close timeout and stays connected for the whole instance lifetime; websockets.client logging is routed through the engine's Remoting log level.

Notes

  • Self-hosted deployments only -- not available on RocketRide Cloud (nosaas capability).
  • The remote server must be running a RocketRide instance with the server component enabled.

Schema

Remote Processing (services.client.json)

No configuration fields.

Dependencies

  • fastapi
  • nest-asyncio
  • websockets