-1

I have an Android application which gets data from an Apache server. After making some changes on approx 3k rows (each row in database consists of 35 columns) then that data needs to be sent back from android app to the same Apache server. So my question would be how to do it?

My thought were :

  1. send it with post method and create large JSON file like in here
  2. make XML file (of all rows) and send it in binary format(still thinking on this one) and then decode in Apache

Currently I don't have any code, just need an guidance on which way to start

Community
  • 1
  • 1
KuKeC
  • 4,392
  • 5
  • 31
  • 60
  • 1
    I think your linked answer still applies, even if the json payload is larger than the example. – Charlie Egan Jan 19 '16 at 15:13
  • 1
    JSON would do the job, and on laravel side you could use laravel's mass assignment to insert or udpdate a table in the database – Malek Hijazi Jan 19 '16 at 15:16
  • Well i's very important to me that there won't be any lost data in the transfer and that it's done in some reasonable time (<15 secs). Does this effect to your suggestions or not? – KuKeC Jan 19 '16 at 15:36

1 Answers1

1

It depends on your aplication and its architecture.

  1. You could possibly do it either in text (JSON/XML/CSV) or binary form - it depends on your data, data volume, and whether it is a problem for your application.

  2. You could do in one request or one request per row. - In both cases you should think what would you do if an error occurs during transmission.

  3. You should also possibly take care of concurrent changes - if they are appliable to your application.

Gennadiy Litvinyuk
  • 1,536
  • 12
  • 21