lundi 29 juin 2015

Including the results from another server

I've a web server that accepts input from the browser and returns computation results to the browser. I'd like to offload the computation part to another server. What is the best way to include results of computation in the web page?

One option is to use iframe in the generated HTML: <iframe src="http://ift.tt/1NqmvFV"></iframe> But this is clunky as the width of the frame remains fixed irrespective of the width of the browser window. The 'seamless' attribute doesn't do anything in Chrome & Firefox.

Another option is to make an http call to the computation server in the CGI script on the web server and include results in the web page. The downside of this is that the results can be large and there's an extra delay of transferring results from the computation server to the web server and then from the web server to the browser.

Is there another way to accomplish what I'm looking to do? I guess, in essence, what I'm looking for is something like this: At webserver.com, the form calls computationserver.com but that call is hidden from the user and the user sees only webserver.com URL in her browser.

Thanks for your help!




Aucun commentaire:

Enregistrer un commentaire