Make PHP execute and communicate with a Java application on a web server

前端 未结 4 1924
你的背包
你的背包 2021-01-12 09:10

I have a java application that will take the image as an input and output another image. I have a website with a popular host (PHP+MYSQL Hosting). I want to create a page on

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-12 09:48

    Google App Engine allows to host Java (and Python) web applications. The SDK and the basic account is free of charges. With the SDK, you could develop and test the application locally and then simply deploy to App Engine (NetBeans and Eclipse plugins are available).

    Then the PHP app could send the data in a HTTP POST to the Google App Engine application and get the result in the response data.

    Or the data is stored first in a database blob and a processing job is put in a task queue (a 'message queue'). This has the advantage that the PHP client request will return immediately after the data has been POSTed. Then, the PHP application could poll for the result data while Google App Engine processes the image. The PHP side would be more responsive this way.

提交回复
热议问题