低速の衛星接続を介してデータクエリWCFサービスを作成することを検討しており、WCFデータサービスが本当に気に入っています。私が見ている問題は、HTTPが非常に冗長な形式であり、私が行っていることはすべて内部および.NETであるため、代わりにNetTcpBindingを使用してオーバーヘッドの一部を削減することは可能ですか?
これも可能ですか?お勧めですか?
低速の衛星接続を介してデータクエリWCFサービスを作成することを検討しており、WCFデータサービスが本当に気に入っています。私が見ている問題は、HTTPが非常に冗長な形式であり、私が行っていることはすべて内部および.NETであるため、代わりにNetTcpBindingを使用してオーバーヘッドの一部を削減することは可能ですか?
これも可能ですか?お勧めですか?
While researching this on my own, i ran across the MSDN article on Self-Hosted WCF Data Services. This article notes that you can host the service with DataServiceHost which still requires HTTP (it's derived from WebServiceHost).
But you can also roll your own host using IDataServiceHost. Here's an excerpt from the MSDN article:
For cases where the WCF host implementation is too restrictive, you can also define a custom host for a data service. Any class that implements IDataServiceHost interface can be used as the network host for a data service. A custom host must implement the IDataServiceHost interface and be able to handle the following basic responsibilities of the data service host:
- Provide the data service with the service root path.
- Process request and response headers information to the appropriate IDataServiceHost member implementation.
- Handle exceptions raised by the data service.
- Validate parameters in the query string.
The article seems to suggest that MS has properly segrated data-service responsibilities from network interface responsibilities. If that's so, then I should be able to write a NetTcpDataServiceHost. Has anyone ever written a IDataServerHost? Any suggestions?
いいえ、WCFデータサービスはREST上に構築されており、REST自体はGET、PUT、POSTなどのHTTP動詞に非常に密接かつ完全に基づいています。これらは本質的にHTTPプロトコルに関連付けられているため、NetTcpを介して実行することはできません。スタック。
送信されるデータを減らすための他のオプションがあるかもしれませんか?一度に取得される行の数と送信される属性/データフィールドの数の両方で、オブジェクトを微調整します(可能な場合は脂肪をトリミングします)。それはおそらくあなたが最も有望なアプローチです。