hyperdrive icon indicating copy to clipboard operation
hyperdrive copied to clipboard

Transactional writes

Open mafintosh opened this issue 7 years ago • 0 comments

We need a transaction API

var archive = hyperdrive(...)

// optionally pass in a random-access-storage for storing the transaction data
var fs = archive.batch()

fs.writeFile(...)
fs.createWriteStream(...)

// will sign the log. if it fails, it'll roll it back
fs.commit(function (err) {
})

We should implement this by simply commit everything to the log but dont sign it (need hypercore option needed.

mafintosh avatar Mar 20 '18 21:03 mafintosh