If a WCF Service gets the same request, means the same MD5 over all Parameters i want to block all except the first request until the processing is done and notify all waiting clients.
What is the best way doing this? I thaugh of something like a channel sink, maybe there is a finnished implementation for archieving this?
I’m not sure about what would be the ‘best’ fit for the WCF architecture but you should consider setting your InstanceContextMode to Single as you’re likely to be doing a lot of synchronization steps for what you want to do here.
How about something like this? You will obviously need to do some synchronization on the dictionary itself, but at least it’s a start.
To me, this is something I’d want to abstract away from my business logic, and I’ll personally use PostSharp and write a little attribute to handle all this.
I’ve written a Memoizer attribute which does something similar in the lines of caching responses based on request but without the synchronization steps, so you could probably take a look at what I’ve done and modify it accordingly to achieve what you’re after.