Anything will work here, whatever floats your boat. Depends a little on the size of the payload, XML has a marshalling cost associated with it, but it's not much more than any other plain text format. It's certainly likely easier to do with PHP than something more native.
You could also consider JSON, it's a little less verbose than XML and suitable if you're simply interested in moving data back and forth versus the other features of XML.
Heck, CSV will work fine as well.
The easiest way to pull this off would be to host a simple Java Web App and simply tunnel the data over HTTP to your process. If the process isn't designed to be synchronous (i.e the PHP system should wait for processing), then you can simply store the data in a "work_to_be_done" table in a DB, or use one of the many queueing systems (JMS and its ilk).
Nothing really magic here. Just do it. If you're moving millions and millions of messages, then it's different, and a different discussion. If not, fire away and have at it.
发布评论
评论(1)
在这里一切都可以,无论你的船是否漂浮。 XML 具有与其相关的编组成本,这在一定程度上取决于有效负载的大小,但它并不比任何其他纯文本格式多多少。使用 PHP 显然比使用本机语言更容易。
您还可以考虑 JSON,它比 XML 稍微简洁一些,如果您只是对与 XML 的其他功能来回移动数据感兴趣,那么它很适合。
哎呀,CSV 也能正常工作。
实现这一目标的最简单方法是托管一个简单的 Java Web 应用程序,并通过 HTTP 将数据简单地传输到您的进程。如果该过程不是设计为同步的(即 PHP 系统应该等待处理),那么您可以简单地将数据存储在数据库中的“work_to_be_done”表中,或者使用众多排队系统之一(JMS 及其等)。
这里没有什么真正神奇的。去做就对了。如果您要移动数百万条消息,那么情况就会不同,讨论也会不同。如果没有,就开火并继续努力。
Anything will work here, whatever floats your boat. Depends a little on the size of the payload, XML has a marshalling cost associated with it, but it's not much more than any other plain text format. It's certainly likely easier to do with PHP than something more native.
You could also consider JSON, it's a little less verbose than XML and suitable if you're simply interested in moving data back and forth versus the other features of XML.
Heck, CSV will work fine as well.
The easiest way to pull this off would be to host a simple Java Web App and simply tunnel the data over HTTP to your process. If the process isn't designed to be synchronous (i.e the PHP system should wait for processing), then you can simply store the data in a "work_to_be_done" table in a DB, or use one of the many queueing systems (JMS and its ilk).
Nothing really magic here. Just do it. If you're moving millions and millions of messages, then it's different, and a different discussion. If not, fire away and have at it.