发送数据量最少的通过线路与WCF

发送数据量最少的通过线路与WCF

本文介绍了发送数据量最少的通过线路与WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目有netTCP WCF服务。这是在app.config它:

My project has a netTCP WCF service.This is the app.config for it:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.serviceModel>
        <bindings>
            <netTcpBinding>
                <binding name="NetTcpBinding_IIndexer" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                    maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                    maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="None">
                        <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                        <message clientCredentialType="Windows" />
                    </security>
                </binding>
            </netTcpBinding>
        </bindings>
        <client>
            <endpoint address="net.tcp://mach1:9000/Indexer" binding="netTcpBinding"
                bindingConfiguration="NetTcpBinding_IIndexer" contract="in.IIndexer"
                name="NetTcpBinding_IIndexer" />
        </client>
    </system.serviceModel>
</configuration>

有没有可以做,以最大限度地提高数据的COM pression正在通过网络发送的任何事情吗?我的项目是内部如此速度和处理能力是没有问题的本质。

Is there any thing that can be done to maximize the compression of the data being sent over the wire? My project is internal so speed and processing power are essentially of no issue.

有什么好的技巧和窍门,以玉米为preSS从客户端发送到WCF服务?

What are some good tips and tricks to compress the data sent from the client to the WCF service?

推荐答案

由绑定将决定你的数据如何被转化为对丝字节指定的信息编码。对于NetTcpBinding的,它会自动使用二进制编码,让你的信息的最紧凑重新presentation所有内置的WCF EN codeRS的。

The message encoding specified by the binding will determine how your data gets turned into bytes on the wire. For the NetTcpBinding, it will automatically use binary encoding which gives you the most compact representation of your message out of all the built-in WCF encoders.

有关详细信息,我会推荐这些资源:

For more information, I would recommend these resources:

  1. 佐勒菲卡尔·艾哈迈德: SOAP消息尺寸优化:编码VS COM pression
  2. 肯尼·沃尔夫:WCF恩$ C $的性能特点CRS
  3. 在MSDN:选择一个信息恩codeR
  1. Zulfiqar Ahmed: SOAP message size optimization: Encoding vs compression
  2. Kenny Wolf: Performance Characteristics of WCF Encoders
  3. MSDN: Choosing a Message Encoder

这篇关于发送数据量最少的通过线路与WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 19:06