How to use actors in distributed applications

Actors make it easier to build and manage scalable, distributed cloud applications. Each actor can send and receive messages and taking certain actions based on message contents

Become An Insider

Sign up now and get FREE access to hundreds of Insider articles, guides, reviews, interviews, blogs, and other premium content. Learn more.

Building for the cloud and for scalability means building a different type of application. Instead of constructing monolithic applications, you need to break code up into collections of services that can scale out across the compute fabric of a public or private cloud.

Yet such distributed systems have their own problems. Depending on the application, you may need to solve complex issues of managing state in an unpredictable, failure-prone environment -- one where the underlying fabric of virtual infrastructures may be pre-empted at any time.

Developers looking to build distributed systems quickly discover that the models and patterns we use for the current generation of applications don't scale. You wouldn't use an n-tier MVC architecture to power a distributed sensor network, for example, or an MVVM framework to handle an international VoIP service.

That's where the actor-message pattern comes in. The concept was born in 1973, and it's becoming increasingly popular -- you'll find it embedded in the Project Orleans tools from Microsoft Research and in such modern languages as Erlang.

Getting to know the actor

The actor is an important concept in distributed application development. It builds on the idea that everything is capable of receiving and sending messages and acting on the content of those messages. Concurrency is handled by the messages in a system, because there's no way of managing arrival order -- an important point to understand in preparation for the massive networks we'll need to manage when the Internet of things arrives.

To continue reading this article register now