Cortensor
  • Home
  • Abstract
    • Value Proposition
    • Whitepaper
      • Page 1: Introduction and Vision
      • Page 2: Architecture and Technical Overview
      • Page 3: Incentive Structure and Tokenomics
      • Page4: Development Roadmap and Phases
      • Page5: Summary
  • Introduction
    • What is Cortensor?
    • Key Features & Benefits
    • Vision & Mission
    • Team
  • Getting Started
    • Quick Start Guide
    • System Requirements
    • Installation & Setup
      • Getting Test ETH
      • Setup Own RPC Endpoint
      • Router Node Setup
        • Router API Reference
  • Core Concepts
    • Decentralized AI Inference
      • Community-Powered Network
      • Gamification and Quality Control
      • Incentive Structure
    • Universal AI Accessibility
    • Multi-layer Blockchain Architecture
  • Technical Architecture
    • Design Principles
    • Node Roles
    • Node Lifecycle
      • Ephemeral Node State
    • Node Reputation
    • Network & Flow
    • Type of Services
    • Coordination & Orchestration
      • Multi-Oracle Node Reliability & Leadership Rotation
    • AI Inference
      • Open Source Models
        • Centralized vs Decentralized Models
      • Quantization
      • Performance and Scalability
    • Consensus & Validation
      • Proof of Inference (PoI) & Proof of Useful Work (PoUW
      • aka Mining
      • Proof of Useful Work (PoUW)
      • Proof of Useful Work (PoUW) State Machine
        • Miner & Oracle Nodes in PoUW State Machine
      • Sampling in Large Distributed Systems
      • Parallel Processing
      • Embedding Vector Distance
    • Multi-Layered Blockchain Architecture
    • Modular Architecture and Smart Contract Interactions
      • Session Queue
      • Node Pool
      • Session Payment
    • Mining Overview
    • User Interaction & Node Communication
      • Session, Session Queue, Router, and Miner in Cortensor
    • Data Management
      • IPFS Integration
    • Security & Privacy
    • Dashboard
    • Development Previews
      • Multiple Miners Collaboration with Oracle Node
      • Web3 SDK Client & Session/Session Queue Interaction
    • Technical Threads
      • AI Agents and Cortensor's Decentralized AI Inference
    • Infographic Archive
  • Community & Ecosystem
    • Tokenomics
      • Network Incentive Allocation
      • Token Allocations & Safe Wallet Management
    • Staking Pool Overview
    • Contributing to Cortensor
    • Incentives & Reward System
    • Governance & Compliance
    • Safety Measures and Restricted Addresses
    • Buyback Program
    • Liquidity Additions
    • Partnerships
      • Partnership Offering for Demand-Side Partnerships
    • Community Testing
      • Closed Alpha Testing Phase #1
        • Closed Alpha Testing Phase #1 Contest: Closing & Winners Announcement
      • Closed Alpha Testing Phase #2
      • Closed Alpha Testing Phase #3
      • Discord Roles & Mainnet Privileges
      • DevNet Mapping
      • DevNet Modules & Parameters
    • Jobs
      • Technical Writer
      • Communication & Social Media Manager
      • Web3 Frontend Developer
      • Distributed Systems Engineer
  • Integration Guide
    • Web2
      • REST API
      • WebSocket
      • Client SDK
    • Web3
      • Web3 SDK
  • Use Cases
  • Roadmap
    • Technical Roadmap: Launch to Next 365 Days Breakdown
    • Long-term Vision: Beyond Inference
  • Glossary
  • Legal
    • Terms of Use
    • Privacy Policy
    • Disclaimer
    • Agreement for Sale of Tokens
Powered by GitBook
On this page
  • Design & Functionality
  • Interaction with Other Modules
  • Comparison: Cognitive Module vs. Session Queue
  • Current Design & Future Enhancements
  • Conclusion
  1. Technical Architecture
  2. Modular Architecture and Smart Contract Interactions

Session Queue

The Session Queue Module in Cortensor is a state machine-controlled task queue system designed to handle user tasks. It is responsible for managing inference requests from users, assigning ephemeral nodes to execute these tasks, and interacting with miners for AI inference processing.

While the Cognitive Module focuses on network tasks and regulates task flows at the infrastructure level, the Session Queue is dedicated to user-driven tasks, ensuring a structured and reliable execution pipeline.


Design & Functionality

The Session Queue acts as a state machine, processing AI inference tasks submitted by users through the Session Module. Miners interact with the Session Queue to consume tasks, perform AI inference, and return results.

Task Flow & State Transitions

The Session Queue follows a structured state transition model, ensuring data reliability and task integrity. The key states include:

  1. Queued → Task is received from the Session Module and added to the queue.

  2. Acked → Ephemeral nodes acknowledge the task and signal readiness to process.

  3. Precommitted → Miners generate a hash of their inference results, ensuring integrity before submission.

  4. Committed → Miners submit actual inference outputs, finalizing the process.

  5. Completed → The task is marked as successfully processed, and results are returned to the user.

These states ensure structured task handling, prevent race conditions, and maintain data integrity throughout the AI inference workflow.


Interaction with Other Modules

The Session Queue Module acts as an intermediary between key Cortensor components:

  • Session Module → Pushes user tasks to the Session Queue.

  • Node Pool & Ephemeral Nodes → Assigns miners to execute tasks.

  • Router Nodes → Relay results back to users via REST API or WebSocket.

  • Cognitive Module → Ensures network-wide coordination but does not directly manage user tasks.


Comparison: Cognitive Module vs. Session Queue

Feature
Cognitive Module
Session Queue Module

Primary Function

Network-wide task management

User AI task execution

Task Type

Infrastructure & health-check tasks

AI inference requests

State Machine

Complex with multiple verification layers

Lighter with fewer states

Interaction With

Oracle Nodes, Miners

Session, Miners, Ephemeral Nodes


Current Design & Future Enhancements

Current Implementation

  • Handles real-time AI inference requests.

  • Manages ephemeral nodes dynamically for task allocation.

  • Implements structured state transitions for reliability.

Future Considerations

  • Task Prioritization: Enhancing scheduling to prioritize urgent AI requests.

  • Load Optimization: Smarter balancing across multiple miners for faster processing.

  • Adaptive Session Management: Allowing dynamic scaling of ephemeral nodes based on demand.


Conclusion

The Session Queue Module is a critical part of Cortensor's decentralized AI framework, ensuring efficient, structured, and scalable AI inference task management. By leveraging a state machine approach, it guarantees task integrity, secure computation, and seamless coordination with miners and ephemeral nodes.

PreviousModular Architecture and Smart Contract InteractionsNextNode Pool

Last updated 2 months ago