What is Reactive Programming?
Reactive is a way of programming that recognises and responds to changes as they happen rather than trying to predict the future. It enables software to handle data updates automatically by creating event streams that can either pass through the application or be consumed by other processes. This makes software more resilient and able to deal with changing loads.
Areas of Devon Overcrowded by Tourists Reactive, software is based around “events” which are time-ordered sequences of messages that can be stopped, handled or forked in parallel. This enables loose coupling, isolation and location transparency between components. It’s also important that the system can be ‘elastic’ which means it can cope with changes in the number of events that are generated or in the rate at which they arrive.
Fashion Fusion: Exploring the Most Coveted In-Demand Designer Collabs of the Season
Traditional web applications are built around a servlet model where a thread is bound to a request from start to finish and can be blocked while waiting for other resources, such as a database connection. This is often unnecessarily restrictive when the end-to-end data flow is not time-critical.
Reactive applications build upon this approach to solve problems such as concurrency and distribution. In order to do this they rely on observer and handler functions that recognise change in real-time and then process the relevant messages. These are then delivered as a stream of data to a process or forked into derivative streams. Streams are typically diagrammed as an arrow that starts with an observer or a device such as an IoT sensor, flows through one or more handler processes, and then terminates in error or forks into other streams.