This document describes the different execution environments available in Superlinked for running vector search applications. Execution environments determine how your application processes data, handles queries, and manages vector storage during development, testing, and production phases.
For information about specific vector database integrations, see Vector Databases. For production deployment configuration, see Production Setup.
Superlinked provides three primary execution environments, each designed for different stages of development and deployment:
| 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 |
Sources: notebook/feature/basic_building_blocks.ipynb141-143 notebook/recommendations_e_commerce.ipynb374-376 notebook/semantic_search_netflix_titles.ipynb374-376
Sources: notebook/feature/basic_building_blocks.ipynb141-142 notebook/recommendations_e_commerce.ipynb373-374
InMemoryExecutor)The in-memory environment is ideal for:
Key characteristics:
executor = sl.InMemoryExecutor(sources=[source], indices=[paragraph_index]) app = executor.run()
Sources: notebook/feature/basic_building_blocks.ipynb142-143
Interactive execution extends in-memory capabilities for:
Enhanced features include:
Sources: notebook/recommendations_e_commerce.ipynb84-87 notebook/semantic_search_netflix_titles.ipynb74-78
RestExecutor)Production deployment requires:
Production components:
Sources: Based on architecture diagrams showing production deployment patterns
| Source Type | Development | Interactive | Production |
|---|---|---|---|
InMemorySource | ✓ Primary | ✓ Primary | - |
RestSource | - | - | ✓ Primary |
DataLoaderSource | - | - | ✓ Batch |
| DataFrame input | ✓ | ✓ | - |
| Dictionary input | ✓ | ✓ | - |
All execution environments support context data for temporal operations:
EXECUTOR_DATA = {sl.CONTEXT_COMMON: {sl.CONTEXT_COMMON_NOW: timestamp}} executor = sl.InMemoryExecutor( sources=[source], indices=[index], context_data=EXECUTOR_DATA )
This enables:
Sources: notebook/semantic_search_netflix_titles.ipynb93 notebook/rag_hr_knowledgebase.ipynb101 notebook/analytics_user_acquisition.ipynb102
Different environments support varying query patterns:
result = app.query(query, query_text="search term") pandas_df = sl.PandasConverter.to_pandas(result)
Sources: notebook/feature/basic_building_blocks.ipynb238-240