2

I have tried developing Dapps using ethereum blockchain network.

If we are going to have the Blockchain as our truth value of our app. Whether all the data related to app will be stored and retrieved from blockchain ?

Else, do we need to have any intermediary data store which will connect with UI. And also, is that efficient way to make use of logs to get the data from blockchain by watching all the events logs using web3 channel.

Seetharaman GR
  • 851
  • 1
  • 7
  • 14
  • Checkout this answer I've given on a similar post. It answers your question (and has a nice diagram) https://ethereum.stackexchange.com/questions/11928/what-elements-of-a-dapps-backend-are-usually-stored-in-a-decentralised-location/11930 – Malone May 01 '17 at 23:50

2 Answers2

4

I'm a newbie in Blockchain domain, but with my limited experience, I suggest, you should explore IPFS for storage. "IPFS and blockchain are a very good combination".

Storing data on blockchain can be less efficient; So with IPFS, basically data would be stored on blockchain only as a hash and files would be present on IPFS(Interplanetary file system).

Also, you are right that events are cheaper(efficient) in compare to storing data in state variables and retrieval.

Sanchit
  • 3,482
  • 1
  • 12
  • 29
  • Thanks @sanchit. I agree with you for storing files in IPFS. But can I have a same private key to sign the IPFS signing and ethereum signing. Otherwise each is different blockchain based platform we could be pushed to have two different private keys. – Seetharaman GR May 01 '17 at 05:11
  • Not sure about this, will find out and keep you posted. – Sanchit May 01 '17 at 06:39
2

Short answer, for now you need to host these on traditional hosting infrastructure.

However the storage layer for DApps in the near future will be Swarm.

For the time being you should continue using events to emit transaction logs, it is the only way to get notifications for now.

blockchaindev
  • 251
  • 1
  • 5
  • In swarm, if I'm storing a file and getting the hash putting in blockchain. How can i restrict someone could not access that file by only getting the hash. Any suggested way? – Seetharaman GR May 01 '17 at 05:09