You have hundreds, thousands, perhaps even millions of sensors in your stores, factories, pipelines. And something goes wrong. You need software that can make intelligent decisions in real time, perhaps coordinating hundreds of devices: stop the assembly line, reroute the flow.
Or you’ve created a SaaS service that’s suddenly become wildly successful, with tens of thousands of users online at any given time. Your site is groaning under the strain. Your users demand real-time response, you need resiliency, you can’t wait on SQL databases – and you need it to be easy to program so your developers can get it to market fast.
There’s a solution, and it’s been “battle-tested” in a surprising place: online video games, in particular, the best-selling “Halo” franchise from Microsoft. “Actor frameworks” make massive scale for millions of interacting users (or devices) a straightforward thing.
Think about it: when you log on to Halo online, there’s a little piece of code running in the cloud – it represents you; and there may be hundreds of thousands of other players online simultaneously, all with their own little piece of code. That little code object is your “actor,” and it keeps track of where you are in the game, your score, your weapons.
It’s you in the cloud.
The same concept can be used for managing IoT sensors, cars, customers – any scenario where you have to keep track of lots of things at once. Little code objects that represent something real. Not you (or your sensor or your customer): but code in the cloud that acts on your behalf. An actor.
Which server is your actor running on? Where is your opponent’s? What if the server fails? How do you scale? Your developers don’t have to care: the framework takes care of all the low-level infrastructure, scale, networking, and failover.
The point: massive, distributed scale – which used to be a Hard Problem – isn’t anymore. Your developers focus on business logic – adding value to your business.
The “actor frameworks” in Halo were originally developed by Microsoft Research and 343 Industries. But there’s been such demand for a “productized” version that we’ve incorporated the actor model into our comprehensive next-generation microservice cloud application framework, called Service Fabric, available in Azure (and on-premises as well) today. Service Fabric is equally battle-hardened, being the evolution of the application infrastructure used in mission-critical applications like Skype for Business, Cortana, and a number of Azure services. It includes auto-scaling, integrated health monitoring, service healing, orchestration and automation for microservices of all kinds – actors, as well as containerized (like Docker) applications.
Because developers focus only on business logic, not infrastructure, actors accelerate your time to market. Dr. Gregory Athas, principal software architect at BMW, who implemented Service Fabric actors for their BMW Connected application, says, “We’ve found actors to be a natural way to model users in our system. They allow us to focus on our core functionality while inherently supporting persistence, scalability, and resiliency.” Similarly, Stephen Berard of Schneider Electric adds, “Service Fabric reliable actors enabled us to build a scalable solution for implementing our device logic within EcoStruxure.io.”
You may have detected a theme in our recent posts: that increasingly the cloud permits developers and analysts to focus on business logic, and not infrastructure. Actor-model is a great example of this: the cloud provides hyperscale, failover, and all sorts of other benefits, while your developers focus on adding value to your business.
That’s what enterprise computing in the 21st century is all about.
* * *
Oh, and a postscript: You can do all sorts of things with actors. One of my colleagues, Barry Briggs, wrote an actor-based spreadsheet – where each cell is an actor -- a few years ago as a technology demonstration running in Azure. Using several hundred cores he was able to load and model the world’s historical weather records – into one sheet.
Here he is demonstrating (with a nice technical description of actor model):