-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use tar
archival format to transfer file tree structure and data between Polykey vaults and local file systems
#811
Comments
After taking a look at matrixai/js-virtualtar, I have realised that significant work still needs to go into the repo before it would be ready to be used within the Polykey ecosystem. This alone might take a cycle or two. I will need to play around with it before starting development on it. |
What needs to be done before it's ready to be used? |
I haven't taken an in-depth dive into the requirements, just a brief skim-through over the code. As such, I'm not sure what exactly needs to be done for that. I'll need to see what it already has and what still needs to be done when I start working on this issue. |
tar
archival format to transfer file tree structure and data between Polykey vaults and user file systemstar
archival format to transfer file tree structure and data between Polykey vaults and lox file systems
tar
archival format to transfer file tree structure and data between Polykey vaults and lox file systemstar
archival format to transfer file tree structure and data between Polykey vaults and local file systems
The first iteration of the |
We should look into I'd say updating the From what I could tell, our library does not include streaming support yet. This is something pretty important to our use case, so this would need to be implemented in whatever solution we go ahead with. I am yet to look into the repo itself and play around with it to get a better idea of its functionality, so I will mention that later. |
You could start from scratch. The existing virtual tar codebase isn't up to our standards anymore. But you can use the same repo. |
There's an existing node version of far in npm and it's probably still up to date. You can use chatgpt to help generate the right protocol code to avoid any nodeisms. |
Specification
There are times when we need to transfer the secrets from a vault to either another vault or the user's file system. Sometimes, only one secret needs to be transferred. Other times, we need to transfer multiple file trees including their directory structure.
As all the vaults are stored on the same encrypted file system (
efs
), to transfer file trees between vaults, we only need to use regular file copying/moving operations on file systems; something along the lines offs.promises.copy()
should work well to transfer secrets between vaults.However, doing this between the vaults and the user's file system is not as straightforward. To efficiently transmit the file tree, we will be using an archival format like
tar
. Thetar
archival format is inherently streamable, and can be used to zip the file tree into a single file, which can then be transmitted over a RPC call, then be unpacked on the client, effectively transferring the file structure to the user's file system. Of course, we can also compress the resulting file, but we won't get into that quite yet.Additional context
tar
from a file system.tar
bindings for JavaScript.Tasks
fs
operations. Multiple locks might be required if transferring between multiple vaults.The text was updated successfully, but these errors were encountered: