2

I'm designing a program that uses a third party electrical solver. I want to perform monte carlo simulations on large electrical grids and most of the times the program (mine) takes hours. Because of this I thought that if I create a client in other computer I could call from my computer (and vice versa) I would have a nice distributed simulator.

Since I lack the knowlwdge, I would like to know what is the best way (if even possible) to "invoque" a program installed in another computer in the local network to do a specific task: simulate a file that I send and return the results back. The idea is to call the solver in lets say 10 computers at a time and gather the results asynchronically.

The language I use is C#.

I hope that my question is clear enough.

Santi Peñate-Vera
  • 1,053
  • 4
  • 33
  • 68
  • possible duplicate of [Passing data to server for computation](http://stackoverflow.com/questions/21578993/passing-data-to-server-for-computation) – Samuel Feb 13 '14 at 08:00
  • See my comment on the duplicate thread for a hint how to approach the task. – Samuel Feb 13 '14 at 08:00
  • http://stackoverflow.com/questions/21578993/passing-data-to-server-for-computation describes 1 to 1 data exchange, what I describe here is n to n data exchange, thre are n-1 differences – Santi Peñate-Vera Feb 13 '14 at 23:29

1 Answers1

0

The easiest is to have a shared drive on the network, to which all computers have access. Then your app saves the input file (or one input file per machine, depends how you want to do it) on the shared drive, and your app starts another app remotely on each client. It monitors each one it starts for the exit status. After all of them have exited, it takes the output files and combines them and processes the data. Job done. The simplest "remote process" invocation is probably through psexec which you can download from technet, we have used it very successfully and very simple to use. The top two answers of How to execute process on remote machine, in C# have other good ideas: I think you will find them more overhead (longer to implement) but will give you more power in the long run.

Community
  • 1
  • 1
Oliver
  • 27,510
  • 9
  • 72
  • 103