I am very new to blockchain, so I just wanted to get some preliminary answers and clarity.

So currently we have a cloud database to manage certain documents (which contains sensitive information). These documents are important and necessary for trade finance i.e. verifying personnel need to view these documents (banks, customs etc.)

1) If an organisation develops their own blockchain, and request for us to be part of their network (assuming private blockchain), how would we interoperate their blockchain system with our cloud database?

  • What sort of information would be included in each 'block' of the blockchain?
  • From my understanding, it is possible to simply provide the whole document (i.e. in PDF or some other format), and included it on the blockchain, however that due to the size of the file it may not be ideal.
  • The other potential option is for the blockchain system to create a hash value. Verifying personnel would compare the hash value to the document to check veracity. In this scenario, would the document need to have the hash key attached to it as well?
  • The third option, (I'm not sure if this is possible), is to provide the blockchain network a URI, which can link personnel to our cloud database. The URI can be designed either to link the personnel straight to the document or they could be given a login key. In this scenario, would the URI need to be formatted in a special way?

As you guys probably know that I am fairly new to this blockchain, so please correct me if I am wrong in any part.



It depends on your specific security needs and the way network is set up. I've done a few consulting jobs for enterprises, and private blockchains usually do away with the gas mechanics so filesize wouldn't be an issue.

In your case, there are two options:

  1. Encrypt the pdf blob, compress it, send it to the contract, and give your users a private key to decompress and decrypt the blob. That way you ensure only authorized users are able to access the data.

  2. The URI idea is a valid method as well. You can either encrypt the URI, send it to the contract, and give your users a private key to decrypt the string; or send a URI as a cleartext string to the contract and restrict access to authorized users on your backend.

The hash value comparison idea might work, but that just smells like an overengineered solution to me.

Just think of the Ethereum blockchain as a publicly accessible database.


You don't have to make your documents compliant on different platforms, you just need to wrap and unwrap your data in a way that's compliant with the different platforms depending on which platform it sends to.

It's hard to explain without delving into pseudocode, so I'll explain this in laymen's terms. Apologies in advance if it seems a little simplistic and/or patronizing, but my goal here is to make it easy to understand.

Single platform

The client gives you an orange and asks you to store the orange on Ethereum. Ethereum requires that the orange be unpeeled.

class StoreOrangeOnEthereum

  def store(orange, address)
    unpeeled_orange = unpeel(orange)
    transfer_to_blockchain(unpeeled_orange, address)

  def withdraw(address)
    unpeeled_orange = withdraw_from_blockchain(address)
    orange = repeel(unpeeled_orange)
    return orange     


Very simple and straightforward.

Multiple platforms

Another client gives you an orange and asks you to store it on Hyperledger Fabric. Fabric requires that the orange be stored in slices.

class StoreOrangeOnFabric

  def store(orange, address)
    unsliced_orange = unslice(orange)
    transfer_to_blockchain(unsliced_orange, address)

  def withdraw(address)
    unsliced_orange = withdraw_from_blockchain(address)
    orange = reslice(unsliced_orange)
    return orange   


Instead of calling different classes everywhere, you can simplify your backend by calling the right integration from a single API:

class OrangeAPI

  def store(orange, address, platform)
     if (platform == 'Ethereum')
       StoreOrangeOnEthereum.store(orange, address)
     elsif (platform == 'Hyperledger Fabric')
       StoreOrangeOnFabric.store(orange, address)

  def withdraw(address, platform)
     if (platform == 'Ethereum')
       StoreOrangeOnEthereum.withdraw(orange, address)
     elsif (platform == 'Hyperledger Fabric')
       StoreOrangeOnFabric.withdraw(orange, address)


So on both platforms, you're storing and withdrawing the same orange. You're just packaging the oranges differently depending on the needs of the platform.

  • Thank you for your reply. Regarding the process of encryption and compression, is there some sort of technical requires needed for it documents to be sent to the contract? We have developers that handle our document management systems. I just wanted to know what sort of requirements would be needed to include the pdf in the contract – yomamg Sep 28 '17 at 1:27
  • The blob will have to be encoded as a utf-8 string. AFAIK that's the only requirement. Alternatively you can store the blob as raw byte data. – Ryan.lay Sep 28 '17 at 1:51
  • Thanks, and in regards to the URI method, would it simply just be a link to the database? – yomamg Sep 28 '17 at 1:54
  • It would be a link to a page on your web app that's connected to your database. – Ryan.lay Sep 28 '17 at 1:56
  • It all depends on how your users are accessing the data on your end. – Ryan.lay Sep 28 '17 at 1:58

You can read my article Regarding Offchain solutions on top of Blockchain.

While Cloud Databases like Cosmos DB can be tried. One best option is #Bigchaindb. Which provides blockchain like characteristics while providing high throughput and scalability.


I am working on more possibilities on integrating bigchaindb and blockchain based solutions. Read more about in their web site.

  • 1
    Link only answers are not very good for a question and answer site like stackexchange, because sites can go offline after a few years. I suggest to add the main ides from the link to your answer and use the link to point to additional details. – Ismael Sep 28 '17 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.