gae crawler

http://code.google.com/p/gwt-platform/
http://code.google.com/p/gwt-platform/source/browse/#hg%2Fgwtp-samples%2Fgwtp-sample-crawler-service

Web crawlers and Google App Engine Hosted applications




























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














link|edit|flag






50% accept rate





























4 Answers























up vote
2
down vote
accepted



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.












link|edit|flag
















































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.











link|edit|flag












































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.












link|edit|flag













































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.











link|edit|flag





























Your Answer






























 




gae
原文地址:https://www.cnblogs.com/lexus/p/2061229.html