Introduction to Rx (Reactive Extensions)

Reactive Extensions (Rx) was originally proposed by Microsoft as a library package that integrated asynchronous and event-driven programming, using observable sequences and LINQ-style query operations. 

Using Rx, developers can use Observables to express asynchronous data streams, use LinQ operations to query asynchronous data streams, and use Schedulers to parameterize concurrency in asynchronous data streams.
Rx = Observables + LINQ + Schedulers.

The most notable feature of Rx is the use of Observable Collection to achieve the effect of composing asynchronous and event-based programming.

With Rx, for any number of asynchronous data streams coming from anywhere, such as from stocks, Twitter posts, or computer events, or web service requests, etc., just use the interface IObserver<T> to subscribe to these event streams, and then use the interface IObservable <T> Alert these subscribers when an event occurs.

Because observable sequences are streams of data, you can query them using standard LINQ via Observable's extension methods. This allows you to filter aggregated combinations of these events.

Rx is implemented by the following projects:

Rx.NET : Microsoft's own Rx implementation.
RxJS : javascript extension
RxCpp: C and C++. extension
Rx.rb: ruby
​​RxPy: Python 3 (Rx.Py) 

RxJava: is a JVM-based Microsoft Reactive Extensions extension launched by Netflix, providing Java, Scala, Clojure, and Groovy language implementations.

Rx (Reactive Extensions) - Home

 

http://www.jdon.com/45833

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325648884&siteId=291194637