B*s
2 楼
windows上的程序要调用linux上的程序,返回结果后windows处理一番,再调用linux上
的另一个程序处理。
windows程序和linux程序之间有几M的文件要共享,可能用svn的方式共享。二者在局域
网之中。
如何让这些程序之间互相调用、返回结果呢?
我想到的办法是:
1,在windows、linux上都搭建webservice,由对方调用。局域网之间这样做是不是太
重量级了?
2,双方开socket,等对方来连接。好像比较低层次。
3,开一个共享目录,双方都每10秒查询一次看看对方有没有新命令。这样是否可靠?
windows上面用c#,linux上面用perl/ruby。两边的核心都做好了,而我负责做两边的
通信。
的另一个程序处理。
windows程序和linux程序之间有几M的文件要共享,可能用svn的方式共享。二者在局域
网之中。
如何让这些程序之间互相调用、返回结果呢?
我想到的办法是:
1,在windows、linux上都搭建webservice,由对方调用。局域网之间这样做是不是太
重量级了?
2,双方开socket,等对方来连接。好像比较低层次。
3,开一个共享目录,双方都每10秒查询一次看看对方有没有新命令。这样是否可靠?
windows上面用c#,linux上面用perl/ruby。两边的核心都做好了,而我负责做两边的
通信。
b*u
3 楼
ebay
amazon
check their websites
amazon
check their websites
c*y
4 楼
似乎2最好
?
【在 B*********s 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: windows上的程序要调用linux上的程序,返回结果后windows处理一番,再调用linux上
: 的另一个程序处理。
: windows程序和linux程序之间有几M的文件要共享,可能用svn的方式共享。二者在局域
: 网之中。
: 如何让这些程序之间互相调用、返回结果呢?
: 我想到的办法是:
: 1,在windows、linux上都搭建webservice,由对方调用。局域网之间这样做是不是太
: 重量级了?
: 2,双方开socket,等对方来连接。好像比较低层次。
: 3,开一个共享目录,双方都每10秒查询一次看看对方有没有新命令。这样是否可靠?
?
【在 B*********s 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: windows上的程序要调用linux上的程序,返回结果后windows处理一番,再调用linux上
: 的另一个程序处理。
: windows程序和linux程序之间有几M的文件要共享,可能用svn的方式共享。二者在局域
: 网之中。
: 如何让这些程序之间互相调用、返回结果呢?
: 我想到的办法是:
: 1,在windows、linux上都搭建webservice,由对方调用。局域网之间这样做是不是太
: 重量级了?
: 2,双方开socket,等对方来连接。好像比较低层次。
: 3,开一个共享目录,双方都每10秒查询一次看看对方有没有新命令。这样是否可靠?
k*a
5 楼
同问。
a*i
8 楼
x*r
10 楼
If you only need loosely couple the two programs, you can open sshd on your
linux, and then on Windows use expect http://expect.nist.gov/ or expect-like module (e.g. http://www.noah.org/wiki/Pexpect if you use python) to invoke a ssh/sftp client (e.g. putty & pscp) to automate the interaction your linux program.
linux, and then on Windows use expect http://expect.nist.gov/ or expect-like module (e.g. http://www.noah.org/wiki/Pexpect if you use python) to invoke a ssh/sftp client (e.g. putty & pscp) to automate the interaction your linux program.
A*e
12 楼
为啥不直接用 linux 给 windows 提供 file service 呢?我们系就是这个做的,所以
windows 和 linux 的程序对文件的共享的协调相当容易。
?
【在 B*********s 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: windows上的程序要调用linux上的程序,返回结果后windows处理一番,再调用linux上
: 的另一个程序处理。
: windows程序和linux程序之间有几M的文件要共享,可能用svn的方式共享。二者在局域
: 网之中。
: 如何让这些程序之间互相调用、返回结果呢?
: 我想到的办法是:
: 1,在windows、linux上都搭建webservice,由对方调用。局域网之间这样做是不是太
: 重量级了?
: 2,双方开socket,等对方来连接。好像比较低层次。
: 3,开一个共享目录,双方都每10秒查询一次看看对方有没有新命令。这样是否可靠?
windows 和 linux 的程序对文件的共享的协调相当容易。
?
【在 B*********s 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: windows上的程序要调用linux上的程序,返回结果后windows处理一番,再调用linux上
: 的另一个程序处理。
: windows程序和linux程序之间有几M的文件要共享,可能用svn的方式共享。二者在局域
: 网之中。
: 如何让这些程序之间互相调用、返回结果呢?
: 我想到的办法是:
: 1,在windows、linux上都搭建webservice,由对方调用。局域网之间这样做是不是太
: 重量级了?
: 2,双方开socket,等对方来连接。好像比较低层次。
: 3,开一个共享目录,双方都每10秒查询一次看看对方有没有新命令。这样是否可靠?
B*s
14 楼
xiaoer: the Expect might be the perfect solution for me, because I only call
linux program from Windows. Thank you.
By using this I don't need to open a specific thread to monitor the socket and give commands to other threads.
linux program from Windows. Thank you.
By using this I don't need to open a specific thread to monitor the socket and give commands to other threads.
B*s
15 楼
汇报:最后用plink (from putty) 来直接调用linux上面的命令,能够返回 error
output 和standard output,基本上不用编程。
还是要谢谢xiaoer的ssh提醒。 Expect是tcl语言写的,也有perl port,但不太顺手,所以最终没用上。
output 和standard output,基本上不用编程。
还是要谢谢xiaoer的ssh提醒。 Expect是tcl语言写的,也有perl port,但不太顺手,所以最终没用上。
相关阅读
发点牢骚! 真的觉得日本人好牛~ZFS performanceSGE tutorial?Questions about gateway server forward all https to proxy serverAmex SPG卡送25K points 免费送500刀现金 最佳酒店卡10台Sparc怎么用ubuntu下的chrome和firefox,观看视频速度异常好奇号探测器用的是python [zz]码工码农,帮忙了! (转载)Linux下面那个program code editor 好用呢Amex Blue Cash preferred 6% Cashback+$150bonus超市专用信用卡两个硬盘dual boot问题ubuntu 下建的目录在Windows下打不开ArchLinux安装deluge失败open suse 12.1庆祝Arch Linux逆天!/sbin/fdisk sda显示 fdisk: cannot open sda (转载)shell Q: how to detect if a file exists求Numpy中文教程。非常感谢!请高手帮忙看看这个chkrootkit安全否?