What needs to be done to ensure the scalability of Internet Computer apps?

As described here, the memory limit of each canister is 4GB. As application developers, we need to deal with the situation in advance when the data exceeds 4GB. I know about Bigmap, but there is not much information. Recently, there is also sudograph, which is a rust library.

Do application developers need to think about this in advance? Are there any examples based on motoko to show what application developers should do?

1 Like

Yes, you should think of your memory beforehand. Even if the proposal for 64-bit web assembly will be implemented, one day your data might outgrow this limit also.

There are basically two ways to follow right now:

  1. Wait for BigMap to get re-prioritized again and released
  2. Implement your own solution

For the latter the simplest take might be something like to spawn a new storage canister each time the old one’s size is close to 4gb (I don’t know how to count it not by hand right now though) and use composite ids (storage_canister_id, data_entry_id) to address this data.

1 Like