-
Notifications
You must be signed in to change notification settings - Fork 22
Open
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)).
- Listen for HTTP requests (via
- 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.pngis synced back toC:/data/test.pngon 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
curlto 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
Labels
No labels