mysql - HTTP POST Transmission suggestion -
i'm building system requires arduino board send data server.
the requirements/constraints of app are:
- the server must receive data , store them in mysql database.
- a web application used graph , plot historical data.
- data consumption critical
- web application must able plot data in real time.
so far, system working fine, however, optimization required.
the current adopted steps are:
- accumulate data in arduino board 10 seconds.
- send data server using post data containing xml string representing 10 records.
- the server parse received xml , store values in database.
this approach historical data, not realtime monitoring. question is: there difference between:
- accumulating data , send them xml, and,
- 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
Post a Comment