Per-call service with ConcurrencyMode.Multiple

An interesting observation here is that in the interest of throughput, it is a good idea to configure a per-call service with ConcurrencyMode.Multiple — the instance itself will still be thread-safe (so you will not incur the synchronization liability), yet you will allow concurrent calls from the same client.

For a service configured with ConcurrencyMode.Multipleto experience concurrent calls, the client must use multiple worker threads to access the same proxy instance.

However, if the client threads rely on the auto-open feature of the proxy (that is, just invoking a method and having that call open the proxy if the proxy is not yet open) and call the proxy concurrently, then the calls will actually be serialized until the proxy is opened, and will be concurrent after that.

If you want to dispatch concurrent calls regardless of the state of the proxy, the client needs to explicitly open the proxy (by calling the  Open()method) before issuing any calls on the worker threads.

댓글

이 블로그의 인기 게시물

Oracle NLS_DATE_FORMAT 변경

Stop console process using Ctrl+C.

Alternative to IValueConvert, QuickConverter