views:

952

answers:

4

Is it impossible to run a web crawler on GAE along side with my app considering the I am running the free startup version?

A: 

I suppose you can (i.e., it's not impossible to) run it, but it will be slow and you'll run into limits quite quickly. As CPU quotas are going to be decreased at the end of May even further, I'd recommend against it.

SilentGhost
+1  A: 

App Engine code only runs in response to HTTP requests, so you can't run a persistent crawler in the background. With the upcoming release of scheduled tasks, you could write a crawler that uses that functionality, but it would be less than ideal.

Nick Johnson
A: 

It's possible. But that's not really an application for appengine just as Arachnid wrote. If you manage to get it working I'll doubt you'll stay in the qotas for free accounts.

Vasil
+2  A: 

While Google hadn't exposed scheduling, queue and background tasks API, you can do any processing only as an answer to external HTTP request. You'd need some heartbeat service that will process one item from crawler's queue at a time (not to hit GAE limits).

To do crawling from GAE, you have to split your application into queue (that stores queue data in Datastore), queue processor that will react to external HTTP heartbeat and your actual crawling logic.

You'd manually have to watch your quota usage and start heartbeat when you have spare quota, and stop if it is used up.

When Google introduces the APIs I've told in the beginning you'd have to rewrite parts that are implemented more effectively via Google API.

UPDATE: Google introduced Task Queue API some time ago. See task queue docs for python and java.

myroslav