Modern day web applications are increasingly under pressure to provide a richer user experience. At minimum, usually those applications start with the ability to support hundreds of concurrent users with few thousands concurrent requests or calls a day, however that could increase to millions if the venture proved to be successful and need to grow, and you need to react and adopt without fundamentally changing the architecture or the technology building blocks. The Modern web app is required to adopt to the load and if it fails; it will do so gracefully and recover seamlessly from that failure without negatively impacting the user experience. Also, it’s required to provide a relatively fast response time, in milliseconds instead of seconds.
The Actor Model
Have you ever been in a situation where you have to deliver an application or a solution in a very short time? Or overcommitted to the business and you found out that; the amount of work is a lot more than you expected? You have to “REACT” gracefully and deliver. Luckly, you have a lot of friends on your team who can help and “Act” on your behalf, who are called “Actors”, they’re waiting for your tasks or jobs and you can delegate tasks to those actors without worrying about multi-tasking confusion, they know what to do and they can communicate using messaging, they won’t waste your time or your cycles asking silly questions, they’re resilient too, they can sustain failure and they know how to cooperate to recover, they’re independent individuals with no strings or threads attached. Putting the humor aside, this is how the modern web application architecture operates.
This is how the Actor Model works, the actor model is at the core of modern application architecture and Reactive Architecture.
Modern Application Architecture and the Reactive Paradigm
Reactive Architecture is not new, it was just forgotten for some time, recently, it resurfaced or resurrected to support the modern applications requirements.
The Reactive paradigm is supporting the following computing qualities, I’m going to use the “Triple R” notation to make it easier to memorize
- Reactive (scalable)/Elastic
Has the ability to seamlessly handle an increasing or growing number of requests without negatively impacting the user experience, it’s even better if it supports on-demand computing by scaling up or down the consumption of resources based on the current system demand (Elasticity).
The increasing concurrency and load will not negatively impact the response time.
The ability to recover from unexpected failure without impacting the user experience or causing a complete system downtime or full system recovery, supporting self-healing and embracing failure.
The Reactive model is achieving the above by adopting the message-driven architecture, the Actor model, Cloud-Native, Edge-Computing and many more, for a complete summary, please refer to our blog here.
Functional Programming and the Reactive Paradigm
While Functional programming is sharing a lot with the Reactive paradigm, however, that doesn’t mean you can only do this in Haskell or just pure functional language.
Reactive Programming in Java
Lightbend have already developed the needed technology stack to build reactive systems in Java & Scala; they created several capabilities in that space to support the Reactive paradigm, now we have the Play Framework and the Akka toolkit to build enterprise solutions and Cloud-Native stateful applications using Reactive Microservices Architecture.
If you need more guidance in that space and looking for the best of breed solution architecture, please reach out to us at Logic Keepers, we provide services and coaching workshops dedicated to serve that space.
Logic Keepers is a Lightbend Consulting Partner