|
| 1 | +# The pre-2023 README |
| 2 | + |
| 3 | +By early 2023, the main README had become a bit of a dumping ground for information, most of which was at an inappropriate level of detail for someone visiting the repo for the first time to find out what it was about. |
| 4 | + |
| 5 | +However, most of the information in there would be of some use to someone, so we've moved the more obscure bits out into this file so that they don't vanish entirely. |
| 6 | + |
| 7 | +## A Brief Intro |
| 8 | + |
| 9 | +(**Note:** none of this was untrue, but it focused on detail without really saying what Rx is actually for.) |
| 10 | + |
| 11 | +The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. Using Rx, developers *__represent__* asynchronous data streams with [Observables](https://docs.microsoft.com/dotnet/api/system.iobservable-1), *__query__* asynchronous data streams using [LINQ operators](http://msdn.microsoft.com/en-us/library/hh242983.aspx), and *__parameterize__* the concurrency in the asynchronous data streams using [Schedulers](http://msdn.microsoft.com/en-us/library/hh242963.aspx). Simply put, Rx = Observables + LINQ + Schedulers. |
| 12 | + |
| 13 | +Whether you are authoring a traditional desktop or web-based application, you have to deal with asynchronous and event-based programming from time to time. Desktop applications have I/O operations and computationally expensive tasks that might take a long time to complete and potentially block other active threads. Furthermore, handling exceptions, cancellation, and synchronization is difficult and error-prone. |
| 14 | + |
| 15 | +Using Rx, you can represent multiple asynchronous data streams (that come from diverse sources, e.g., stock quote, tweets, computer events, web service requests, etc.), and subscribe to the event stream using the `IObserver<T>` interface. The `IObservable<T>` interface notifies the subscribed `IObserver<T>` interface whenever an event occurs. |
| 16 | + |
| 17 | +Because observable sequences are data streams, you can query them using standard LINQ query operators implemented by the Observable extension methods. Thus you can filter, project, aggregate, compose and perform time-based operations on multiple events easily by using these standard LINQ operators. In addition, there are a number of other reactive stream specific operators that allow powerful queries to be written. Cancellation, exceptions, and synchronization are also handled gracefully by using the extension methods provided by Rx. |
| 18 | + |
| 19 | +Rx complements and interoperates smoothly with both synchronous data streams (`IEnumerable<T>`) and single-value asynchronous computations (`Task<T>`) as the following diagram shows: |
| 20 | + |
| 21 | + |
| 22 | +<table> |
| 23 | + <th></th><th>Single return value</th><th>Multiple return values</th> |
| 24 | + <tr> |
| 25 | + <td>Pull/Synchronous/Interactive</td> |
| 26 | + <td>T</td> |
| 27 | + <td>IEnumerable<T></td> |
| 28 | + </tr> |
| 29 | + <tr> |
| 30 | + <td>Push/Asynchronous/Reactive</td> |
| 31 | + <td>Task<T></td> |
| 32 | + <td>IObservable<T></td> |
| 33 | + </tr> |
| 34 | +</table> |
| 35 | + |
| 36 | +Additional documentation, video, tutorials and HOL are available on [MSDN](https://docs.microsoft.com/en-us/previous-versions/dotnet/reactive-extensions/hh242985(v=vs.103)), on [*Introduction to Rx*](http://introtorx.com/), [*ReactiveX*](http://reactivex.io/), and [ReactiveUI](https://reactiveui.net/). |
| 37 | + |
| 38 | + |
| 39 | +## Flavors of Rx |
| 40 | + |
| 41 | +* __Rx.NET__: *(this repository)* The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. |
| 42 | +* [RxJS](https://github.com/ReactiveX/rxjs): The Reactive Extensions for JavaScript (RxJS) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in JavaScript which can target both the browser and Node.js. |
| 43 | +* [RxJava](https://github.com/ReactiveX/RxJava): Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM. |
| 44 | +* [RxScala](https://github.com/ReactiveX/RxScala): Reactive Extensions for Scala – a library for composing asynchronous and event-based programs using observable sequences |
| 45 | +* [RxCpp](https://github.com/Reactive-Extensions/RxCpp): The Reactive Extensions for Native (RxCpp) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators in both C and C++. |
| 46 | +* [RxPy](https://github.com/ReactiveX/RxPY): The Reactive Extensions for Python 3 (Rx.Py) is a set of libraries to compose asynchronous and event-based programs using observable collections and LINQ-style query operators in Python 3. |
| 47 | + |
| 48 | + |
| 49 | +## Applications |
| 50 | + |
| 51 | +* [Tx](https://github.com/Reactive-Extensions/Tx): a set of code samples showing how to use LINQ to events, such as real-time standing queries and queries on past history from trace and log files, which targets ETW, Windows Event Logs and SQL Server Extended Events. |
| 52 | +* [LINQ2Charts](http://linq2charts.codeplex.com): an example for Rx bindings. Similar to existing APIs like LINQ to XML, it allows developers to use LINQ to create/change/update charts in an easy way and avoid having to deal with XML or other underneath data structures. We would love to see more Rx bindings like this one. |
0 commit comments