Periodical website parsing consumes high data downloading. Should I migrate my logic to a server? How?

StackOverflow https://stackoverflow.com/questions/15850323

  •  01-04-2022
  •  | 
  •  

Question

First of all, sorry for my bad English.

I've made an Android app which seems to work fine. Its mission is to connect to a website and parse it to see if there is new data. In that case, it creates a notification.

The data in the website is modified approximately once a day, but at a random hour. And I want to know it as soon as possible.

My app connects to the website every 20 minutes to check for new info, but I realized that it involves a high data consuption on 3G. I've thought that the parsing could be done in a server, and the mobile would just recive a c2dm push.

My problem: I've no idea about servers. I've seen some prices and.. Do I have to expend that high quantity of money in a 800$ server? Are there any cheaper option for my simple app?

Thank you everyone!

Était-ce utile?

La solution

As you have seen, doing the parsing on the device can be troublesome with data use and also potential network access issues (what if you don't have a connection at the time you try to search?). Doing this work on a server with a more reliable internet connection is a good idea. You will be using Google Cloud Messaging (GCM) not C2DM which is deprecated. You don't need to buy special hardware to host a server, and if it's only for your use, an always-on desktop computer could do the work for you. Since you'll be using push, you don't even need a static IP address (or a domain name) for the server, since the device will never 'phone home', since you just need a notification when things change.

I would first start by opening a port on my desktop computer and try to get the device to talk to your machine via your LAN.

Hope this helps.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top