1

I have an application already developed and in production. It's developed in groovy, as a desktop application with its own UI, and its purpose is to screen-scrape a website to extract some information every minute, and show alerts to the user when it need to.

Now I am trying to move this application to android, so it will be available all the time the phone is up (the more alerts the user gets during the day the better). Before starting I would like to gather opinions from people with experience (haven't touched android yet):

I see the following ways to set the app in android:

  1. just port the whole application to android/java and have it running in the background all the time, doing more or less what the app now does. To take into account.

    • I assume running groovy on android is out of the question. I think I saw once some reference to a project to port it to android but it was so slow it was useless. So it must be android/java

    • Getting the html pages every minute (or less if i decrease) and doing all the parsing etc is doable or drains to much battery? What about memory, pages to parse could be not so small is there any limit on android?

  2. Set up a server side living in some hosting doing the screen-scraping every minute and only sending alerts to the background running android app, that would be much lighter than the previous one.

    • I assume there is some built-in push functionality in android apps can listen to?

    • What server side hosting/service would be recommended (and for what reason, cost, perf, easy of use...).

My guess would be 2, using GAE due to the affinity with android and maybe I could even use gaelyk to reause part of my groovy code...

I am targeting android 2.2.1 and up. The number of users is very small and easy to deal with so updating the android app is not a problem.

thanks

4

1 回答 1

0

If you choose #1 you will not only drain the phones battery but also generate more traffic to the web-site you are scraping (if all users are scraping the same pages). In any case, I would go with #2. (Have you considered sending out an email or SMS instead of writing an app? Of course, this really depends on your use case...)

Regarding the server platform:

GAE and Android are both by Google but I don't see how that would help you in this case. I develop GAE apps and never came across any Android specific features for GAE. However, GAE seems like a good fit for your intended use. It is quite possible that you could get away with a free instance (depending on the amount of processing you need to do, which will depend on the number of users and scraping).

Some points you should also consider

  • with GAE you don't get a static IP as opposed to EC2.
  • if you need https: does not work with custom domains (so users will always see something like https://youapp.appspot.com)

On the plus side: you don't have to deal with adminstration and can focus on coding. I believe EC2 is a lot more involved in that respect. (At least that's why I chose GAE). The technology look-in is greater on GAE of course.

Hope this helps!

P.S.: Just to be clear, I have no experience with Android.

于 2011-05-22T12:25:22.693 回答