简体   繁体   English

PHP:在后台运行Java程序的跨平台方式

[英]PHP: cross-platform way of running a java program in the background

The java program in question needs to run for a few minutes, write a temporary file and then terminate. 有问题的Java程序需要运行几分钟,编写一个临时文件,然后终止。 So PHP must allow it run in background , instead of the exec way of waiting for that program to terminate. 因此,PHP必须允许它在background中运行,而不是等待该程序终止的exec方法。

What is a cross-platform way of doing this? 跨平台的实现方式是什么?

There are a couple ways. 有几种方法。 Message Queues would be a great way to handle this. 消息队列将是解决此问题的好方法。

http://www.rabbitmq.com/ and http://kr.github.com/beanstalkd/ http://www.rabbitmq.com/http://kr.github.com/beanstalkd/

They would allow you to asynchronously execute your java in the background without making the user wait. 它们将允许您在后台异步执行Java,而无需用户等待。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PHP中的跨平台pgrep - Cross-platform pgrep in PHP PHP Perl跨平台编码器/解码器 - php perl cross-platform encoder/decoder 用于ASP / PHP的跨平台平面文件数据存储 - Cross-platform flat-file data storage for ASP/PHP 生成跨平台兼容的Blowfish哈希(PHP / Ruby) - Generate cross-platform compatible Blowfish hash (PHP/Ruby) 如何使用PHP PDO跨平台进行用户名/密码管理 - How to use PHP PDO Cross-platform for UserName/Password Management 检测/读取按键,跨平台的PHP CLI - Detect/read key pressed, cross-platform PHP CLI 数据库的跨平台加密 - Cross-Platform encryption for Database “与MySQL结合使用的PHP是跨平台的(您可以在Windows中开发并在Unix平台上提供服务)”的确切含义是什么? - What exactly mean by “PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)”? PHP中(跨平台)实时数据流的最佳方法? - Best approach for (cross-platform) real-time data streaming in PHP? 如何为PHP / Ajax应用程序构建一个完整的,跨平台的,完全自动化的测试套件? - How to build a complete, cross-platform and full automated test-suite for PHP/Ajax applications?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM