I was looking at Motoko and some of the example code bases. It all seems very functional in nature. After looking through the docs on canisters I see that they run the code and carry state. I was wondering if they run like Lambda functions (in say AWS): as in they only run and scale when something is interacting with them. vs an EC2 instance which is a server that is always running and does not automatically scale.
From the docs I am inferring that canisters are paid with cycles for the amount of requests, CPU, disk space those canisters are using in IC. Efficiency is gained by using resources where they are needed, rather than provisioning them all of the time for when they might be needed. Very much like a functional lambda server-less model.
If non-tech people ask: why is this cheaper than AWS? I think it would be easy to say “well they run like Lambda or Firebase the function inits and runs when it is interacted with, and you are only charged for that time”.
I found this A Closer Look at Software Canisters, an Evolution of Smart Contracts | by DFINITY | The Internet Computer Review | Medium but would like more of a deep dive on canisters running as processes.
- Be able to explain why IC is cheaper and more efficient than a traditional provider.
- Understand more about canister runtime within IC.