views:

104

answers:

1

I can understand that WCF is in general better than Remoting, but the two seem quite different to me. MS make this pretty picture to show how great WCF is (or perhaps how poor the other techs are to only check one box each): alt text

But, WCF is centered around SOA and I don't think it's correct to assume every networked application wants to expose services.

In my case I'm looking at ways to replicate objects between two instances of a server application on different PCs. WCF appears to just give a modern version of COM... get an object and call methods and it magically calls the version on the other PC. But Remoting appeared to do something quite different and I'm not clear why it was deprecated without being replaced with a similar technology.

So, do MS even claim Remoting is dead? Or do they still support it, acknowledging it has its place alongside WCF?

+1  A: 

It really does replace .Net remoting. You can use a binary formatter with a Tcp channel and get the same experience as remoting.

For your case, remoting doesn't really seem to be the right choice. If you want to replicate objects, as in make copies of them in a different location, then you want to serialize them and send them as a bundle (a "message" in WCF lingo) to be loaded into a type (could be the same type in the same assembly, but deployed on a different server) on the remote endpoint. This is where WCF excels. Remoting would give you a connection to a "live" object from one endpoint to the other.

codekaizen
Maybe I misunderstand remoting... does it _replicate_ objects or keep a server copy which is _accessed_ remotely?
John
@John: neither nor - WCF is all about sending serialized messages - messages which are just data, no behavior/code/methods. In that respect, yes, WCF cannot replace remoting since it's really not a "remote controlling objects" kind of technology
marc_s
@John - with .Net Remoting, it is the latter: you access an object's state remotely, and just marshal calls from endpoint-to-endpoint. If you want to send the actual object, what you want is more of something service-oriented, which serializes the object state and sends it as a message from endpoint-to-endpoint. WCF can do both, but it's more natural to send messages. The reason for this is we've learned, via DCOM, that transparent access to object state across boundaries is a bad design.
codekaizen
@codekaizen ok that makes more sense. I was thinking remoting was about keeping copies of the same object synchronized, as you describe it you're right that it wouldn't be a good fit in our case.
John
If you want to keep copies in sync, you might take a look at the Sync Framework: http://msdn.microsoft.com/en-us/sync/bb821992.aspx
codekaizen