1

I'm building web application (in this context the client) which talk with a different process (in this context the server) through a namedpipe wcf service (WCF 4).

After reading many articles I was thinking to create a pool of proxy connected to the server (I've read it provide better performance) used in roundrobin.

Each call will be very short, on the server i need to reads and writes simple properties on few objects but this objects are shared so i must use locks in any case. I expect very high concurrency.

Beacuse of the pool, the client will have N session always open with server.

I was wondering what should be the best settings for InstanceContext-ConcurrencyMode between PerSession-Single or SingleInstance-Multiple.

Thank You

SkyG
  • 275
  • 3
  • 11

1 Answers1

0

My opinion: Do not use custom pool of proxies. Use build-in pooling of connections. You can't fully control connectionPooling in predefined bindings but you have full control in customBinding when using namedPipeTransport.

From implementation perspective in your client - use new proxy for each client's request. Don't share proxies among requests.

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670
  • Thank you, I didn't know there were a built-in pool, I was almost sure to have read that there wasn't. This will save a me some development time and troubles. Do you think it will be better to go with a Single Instance Multithreaded service ? – SkyG Mar 03 '11 at 09:32
  • Base on your description I think you can use singleton instance with multiple concurrency mode. You will have to deal with locks anyway. – Ladislav Mrnka Mar 03 '11 at 09:40