Vercel Logo
DOCS
TECHNICAL DOCS
QUERY PIPELINES
BUILDING RACE PIPELINES

Race Pipelines

The Race Pipeline is a unique higher-order pipeline within Syncraft's query engine that executes its child pipelines simultaneously. Still, unlike the Parallel Pipeline, it returns the result of the first pipeline to complete. This approach is beneficial in scenarios where the fastest response is desired, such as real-time applications or when dealing with time-sensitive data.

Untitled (16).jpg

Components

  • Race - A map of the field - pipeline, where after the pipeline completes, the value is stored and can be referenced by a field name in the ReMap step.
  • ReMap - The step where we can consolidate the data returned from parallel pipelines. Learn more about ReMap pipelines.

Core Features

1. Simultaneous Execution

All child pipelines under a Race Pipeline are triggered to execute simultaneously, ensuring that each pipeline competes to complete its execution first.

2. Fastest Response

The primary aim of the Race Pipeline is to obtain the fastest response by accepting the result from the first pipeline to complete its execution.

3. Performance Efficiency

The Race Pipeline enhances performance efficiency by focusing on the quickest result, especially in time-critical scenarios.

Functional Significance

Timely Data Retrieval:

The Race Pipeline is crucial in environments where timely data retrieval is paramount, ensuring that the fastest response is always obtained.

Real-Time Applications:

Its design significantly benefits real-time applications where every millisecond counts, ensuring prompt data delivery.

Usage Scenarios

Time-Sensitive Data Processing:

The Race Pipeline ensures the fastest possible response in scenarios where data processing is time-sensitive.

Competitive Execution:

When multiple possible pipelines can provide the required data, the Race Pipeline helps select the fastest among them.

Optimized Query Performance:

The Race Pipeline optimizes the query performance by obtaining the quickest result.

Continue Your Journey
Building Parallel Pipelines
Continue Your Journey
Processing Remap Language