Skip to main content

Using Microsoft’s Orleans actor framework for massive scalability

In enterprise organizations, legacy systems aren’t easy to overthrow – or to rearchitect. When you’re facing a system that has grown in size and complexity and that has you locked in for certain types of functionality but hamstrung in scalability, you need: 

  1. An unlimited budget
  2. An unlimited timeline, OR
  3. An actor framework 

If options A and B aren’t in the cards right now, you’re not alone. And if you’re looking into actor frameworks for new solutions to legacy system modernization and scalability, you’re in good company there, too. 

The challenge of scaling cloud software 

The cloud makes it easy to scale hardware, allowing business and UI logic to execute on simultaneous servers to any degree you need or want, but writing software at that scale is much more difficult. Many common strategies attempt to solve that problem by increasing the scalability of the data layer, but each of these approaches introduces added complexity and requires significant effort to implement.  

For example, implementing caching patterns can reduce the load on the data layer, speeding time to scale. However, this tactic requires significant application recoding and introduces significant problems such as determining when and how to invalidate the distributed cache. 

In some limited circumstances, an organization may be able to use a NoSQL database such as Mongo DB to streamline scalability in the cloud. But even if a NoSQL database is an option – and for many organizations, it is not – transitioning from a traditional datastore to a non-relational database is a large undertaking, requiring the organization to take on significant risk and expend substantial effort. 

Enter the Orleans actor framework 

The Orleans actor framework solves the cloud scalability problem in a much more robust and elegant way. Although Orleans could replace the data layer entirely, it’s more often used to add a layer of scalability to the business logic that overlays the data layer, reducing pressure without adding complexity. Orleans allows the data layer to exist in different states and have persistence, which delivers better performance than caching or stateless business logic in a cleaner, more streamlined manner. And, like NoSQL databases, Orleans can also be massively distributed to as many servers and clusters as needed. 

If you’re a gamer, you might be familiar with the Orleans actor framework. Developed by Microsoft to support massive multiplayer online (MMO) games like Halo 4 and Halo 5, Orleans has recently gained popularity as a cross-platform framework for interactive applications in enterprise settings.  

Because our team has a strong background in actor frameworks, we jumped into the vanguard of this emerging opportunity and were eager to test it out. In our experience, modernizing a legacy system at scale often comes at a price – and the cost of maintaining service when multiple components are subject to failure is usually a factor. One of the first things we noticed about Orleans, versus other actor frameworks like AKKA.NET or Service Fabric, was the unusual combination of scalability and fault tolerance.  

If you think about Orleans as an actor framework designed to support millions of people engaged in multi-player games at once, it makes sense that sophisticated failover processes were baked in. Overall, the fact that Orleans had been deployed and proven in that massive, multi-player context gave our team a high level of confidence in suggesting the framework for our business clients. 

Benefits of implementing an actor framework designed for MMO 

In 2022, Fusion’s technology team started putting Orleans into practice at large-scale organizations looking to modernize legacy monoliths with great success. Although it’s not perfect for every use case, we’ve seen significant success in several key areas: 

Observability 

In traditional web-based systems, a user inputs information, and a page refreshes, while behind the scenes, data is processed, databases are updated, and new outputs are pushed to the interface. Observability streamlines that process to deliver outputs in real time. This provides a fluid user experience and provides an elegant workflow – even at full scale.  

In Orleans, actors – called “grains” – have built-in observability, allowing the grains to trigger events and run logic when data changes. Once an Orleans grain is activated, the grain lives in memory with business logic and data in the same location, allowing it to perform at incredibly low latency and with blazingly fast throughput. Orleans grains can be persisted to relational or non-relational databases, further enhancing scalability. 

This design feature makes Orleans a great addition to asynchronous, event-driven architectures. 

Conversational UI 

Orleans also supports a fully responsive and interactive user interface. Using Angular and Signal R to facilitate call and return through established databases and pipelines, we can implement a truly conversational UI. With applications for streamlining internal business processes and enhancing customer experience in public-facing use cases, a conversational UI delivers a cutting-edge experience and enables a fully scalable, customizable way to put the user at the center of any process. 

Lightning speed 

As an actor framework, Orleans makes it easy – and incredibly fast – to support large numbers of processes simultaneously. Again, the fact that Orleans was developed as a gaming framework serves as a benefit! Each unit of Orleans is an actor in the system, updating the internal rules and model. This streamlines processes by removing questions that are not needed by running logic. 

Using Orleans with advanced monitoring and IaC 

While an actor framework like Orleans can deliver a major impact, it’s not a stand-alone modernization solution. In implementing Orleans across enterprise architectures, we’ve found that advanced performance monitoring and infrastructure as code provide considerable companion benefits. 

Orleans + monitoring 

To lock in the scalability and fault tolerance Orleans promises, you’ll need to pair it with an advanced monitoring process. Several vendors offer monitoring solutions that support tiered responses in an unknown number of instances for a fully scalable environment in multiple dimensions. Look for an option that is highly responsive and has capabilities that can address your edge cases. 

Orleans + IaC 

When you’re looking at agile performance at a massive scale, infrastructure as code (IaC) delivers the speed and consistency you need. By managing and provisioning infrastructure through easily editable and distributable scripts and configuration files, IaC reduces manual processing steps and cuts down on slack in the process.  

Figuring out the future of modern app dev 

Stepping into emerging solutions and applying technology in new ways is what Fusion’s team of experienced full-stack technical architects do best. From layering a state-of-the-art UX over an aging system so the modernization process is seamless to the end customer to repositioning technology to support evolving business processes, our team is at the forefront of modern app dev. We stay on top of what’s new and what’s next so that our enterprise clients don’t have to chase buzzwords.  

Actor frameworks like Orleans deliver exciting results, but they aren’t for everyone. Our team can answer your questions, help you unpack your challenges, and suggest the right path forward. Let us know what you need or set up a time to talk.  

Connect with our technology team >> 

About the author

New Era Technology

New Era Technology creates powerful digital, data, and technology solutions that keep companies moving forward in a rapidly changing world. Our 500+ consultants use data insights, experience design, and tech innovation to help you reimagine your business for whatever comes next.

Ready To Talk?

Let us know how we can help you out, and one of our experts will be in touch right away.