I currently code an internet cafe software in WCF for 25 clients. I read much about instanceContextMode, Concurrency and Duplex and other stuff and saw that everyone was having problems because of wrong implementation of these settings.
Here is my scenario: clients are getting time info from server every 5 or 10 seconds, clients and server should be able to send messages to eachother . What settings开发者_开发知识库(Concurrency/InstanceMode) would you recemmend me not to have thread, deadlock and other issues?
--the clients and the server should be able to send messages to eachother(So Duplex will be necessary?)
--In order for server to serve all the clients at the same time, Concurrency is Multiple and instance is persession?
Thanks in advance
Personnally, I'd use these settings:
[ServiceBehavior
(
InstanceContextMode = InstanceContextMode.PerCall,
ConcurrencyMode = ConcurrencyMode.Multiple
)]
精彩评论