Skip to main content

Runtime

The runtime environment in the Calimero Network is essential for executing decentralized applications (DApps). It acts as a bridge between the application logic, the network, and storage layers, ensuring seamless operation and integration. The runtime ensures secure, isolated, and efficient execution of applications by managing resources effectively, supporting real-time event handling, enabling scalability, and providing robust storage and transaction management.

Core Capabilities​

  • Security and Isolation: The runtime provides a secure execution environment for Calimero applications using WebAssembly (WASM). Each application is sandboxed in the WASM VM, ensuring proper isolation and preventing interference between applications. This setup also ensures that applications cannot access unauthorized resources, maintaining a secure environment.

  • Multi-Application Support: The runtime allows multiple applications to run concurrently on the same node and supports multiple instances (contexts) of the same application, each with its own state. This capability enhances the flexibility and scalability of the network.

  • Scoped Storage: The runtime manages storage by partitioning it and governing where each context stores its state. These implementation details are abstracted from the app developer, ensuring that storage management is handled seamlessly and securely.

  • Atomic Transactions: The runtime guarantees atomic transactions, ensuring that if a transaction fails, it is completely rolled back with no state updates or side effects detected. This guarantees consistency and reliability in the application's state and any connected clients.

  • Log Collection and Relaying Events: The runtime facilitates log collection and relays events emitted by the applications to connected clients, enabling real-time monitoring and interaction.

  • Resource Management: The runtime defines resource limits for applications to ensure fair usage and prevent malicious behavior. This includes limiting CPU, memory, and network usage to prevent any single application from monopolizing system resources or compromising the host system.

  • Task Management and Performance: The runtime keeps track of WASM instances up to a defined threshold, effortlessly queueing transactions to reuse live instances and shutting down stale ones to reclaim system resources. These optimizations ensure efficient resource utilization and improved performance.

Was this page helpful?
Need some help? Check Support page