简体   繁体   English

概念:使用WCF服务VS。 插座VS。?

[英]Concept: Using WCF Service VS. Sockets VS.?

We are developing an Client-Server-Scenario where the client application will be installed on hundred or thousands of clients. 我们正在开发一种Client-Server-Scenario,其中客户端应用程序将安装在成百上千的客户端上。

We need the following: 我们需要以下内容:

  • Client application (100-1000 clients) 客户端应用程序(100-1000个客户端)
  • Administrator Console Application (10-50 administrators) 管理员控制台应用程序(10-50个管理员)
  • WCF Service or TCP Socketserver or ? WCF服务或TCP套接字服务器或? (other possibilities) that will interact with the client application, administrator console and a Microsoft SQL Server (其他可能性)将与客户端应用程序,管理员控制台和Microsoft SQL Server进行交互

     CLIENT -> SERVICE -> write information 2 DB CLIENT <- SERVICE -> read data records of DB CONSOLE <- SERVICE -> read data records of DB CONSOLE -> SERVICE -> write information 2 DB 

So, what's the best solution for our scenario? 那么,什么是我们方案的最佳解决方案? Should we use a WCF Service, TCP Socketserver or something else? 我们应该使用WCF服务,TCP Socketserver还是其他工具? What are the advantages and disadvantages? 优点和缺点是什么?

If you have control over all of the applications that will be communicating with your server application and can guarantee they will always run on Windows (as opposed to Mono), I would recommend WCF since it will handle most of the heavy lifting for you. 如果您可以控制将与服务器应用程序通信的所有应用程序,并且可以保证它们将始终在Windows上运行(而不是Mono),那么我建议您使用WCF,因为它将为您处理大部分繁重的工作。 If you're running .NET 4 then you can take advantage of the new WCF Discovery functionality to reduce your administration headaches as well. 如果您正在运行.NET 4,则可以利用新的WCF发现功能来减少管理上的麻烦。

If you choose to use discovery though I'd recommend building in a service location cache as well though because 100-1000 UDP broadcasts over and over again could bring your network to its knees (and then you're network admin will blame you for network problems until the end of time). 如果您选择使用发现功能,尽管我建议您也建立一个服务位置缓存,因为一遍又一遍的100-1000 UDP广播可能会使您的网络瘫痪(然后,网络管理员会责怪您使用网络问题直到时间结束)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM