Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trishume/telefork
Like fork() but teleports the forked process to a different computer!
https://github.com/trishume/telefork
Last synced: about 7 hours ago
JSON representation
Like fork() but teleports the forked process to a different computer!
- Host: GitHub
- URL: https://github.com/trishume/telefork
- Owner: trishume
- Created: 2020-04-05T21:25:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-09T01:07:27.000Z (over 3 years ago)
- Last Synced: 2024-11-06T11:53:11.077Z (7 days ago)
- Language: Rust
- Homepage: https://thume.ca/2020/04/18/telefork-forking-a-process-onto-a-different-computer/
- Size: 32.2 KB
- Stars: 589
- Watchers: 12
- Forks: 29
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# telefork
Check out [the blog post I wrote about this project](https://thume.ca/2020/04/18/telefork-forking-a-process-onto-a-different-computer/)!
Basically it's like the `fork()` syscall except it can fork a process onto a
different computer. It does this using a bunch of ptrace magic to serialize
the memory mappings of the process, stream them over a pipe and recreate them
on the other end along with the registers and some other process state.# How it works
Read the code in `src/lib.rs!`. I specifically wrote it all in **one file with
tons of comments** in an order meant to read top to bottom. Hopefully it should
be easy enough to understand what it's doing, provided some familiarity with
systems programming concepts.# Examples
- `basic` and `load`: Save and restore a process state to a file
- `teleserver` and `teleclient`: Fork a process to a remote server
- `yoyo_client` and `yoyo_client_raw`: Execute a closure on a remote server by teleforking there and back
- `smallpt`: Use `yoyo` to run a path tracing render on a remote server from a local executable.