Spring Webflux Flashcards
What are the caracterists of the Traditional Rest API Design?
- Limited number of Concurrent Users
- They are synchronously and blocking
- Inefficient resource usage
- Imperative Style API
- No back pressure support
What would be a better API Design?
- Asynchronously and Non-blocking
- Move away from Thread per Request model
- Use fewer threads
- Back Pressure compatible
What is Reactive Programming?
Reactive programming is an asynchronous programming paradigm concerned with data streams and the propagation of change. This means that it becomes possible to express static (e.g. arrays) or dynamic (e.g. event emitters) data streams with ease via the employed programming language(s).
What is a Reactive System?
It a system that is Responsive, Resilient, Elastic and Message Driven.
What are the benefits of a Reactive System?
Systems built as Reactive Systems are more flexible, loosely-coupled and scalable. This makes them easier to develop and amenable to change. They are significantly more tolerant of failure and when failure does occur they meet it with elegance rather than disaster. Reactive Systems are highly responsive, giving users effective interactive feedback.
What is a responsive system?
Responsive systems focus on providing rapid and consistent response times, establishing reliable upper bounds so they deliver a consistent quality of service. This consistent behaviour in turn simplifies error handling, builds end user confidence, and encourages further interaction.
What is a resillient system?
The system stays responsive in the face of failure. This applies not only to highly-available, mission-critical systems — any system that is not resilient will be unresponsive after a failure.
What is a elastic system?
The system stays responsive under varying workload. Reactive Systems can react to changes in the input rate by increasing or decreasing the resources allocated to service these inputs. This implies designs that have no contention points or central bottlenecks, resulting in the ability to shard or replicate components and distribute inputs among them.
What is a message-driven system
Reactive Systems rely on asynchronous message-passing to establish a boundary between components that ensures loose coupling, isolation and location transparency.