. NET Remoting and ASP.net Web service performance comparisons

Source: Internet
Author: User
Tags iis soap reflection relative requires socket web services wsdl

Summary: This article compares Microsoft ASP.net Web services to the relative performance of Microsoft. NET Remoting. Microsoft ASP.net Web services have the best interoperability and full support for WSDL and SOAP on HTTP, while Microsoft. NET Remoting enables high fidelity of common language runtime type systems and supports other data formats and communication channels.

Download the Bdadotnet.msi sample code from MSDN code Center (English).

Brief introduction

asp.net Web services and. NET Remoting provide a complete set of design options for interprocess communication in distributed applications. Typically, ASP.net Web services are interoperable and fully support WSDL and SOAP on HTTP, while. NET Remoting enables high fidelity of common language runtime type systems and supports other data formats and communication channels. For more information, see ASP.net Web service or. NET Remoting: How to choose.

This paper mainly compares the relative performance of these two technologies.

asp.net Web Services

asp.net provides an infrastructure of Microsoft®iis as a host, supporting industry standards such as SOAP, XML, and WSDL. Although. NET Remoting also supports soap on IIS hosts and HTTP, ASP.net provides the highest level of soap interoperability, including support for SOAP Section 5 and Document/literal.

ASP.net can take full advantage of the features that IIS has, such as security and logging. The IIS host is also powerful because it can be regenerated after the aspnet_wp.exe terminates. In addition, because the configuration of the server and client for the ASP.net Web service has been simplified, it is easier to create and use than the services provided by using the. NET Remoting.

. NET Remoting

The. NET Remoting is more versatile and extensible, allowing communication between objects that use different transport protocols and serialized formats. It supports binary, SOAP, custom formats, and TCP, HTTP, and custom protocols. Supports multiple object creation and lifetime patterns, including Singleton, SingleCall, and client-activated. Remoting requires a host process, either IIS, microsoft®windows services, or executable files written in. NET.

When you host A. NET Remoting object that uses the SOAP formatter in IIS with ASP.net, the object can be exposed as an XML Web service. Because the payload is encoded with soap on HTTP, any client that supports SOAP-encoded formats can access the object over the Internet. Another advantage of using the HTTP protocol is that it can generally pass through most firewalls unimpeded. TCP channels and binary formatters can be deployed in an Intranet environment where both the server and the client are running the. NET Framework. This method has the best performance because it uses a custom protocol that is more efficient than HTTP when data is transmitted over the network using the original socket. Although this approach can provide superior performance in a closed environment, it cannot be deployed on a cross-platform scenario where the client does not run the. NET Framework.

IIS hosts use Secure Sockets Layer (SSL) to provide secure communication for network-level protection, and you can also take advantage of IIS and asp.net authentication and authorization. TCP channels and HTTP channels that do not host through IIS do not support secure socket transmission, so their data is transmitted in clear text. If you are using a TCP channel or an HTTP channel hosted by a non-IIS process, you need to be responsible for implementing its security.

Test scenarios

The performance of interprocess communication in a distributed application depends on the following factors:

Systems used to transmit information between applications across remote boundaries, including TCP and HTTP, are consumed by sales. TCP sockets are more efficient than HTTP.

Another factor is serialization. A serialized stream can be encoded by XML, SOAP, or compressed binary notation. The ASP.net Web service uses the XMLSerializer class to serialize objects into XML streams, which are very fast, but require some overhead because of XML parsing. Remoting uses BinaryFormatter and SoapFormatter to serialize objects into binary and SOAP formats, respectively. Because these formatters use reflection, they are quick for referencing objects, but are slower for value types that must be boxed or unboxed to pass through the reflection API. Additionally, SoapFormatter requires additional overhead to generate coded SOAP messages.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.