Document storage – recommended approach with OBP

Like our use case, many scenarios relating to today's enterprise business processes involve the exchange of a document object. In terms of practicality, for many cases, the document in itself is just a direct adoption of a physical process. It primarily provides a perception of the trusted physical asset in the hands of transacting stakeholders. Technically, it is a logical grouping of data values related to business transactions such as agreed terms and conditions, contracts, and transaction data.

With blockchain-based trusted solutions such as the one we're building on OBP, we can in fact do away with many such needs of a document object. Still, for the sake of practicality, documents could co-exist and may gradually fade away into irrelevance (not necessarily in all cases) as the adoption increases.

Currently, the following approach can be adopted for storing business documents along with core OBP solution (ledger) data:

  • During write transactions on the OBP ledger:
    • Generate a hash of the document, record the hash on the ledger (on-chain) and store the document off-chain
    • Off-chain storage of documents could either the cloud-based Oracle Content and Experience Service or other Oracle Cloud storage options, such as object storage or file storage
    • Hashing logic should be agreed by transacting stakeholders and must be secured appropriately
    • Performing hashing and document storage operation outside the smart contract would reduce its execution time
  • During read transactions (that is, while fetching a document asset):
    • Fetch the document from the chosen document storage.
    • Get a hash of the document and send it to a smart contract for comparison and validation.
    • On a positive match, the document can be read. Otherwise, an unexpected situation should be reported.

For more details on this aspect, please refer to the document storage section in the previous chapter.

So far, we have walked through the business scenario and defined the use case. We have analyzed the use case to justify the need for a blockchain solution by walking through the use case qualifications. Once we decided that the use case qualifies for a blockchain solution, we covered designing the blockchain-based solution. The next half of the chapter concentrates on exploring OBP and its architecture, and setting up an OBP network instance.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset