1

Concept:

nc -lp 1234 -e fusexmp_server
nc 127.0.0.1 1234 -c "fusestream /mnt/tmp"

Advantages:

  1. Easy implementation of servers in high level language (without need of any arch-dependent things like JNI or whatever)
  2. Simple ad-hoc networking filesystem out of the box.
  3. Accessibility without actual FUSE (when it is inaccessible):
nc -lp 1234 -e fusexmp_server&
fakefusestream 127.0.0.1 1234
% ls
bin lib usr proc etc
% get /etc/hosts
% exit

Like simple RPC of FUSE methods. The protocol should simple like IRC and should handle all things FUSE can handle.

Is there already such thing or should I implement it?

Vi.
  • 37,014
  • 18
  • 93
  • 148

1 Answers1

1

It seems that ccgfs might help you in that direction. You would run ccgfs-storage on the end where the files are, and ccgfs-mount where the mountpoint is supposed to be, and either of the component is replaceable by a program of yours, presuming it adheres to the stream protocol (doc shipped in tarball). Note that you still need to connect the two components somehow (as in: you decide; it works with stdin/stdout).

socat (preferable to netcat) works with that too.

user502515
  • 4,346
  • 24
  • 20
  • Yes, in head I meant "socat" but was writing "nc" because of it is more common. – Vi. Jan 02 '11 at 23:30
  • Yes, socat -v exec:'ccgfs-storage -p /' exec:'./ccgfs-mount /mnt/tmp' shows that this is what I meaned. But the packet format is not nice, binary and is very far from being self-explanatory. – Vi. Jan 03 '11 at 00:34
  • Whether it is the short doc, or being binary is the issue, feel free to start a discussion on improvement at/with the project's lists/authors. – user502515 Jan 03 '11 at 00:41