Generate graphs on server, display in browser
is waiting for the newly created image.
This image must be generated by a Windows application running either on the Windows 2003 server or on a PC to which the server has access. The app is heavy, so instead of launching it for every request, I plan to launch a tiny executable that sends a request string to the app.
So the logic is roughly:
- user clicks a link saying "give me a new image with x=1, y=2, z=3"
- script launches tiny executable on server
- tiny executable sends WM_xx message to big app saying "generate image with x=1, y=2, z=3"
- when big app has created image, it informs tiny executable "image is done, filename is MyTmp123.png"
- tiny executable informs browser that image is ready
- a call to document.images.src=MyTmp123.png replaces current image with new image.
I thought this was an extremely simple setup, but my searches tell me it's not. Exec and System seem not to be widely used, and the idea of having a GUI app running on a server seems not so popular (I can parse the request manually to prevent exploits).
Efficiency and speed are not important - there will not be many users. But I would be grateful for hints to a solution that is simple enough for a newbie in server-side scripting.