I have a tcp
WCF service that is meant to calculate certain prices and put them into a queue for the client to pick up and to display.
The first thing that came to my mind was the Producer/Consumer
pattern. The WCF Service produces the prices and puts them into a queue. The client would then consume any workitems ready in the queue.
Looking at Albahari's BlockingCollection example, how he explains producer/Consumer pattern, I can't get my head around it.
var pcQ = new PCQueue (1);
Task task = pcQ.EnqueueTask (() => Console.WriteLine ("Easy!"));
If I run this on the WCF service
I have put a task in the queue to be processed, fair enough. But once the task is finished on the service side, how do I push the price to the client automatically? or is that not something I could do with a tcp
WCF service?