0

I want to create a wcf service that makes insert, update and select queries to the MsSQL database on the remote server. I will connect with service reference through windows form application and around 1000 people in different places will use this form application. I'm wondering if wcf will be sufficient for the commands from all these users or is it a better choice to use web api instead?

According to my research, there is multi-connection support, but I don't know if it's enough.

[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple)]
tete
  • 1
  • 3
  • 1
    WCF allows for fine control via `ConcurrencyMode` and `InstanceContextMode`. The latter determines whether or not each client gets a new instance and the former determines its threadedness. You might find `InstanceContextMode.PerSession` and `ConcurrencyMode.Single` a good start with its unique instance per connection. If you want a singleton perhaps `InstanceContextMode.Single` and `ConcurrencyMode.Multiple` if you are confident with your multithreaded server. Alternatively, if this is on a LAN and you want ultimate scalability use MSMQ as the transport. –  Dec 12 '22 at 07:57
  • 1
    ...https://www.amazon.com.au/Programming-WCF-Services-Juval-Lowy/dp/1491944838/ref=sr_1_2?keywords=wcf&qid=1670831949&s=books&sr=1-2 –  Dec 12 '22 at 07:59
  • so should i use wcf service or web api? – tete Dec 12 '22 at 10:00
  • 1
    What part did you fail to understand? –  Dec 12 '22 at 13:07
  • What I want to know exactly is whether the wcf service causes problems in simultaneous connections and if possible how to design wcf for a program with at least 1000 users. – tete Dec 12 '22 at 14:09
  • 1
    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 12 '22 at 16:31
  • 1
    So you are ignoring what I've written already. I'm glad I didn't post an answer because people are generally unlikely to help _member-for-one-day_ contributors; with no other questions or answers; posting questions with poor formatting; grammar or little research; because they are unlikely to be rewarded for their effort OR the OP keeps moving the goal post. _[Suspicious](https://meta.stackexchange.com/a/57685/284550)_. Also what makes you think REST is superior? Have you never encountered an unresponsive web server? –  Dec 12 '22 at 21:23
  • First of all, I'm sorry that I don't know English well, I think I can't express myself. I'm developing form applications. I don't know much about web projects and APIs, so wcf service came a little easier for me. Since many people will use the application I will make, I opened this topic because I do not know if wcf will cause problems in simultaneous operations. and I'm not ignoring what you say. – tete Dec 13 '22 at 17:56
  • you gave me information about ConcurrencyMode, InstanceContextMode.PerSession, InstanceContextMode.Single and ConcurrencyMode.Multiple. On the other hand, can the WCF I mentioned be able to execute commands from many users at the same time, so in summary, would it be a problem if I use wcf for this job? I hope I explained it this time because I don't want anyone to think badly of me. Thank you for giving your precious time to me. – tete Dec 13 '22 at 17:57

0 Answers0