tags:

views:

57

answers:

4

Vaguely remember seeing some discussions on this quite a while back but haven't heard anything since. So basically are you able to subscribe to an IObservable on a remote machine?

A: 

There's no reason that a framework couldn't be devised for doing that. The framework would have to provide a means to address remote objects, generate proxies for them, then marshal the activity of the remote object across the application boundaries (i.e. through socket communication). .NET Remoting may be a suitable option for implementing this. WCF would be even better.

Jacob
So as the framework stands right now, you can't just call a remote server and get an IObservable and subscribe to it? Which makes sense as Rx would need to know where and how to make those callbacks and surely can't magically figure those out by itself! lol
theburningmonk
Yep, that's the gist of it.
Jacob
+1  A: 

You can use IObservable.Remotable to use observables directly from other machines via .NET Remoting.

Paul Betts
Hi Paul, do you have a link to an article of some sort that explains what it is and how it works?
theburningmonk
http://msdn.microsoft.com/en-us/library/kwdt6w2k(VS.71).aspx describes Remoting - be aware though, that Remoting has some pretty significant caveats when it comes to versioning (i.e. computer A has build 1004 and computer B has 1007 => app is broken)
Paul Betts
thanks, actually I was looking for examples of IObservable.Remotable as I haven't come across it with the previous version of Rx :-P Found it anyway, on the Channel9 video I posted below
theburningmonk
A: 

Are you specifically bound to using Rx as the solution to your problem? WCF provides duplex services, which have the ability for clients to register callback endpoints to a service. The service may then initiate calls back to its clients as necessary. It is effectively a remoted observer pattern. If RX is a must, then it should be fairly strait forward to wrap WCF duplex services with an RX support framework, allowing your clients to "transparently" observe service behavior with IObservable.

jrista
We're not bound to using Rx as the solution, just exploring different possibilities. A duplex WCF service has also popped up but would be nice to be able to use Rx to deal with more complex composite events.
theburningmonk
A: 

Found this cool video on Channel 9 which an example of using IObservable.Remotable as Paul pointed out:

http://channel9.msdn.com/posts/J.Van.Gogh/Whats-different-about-the-3-versions-of-Rx-Part-3-NET-35-SP1/

Very interesting stuff, gonna spend a bit of time playing around with it now! :-D

theburningmonk