Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
App Engine newbie question: Is there any way to circumvent the 30 second process limit?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Whitemice  
View profile  
 More options Apr 23, 5:25 am
From: Whitemice <markbr...@zedray.co.uk>
Date: Thu, 23 Apr 2009 02:25:36 -0700 (PDT)
Local: Thurs, Apr 23 2009 5:25 am
Subject: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
I have Java Servlet code (currently hosted elsewhere) that responds
very quickly to requests.  My code relies on a background spider
process that collects and updates data from a number of sources once
every hour.  This process takes around 2 minutes on test hardware, but
could take as long as 15 minutes on bulk production data.  I have
built it so it is low intensity (using only one socket), so that user
HTTP requests can be handled concurrently without any lag.

Due to third party timeout requirements, I don’t think I can split
this background activity into 30 second chunks.

Questions:
Is there an exception in the 30 second rule for background tasks?
If not, should there be?

Thanks
Mark


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shawn Brown  
View profile  
(1 user)  More options Apr 23, 5:50 am
From: Shawn Brown <big.coffee.lo...@gmail.com>
Date: Thu, 23 Apr 2009 18:50:03 +0900
Local: Thurs, Apr 23 2009 5:50 am
Subject: Re: [appengine-java] App Engine newbie question: Is there any way to circumvent the 30 second process limit?

> very quickly to requests.  My code relies on a background spider
> process that collects and updates data from a number of sources once
> every hour.  This process takes around 2 minutes on test hardware, but
> could take as long as 15 minutes on bulk production data.

Have you looked at http://code.google.com/appengine/docs/java/config/cron.html

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Whitemice  
View profile  
 More options Apr 23, 6:19 am
From: Whitemice <markbr...@zedray.co.uk>
Date: Thu, 23 Apr 2009 03:19:05 -0700 (PDT)
Local: Thurs, Apr 23 2009 6:19 am
Subject: Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
Thanks for the feedback.
I am using a Cron job on my current hosting, and going through the
Google documentation I see the same problem:

>>A URL invoked by cron is subject to the same limits and quotas as a normal HTTP request, including the request time limit.<<

Source: http://code.google.com/appengine/docs/java/config/cron.html

I.e. this seems to confirm my original problem of not being able to
run a lengthy background task.

Regards
Mark

--------
I am blogging this:
http://blog.zedray.com/2009/04/23/google-app-engine-on-java/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cannontrodder  
View profile  
 More options Apr 23, 7:39 am
From: cannontrodder <neil.trod...@gmail.com>
Date: Thu, 23 Apr 2009 04:39:54 -0700 (PDT)
Local: Thurs, Apr 23 2009 7:39 am
Subject: Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
I think one of the flipsides to zero-configuration scalability is that
you have to keep your requests short and snappy. That's why there is a
limit on the size of data structures and a limit to how long your
instances of web code live for. It makes the scalability *work* and
without it, you would just create other constraints elsewhere - a
shame when pulling lots of data out of your app is only happening a
fraction of the time. Imagine if enabling that forced you to make
compromises with the other 99.99% of your page impressions?

There will be a way to break up your task and even if you think this
is crazy and it would be so much simpler if you could just dump 20 MB
of data across the network on other platforms don't forget about the
amazing benefits app engine gives you in reward for coding within
these constraints.

On Apr 23, 11:19 am, Whitemice <markbr...@zedray.co.uk> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Whitemice  
View profile  
 More options Apr 23, 9:42 am
From: Whitemice <markbr...@zedray.co.uk>
Date: Thu, 23 Apr 2009 06:42:26 -0700 (PDT)
Local: Thurs, Apr 23 2009 9:42 am
Subject: Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
Hi cannontrodder

I agree with what you’ve written, it’s just that I’m describing a
different kind of thread lifecycle requirement.  My background thread
does not need to scale, and because of my architecture the other page
impressions benefit from having updated data stored locally.  Other
approaches are orders of magnitude less efficient.

Coming from an Android programming background (my requesting
application is an Android device), I see that Google have recognised
this requirement by creating a “background Service” process which can
run for longer and have different responsiveness requirements to
regular Activities.

It just sounds like hitting the same process every 30 seconds (to
simulate a longer running process) breaks the sprit of the original
rule.

Regards
Mark

--------
I am blogging this:
http://blog.zedray.com/2009/04/23/google-app-engine-on-java/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
cannontrodder  
View profile  
 More options Apr 23, 10:11 am
From: cannontrodder <neil.trod...@gmail.com>
Date: Thu, 23 Apr 2009 07:11:50 -0700 (PDT)
Local: Thurs, Apr 23 2009 10:11 am
Subject: Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
On Apr 23, 2:42 pm, Whitemice <markbr...@zedray.co.uk> wrote:

> Coming from an Android programming background (my requesting
> application is an Android device), I see that Google have recognised
> this requirement by creating a “background Service” process which can
> run for longer and have different responsiveness requirements to
> regular Activities.

I too am looking at android and would like appengine to act as its
backend.

To be fair to google, their decision to implement services on Android
and their decision *not* to implement them on app engine isn't
contradictory in my opinion, just different approaches for very
different platforms.

> It just sounds like hitting the same process every 30 seconds (to
> simulate a longer running process) breaks the sprit of the original
> rule.

I know *exactly* where you are coming from! It's almost as if you are
abusing the system if you do this! But what *is* the 'spirit of the
rule'?

I'm guessing at the reasoning behind the decision to limit the process
to 30 seconds (which used to be 10 seconds) but I'm sure it is all
about making scaling easier and *not* about stopping you hogging
resources. And not having to worry about users hogging resources is
what google get by making it scale well. Hosting providers who do not
do the scaling for you automatically still have to worry about
developers hogging resources on shared hosting.

If you chop processing time and storage requirements into smaller
chunks, then that is easier to distribute. If you chop your big job
into 100 smaller jobs then it isn't cheating or hacking around a
limitation, it's removing the impact that your large job has by making
it easy to distribute. It also frees up the hardware that other
application developers *need* for scaling of their apps.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Whitemice  
View profile  
 More options Apr 23, 11:48 am
From: Whitemice <markbr...@zedray.co.uk>
Date: Thu, 23 Apr 2009 08:48:26 -0700 (PDT)
Local: Thurs, Apr 23 2009 11:48 am
Subject: Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
>>I too am looking at android and would like appengine to act as its backend. To be fair to google, their decision to implement services on Android and their decision *not* to implement them on app engine isn't contradictory in my opinion, just different approaches for very different platforms.<<

Agreed, I was just reaching for the closest available metaphor.

>>I know *exactly* where you are coming from! It's almost as if you are abusing the system if you do this! But what *is* the 'spirit of the rule'?....<<

You make a very good point, as I was assuming that the rule was about
making code responsive (which I know a lot about) rather than about
process distribution (of which I know nothing). *If* you are correct,
then I could rewrite my cron loop to generate self referencing
requests (in up to 30 second chunks) which would hammer the server and
make it perform the required work.

Could someone who knows recommend a strategy for doing this, and
confirm that this kind of thing is permitted?

Another approach for Google would be to limit processes intensity
(CPU, memory usage, etc) rather than elapsed runtime (i.e. for non-
HTTP request activities), although I now understand that this is a
less efficient solution for distributed systems (as well as a way to
let bad code run for longer).

Thanks for the feedback
Mark


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Toby Reyelts  
View profile  
 More options Apr 23, 12:10 pm
From: Toby Reyelts <to...@google.com>
Date: Thu, 23 Apr 2009 12:10:40 -0400
Local: Thurs, Apr 23 2009 12:10 pm
Subject: Re: [appengine-java] Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?

I can't give you a detailed strategy for doing this at the moment, but I can
confirm that it is reasonable and permitted to break up longer background
tasks into shorter background tasks.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Whitemice  
View profile  
 More options Apr 24, 4:09 am
From: Whitemice <markbr...@zedray.co.uk>
Date: Fri, 24 Apr 2009 01:09:14 -0700 (PDT)
Local: Fri, Apr 24 2009 4:09 am
Subject: Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
Hi Toby
Judging by your @google.com email address I’ll regard this as a semi-
official Google response and start thinking about my implementation.

May I suggest that the App Engine documentation be updated to include
this scenario, as it currently puts off developers.  Also (if no one
else does), I will put a tutorial together on my blog showing my
implementation for other developers to follow (and to solicit outside
critique).

Thanks for the feedback
Mark


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
javaDinosaur  
View profile  
 More options Apr 24, 5:48 am
From: javaDinosaur <jonathan...@hotmail.co.uk>
Date: Fri, 24 Apr 2009 02:48:49 -0700 (PDT)
Local: Fri, Apr 24 2009 5:48 am
Subject: Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
@Whitemice

Have you looked at the AppEngine roadmap? Asynchronous processing
driven off an event queue is high on the list. Google now has a pretty
good track record of stating intentions and delivering into AppEngine
so my guess is we will hear more about async tasks at Google I-O.

http://code.google.com/appengine/docs/roadmap.html


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Whitemice  
View profile  
 More options Apr 24, 7:24 am
From: Whitemice <markbr...@zedray.co.uk>
Date: Fri, 24 Apr 2009 04:24:58 -0700 (PDT)
Local: Fri, Apr 24 2009 7:24 am
Subject: Re: App Engine newbie question: Is there any way to circumvent the 30 second process limit?
Hi javaDinosaur
>>  Asynchronous processing driven off an event queue is high on the list.<<

Yes, that’s exactly what I was looking for! :-D

I will delay my Java Google App Engine migration till after this
rollout, and instead concentrate on getting the Android bit finished.
Thanks everyone for improving my understanding.
Mark


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google