jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.87k stars 872 forks source link

IPFS bridge #994

Open maxbrito500 opened 3 years ago

maxbrito500 commented 3 years ago

Hello,

Can mapdb start using IPFS for storing data instead of the local file system?

IPFS nowadays is very easy to include inside any Java program. There is a relevant tutorial here with the code necessary to get up and running the file storage: https://kauri.io/#communities/Java%20Ethereum/managing-storage-in-a-java-application-with-ipfs/

To avoid confusion, it is not necessary to run an IPFS node on the computer to use IPFS resources. It is possible to connect directly to a public node such as this one: IPFS ipfs = new IPFS("/dnsaddr/ipfs.infura.io/tcp/5001/https");

The big advantage for mapdb is persistent data memory across a "cloud" instead of just locally. I already do this on my software but it is still a lot of steps (closing the database, committing to IPFS and so on). It would be great to have this functionality packed inside mapdb as an option.

Many thanks for the consideration.