Is SignalR the same thing is Reactive Extensions? Can you explain why or why not?
-
2However, SignalR can help you publish serverside observables on the clientside https://github.com/cburgdorf/SignalR.Reactive – Christoph Mar 07 '12 at 20:19
1 Answers
No, they are absolutely not the same thing.
Reactive Extensions is a library for creating and composing observable streams of data or events (which are actually quite similar). It basically knows nothing about client-server connections or other things. It is focused solely on Observable
s and is capable of wrapping any collection, stream, event, async method, etc. into the common Observable
interface.
SignalR is a toolkit for creating persistent (i.e. alive) duplex connections between client and server. It works over HTTP and its purpose is wrapping 3 low-level techniques: long-polling, server-side events and web sockets into a high-level API for comfortable development. So, it's focused on the communication.
So, the components themselves are quite independent from each other, and they have completely different concerns.
On the other hand, these 2 great libraries are complementary to each other: one might use SignalR to push events from server to clients and then wrap the server-side events into RX's Observable
s to create complex reactive user experiences.
UPDATE
Rx is like LINQ, it helps you specify 'what happens', it doesn't get into the details of 'how'. SignalR is a library to implement the 'how' for real-time network communication – Paul Betts
The difference between 'LINQ to Objects' and RX is that in 'LINQ to Objects' you pull next items from an enumerable thing, while in RX they are pushed to you from an observable thing.

- 31,719
- 12
- 116
- 122

- 7,579
- 1
- 27
- 42
-
20+1, Rx is like LINQ, it helps you specify 'what happens', it doesn't get into the details of 'how'. SignalR is a library to implement the 'how' for real-time network communication – Ana Betts Dec 08 '11 at 06:11
-
2@PaulBetts +1 Great comparison with LINQ, RX's twin-brother. I've added a quote to the answer. – Pavel Gatilov Dec 08 '11 at 19:19
-
1FYI: Rx is built on top off LINQ. It just happens that until Rx came along, the main usage of LINQ was with the `IEnumerable
` interface. LINQ is the combined language features of Anon Types, Extension methods, Lambdas, Expression (trees) and Query Comprehension Syntax. – Lee Campbell Aug 28 '13 at 07:41 -
@LeeCampbell True. However, the LINQ term is frequently confused with its specific implementation living in `System.Linq.Enumerable` class, that is _LINQ to Objects_. I'll update the answer to use _LINQ to Objects_ to avoid confusion. – Pavel Gatilov Sep 04 '13 at 04:04
-
Cool, I was just trying to stop that confusion and discourage the continuation of the misuse of the term (as far as I understand it) – Lee Campbell Sep 04 '13 at 12:02
-
-
1@marsop, not a twin perhaps. As I understand it, Ix extends LINQ, while Rx is a reactive dual side for the LINQ + Ix combo. But in the sense that Ix brings the LINQ capabilities up to equal Rx - they are very close. – Pavel Gatilov Aug 09 '17 at 10:24