When to choose Orleans
It is important to understand when not to choose a specific technology or framework. In this section, let's learn about when to choose and when not to choose Orleans.
Orleans is a great framework to build distributed applications. But if you have a single grain that takes 50% of all the requests, it is going to be a challenge to scale the system. If you have a request that needs to communicate with 50 other grains to serve the response, it is going to add latency and will have an impact on throughput. In both the scenarios mentioned above, the main problem is granularity. In all the Microsoft systems mentioned in the previous section that use Microsoft Orleans, the state is naturally partitionable and it nicely maps grains. It can be more easily distributed across a cluster of machines.
To summarize, think of the granularity while working with Orleans. Orleans may not be the best choice when data is shared across grains, when there's a small...