7

I am trying to develop a social media platform on top of the Ethereum platform and integrate it with my currency (an ERC20 Token). This platform will allow users to post media files (articles/images/videos) and others will view and comment. So I am here for answers of a few questions.

First Question: What is the recommended way to store media files in DApps?
I know two options; IPFS and SWARM but don't know what would be best suited in my scenario. In fact swarm is in test phase.

Second Question: What are the recommended ways to authenticate users in DApp?
To avoid authentication on basis of long public keys I found Uport, can be used in DApps for authentication of users in a user friendly way but it is still in Alpha.

Third Question: What techonology stack is recommended for frontend (Mobile,Web)? Is there any need for backend or middleware for DApps?

Fourth Question: Is it possible to develop a system in a conventional way with centralized database (marai/mongo/casendra) communicating with backend but backend is also linked with blockchain for saving hashes of data for its proof of existence.

Fifth Question: What are the good practices or recommended way to architect and develop huge blockchain based systems (Dapps) ?

Please feel free to edit if there is something missing that could be helpful for developing DApps.

2
  • I think it may be worth breaking this up into distinct questions as they each cover very different topics. Commented Aug 15, 2017 at 22:48
  • 1
    Yes, it can be but the sole purpose of this question will lost. The question is not about individual technologies but about the infrastructure of DApps.
    – furusiyya
    Commented Aug 20, 2017 at 8:50

1 Answer 1

3

What is the recommended way to store media files in DApps?

There is no recommended way. Most DApps do not deal with media but with value, security and problems that require cryptographic proofs or authentication (who is who and who owns a certain private key). And yes, IPFS and Swarm are data storage options. IPFS is cutting edge right now, meaning not everything is perfect. It is growing, they have an awesome team (like super awesome), and now they have near-unlimited capital, so that bodes well for the future of IPFS and Filecoin. Media files are typically large compared to text and storing data is very expensive on the Ethereum blockchain (ranging from $0.09 - $0.90 per kB at current Ethereum prices). Not to mention the limitations and difficulty of working with media files (assuming you'll need to do something more than just store them)in Solidity.

What are the recommended ways to authenticate users in DApp?

This is one nice thing about DApps: only those who possess a private key and the passphrase of an account can authenticate as that account, so having users authenticate themselves is built into Ethereum. You mention uPort, which is early stage itself but has a nice team as well. uPort delivers your Ethereum public key (this goes back to the public/private key bit which is built into Ethereum). This address is a very unique user identifier. See the public_key bit in the following image from a recent uPort blog post:

enter image description here

What techonology stak[sic] is recommended for frontend (Mobile,Web)? Is there any need for backend or middleware for DApps?

There are a few parts of typical DApp tech stacks:

  1. Solidity smart contracts that are executed and stored in the blockchain
  2. A javascript web client that connects to geth nodes (these are the clients' way of connecting to and interacting with the blockchain)
  3. The clients in #2 basically all run web3. web3 is a Javascript library written by Ethereum itself. web3 is definitely something you'll need and want to get familiar with.
  4. Possibly IPFS for storage of data off-chain that is one or both of: too large to store on-chain or too difficult to work with with the current limitation of Ethereum Virtual Machine high-level languages.

Fourth Question: Is it possible to develop a system in a conventional way with centralized database (marai/mongo/casendra) communicating with backend but backend is also linked with blockchain for saving hashes of data for its proof of existence.

Short answer is yes, it is possible. How this problem is solved is of great interest to me working on http://Disten.se right now. We have built a tool that maps git hashes to IPFS hashes, for instance (to allow the state of a repo to be secured on chain). This is a way of storing (which is really what blockchains are good for) a pointer to the correct or true state of some content elsewhere. As you hinted at, the hash can actually encode the content itself (which is an amazing property of hash functions), and can be updated according to a set of rules written in your smart contract code.

Fifth Question: What are the good practices or recommended way to architect and develop huge blockchain based systems (Dapps) ?

This series of questions somewhat answers this question, so I hope you find the above valuable. Feel free to get in touch if you have any more questions I can help with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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