Introduction to Reactive Systems Flashcards
Reactive is
A set of Design Principles
Message Driven
Resilient
Elastic
Responsive
What’s the primary goal of Reactive Architecture?
- Software that maintains a Consistent Level of Quality and Responsiveness (No downtime and good response times).
- Failures with little to no effect on the user.
- Software that can be distributed across many machines.
- Software that scale consuming only the necessary resources.
When people talk about Reactive, they generally mean …
- Reactive System (architecture and design)
- Reactive Programming (declarative event-based)
- Functional Reactive Programming (FRP)
Message Driven is the foundation for …
Elastic, Resilient and Responsive systems
Message: Asynchronous and Non-blocking
Non-Blocking: don’t wait for a response, to avoid consuming resources.
Message Driven provides …
Loose Coupling.
Isolation.
Location Transparency.
An Asynchronous Boundary.
Elastic
A Reactive System remains Responsive, despite changes in System Load.
Resilient
A Reactive System remains Responsive, even when failures occur.
The Main Keys for a Resilient System ..
Containment (a consequence of Isolation)
failures are isolated into a single component (they don’t propagate and bring down the whole system).
Isolation: Services can function on their own, they don’t have external dependencies.
Delegation: Recovery is managed by an external component because the failing component is not reliable, if the system goes down the system can’t restart itself because it’s down.
Replication: Multiple copies of a service.
Responsive is …
Cornerstone of Usability.
it is the consequence of a Resilient, Elastic and Message Driven System
It is not a Reactive System if …
- if it is deploy in single node.
- if there is a local cache and there is not way to sync with multiple nodes, hard to scale up, consistency problem.
Reactive Programming is …
Is a Subset Of Asynchronous Programming and a Paradigm where the availability of new Information drives the logic forward rather than having control flow driven by a Thread-of-execution
Reactive Programming Techniques
Takes a problem and breaks it up into small discrete steps, those are executed in an Asynchronous Non-blocking fashion (some sort of callback mechanism).
Futures, Reactive Stream, RxJava, RxScala.
Actor Model Concepts:
- All computations occur inside of an actor, the Principle Abstraction is Encapsulating all computation inside of an actor.
- Actors communicate only through Asynchronous Messages Location transparency
- Each actor is addressable, it has a unique address
Location transparency:
- Local calls look like remote calls, assumes you are always making remote call and you have to assume remote failure scenarios (Eg. network failures)
- You can’t assume that the message is delivered.
Transparent Remoting:
Remote calls look like local calls, hides the fact that you are making remote calls and also potential failure scenarios (Eg. network failues)