Communication between Cgi and another perl application

Discussion in 'Perl Misc' started by Giojo, Dec 13, 2004.

  1. Giojo

    Giojo Guest

    Hello boy!
    I have to make 2 applications in perl running on the same server.. One is
    always active and using an infinite loop do something on the server, the
    other one is a cgi script that have to comunicate with the always active
    application... So I can control remotely my application using a cgi and the
    apache server...
    Now, I don't know in witch way they should communicate...
    1)through text file shared?
    2)through memory shared?
    I'd prefer the second one, I think is more useful then the first... What do
    you think?
    Consider that the message are very simple, for example start this... stop
    that... etc...
    Thank you :)
    Giojo
     
    Giojo, Dec 13, 2004
    #1
    1. Advertising

  2. Giojo wrote:

    > Hello boy!
    > I have to make 2 applications in perl running on the same server.. One is
    > always active and using an infinite loop do something on the server, the
    > other one is a cgi script that have to comunicate with the always active
    > application... So I can control remotely my application using a cgi and
    > the apache server...
    > Now, I don't know in witch way they should communicate...
    > 1)through text file shared?
    > 2)through memory shared?
    > I'd prefer the second one, I think is more useful then the first... What
    > do you think?
    > Consider that the message are very simple, for example start this... stop
    > that... etc...
    > Thank you :)
    > Giojo


    Use standard interprocess communication mechanisms - shared
    memory/semaphores or sockets.

    gtoomey
     
    Gregory Toomey, Dec 13, 2004
    #2
    1. Advertising

  3. Giojo

    Bart Lateur Guest

    Giojo wrote:

    >Now, I don't know in witch way they should communicate...
    >1)through text file shared?
    >2)through memory shared?
    >I'd prefer the second one, I think is more useful then the first... What do
    >you think?


    Tradition is to use sockets (such as TCP).

    Also check out the included docs "perlipc"

    <http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlipc.html>


    A good book on networking with perl is "Network Programming with Perl"
    by Lincoln Stein.

    <http://modperl.com:9000/perl_networking/>


    You can always write a little command line utility that takes its data
    from STDIN or via the command line, and passes it along to the server
    (=daemon).

    --
    Bart.
     
    Bart Lateur, Dec 13, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jochen Neyens
    Replies:
    11
    Views:
    1,246
    Mark Rae
    Aug 7, 2004
  2. Replies:
    7
    Views:
    456
  3. kath
    Replies:
    4
    Views:
    814
    J. Gleixner
    Apr 9, 2007
  4. Replies:
    0
    Views:
    160
  5. sri
    Replies:
    4
    Views:
    163
    Thrill5
    Nov 16, 2008
Loading...

Share This Page