views:

592

answers:

5

Hi,

I know web service and have some knowledge on remoting. Both concepts invoke methods on the client machine so where lies the difference ??

Through remoting we can also execute the method on the remote machine and the same functionality can be achieved through web service too..

Please excuse me if it is the obvious question..

+8  A: 

Both support distributed applications.

Web services are cross platform, using common standards and work through firewalls. They also think in terms of messages, not objects - you send a message to a service, and you get a reply.

Remoting is an MS only technology which is not cross platform and talks in a binary format. It thinks in terms of objects, you create an object on the remote server and work with it. It doesn't work well with firewalls. Remoting is also dead these days, MS favour WCF (which includes web services)

blowdart
Remoting isn't dead (yet), just deprecated.
Henk Holterman
OK, it's very very ill then :)
blowdart
A: 

WebServices are a form of remoting, since you are effectively executing code else where or on the same machine outside of you AppDomain.

Remoting (InterProcess) on the same machine or over the network, is different in the sence that you Marshal your object between AppDomain/ platform boundries through transparent proxies and serialization. Remoting comes with its complexities and can easily become very complexe. WCF has made things much simpler to maintain. Performance wise, I haven't compared both approaches and would definitely be interested to see how both fare in an InterProcess context. Since WCF can communicate with binary bindings and is not limited to the HTTP Protocol.

WCF has made this much simpler using Pipes for InterProcess communication.

In the end WebServices used to communicate via port 80 (standard) HTTP and Remoting could communicate via predefined ports and channels using different serialization formatters.

They have now been upgraded by WCF which now provides methods for these types of communications.

Alexandre Brisebois
A: 

While WebService is implemented over HTTP, Remoting is implemented over TCP/UDP. Thus Remoting performs better in terms of speed.

Tzury Bar Yochay
Web services are not implemented over HTTP unless you refer to a very specific implementation. Web services by W3C definition are independent of the transport protocol. In fact many Web service frameworks provide transports over TCP, SMTP as well (e.g. Metro)
wierob
Well, I was sure the guy was talking about the .net web services
Tzury Bar Yochay
+2  A: 

.NET Remoting concept is a Microsoft/.NET specific interprocess communication technology.

The term "Web service" is very diffuse due to its hype. But I think the W3C definition is intended in most cases. It defines the use of WSDL as interface description and SOAP as message protocol.

According to Microsoft .NET Remoting: A Technical Overview on MSDN, Remoting uses either a binary or XML encoding. Whereas the XML encoding uses SOAP. But as far as I know, it does not adhere to the WS-I Basic Profile. Hence, it provides an extremely limited Web service interoperability.

Both concepts allow interprocess communication. If your application only uses .NET, then using .NET Remoting is a good choice.

However, if you plan to provide interoperability with other programming languages than you should use Web services.

wierob
A: 

Remoting is simulating the foreign method invoked as local method, accepting same type of parameters hence all it needs is to serilazie the object and transfer invoke the remote method (which is in same language or platform), and provide the respone.

Web Service (SOAP service) deals with cross platform method invocations in RPC terms but is further can be improved using Document style services, here the languages or platforms are not the barriers as XML will acts as intermediate by marshalling and unmarshilling the native and XML representations.

shivaspk