Does WCF really replace .NET Remoting?
Asked Answered
E

1

12

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
(source: microsoft.com)

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?

Exostosis answered 2/7, 2010 at 7:45 Comment(5)
See #1294994 , Also - it's quite easy to fire up a WCF endpoint in your app, and send objects back and forth.Alemannic
I'm not saying this is an exact duplicate, because of the specific description of your situation. But (like nos posted above) this question discusses whether remoting is deprecated #1294994Socio
@nos, to send objects back and forth you still need an API though like newForumPos(ForumPost), etc... you're having to write code to transfer the objects or their fields rather than have this done automagically like how XSTM works (xstm.net)Exostosis
Yes, XSTM is something entirely different than both .net remoting and wcf.Alemannic
now grpc replaces wcf...Barley
A
6

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.

Aurlie answered 2/7, 2010 at 7:52 Comment(5)
Maybe I misunderstand remoting... does it replicate objects or keep a server copy which is accessed remotely?Exostosis
@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 technologyRecommit
@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.Aurlie
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.Exostosis
If you want to keep copies in sync, you might take a look at the Sync Framework: msdn.microsoft.com/en-us/sync/bb821992.aspxAurlie

© 2022 - 2024 — McMap. All rights reserved.