简体   繁体   English

分布式应用程序模型,服务器和多个客户端(客户端可以在服务器上运行)

[英]distributed application model, server and multiple clients (client can run on server)

I've got a system i'm designing where we're using 4 specialized PC's we manufacture in house that have 16 serial ports (db-9 RS232) I need to communicate with 64 units near simultaneously (4x16) and manage the communications. 我有一个正在设计的系统,正在使用内部制造的4台专用PC,这些PC具有16个串行端口(db-9 RS232),我需要同时与64个单元同时进行通信(4x16)和管理通信。 Here's the model I came up with and i'm soliciting feedback 这是我想出的模型,我正在征求反馈

Server: Runs on one system and coordinates client applications. 服务器:在一个系统上运行并协调客户端应用程序。 Maintains a master state machine and makes sure that the clients are in lock step with that state machine. 维护一个主状态机,并确保客户端与该状态机处于同步状态。 (For instance, all units do task A, when the last one reports completion, all units do task B). (例如,所有单位执行任务A,最后一个报告完成时,所有单位执行任务B)。

Communicates via .net remoting? 通过.net远程通讯? WCF? WCF?

Client: Can run on the same system as the server. 客户端:可以与服务器在同一系统上运行。 Manages all the IO. 管理所有IO。 Manages buisness logic for actual task execution (bad idea?) Reports status through Remoting/WCF via notification events (for instance INotifyPropertyChanged) . 管理实际任务执行的商务逻辑(坏主意?), 通过通知事件(例如INotifyPropertyChanged)通过Remoting / WCF报告状态。

I've never worked with .net remoting or ANY sort of distributed applications so i'm a total novice at this, but I do learn quickly. 我从来没有使用过.net远程处理或任何种类的分布式应用程序,因此我是这个方面的新手,但是我确实学习很快。 Literature and community advice would be much appreciated at this point. 此时,文学和社区建议将不胜感激。

Definitely check out the Concurrency and Coordination Runtime (CCR): 绝对检查并发和协调运行时(CCR):

http://msdn.microsoft.com/en-us/library/bb648752.aspx http://msdn.microsoft.com/en-us/library/bb648752.aspx

EDIT: 编辑:

Link to download: 链接下载:

http://msdn.microsoft.com/en-us/robotics/aa731520.aspx http://msdn.microsoft.com/en-us/robotics/aa731520.aspx

If I were you I would read up on distributed system design. 如果您是我,我将阅读分布式系统设计。 Generally it is a bad idea to have a single point of failure in a system (one special PC is the "server" and all others need to communicate to it.) 通常,在系统中具有单点故障是一个坏主意(一台特殊的PC是“服务器”,而其他所有PC都需要与之通信。)

But in your case it could very well be that it does not matter. 但是在您的情况下,这很可能无关紧要。

Read up on distributed systens design. 阅读分布式系统设计。

The API you choose is not the most important thing, I'd say. 我会说,您选择的API并不是最重要的。 First you need to plan the architecture, and the behavior you want to get in various scenarios (like one of the PCs goes AWOL.). 首先,您需要计划架构,以及要在各种情况下获得的行为(例如,其中一台PC变为AWOL)。

Just a quick reaction from reading your reqmts, I would look into a distributed pub/sub system. 只需阅读您的要求即可快速做出反应,我将研究分布式pub / sub系统。 How you implement the pub/sub is up to you. 如何实现发布/订阅由您决定。 You could use MSMQ, or WCF and WS-Eventing, or .... 您可以使用MSMQ,WCF和WS-Eventing或...。

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

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