Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

one script comunicating with another

by mr2 (Friar)
on Dec 23, 2002 at 16:23 UTC ( #221882=perlquestion: print w/ replies, xml ) Need Help??
mr2 has asked for the wisdom of the Perl Monks concerning the following question:


i need to write 2 scripts that must comunicate on the same server ...

one gathers some information & it needs to give it (some
data) to another script that posts this data somewhere ...
(everything in real time)

any suggestions how to do it & what modules to use?

thanks

Comment on one script comunicating with another
Re: one script comunicating with another
by tstock (Curate) on Dec 23, 2002 at 16:25 UTC
    I would start by reading perlipc (man perlipc) and see what ideas pop up.

    Tiago
•Re: one script comunicating with another
by merlyn (Sage) on Dec 23, 2002 at 16:31 UTC
Re: one script comunicating with another
by Nitrox (Chaplain) on Dec 23, 2002 at 17:01 UTC
    I accomplished something similar on a project by using Cache::Cache.

    -Nitrox

Re: one script comunicating with another
by gjb (Vicar) on Dec 23, 2002 at 18:02 UTC

    It's a good pretext to use SOAP::Lite ;-)
    A nice and small project to get familiar with the technology (that is extremely simple to use in Perl.

    Just my 2 cents, -gjb-

Re: one script comunicating with another
by Beatnik (Parson) on Dec 24, 2002 at 00:12 UTC
    Well, IPC::Shareable saved my butt a few times but I do consider using it as a dirty hack :)

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.
Re: one script comunicating with another
by paulbort (Hermit) on Dec 24, 2002 at 19:00 UTC
    Lots of ways to do this, here's the ones I remember off the top of my head, pick one you like:

    • Look for files in a directory/drop files in a directory (good when data is in obvious chunks like transactions, and/or you're in a hurry.)
    • Create a pipe. One process writes to it, the other reads. If you need bi-directional, two pipes. (This is classic *nix.)
    • If there is a future possibility of the two processes being on different machines, consider using a socket.
    • I haven't used SOAP::Lite, but a couple other posters mention it, so it's probably worth checking, especially if your project needs more buzzwords for PHB approval.

    Also, if there is a future possibility of needing more than one instance of either end of the protocol, keep that in mind in picking a solution.
    --
    Spring: Forces, Coiled Again!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://221882]
Approved by Aristotle
Front-paged by jdporter
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2014-08-02 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (54 votes), past polls