[英]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.