I need to retrieve very large portions of NTFS files (as byte arrays) from a WCF Service. The needed portions of the files are far too large to efficiently return in a single request, so I need a "chunky" implementation that will return
just a portion of the file on each method call.
But the entire process needs to be very fast... specifically: I need to avoid the overhead of re-opening the file each time the client requests the next "chunk".
So how can I keep the filestream open on the service-side in anticipation of the next request from the client for the next chunk? And if no subsequent request arrives, then close the filestream? That is, implement "lazy close".
Or stated another way: Does the code instantiated on the service-side to service an incoming method call remain "alive" after the method returns to the caller? Or can it be configured that way, like a Singleton SAO behaves in Remoting??
View Complete Post