Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Make Many Programs Communicate with One Another Across a LAN

Status
Not open for further replies.

6volt

Programmer
Jun 4, 2003
74
0
0
US
At work, we had a network of workstations to run finite element jobs. You submit the job, it goes into a queue, and then is executed on a specific machine based on memory and drive requirements.

I want to build the same type of system, but a rudimentary as possible.

Let's call one a Queue Manager and the others the Worker Bee's.

If the QM has a job, it will look for a Ready WB and send it the job input files and location to send the results. The WB's will have the applications installed to process the job.

All running XP Pro connected thru LAN.

Communication (synchronizing, semaphoring, mutexing, whatever...) is the issue. How to do it. Stoopid way is to merely use an empty file to indicate state. Problem is what to do if there is simmultaneous access of the file between the WB and the QM. There is probably a better way to do this.

The other issue is would there have to be a continuously running process on the WB to determine if a job had been sent to it? or, could the QM initiate the process on the WB to process the job?

I was just wondering if there is anything more elegant/efficient than empty files for doing the synchronizing?

If someone would like to enlighten me with the correct terms for this system and its components, I would appreciate that also.

Thanks
Tom
 
All of this is without any testing so its very general pointers..
I can't see any reason why you can't start an executeable on a remote machine. a matter of passing the correct path to createproccess, there are also network commands to run programms remotely.

If a file is opened on a networked machine, windows should raise a sharing violation if you attempt to open the same file from another machine.

You need to look at network messaging, to see if there are any network 'flags' you could use rather than file data.

If your network is not windows based then you need to look at the specifics of your network setup.



Steve

Life is like a Grapefruit, sort of orangey-yellow and dimpled on the outside, wet and squidgy in the middle, it's got pips inside too. Oh and some people have half a one for breakfast. Ford Prefect.

Want to do more with TGML Download Star
 
why not use COM, this is a perfect example of how remoting should be used. if you are new to this, here's a perfect start :


be warned, COM programming may seem difficult in the beginning, but once you know the principles and it's advantages, sharing objects via the network was never so easy...

--------------------------------------
What You See Is What You Get
 
Well, one thing is that I would use empty files so I would never have collisions during reading or writing. The mere existance of the file would serve as the flag. "IF FileExists..." would be the test.

When doing a FileExists, I would loop it a few times Pausing each iteration for a total duration of 1 second just to be sure I didn't collide with a creation or deletion of the file of interest.

I'll have to look at this COM stuff, but I warn you, I am an "over the hill" FORTRAN programmer that is coughing up blood trying to adapt to object oriented programming in Delphi.

Cough, cough...
Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top