Reactive Systems: Actor Model and Akka.NET

All the world's a stage,
And all the men and women merely players.
-Shakespeare  

This quote from William Shakespeare's pastoral comedy As You Like It, can be very helpful when describing Actor Model. In this post, we will see what an Actor Model is and how you can use it to build concurrent, distributed, and resilient applications.

Leaning Towards Reactive Architecture

Why Reactive Architecture?

Reactive Architecture aims to provide software that remains responsive in all situations. Reactive Systems build user confidence by ensuring that the application is available whenever the users need it in all conditions.

What Is the Goal of Reactive Architecture?

  • Be responsive to interactions with its users
  • Handle failure and remain available during outages
  • Strive under varying load conditions
  • Be able to send, receive, and route messages in varying network conditions

What Is Reactive Manifesto?

The Reactive Manifesto is a document that was authored by Jonas Boner, Dave Farley, Roland Kuhn and Martin Thompson. The Manifesto was created in response to companies trying to cope with changes in the software landscape. Multiple groups or companies independently developed similar patterns for solving similar solutions. So aspects of a Reactive Systems were previously individually recognized by these groups. So the Manifesto attempts to bring all of these common ideas into a single unified set of principles, known as Reactive Principles.

How to Build Scalable, Stateful Java Services in Under 15 Minutes

Five years ago when I started tracking media buzz around stateful architectures, I’d see a few articles every month about running stateful containers. That's about when Caitie McCaffrey first shared this awesome presentation about building scalable stateful architectures. Since then, the dominant software paradigm has become functional application design. The actor model and other object-oriented paradigms are still in use, but database-centric RESTful architectures are standard means of building web applications today.

However, the tides are beginning to shift. Due to innovations like the blockchain, growing demand for real-time applications, the digitization of OT assets, and the proliferation of cheap compute resources at the network edge; there’s renewed interest in decentralized application architectures. As such, there’s also been increased focus on stateful applications. For example, at least five Apache Foundation projects (Beam, Flink, Spark, Samza, and TomEE) are touting statefulness as a benefit today. Modern applications communicate across multiple application silos and must span real-world machines, devices, and distributed data centers around the world. Stateful application architectures provide a way to abstract away the logistical effort of state management, thereby reducing development and management effort necessary to operate massive-scale distributed applications.

Build a Scalable, Stateful To-Do List in 15 Minutes or Less

For the rest of this post, I want to disprove the notion that building scalable, stateful applications is a task too complex for everyday Java developers. In order to illustrate how easily a stateful application can be setup, we’ll walk through a tutorial for building a simple to-do list using the Swim platform. You can find all the source code for the to-do list tutorial here on GitHub.