Deterministic Time Slicing

This is awesome @ulan :tada: thanks for the update - can’t wait to test it out!

Just to be clear, this memory limit is because of overflowing the heap/main memory, and is different than the upgrades failing due to upgrade cycles limitations, correct? I believe streaming serialization was implemented (see @claudio’s comment in link) that allows very close to (slightly less than) 4GB of heap memory to be serialized to stable memory during upgrades.

Also, with respect to the “freezing threshold” idea

I think it would be great if this would be a system func “hook” that a canister developer could tie into and trigger an action once this threshold is hit.

With CanDB I’m doing something similar (but not implemented at the language/system level obviously). I currently have two fixed limits that are lower than the 4GB heap limits. These limits are:

  1. An INSERT_THRESHOLD, after which no new items can be inserted
  2. An UPDATE_THRESHOLD, after which no new items can be modified (i.e prevents a user from appending to the attribute metadata associated with a record)

I use these thresholds to both trigger auto-scaling actions as well as to permit or reject additional inserts/updates to the CanDB data store in a canister.

3 Likes