Throttling in OData : Limiting the amount of data received from Server
How do I restrict the amount of data received from a OData service.?
In a WC开发者_Python百科F Service there is an option MaxReceivedMessageSize with which we can restrict. Binding.MaxReceivedMessageSize ==> Gets or sets the maximum size for a message that can be received on a channel configured with this binding.
In the case of OData is there a way to restrict the amount of data received from the server?
How do I throttle the amount of data received? OR Is it same as the underlying Http protocol ?
Thanks
Venki
I believe it is possible to consume the OData feed's media resources using WCF. In which case you would be able to utilize MaxReceivedMessageSize as far as my understanding goes. Please consider this MSFT blog article: http://blogs.msdn.com/b/astoriateam/archive/2010/08/04/data-services-streaming-provider-series-implementing-a-streaming-provider-part-1.aspx
Otherwise, the only method I could think of would be implementing paging. But depending on how/what is consuming the OData service the client could be receiving all the data and handling the paging itself (aka not server side)...check out the last comment here: http://channel9.msdn.com/shows/SilverlightTV/Silverlight-TV-26-Exposing-SOAP-OData-and-JSON-Endpoints-for-RIA-Services/
精彩评论