Execution Environment Reference
Environment | Primary Use Case | Data Persistence | Performance | Setup Complexity |
---|---|---|---|---|
In-Memory | Development, prototyping, testing | Temporary | Fast for small datasets | Minimal |
Interactive | Jupyter notebooks, experimentation | Session-based | Moderate | Low |
REST API | Production deployment | External VDB | High, scalable | High |
Executor Components Reference
Foundation components for execution engine management:
Execution Environment Architecture
Executor Class Hierarchy
Implementation Guide
Development Environment (InMemoryExecutor)
Development Environment (InMemoryExecutor)
The in-memory environment is ideal for initial prototyping, testing, and development workflows with fast iteration cycles.
Use Cases
- Initial prototyping and experimentation
- Unit testing and validation
- Small dataset exploration
- Schema and space configuration development
Key Characteristics
- Data stored in Python memory
- No external dependencies
- Fast iteration cycles
- Automatic cleanup on process termination
Basic Setup
Context Data Support
Interactive Environment
Interactive Environment
Interactive execution extends in-memory capabilities specifically for Jupyter notebook workflows and data science experimentation.
Enhanced Features
- Session persistence within notebook context
- Visualization integration with plotting libraries
- DataFrame conversion utilities
- Dynamic parameter adjustment
Jupyter Integration
Visualization Support
Production Environment (RestExecutor)
Production Environment (RestExecutor)
Production deployment requires persistent storage, scalability, and RESTful API interfaces for multi-client support.
Production Requirements
- Persistent vector storage
- Horizontal scalability
- High availability
- RESTful API interface
- Multi-client support
Production Components
- External vector databases for persistence
- HTTP server for client communication
- Batch data ingestion capabilities
- Monitoring and telemetry integration
REST Executor Setup
Batch Data Loading
Data Sources by Environment
Data Sources by Environment
Different execution environments support specific data source types optimized for their use cases.
Source Type Support Matrix
Source Type | Development | Interactive | Production |
---|---|---|---|
InMemorySource | ✓ Primary | ✓ Primary | - |
RestSource | - | - | ✓ Primary |
DataLoaderSource | - | - | ✓ Batch |
DataFrame input | ✓ | ✓ | - |
Dictionary input | ✓ | ✓ | - |
Development Sources
Production Sources
Query Execution Patterns
Query Execution Patterns
Different environments support varying query patterns optimized for their execution context.This enables:
Synchronous Queries (Development/Interactive)
Asynchronous Queries (Production)
Production environments handle queries through HTTP endpoints:- HTTP POST requests to REST endpoints
- JSON response format
- Concurrent query processing
- Load balancing support
Context Data Management
All execution environments support context data for temporal operations:- Recency space calculations
- Temporal filtering
- Time-aware recommendations
- Event effect processing
Key Features
Executor components provide:- Multiple Execution Modes: Support for various deployment and execution patterns from development to production
- Performance Optimization: Choose the right executor for your performance needs and scale requirements
- Scalability: From local development to distributed production execution with horizontal scaling
- API Integration: Built-in REST API execution capabilities for web service deployment
- Error Handling: Robust exception management during execution with meaningful error responses
- Context Management: Temporal data support for recency calculations and time-aware processing
Different executor types are optimized for specific execution scenarios. In-memory executors provide fast local execution for development, while REST executors enable scalable web service deployment with persistent storage.
Executor Selection Guide
Choose the right executor type for your use case:- In Memory Executor: Best for development, testing, and high-performance local execution with small to medium datasets
- Interactive Executor: Ideal for experimentation, prototyping, and iterative development in Jupyter notebooks
- Query Executor: Specialized for query-focused applications and search services
- REST Executor: Perfect for web applications, API-based services, and production deployments requiring persistence
Start with In Memory Executor during development for fast iteration, then transition to REST Executor for production web service deployment with appropriate vector database backend.
Execution Workflow
Executors handle the complete processing pipeline:- Data Ingestion: Accept data through sources (in-memory, REST endpoints, or batch loading)
- Schema Validation: Ensure incoming data meets defined schema requirements
- Space Processing: Execute vector operations and embedding generation
- Index Management: Store and organize vectors in appropriate storage backend
- Query Processing: Parse and validate incoming queries with parameter handling
- Vector Computation: Execute similarity calculations and retrieval operations
- Result Generation: Compile and format query results with ranking and filtering
- Response Delivery: Return results through the appropriate interface (direct, HTTP, etc.)
- Error Management: Handle exceptions and provide meaningful error responses
Performance Considerations
Executors optimize for:- Computation Speed: Efficient vector operations and similarity calculations with optimized algorithms
- Memory Management: Optimal memory usage during query execution and data processing
- Concurrency: Support for parallel query processing and multi-client access
- Resource Utilization: Balanced use of CPU and memory resources across different workloads
- Storage Efficiency: Appropriate vector database selection based on scale and performance requirements
- Network Optimization: Efficient data transfer and API response handling for distributed deployments