Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Perl CGI to Perl daemon communication

perl server daemon

1:31 am on Nov 14, 2009 (gmt 0)

New User

5+ Year Member

joined:Nov 14, 2009
posts: 2
votes: 0

I am building a Web interface to monitor an embedded system.
I have built a Perl script which runs remote commands and gathers output from that system.
Now what i need is a Web interface which makes calls to this script(executes remotes command) and displays data on the web page.

First of all, i need to make my script as a daemon process
which can accept requests from the server.
I can choose any Server side technology till it can communicate with this Perl script.
To keep it simple, i can choose Perl/CGI which can talk to this daemon Perl script.

What is the best way to communicate with this Daemon script.
I haven't decided on how the communication needs to be..Sockets or anything else...any suggestions?

Are there Perl modules already available which can make my message passing simpler?

I can have the Web Page submit actual remote commands which needs to be passed to the Perl script which executes on the embedded system and returns me the result.

Thanks in advance.

3:47 pm on Nov 15, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 31, 2008
votes: 0

the communication can be whatever you want it to be. if you don't mind the overhead, you could simply use HTTP. making your script a HTTP-daemon is easy with HTTP::Daemon (or any of the other httpd-modules), and querying it with REST-style queries and LWP::UserAgent shouldn't be too hard as well.
Of course, it heavily depends on your performance needs, how many concurrent connections are to be handled etc.
2:23 am on Nov 18, 2009 (gmt 0)

New User

5+ Year Member

joined:Nov 14, 2009
votes: 0

Thanks janharders. Response time needs to be short(less than 3 sec) but my response data could be around few Ks. I'll take a look at HTTP-Daemon.