You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing peer-base pinner will persist data to ~/.jsipfs, which works great.
But we'd like to deploy the pinner to Heroku, which has an ephemeral disk. On redeploys, the virtual machine will have a fresh disk, which will lose the pinned data.
As an extra layer, I'm going to try to write the pinner state out to IPLD on each state change, and call the ipfs-cluster API to pin it permanently. Additionally, we can use IPNS to keep track of the current head.
As a proof-of-concept, I've figured out how to save and retrieve the pinner state out-of-band from the IPFS datastore using the filesystem here:
I had to tweak IPNS (go-ipfs), but it can now save and retrieve pinned state across heroku reboots (the IPFS repo needs to be recreated after each reboot because of the ephemeral disks). I'll be added in some support to pin to ipfs-cluster, and with that, we should have a solution for durable pinning that will enable us to deploy the dev PeerPad to production.
It all needs lots of testing ... I think we'll be able to learn a lot from this pinning solution once we have it running in production.
The existing peer-base pinner will persist data to ~/.jsipfs, which works great.
But we'd like to deploy the pinner to Heroku, which has an ephemeral disk. On redeploys, the virtual machine will have a fresh disk, which will lose the pinned data.
As an extra layer, I'm going to try to write the pinner state out to IPLD on each state change, and call the ipfs-cluster API to pin it permanently. Additionally, we can use IPNS to keep track of the current head.
As a proof-of-concept, I've figured out how to save and retrieve the pinner state out-of-band from the IPFS datastore using the filesystem here:
https://github.com/jimpick/peer-pad/blob/jim-dev/pinner/index.js#L117
Next, I'm going to try to use IPLD and IPNS instead of fs to store the out-of-band backups.
The text was updated successfully, but these errors were encountered: