Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Interfacing unix with windows

by Cirollo (Friar)
on Jul 31, 2003 at 19:05 UTC ( #279723=perlquestion: print w/ replies, xml ) Need Help??
Cirollo has asked for the wisdom of the Perl Monks concerning the following question:

I have an application that runs on Windows, and it can be accessed through Visual Basic scripting (lots of people embed it in Excel sheets) so I should be able to control it with Win32::OLE (although I'm not very experienced with perl-on-windows). I have another application that runs only on Unix machines, and it's API is available through a custom Perl module.

Is there any simple solution that could allow a Perl program to interface with both of these programs at the same time? I couldn't find an answer on Google or CPAN, and I really don't want to implement my own socket server to do this.

Comment on Interfacing unix with windows
Re: Interfacing unix with windows
by Grygonos (Chaplain) on Jul 31, 2003 at 19:15 UTC
    you might want to be more specific... do you mean control the apps concurrently or one after the other? or just control them both in general. I'm not sure where to start because I don't quite understand what you mean. I'm not trying to be critical at all.. I just think supplying more info leads to a better response. Hope you can figure out what you mean exactly.
      I need to control them concurrently, and provide some interface where the results from one program can drive the input to the other program. I ask program A to do something, it gives me an answer; based on that answer, my Perl program decides what to tell program B to do. There will probably need to be some sharing of data between the two applications, but I think that can be accomplished through our Samba mount.
Re: Interfacing unix with windows
by fglock (Vicar) on Jul 31, 2003 at 19:20 UTC

    You could use a HTTP server and a client. This does not qualify as "simple", but it is quite tested and not too difficult to implement.

Re: Interfacing unix with windows
by BrowserUk (Pope) on Aug 01, 2003 at 00:24 UTC

    If the Win32 machines filesystem is visible to the unix box (via Samba or similar) then you could have the Win32 app create a Named pipe and the unix app can just open/read/write to/from that.

    The nice things about this is that if the Win32 app creates the NP at a domain server, it can do so from any machine that can see the domain server and the unix app can run on any machine that can see that domain server. This indirection through a 3rd machine is rather easier to coordinate than ip.port combos.

    Win32::Pipe allows (limited) access to the native Named Pipe apis from perl. The downside is that the implementation is a blocking API with no apparent mechanism for timeouts.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
    If I understand your problem, I can solve it! Of course, the same can be said for you.

Re: Interfacing unix with windows
by NetWallah (Abbot) on Aug 01, 2003 at 00:37 UTC
    Web Services - the universal glue - at least if you believe the MS hype.

    Back in the real world, Web services ARE a viable option here, if you are not looking for blinding speed.

    I thinks fellow monks will bless web services as usable, in this context.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2014-12-27 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls