Solution for simple grid computing in local network

痞子三分冷 提交于 2019-12-24 10:39:23

问题


I'd like to develop a simple solution using .NET for the following problem:

We have several computers in a local network:

  • 10 client computers that may need to execute a program that is only installed on two workstations
  • The two workstations that are only used to execute the defined program
  • A server that can be used to install a service available from all previously described computers

When a client computer needs to execute the program, he would send a request to the server, and the server would distribute the job to a workstation when available for execution, and inform the client computer when the execution has been performed.

I'm not very used to web and services development so I'm not sure if it's the best way to go, but below is a possible solution I thought about:

  • A web service on the server stores in queues or in a database the list of tasks with their status
  • The client computer calls the web service to execute a program and gets a task id. Then calls it every second with the task id to know if the execution has been performed.
  • The workstations that are available call the web service every second to know if there is something to execute. If yes, the server assigns the task, and the workstation calls the web service when the execution is completed.

I summarized this in the below figure:

Do you think to a simpler solution?


回答1:


Have a look at signalr! You could use it as messaging framework and you would not need to poll the service from 2 different diretions. With signalR you would be able to push execution orders to the service and the service will notify the client once the execution has been processed. The workstation would be connected with signalR, too. They would not need to ask for execution orders as the webservice would be able to push execution orders to either all or a specific workstation.



来源:https://stackoverflow.com/questions/24324351/solution-for-simple-grid-computing-in-local-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!