Skip to content

[Idea3] Remote version in todo list #72

@draftman9

Description

@draftman9

Requirement Summary

  1. Remote Execution Environment:
  • PC acts as a client, sending Julia scripts to the server via curl.
  • Server runs the script and handles file I/O operations.
  1. File Synchronization Mechanism:
  • Implement a Files On-Demand mode (similar to OneDrive):
  • Sync files from PC to a temporary server directory (e.g., /tmp/daemonmode-date/) only when needed.
  • Automatically map file paths referenced in the script between PC and server.
  • Sync generated files (e.g., test.png) back to the PC after execution.
  1. Goals:
  • Minimize data transfer (sync only essential files).
  • Simplify code logic by eliminating manual path mapping.

Implementation Plan

1. Server Architecture

  • Julia Service:
    • Listen for HTTP requests (via HTTP.jl).
    • Receive script content, parameters, and a path mapping table.
    • Create a temporary directory (e.g., /tmp/daemonmode-$(date)).
  • Sync Logic:
    • Input Sync: Dynamically sync files from PC paths referenced in the script to the temporary directory.
    • Output Sync: After execution, sync new/modified files in the temporary directory back to the PC.

Workflow Example

  1. PC Sends Request:
  • Script content + path mapping table → Server.
  1. Server Processing:
  • Create temporary directory /tmp/daemonmode-2024-05-01/.
  • Sync C:/data/ from PC to /tmp/daemonmode-2024-05-01/data/.
  • Replace paths in the script and execute.
  1. Post-Execution:
  • Newly generated test.png is synced back to C:/data/test.png on the PC.

Advantages & Risks

  • Advantages:
    • Reduces bandwidth usage by syncing only necessary files.
    • Avoid a little time elapsed by start julia in client, instead only use curl to send julia script.
    • Automated path mapping eliminates code modifications.
    • Compatible with DaemonMode.jl’s multi-tasking and Revise.jl features.
  • Risks:
    • Network latency may impact sync speed.
    • Path replacement must be accurate to avoid omissions/errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions