-
Notifications
You must be signed in to change notification settings - Fork 11
add an experimental version of mount
to go-ipfs
#74
Comments
Status update: A client (the mount program in this case) will request and perform operations on this filesystem, and do whatever translations are needed (for the local system). The interface around this will require some kind of protocol between the client program and the file system(-server). In the short term I'm going to investigate the viability of modifying the 9P protocol, so that we can use it to handle transparency at a data transport layer. Something like this should allow us to better compose and manipulate tree structures, in a distributed and shared way. It should also allow us to separate parts of the logic. Pushing edge cases or special handling into separate packages, that compose a specific view by wrapping other filesystem servers. This remains to be seen though. If things start to sprawl out, I'm going to pivot into a fork of Backlink: #71 |
Note: The plan is to have a basic demo of the 9P based system by Monday or a solid understanding of why it won't work. |
It might be neat to use Ignore this if it's not on your hot/convenience path of course. Just throwin' it out there. |
Originally I was looking at https://godoc.org/github.com/docker/go-p9p Edit: while cool, those packages seem to depend on Linux syscalls. |
Status update: This introduces separation between the node's file system(s) and its client implementations, that are unified around the 9p protocol. The demo is not fully functional right now, so the current plan is to keep implementing 9P operations on the server, until we have basic read support for the IPFS namespace, exposed over 9P. A client program that utilizes this namespace, providing 9P <-> cgofuse bindings, should follow. For Additional notes: This may require changes to increase compatibility with other versions of the styx/9p2000 protocol (9p2000.u, 9p2000.L, 9p2000.e, et al.) |
Hey yall, I just split out gVisor's 9p code into its own lib. I feel it's a bit cleaner than the alternatives mentioned here, and I'm still cleaning it up a bit: http://github.com/hugelgupf/p9 |
Status update: @djdv ran into some trouble getting that P9 implementation working on Windows and will focus on getting a usable IPFS plugin working on Linux first. |
I'm putting this note here because it seems like a good spot for it. Given the long time between the start of this effort and now, it may be best to recap some things and summarize the status. We wanted to support Progress was made on this, and resulted in a reasonably functional fork that did the thing (most of the time). All related demos are up here and there's even more textual updates in the related issues. It mounts on a few more platforms than mainline. And the read performance + scheduling was pretty good. Write support was also there for IPNS and MFS, however these suffered severely in performance for batches of small writes. Copying over GB large files seemed like native speeds during testing, but doing a shallow clone of the source repo took longer than a day to complete. This matches up with things that have been reported by @dirkmc and @andrew, in regards to adding files and mirroring package repos. The fuse branch(es) that exists, Since then, research on other file and operating systems has been done, and designs have continued to be discussed, with more people joining in. Long term, the ideal is to not only have something compatible, but also flexible. We should be able to have the same relationship the gateway has with HTTP, but at a file system protocol/ABI/API level. (the ideal being that supporting other protocols/platforms should not be a maintenance burden or be too unapproachable for those not familiar with the entire project codebase) With all that in mind, the current plan is to just take all this context and take a more sensible approach to the same problem. Gradually migrating step by step from the existing fork, and making design decisions in phases (rather than not at all / all at once). Editorial: |
Clarifying this. The p9 library couldn't receive messages on Windows but this was quickly amended thanks to @hugelgupf. I'm at a point currently where I can start a daemon which hosts a 9p resource server/file system server, and have a client connect to it and do some operations. Right now we have a root that contains a soft directory, and that subdirectory contains the contents of your IPFS pins. Doing development on a Windows machine primarily at the moment. Next should come metadata translations, and file reading support for IPFS objects under |
The topic of cross platform error values did come up though (centring around the use of |
Status update: (djdv/go-ipfs@3dc315f) Next I'm going to try and put this behind some kind of experimental flag, so that the server only starts listening when enabled. This should help us towards getting a PR against I'm also going to point a 9P aware client (like 9vfs) at it and see what happens. There's also the issue about error return values being different across platforms. I'm going to ignore this for now and continue testing the client and server on the same platforms. With cross platform support considerations to come later. Ideally any client should be able to connect to any server without inconsistencies. |
Note: Related debug kernel packages for Arch: https://drive.google.com/open?id=1Bf-vKSsscNa4C4ZSaCQfDEhrdTAjpsYq When mounting, it seems like the kernel client is trying to open the root as a regular file, with write access. The server responds with (-22) which I assume is |
Followup to the previous post. Linux's We need to see where the discrepancy is. The request from |
Ah, I found the issue. The issue is that we're trying to open the file non-blocking, as far as I can tell. That is. The 0o4000 in 0o304000 is I misread the code. It's not checking for a read/write flag. It's checking to make sure there aren't any bits we don't understand. We need to modify the library to handle this "don't block" request and turn it into a "operate offline" request (maybe prefetching on the side?). |
Filed an issue: hugelgupf/p9#6. |
Not there yet, but getting there. |
Status update: (djdv/go-ipfs@f97fde4) I managed to remotely interact with an IPFS node running on a Windows machine, from inside a Linux vm. Using IPFS data with a few existing programs. |
A draft PR has been put up here ipfs/kubo#6612 After all that, these are the current plans for next steps:
In speaking with @Stebalien about metadata, it seems like we'll want to couple attributes with newly generated data, rather than try to retrofit existing data with non-distributed attributes (essentially would have been a node-local database). So this will be considered going forward. |
I failed to meet expectations for this endeavour, and thus progress is officially halted.
The branches for read and write were never deemed acceptable experiments and thus remain out of tree. I apologize to the community, to which I made promises I could not keep. An updated version of the branch lives here. |
Fundamentally, we want interoperability between an IPFS node and a variety of existing platforms and tools. (such as using
rsync
on a POSIX system with IPFS source and target paths)Just as the gateway is a bridge between an IPFS node and HTTP, we would like to build a bridge between IPFS and various file system APIs.
We can achieve this by using a platform-agnostic protocol that clients can use, to interact with IPFS, in a way that is conventional for their platform. Oriented around file system operations to start.
For our experimental version, we abstractly want to create a server and client, which uses this protocol to construct a conventional Unix file system on the client-side, which is usable/mountable by the operating system.
(Exposing file-like objects to the host API, that map to IPFS constructs rather than files on disk)
At current, we have a daemon plugin for
go-ipfs
that hosts a service, and we're testing this against various client implementations.The protocol we're using is 9p2000.L since it already takes some of our interface needs into consideration, such as platform and transport independence.
In addition there are existing server and client implementations to compare and test against.
When various milestones are reached, we should merge them back into
go-ipfs
, behind an experimental flag.A check signifies an experimental version of this has worked in testing, but the implementation may still need to be changed again for standard compliance, operation additions, edge cases, etc.
go-ipfs "filesystem" plugin (resource server implementation)
/ipfs
as a directory of the node's pins)File system clients
mount
handler)mount
handler; requires 9p2000 or 9p2000.u server support)ipfs mount
"filesystem-client" plugin)The text was updated successfully, but these errors were encountered: