Remoting (.NET 1.1) Performance Guidelines - Formatters

From Guidance Share

Jump to: navigation, search

- J.D. Meier, Srinath Vasireddy, Ashish Babbar, and Alex Mackman


Use the BinaryFormatter for optimized performance.

Use the BinaryFormatter for optimum performance. The BinaryFormatter creates a compact binary wire representation for the data passed across the boundary. This reduces the amount of data that needs to be passed.

A formatter is responsible for taking an object and converting it into a form that can be passed over the communication channel. The .NET Framework supplies two formatters:

  • The SoapFormatter uses XML-encoded SOAP as the message format.
  • The BinaryFormatter uses a native binary representation.

You can use either formatter with both TCP and HTTP channels.

Consider Web services before using the SoapFormatter.

If you need SOAP for interoperability reasons, consider using Web services ahead of the SoapFormatter with .NET remoting. Web services outperform .NET remoting, when using SOAP-based communication.

Personal tools