0

I am a full stack enginer. I am going to develop a decentralized social app. Fully not have backend.

My choises:

  • Frontend: react or vue.
  • Big content storage: arweave.
  • Cheaper and faster chain: polygon.
  • Authentication: smart contract.
  • CURD database: ?

There are flexible and large amounts of data, such as likes, comments, reports, and mappings of content in arweave.

Can there data be stored in smart contact using list or mapping type?

Because there will be millions of data. I can't imagine there data just be stored in List or Mapping variable.

And how to do search work in there data, Gas fee will be huge.

My english is not good, hope you understand what I mean and thanks for your answer.

2
  • Blockchain is not a database, it is slow,expensive and hard to query you need to redesign your application.
    – Majd TL
    Commented Mar 20, 2022 at 9:10
  • @MajdTL Can use centralized server as cache to solve problem of slow. Some side chain is cheap enough. With the development of blockchain, all problems will be solved.
    – IceDog
    Commented Mar 22, 2022 at 8:40

1 Answer 1

0

You could store that on a blockchain. And if you use mapping in a smart way, accessing the data, and even editing it shouldn't be that expensive. But the sheer amount of data (Millions of users) will likely make it too expensive for you yourself to cover the day-to-day cost of operating everything. However, if individual users are paying their own price, it might have some utility.

But in general, you should try and write as little data as you can into the blockchain, because it's expensive.

2
  • My idea is to use a centralized server to back up data and deal with problems such as search. My question. is there a size limit for smart contracts? If I have an array of millions of lengths to store user names and other information, will it fail?
    – IceDog
    Commented Mar 22, 2022 at 8:44
  • That is a good Question! I too wanted to ask that (What is the max amount of data you can store or return in smartContract). From what I gather you should be fine as long as the size of the array/List doesn't go over the block gas Limit (AKA: The action gets too expensive). Not sure about the exact number, but it would also depend on the type of data you had stored in the array/List. After all, array of 10 addresses takes more space than array of 10 UINT8 variables.
    – Sky
    Commented Mar 22, 2022 at 9:35

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.