Monthly Archives: September 2010

Remote Exec By Client Server

Image and video hosting by TinyPic

This document is about how to run program on remote servers via a simple client/server setup.

Basic Idea

Server is the program running on each of the remote computers over the network. They are used to communicate with the Client end, which is started on your localhost. When a  request is accepted, Server starts specific program (exec) on its localhost to do the job.

Server Side

The start the server, type command:

junoserver.py -p 4

or double-click the file start_juno_server.bat

junoserver.py is the Python script of the server side, -p flag specify how many CPUs are available for this server. All remote computers should have its server side up and running, waiting to make contact with client side.

Image and video hosting by TinyPic

Look For Servers

Along side with junoclient.py, there is a file named junohosts.txt, it contains:

192.168.0.131
192.168.0.132

each line is the IP address of a remote computer could running a server side.

Job Settings

Inside jobname.txt:

file:prtServer -path //servername/data/embryo -dice 8 -opt 1 0 1 1 untitled.114.scene
file:prtServer -path //servername/data/embryo -dice 8 -opt 1 0 1 1 untitled.115.scene
file:prtServer -path //servername/data/embryo -dice 8 -opt 1 0 1 1 untitled.116.scene

each line is a request to start prtServer with specific flags.

Client Side

To start the client, type command:

junoclient.py -f jobname.txt

or double-click jobname.bat

junoclient.py is the Python script of the client side. -f flag defines the job file it should read

Image and video hosting by TinyPic

Client end reports sending jobs to available servers. It will quit as soon as there is no job left.

Image and video hosting by TinyPic

Server accepts the jobs and start PRT computing.

Note

All files mentioned above should be put in the same folder.

Further Development

This is just the minimal Client/Server program in Python. All controls are input by text files. I plan to add some GUI to the client end, so people can type the address of a server, or choose a file as input job. Should be better.

Leave a comment

Filed under Uncategorized

Hello world!

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Leave a comment

Filed under Uncategorized