My intention is to use IPFS as a distributed database with a local-first approach. Programs store and retrieve data (as IPLD nodes) via the IPFS daemon on single computer, and if that computer happens to have a network connection, the same database access works across the network. The main point is that everything should work locally without a network connection (think mobile devices).
This works very well for storing and retrieving data via CIDs. But I do need mutable references as well, and I started to play with IPNS, but so far this has mainly resulted in frustration.
When I publish a new binding for a name, and my computer happens to have no network connection, I get
Error: failed to find any peer in table. I thought that
--allow-offline would let me do this, but it doesn’t (see https://github.com/ipfs/go-ipfs/issues/6458). The behavior I need is the daemon storing the new binding locally, and broadcasting it asynchronously when possible. Is that doable somehow?
Resolving names is also problematic, because it takes a long time even for keys hosted on the same machine. This makes IPNS unusable as a replacement for a local filesystem, for communication between programs running on the same computer. I do understand that this is due to the possibility of a key being used by several IPFS peers in parallel. However, this is not required for my use case and could safely be considered an error. I’d much prefer local names to be resolved immediately, in particular when there is no network connection. Can this be achieved somehow? I was hoping to use
--dhtt with a very short timeout, but that doesn’t seem to work.