Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Usage of Reactive Extensions in the "Real World" [duplicate]

In order to get familiar with RX, I am looking for examples where RX is used in "real world" projects.

I am interested in both, the .NET version or the JavaScript version. References to closed source projects would be interesting. Open-source projects would be even more interesting.

It would also be interesting why RX is a good choice for those projects.

I am not looking for tutorials or introductions.

like image 537
jbandi Avatar asked Apr 09 '11 20:04

jbandi


2 Answers

In less than an hour I was able to add Rx support to MassTransit, an open source ESB:

https://github.com/MassTransit/MassTransit/tree/master/src/MassTransit.Reactive

Update: As for why it's a good fit, they already had a Subscribe/Unsubscribe mechanism in place. Adding Rx support means that those subscriptions can now be composed together easily. For example, you might have two kinds of messages that share some CorrelationId. With Rx you can trivially Join() the published messages by that identifier:

var someMessages = bus.AsObservable<SomeMessage>();
var otherMessages = bus.AsObservable<AnotherMessage>();

var joined = from s in someMessages
             join o in otherMessages
               on s.CorrelationId equals o.CorrelationId
             select new { s.Something, o.OtherThing };

joined.Subscribe(x => Console.WriteLine(x));

Also: Check out https://github.com/reactiveui/ReactiveUI for an Rx-powered MVVM framework targeting XAML (WPF, Silverlight, WP), iOS and Android. Very, very cool stuff.

like image 139
dahlbyk Avatar answered Oct 15 '22 12:10

dahlbyk


Here are two closed source/commercial examples:

  1. Banks are using Rx adapters over their message bus infrastructures.

  2. The makers of Nirvana, a web streaming product will be offering an based API in their next release of the product.

like image 39
Scott Weinstein Avatar answered Oct 15 '22 12:10

Scott Weinstein