ERRATUM Implementing centralized external database for saving file #fabric #database

Jonathan C.


I have been working on Hyperledger Fabric for the last 6 months on different kind of projects. In my last project I would like to integrate a database for saving XML file. Two possibilities, either IPFS style DB or general DB style like NoSQL.

For IPFS It would be pretty easy to integrate from the frontend and save the hash to the ledger, but I don’t need a decentralized DB. My choice then goes to a centralized DB like NoSQL.

For NoSQL, I identified two choices :

  • 1) from the frontend/backend: send xml to an external DB when successfully finished from the frontend/backend send transaction to the ledger with the hash and Transaction id(and/or some kind of ID defined in the DB) to the ledger

  • 2) from the smart contract: send xml file to external DB then save the hash and Transaction id in the ledger

Drawback identified on solution 1):

  • Need to integrate an external credential system

  • Handling ledger committing errors, if transaction do not get accepted

Drawback identified on solution 2)

  • All peers will execute the transaction which mean that some kind of solution need to be defined at DB level for removing possibilities of multiple writing.

  • Need to implement deterministic function

There is probably lots of more error-prone possibilities. But I would be really interested to know if anyone already implemented some kind of similar solution.


Awesome day,




Join to automatically receive all group messages.