0

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?

vektor
  • 3,061
  • 6
  • 42
  • 69
Franz Kafka
  • 10,303
  • 19
  • 89
  • 148

2 Answers2

2

You might want to google WebDAV, that would let you store files over HTTP, and you should be able to find a Java client impl.

Here's one link to give you an intro: http://en.wikipedia.org/wiki/WebDAV

MattR
  • 6,528
  • 2
  • 19
  • 29
1

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

Community
  • 1
  • 1
artbristol
  • 31,363
  • 5
  • 65
  • 99