I recently started working on Reactive Extensions, mostly observables at client side using Angular 2. The concept of observables of Rx and events of dotnet seems to be very similar. Are there any specific examples where one is applicable and other is not. If not, is there any other reason why Microsoft introduced Rx.Net, as observables stand at the core of Reactive Extensions. Any links or real time examples would suffice. Has it got something better to do with respect to async/await, tasks or threads? I am looking for differences threading/performance wise.
They are different abstractions. Everything in this answer applies equally to JavaScript and C#.
async
/await
allow you to asynchronously wait for a single asynchronous operation. This "asynchronous operation" can only complete one time, with a single result.
Observables allow you to subscribe to a stream of data, and react to data arriving on that stream. This subscription model allows multiple items of data over time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With