server/client program design advice wanted

J

Junpei

Hi, I basically want to create a server program in perl that does two
thing:
1) can receive a request, with parameters from the client to execute a
command with those parameter, and
2) executes the command, and returns some form of output (in this case
a a few 10kilobyte images).
whats the best way to do this? or is there a better way to do this
besides through perl? i've never done network programming so please be
nice :).
 
J

Jim Gibson

Junpei said:
Hi, I basically want to create a server program in perl that does two
thing:
1) can receive a request, with parameters from the client to execute a
command with those parameter, and
2) executes the command, and returns some form of output (in this case
a a few 10kilobyte images).
whats the best way to do this? or is there a better way to do this
besides through perl? i've never done network programming so please be
nice :).

There are many ways to do this. What is "best" depends on several
factors. Perl is certainly a good choice, as are other languages that
permit you to write TCP/IP servers, such as C, C++, Java, Python, and
no doubt others. Remote Procedure Call (RPC), and (on unix), rsh and
ssh will also let you execute programs remotely. You don't say what
your platform is.

If you want to use Perl, then you should check out the IO::Socket and
IO::Socket::INET modules. Also look at 'perldoc perlipc' for network
programming.

Be sure to check the incoming parameters from the client before
actually executing commands on your server system. To do otherwise is a
major security risk.

Note: this newsgroup is defunct. Try comp.lang.perl.misc in the future.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top