Even after reading so much about WCF, I am unclear what would be THE BEST approach to a very common scenario like the one below
The client is a windows desktop application which makes a call to a WCF service. (uses .NET TCP Binding, Per Session). The service needs to return more than 50K objects. eg. List – The Trade class has around 20 simple properties.
I am thinking to use ‘TransferMode = Streamed’ but I will lose the ‘PerSession’ instancing in that case.
I am looking for some design solutions and some best practices to such common scenarios.
Best approach here is to always make sure that you don’t have to return such a big amount of data. The technique is called lazy loading – which means you load only that much data which the user has to interact with.
A good architect should consider the limitations of internet and different devices connected with the services and considering them, you should adopt the minimum available approach.