I'm looking for a way to let a client invoke an asynchronous process from a client UI to a WCF service host and then notify the client about the process' status. I guess this can be achieved with sagas (process managers), domain events and a WCF duplex connection, but I'm not sure how!
The case sequence (I guess) would be as following:
- Client invokes process
- Client creates WCF proxy
- Proxy connects to service host
- Service host creates duplex channel to client
- Service host starts process using command bus & passes duplex channel
- Process state changes!
- Locate related duplex channel
- Push back status change
- Client receives status change and visualizes
Am I right on this? How would, in short, the related classes look like? And yes, I am aware of NServiceBus (it gets mentioned a lot in such cases), but I do not want to rely on an additional framework (I have already a lot of what NServiceBus can solved by myself and I'm already using hundreds of different frameworks for all kinds of stuff..)
Edit: Example Here goes a real world example that might specify my question.
I've got a image processing server that does some magic and unicorn stuff with images. A WCF client uploads an image to the server and then shows a progress bar denoting how much of the image has been processed. The server starts a new ImageProcessService (in request scope). During the processing, he might throw numerous ImageProcessStateChanged events with a number indicating the process by percent. After he's done, he might throw a ImDoneEvent. All of the events should be caught by a Event Bus which signals them back to the right client. The process might take up to 60 seconds and can be fired once per client, but for as many clients as possible.