I will be writing an app that reacts on user input and sends the user input data to a server. If there is no internet connection the app will batch the data and send it as soon as possible. Encrytion doesn’t matter because just a bunch on key information is sent, which is meaningless without the corresponding real data.
My first idea was to use FTP because I would have to develop my own server part, but using a FTP client in java seems a bit ugly. Furthermore, some firewalls block outgoing FTP.
Port 80 is mostly open, therefore I though of using some webservice stuff. The app would then just do a HTTP POST in its native data format. Now I don’t really want to develop an extra server app. Are there already some server apps that just write POST requests into some file for further processing? Otherwise writing a small thing that catches data and writes it to a file might not be too much work either.
Any ideas on how I can realize this project in the quickest and easiest way possible? I fear that FTP might add some unwanted complexity. Is the second idea flawed?
HTTP POST all the way. FTP is old and clunky and as you say, has problems with firewalls. The server side can be a simple as this https://stackoverflow.com/a/3718333/116509 if you don’t mind PHP or this https://stackoverflow.com/a/7940622/116509 in Java