I have and android app which sends live data to a PHP server. The data is in JSON format and is sent in HTTP POST request from the android app to PHP. The data sent is very large, to the tune of 11KB. I need to send 11 KB of such information every 2 seconds for 1 week. This has led to two problems:
- The data is very large and sent over a cellular network. Hence, it is turning out to be quite expensive operation.
- It is taking a long time to transfer this 11 KB of information from app to server. Thus delaying the subsequent POST requests, thereby making the entire data transfer very very slow.
We have considered using web sockets and protocol buffers as alternatives. The problem with these options is that we will need to change the entire structure of our code.
Are there any other options which will help in reducing the data (like compressing it significantly) so that the data transfer over the cellular network will consume less space and can be done faster? I have also read about gson, bson etc. but I am not convinced about their efficiency over the current json structure.