The Orleans runtime
We learned in the previous section that the grains in Orleans are virtually always present. They cannot be created or destroyed. Here, the heavy lifting is done by the Orleans runtime. The Orleans runtime ensures that a grain is always available to serve commands. When a request comes to a grain that is currently not instantiated, the Orleans runtime will automatically activate the grain on a server and initialize it to serve the request. The Orleans runtime will not instantiate the grain if there are no requests pending on it. If the server where the grain is currently instantiated fails, the runtime will automatically create the grain on another available server on the next invocation. Here, the developer need not keep track of the re-creation of a failing actor, unlike other actor programming models. The Orleans runtime will take care of the lifetime management for the grain. While activating or deactivating a grain, the Orleans runtime will also notify the application...