I need a quick and memory-efficient desktop application that can load settings from a XML file and then recursively send a GET/POST request to a URL. The application then waits for a reply from the URL and based on the return result; it moves to the next page or retries the current page.
The application should be able to handle internet outages and resume once the internet connection returns. It should also show me simple statistics and be multi-threaded so it does not freeze when running.
## Deliverables
I will provide the worker a XML file and it will look something like this:
XML INPUT FILE
*****
<application>
<url>
<address>[login to view URL]</address>
<method>GET</method>
<page>1</page>
<perpage>1</perpage>
</url>
<vars>
<variable>city=new york</variable>
<variable>postalcode=22552</variable>
</vars>
<notify>
<complete>[login to view URL]</complete>
<error>[login to view URL]</error>
<internetdown>[login to view URL]</internetdown>
</notify>
</application>
*****
URL REQUESTS
*****
[login to view URL]
Request Return => {"status":"ok","page":"1","total":"200000"}
[login to view URL]
Request Return => {"status":"ok","page":"2","total":"200000"}
[login to view URL]
Request Return => {"status":"error","page":"3","total":"200000"}
*****
Reguirements:
1) Allow me to load the settings from a XML file like the one above.
2) The application should have "run, pause, stop" update option.
3) There should be a progress bar or (%) complete telling me which page the application is currently updating.
4) There should be a option (checkbox) called "replay" that when enabled, the application will start over from page one once it reaches the total.
5) The application should notify on "complete, error, internetdown" by posting to the respected URL.6) The application should check the status of the request return after every URL request. The request return is in JSON format.
Here are the steps for the application:
1) The application should allow me select a input XML file.
2) When I select "Run" it should begin the update. When I select "Pause" it should pause the update and remember which page its currently doing then continue the update again from the current page when I select "Pause" again. When I select "Stop" it should stop the update.
3) The update should continue to send GET/POST requests to the address URL until page reaches total.
4) If the return status is "error" it should pause, notify to the specified URL, and then give a option to "continue" to the next page, "retry" the page again or "stop" the update.
5) If page reaches total then it should notify to the specified URL that update is complete.
6) If the "replay" option is enabled then it should set page=1 and start the update over.
7) If there is a problem with the internet connection then it should notify to the specified URL and then wait and continue to retry the update every minute.