Blueprint Runners
Blueprint Runners are the core orchestration components that execute Tangle Blueprints. They manage the lifecycle of jobs, coordinate between different components, and ensure the reliable execution of your Actively Validated Service (AVS).
Getting Started
What is a Blueprint Runner?
A Blueprint Runner is the runtime environment for your Tangle Blueprint. It:
- Orchestrates job execution
- Manages communication between different components
- Handles event processing from the blockchain
- Manages state and persistence
- Ensures fault tolerance and reliability
Blueprint Runners follow a modular architecture with four main components: Routers, Producers, Consumers, and Background Services.
Blueprint Runner Architecture
The architecture of a Blueprint Runner consists of the following components:
Routers
Routers direct job calls to the appropriate job handlers based on job IDs. When a job is called, the router identifies the correct handler and passes the job parameters to it.
Producers
Producers listen for events (such as on-chain events from Tangle Network) and prepare them for processing. They convert raw event data into a format that can be processed by your job handlers.
Consumers
Consumers handle the results of processed jobs. They can perform actions such as sending transactions, updating state, or triggering other processes based on job results.
Background Services
Background Services are optional components that run continuously in the background. They can perform tasks such as monitoring, data collection, or periodic operations that are required for your jobs.
Blueprint Runner Lifecycle
The Blueprint Runner follows a well-defined lifecycle to ensure reliable execution of your AVS:
- Initialization: The Blueprint Runner loads configuration, sets up components, and establishes connections.
- Event Processing: Producers listen for events and convert them into job inputs.
- Job Routing: The router directs job inputs to the appropriate job handlers.
- Job Execution: Job handlers process the inputs and produce results.
- Result Handling: Consumers process job results and perform necessary actions.
- Continuous Operation: Background services run continuously to support the Blueprint Runner.
Next Steps
Ready to build your own Blueprint Runner? Check out our step-by-step guide to get started.