Description Requirement Summary
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.
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.
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
PC Sends Request :
Script content + path mapping table → Server.
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.
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.
Reactions are currently unavailable
You can’t perform that action at this time.
Requirement Summary
curl./tmp/daemonmode-date/) only when needed.test.png) back to the PC after execution.Implementation Plan
1. Server Architecture
HTTP.jl)./tmp/daemonmode-$(date)).Workflow Example
/tmp/daemonmode-2024-05-01/.C:/data/from PC to/tmp/daemonmode-2024-05-01/data/.test.pngis synced back toC:/data/test.pngon the PC.Advantages & Risks
curlto send julia script.