reactive applications

2
Applications that are event-driven, scalable, resilient and responsive: delivering highly responsive user experiences with a real-time feel, backed by a scalable and resilient application stack, ready to be deployed on multicore and cloud computing architectures. Applications today are deployed on infrastructures ranging from mobile devices to cloud clusters. Response time expectations are now in milliseconds and 100% uptime is a basic necessity. The need of the hour is to have a highly responsive, scalable, resilient application that can keep the user engaged. This calls for new technologies that have these features built in to the basic design rather than these features getting added to an existing application as an afterthought. Reactive applications represent a balanced approach to addressing a wide range of challenges in software development. Building on an event-driven, message- based foundation, they provide the tools needed to ensure scalability and resilience. On top of this they support rich, responsive user interactions. It's a concept that really has been around for a long time, but it's now gaining special focus and becoming viable in main stream languages. It’s essentially moving away from executing a set of steps to executing an event on a component which might require other events on the same or other components to be fired which in turn might fire further more events. The components are loosely coupled and each are scalable independently and location transparent. Key Traits of Reactive Applications Event Driven: Events are discrete pieces of information describing facts. Event-driven systems push data to consumers when it is available avoiding the wastage of resources by having the consumers continually listen or wait for the data. The asynchronous nature of communication implements loose coupling design. It also means that the application is highly concurrent by design. They can make use of multicore hardware without changes. Any core within a CPU is able to process any message event, leading to a dramatic increase in opportunities for parallelization. These applications are capable of reacting to Events: The event-driven nature enables the following qualities. Load: Focus on scalability rather than single-user performance. Failure: Build resilient systems with the ability to recover at all levels. Users: Combine the above traits for an interactive user experience.

Upload: ashokkumar-t-a

Post on 20-Jan-2017

64 views

Category:

Technology


0 download

TRANSCRIPT

Applications that are event-driven, scalable, resilient and responsive: delivering highly

responsive user experiences with a real -time feel, backed by a scalable and resilient

application stack, ready to be deployed on multicore and cloud computing architectures.

Applications today are deployed on infrastructures

ranging from mobile devices to cloud clusters.

Response time expectations are now in milliseconds

and 100% uptime is a basic necessity.

The need of the hour is to have a highly responsive,

scalable, resilient application that can keep the user

engaged.

This calls for new technologies that have these

features built in to the basic design rather than these

features getting added to an existing application as

an afterthought.

Reactive applications represent a balanced approach

to addressing a wide range of challenges in software

development. Building on an event-driven, message-

based foundation, they provide the tools needed to

ensure scalability and resilience. On top of this they

support rich, responsive user interactions.

It's a concept that really has been around for a long

time, but it's now gaining special focus and becoming

viable in main stream languages.

It’s essentially moving away from executing a set of

steps to executing an event on a component which

might require other events on the same or other

components to be fired which in turn might fire

further more events. The components are loosely

coupled and each are scalable independently and

location transparent.

Key Traits of Reactive Applications

Event Driven: Events are discrete pieces of

information describing facts. Event-driven systems

push data to consumers when it is available avoiding

the wastage of resources by having the consumers

continually listen or wait for the data. The

asynchronous nature of communication implements

loose coupling design. It also means that the

application is highly concurrent by design.

They can make use of multicore hardware without

changes. Any core within a CPU is able to process any

message event, leading to a dramatic increase in

opportunities for parallelization.

These applications are capable of reacting to

Events: The event-driven nature enables the

following qualities.

Load: Focus on scalability rather than single-user

performance.

Failure: Build resilient systems with the ability to

recover at all levels.

Users: Combine the above traits for an interactive

user experience.

Scalable: A scalable application expands according to

its usage. Achieved with the options of being able to

scale out or in or up or down without redesigning or

rewriting the application. The loose coupling and

location independence between components and

subsystems make it possible to scale out the system

onto multiple nodes while retaining the same

programming model with the same semantics.

Scalability helps managing risk by providing optimal

hardware and scaling it based on demand. A scalable

solution also avoids having an application that is

unable to make use of new hardware becoming

available.

Resilient: In a reactive application, resilience is not an

afterthought but part of the design from the

beginning. Making failure a first class construct in the

programming model provides the means to react to

and manage it, which leads to applications that are

highly tolerant to failure by being able to heal and

repair themselves at runtime.

The event-driven model has the necessary primitives

to realize this model of failure management. The

loose coupling in an event-driven model provides fully

isolated components in which failures can be

captured together with their context, encapsulated as

messages, and sent off to other components that can

inspect the error and decide how to respond.

Responsive: Responsive applications are real-time,

engaging, rich and collaborative. They create an open

and ongoing dialog with the customers. They enable

highly interactive applications like Google Docs which

is a collaborative document editing tool.

Observable models of reactive applications enable

other systems to receive events when state changes.

This can provide a real-time connection between

users and systems. For example, when multiple users

work concurrently on the same model, changes can

be reactively synchronized bi-directionally between

them, thus appearing as if the model is shared

without the constraints of locking.

Reactive Languages

NetFlix: Leverages server-side conconcurrency

without the typical thread-safety and synchronization

concerns.

React: from Facebook, lets you build application using

components that know how to render some data.

When data changes, components update

automatically in a very efficient way, only where

necessary

Typesafe: A JVM-based runtime and toolset for

building Reactive applications

Node.js: Uses an event-driven non-blocking I/O model

that is ideal for data-intensive and real-time

applications running across distributed devices.

References

http://www.reactivemanifesto.org/

http://en.wikipedia.org/wiki/Reactive_programming

http://www.infoq.com/news/2013/08/reactive-programming-emerging

http://www.infoworld.com/t/java-programming/fear-multicore-apps-reactive-programming-the-rescue-227985