LogoLogo
  • Lumora
    • Welcome to the Lumora GitBook
    • Introduction
    • Decentralized Internet Bandwidth Sharing
    • Problem Landscape
    • Lumora Ecosystem Overview
      • Participants and Roles
      • Interaction Flow within the Network
      • Advantages of Decentralized Networks
    • Architecture and Technical Framework
      • Network Layer Design
      • Browser Extension and DApp Interaction
      • Blockchain-Powered Backend
      • Integration with Decentralized Storage Protocols
    • Smart Contracts and Tokenomics
    • Core Algorithms
      • Bandwidth Allocation Optimization
      • Proximity-Based Task Assignment
      • Adaptive Data Scraping Framework
      • Dynamic Reward Calculation Protocols
    • Privacy and Security Framework
    • Decentralized Data Scraping Protocol
    • AI-Driven Network Enhancements
    • Roadmap
    • Advanced Scraping for Interactive and Dynamic Content
    • Community Engagement
    • Appendices
Powered by GitBook
LogoLogo

Lumora

On this page
  1. Lumora
  2. Core Algorithms

Proximity-Based Task Assignment

Proximity-based task assignment in the Lumora network ensures efficient task distribution by prioritizing nodes closest to the data source. This minimizes latency, optimizes bandwidth usage, and accelerates task execution, creating a highly responsive and balanced decentralized network.


Objectives

  • Minimize Latency: Assign tasks to nodes near the data source to reduce response time.

  • Optimize Resource Usage: Balance bandwidth and computing capacity effectively.

  • Enhance Efficiency: Enable faster task completion and data delivery.


Task Assignment Algorithm

Input Variables:

  • P_i: Proximity of node i to the task source.

  • L_i: Latency of node i.

  • C_i: Available capacity of node i.

  • α, β, γ: Weighting factors for proximity, latency, and capacity.

Steps:

  1. Calculate Weighted Score:

    Score_i = α * (1 / P_i) + β * (1 / L_i) + γ * (C_i / C_max)
    • C_max: Maximum capacity of the network.

    • Higher Score_i indicates better suitability for task assignment.

  2. Rank Nodes:

    • Nodes are ranked based on their calculated scores.

  3. Assign Tasks:

    • Assign tasks to the top-ranked nodes until their capacity is utilized or task demand is met.

  4. Dynamic Reallocation:

    • If a node becomes overloaded (L_i or C_i exceeds threshold), reallocate tasks to the next ranked node.


Real-Time Adjustments

Dynamic Proximity Calculation:

  • Proximity Metric:

    • Use geographic or network distance between the node and the task source.

    • Example: Round-Trip Time (RTT) in milliseconds.

Load Monitoring:

  • Nodes report real-time capacity metrics (C_i).

  • Tasks are dynamically reassigned to maintain network balance:

    Reassign Tasks if C_i > 80% of node capacity

Example Calculation

Scenario:

  • Total tasks: T_total = 500

  • Nodes: 3

    • Node 1: P_1 = 10ms, L_1 = 15ms, C_1 = 100

    • Node 2: P_2 = 20ms, L_2 = 10ms, C_2 = 150

    • Node 3: P_3 = 15ms, L_3 = 20ms, C_3 = 80

Weighting Factors:

  • α = 0.4, β = 0.4, γ = 0.2

Steps:

  1. Calculate Scores:

    Score_1 = 0.4 * (1 / 10) + 0.4 * (1 / 15) + 0.2 * (100 / 150) = 0.04 + 0.0267 + 0.1333 = 0.2
    Score_2 = 0.4 * (1 / 20) + 0.4 * (1 / 10) + 0.2 * (150 / 150) = 0.02 + 0.04 + 0.2 = 0.26
    Score_3 = 0.4 * (1 / 15) + 0.4 * (1 / 20) + 0.2 * (80 / 150) = 0.0267 + 0.02 + 0.1067 = 0.1534
  2. Rank Nodes:

    • Node 2 (Score_2 = 0.26)

    • Node 1 (Score_1 = 0.2)

    • Node 3 (Score_3 = 0.1534)

  3. Task Assignment:

    • Assign tasks in the order of rank until each node's capacity is utilized:

      Node 2: 150 tasks
      Node 1: 100 tasks
      Node 3: 80 tasks
      Remaining: 500 - (150 + 100 + 80) = 170 tasks
    • Reassign remaining tasks to Node 2 and Node 1 based on available capacity.


Key Benefits

  • Reduced Latency: Tasks are assigned to nodes closest to the data source, ensuring faster execution.

  • Improved Load Balancing: Capacity metrics ensure tasks are distributed evenly.

  • Scalable: Adapts dynamically to changes in network conditions or node availability.


Implementation in Lumora

Code Framework:

  • Core algorithms are implemented in Typescript and Kotlin for backend services.

  • Task scores are currently calculated off-chain and logged within the backend system. Full on-chain logging and validation via Solana programs are planned for Phase 2 to ensure maximum transparency and decentralization.

API Integration:

  • Nodes report proximity, latency, and capacity metrics in real-time to the Decentralized Task Manager.

  • RESTful APIs or WebSocket connections facilitate continuous updates.


Conclusion

Proximity-Based Task Assignment ensures efficient task distribution, reducing latency and optimizing resource utilization in the Lumora network. Its dynamic nature supports scalability and adaptability, making it integral to the decentralized architecture.

Last updated 13 days ago