How to initiate a server-side script execution from applet?
in
Integration and Hardware
•
2 years ago
Dear fellow Processing developers,
I have a question as in the subject line. I have developed a visualization that calls a program from command line, and it works fine on my computer. However, there are difficulties putting it in an applet, because I'd need to have my script running server-side.
After searching the forum, I found one solution which involves POSTing to a URL, which invokes a server-side php script, which does what needs to be done. That is one solution, and needs the following amendments in my visualization:
- implement POSTing to the URL
- put the visualization "on hold", and display some sort of progress bar or spinning indicator showing that it is "thinking", because there may be a considerable delay in getting the program finish server-side
- Continuously test whether the output file has been produced by the server-side script, and upon discovering it, unfreeze and proceed with the visualization.
Are there other solutions?
The reason I am asking this question again, is because developing this may need substantial time because exporting to applet, signing it and uploading to website to test an implementation is a VERY tedious task, especially if needed to do it repeatedly (which it probably will, because it is hard to implement this in one shot).
I would highly appreciate the opinions and experiences of the community. Thank you so much.
Sergiy
1