Good example of Reactive Extensions Use [closed]

I understand the basics of Rx. Where I'm struggling is how you would actually use this beyond academic examples? What are some common, simple real-world scenarios where Rx is a much better solution than what we have today in .NET?


For a bunch of good examples, see the 101 Rx Samples wiki


Rx allows you to write code that orchestrates concurrent events together. If you've ever used the TPL (i.e. Task), then had to do convoluted backflips to try to ContinueWith or WaitAll on the right things, Rx is for you.

For example, the workflow of "For each item in this array, call a web service, and when all of those requests come back, do something else. If any one of them fail, fail the whole thing".

Disclosure, Shameless plug ahead: The book that Jesse Liberty and I wrote about Rx was designed to solve exactly this question, "How do I use Rx in my day-to-day work?"; "What can I do with this?"


First of all, IObservable is an event. So in anywhere you use events internally, you can use IObservable - and if you later need to apply LINQ to this event, you're able to do it without refactoring.

Second, RX is fit for any situation when you need to run your code asynchronousely. For example, calling a web service, or loading a large image.

But when it really starts to shine - if your program reaches some "critical mass" of IObservable usage and you start combining different observables you would be amazed how easy some tasks become.