Do you know what many dApp developers struggle with?
Which data to put on-chain. More data on the chain can drive the cost up. Too much data might render your app unusable. Storing fewer data might not be an option.
Here are some ideas for you to fix this.
A thread. ↓
1. Use A Dedicated Database
This approach will make your dApp into an app.
If you bring in central data storage, you can circumvent the limits of some blockchains, but it doesn't keep the promise of being decentralized.
You can store anything that you can't store on-chain in your database and associate it with a user.
Whenever you need that type of data, you fetch it from your database.
2. Use The Interplanetary File System
The IPFS Protocol is a peer-to-peer hypermedia protocol.
It works like BitTorrent but aims to create a single global network.
If you have a client installed, you can "pin" files that get a unique identifier.
Those files can be loaded from your machine and are then cached for others to access. This is how files can easily be distributed.
IPFS also comes with HTTP gateways so you can even access files, stored in IPFS, from the rest of the "traditional" internet.
Data you can't store on-chain can easily be stored on IPFS and accessed again from there.
This gives you all the storage capacity you would ever need.
Imagine IPFS to be the decentralized Amazon S3 of your dreams.
3. Go Multi-Chain
You can use more than one blockchain for your dApp.
Although your main dApp might rely on Ethereum, you could use other blockchains that allow for more data to be stored cheaper.
Many blockchains have a bridge to Ethereum, so you don't need to work with two fully disconnected chains.
This can come in handy if you don't want to force your users to have more than one wallet if they want to use your dApp.
Choosing a cheaper and faster blockchain to store data that isn't as relevant as your main data can make a lot of sense.
This saves you and your user's money.
4. Use A Dedicated Blockchain Database
There are actually dedicated blockchain databases.
They aren't centralized.
Instead, they are based on their own blockchain implementation that allows you to interface with them.
Blockchain databases are a specific flavor of the multi-chain approach but provide an easier-to-use interface because they usually come with their own drivers/libraries, aimed at providing a database-like interface and not a blockchain-like one.
5. Conclusion
Storing a lot of data for a dApp can sometimes be a little more difficult than the usual interfacing with the blockchain of your choice.
The ecosystem, however, evolves every day and brings more solutions that help to solve such problems.
6. TThread end
That's it for this thread.
I hope you learned something valuable.
If you enjoyed reading this thread, consider dropping a like, retweet the first tweet, and follow me (@oliverjumpertz) for more content like this.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
From time to time you read the term Web 3.0. For many of us, however, this term is still mysterious.
Time to shed some light on it and explain what it actually is all about!
A thread. ↓
1. The Web Today
The web as we know it today is actually already Web 2.0.
It is an extension of the original Web (1.0).
In the beginning, the web was meant for websites to provide information and users to consume it.
Web 2.0 changed this and brought the user into the game.
Users started to create the content themselves, while websites became the platform to distribute this new content instead of only consuming information.