I’m a bit puzzled on why you mention that you plan to use both ic-stable-structures and ic-stable-memory. The two libraries essentially solve very similar problems and provide very similar data structures. Is there something that’s missing in one that you expect to get from the other?
Thanks for the confirmation about the Ingress Message limit of 2 MB.
So this means if I was to load a 20 MB file to the IC Chain then it would have to be chunked into 10 pieces correct?
The execution limits are interesting, so it seems they are the same limitation but affecting code execution. In the case of a file load, there is usually a few seconds or minutes to finish the load, from your answer it seems that as long as we “divide the task into 2 MB” chunks we would be okay, correct?
I can’t speak too much for ic-stable-memory, but as one of the authors of ic-stable-structures, I can tell you some of the design decisions that we made that I believe are different:
Compatibility with multi-memory: when/if canisters have multiple stable memories in the future, it’ll be easy to transition stable structures into separate memories and take advantage of that feature.
Data Isolation: Data structures in ic-stable-structures do not share memory, and as a result, a corruption in one of them cannot corrupt the other.
No need for pre-upgrade hooks.
Simple memory management: Each data structure manages its own memory, and the memory operations are O(1) to prevent cycle drainage.
Interoperability: the library provides a MemoryManager, which allows you to split your stable memory into multiple memories that you can use with other libraries or use them to store data from the heap.
ic-stable-structures is used by a number of canisters, including the Bitcoin Canister, ckBTC, and Internet Identity.
I’m not sure I understand your question. You can either have your canister running locally via dfx for testing and development, or in production on the IC. Whatever behavior you see locally should be what you see once you deploy to the IC. Are you seeing a discrepancy between the two environments?