Comment by BanAntiVaxxers

2 days ago

I could really use a USB "flash drive" that has two connectors on it. You would plug each of the connectors into two different devices. They could both see the same file system. You could implement this in a number of ways. Trying to edit the same file at the same time would not really work well, but otherwise it would work great. And it does not depend on any network and it is cross platform.

You wouldn't be able to edit from any side, because the other side would get its tables confused.

But you could mount readonly and have it work both sides. Or disconnect the side not writing, then reconnected when write has finished.

  • You could have three parts to this "black box".

    Part A emulates a USB drive to Device A.

    Part B emulates a USB drive to Device B.

    Part C is the eventually-consistent synchronizer. It can "see" into Part A and Part B.

    If file exists on A but not B, copy the file from A to B. If file exists on B but not A, copy the file from B to A.

    To each device, the files magically show up.

    To resolve conflicts, it would have to do it based on timestamps.

    The synchronizer could be anything. Heck, it could even be rsync. This device could be 3 Raspberry Pi's crammed into a single box.

    I would happily pay $100 or so for a device that could do this.

    • Yes, it could work. You would have to "disconnect" A and B for files to magically show up, because the drivers on A and B don't expect the filesystem to change "under their feet". It doesn't monitor the disk blocks for changes and rebuild directory indexes, file tables etc.

      If you want a truly "automatic" solution, your magic USB device would have to pretend to be a network device to both A and B, perhaps with DHCP or ipv6 autoconfig, and export NFS and/or Samba to both ends.