mysql - HTTP POST Transmission suggestion -


i'm building system requires arduino board send data server.

the requirements/constraints of app are:

  1. the server must receive data , store them in mysql database.
  2. a web application used graph , plot historical data.
  3. data consumption critical
  4. web application must able plot data in real time.

so far, system working fine, however, optimization required.

the current adopted steps are:

  1. accumulate data in arduino board 10 seconds.
  2. send data server using post data containing xml string representing 10 records.
  3. the server parse received xml , store values in database.

this approach historical data, not realtime monitoring. question is: there difference between:

  1. accumulating data , send them xml, and,
  2. send data each second.

in term of data consumption, sending post request each second much?

thanks

edit: can provide mathematical formula benchmarking 2 approaches in term of data consumption?

for data consumption question need figure out how each post costs giving cell phone plan. don't know if there mathematical formula, test , work out.

however, using 3g (even wifi matter), power consumption issue, if circuit runs on battery; each post bursts around 1.5 amps, that's sending data every second.

but again, why send data every second? real time doesn't mean sending data every second, means being @ least fast system.

for example, if sending temperatures, temperature doesn't change 0° 100° in 1 second. posts waste of power , data.

you need know how fast parameters change in system , adapt post accordingly.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -