views:

109

answers:

3

Is remoting faster than web service or vice versa.

Also on what parameters can we differentiate the performance.

web service uses XMLserializer while Remoting uses binary

is xmlserialization a slow process and if yes than why?

+1  A: 

is it faster because the size of the binary serialized object is smaller then the same object as an XML representation. And the time needed to transmit it across the wire is shorter

Heiko Hatzfeld
That said, XML generally compressed well (lots of repeated patterns et al.). It really depends a bit on what you want/need to do.
Matthew Scharley
Yes... But thats extra work ;)Also it is possible to configure remoting to use another serializer also
Heiko Hatzfeld
+3  A: 

By "remoting" I assume you mean RPC/RMI calls.

Yes, comparing one RPC/RMI call to one web service call, then the RPC/RMI one typically comes out favorable in speed (binary is more compact, faster to encode and decode). But the largest time is typically spent on network latency, waiting for the messages to come across.

So in a realistic large complex system, the best choice is the one that minimizes the number of network requests. This has much to do with how language binding and remote service api looks.

The majority of RPC/RMI APIs I have seen promotes lots of remote calls, i.e. first you get the remote object, then you call a few setters leading to remote calls, then you ask the remote object to do something.

Web services are typically based on creating a large "document object" locally, and sending it over in one go. Requiring only one request-response.

Christian
There is also .Net "remoting" See: http://msdn.microsoft.com/en-us/library/kwdt6w2k(VS.71).aspx
Heiko Hatzfeld
I want to know why binary is more compact, faster to encode and decode? And why is xmlserialer slow? i want to know the internal process?
Panache
A: 

by definition a web service is a stateless process, every time you request data the web service doesn't know what happened last. When you are doing remoting you are using the objects as they would have been locally so there is less overhead.

Anders K.