Question

(Asking this here instead of SO because I don't even know what technology to tag it with :))

My team is about to embark on a project to convert a large part of our code base to use asynchronous file I/O, as our file storage medium is increasingly being locate across a high-latency connection. We have some basic experience with asynchronous development, but this is on a larger scale than our previous work. At this point, I'm not even sure where to begin looking for technologies, patterns, or documentation on how to solve this problem.

The basic setup we have to work within has client applications with a user interface that sends file requests off to some locally-running background process, which does the actual work of communicating with the file storage services to obtain data. (This "proxy" layer is needed because we have a number of client applications that need to share the file services, cached results, etc.)

The design I have in my head would be for a client to submit a request to the service, which would in turn submit a request to the file storage services to begin an asynchronous I/O job. As progress was made downloading the file, the service would receive notifications, and would then fire off some kind of callback mechanism to the UI client to report process and/or completion. This means I need some sort of cross-process mechanism for executing callbacks.

Previously we have use duplex WCF services to implement something similar to this, but I am unsure if it will work properly in our current case. In particular, we want to handle the case where a client submits a request, then exits while the retrieval was in process. The service needs to be able to detect that the client has terminated but keep downloading the file; what I know about WCF duplex channels would imply that the client channel closing would terminate the service's channel as well. In addition, I would prefer not to require the client app to sit in some kind of spin-lock loop waiting for the async call to finish, but again, my research has led me to believe that the duplex callbacks only operate within the context of a single WCF call, so we would need to keep the calling thread around for the duration.

What other mechanisms are there for registering and sending callback-style messages across process? The team would prefer a fully-managed solution, though I'm certainly open to unmanaged options if they are significantly better in some way.

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top