Addressing the stable situation where the VM is "shutdown" by GAE, similarly
to the Servlet context initialization you can call the Servlet context
destroyed listener to take care of any persistence you want to do there.

Of course, this doesn't take care of any exceptional circumstances such as a
crash etc ...

cowper

On Wed, Feb 17, 2010 at 8:58 PM, AJ Chen <ajc...@web2express.org> wrote:

> yes, the new console is a good addition. however, because the app can be
> shutdown/restarted by GAE at any time, you would still need to put the
> initialization code in context listener (or similar place) so that it will
> be called automatically when the app is restarted.
>
> I just realize a potential major issue in GAE environment, which may
> require some paradigm shift in server programming (at least to me). Usually,
> one the server side, you may have a singleton class to keep some data
> objects closeby as well as updating the data at run time. The data may
> change so fast that they are conveniently kept in memory for some time
> before put into permanent storage. This is safe because the web server does
> not kill the app at will. Now that GAE may kill the app and restart it at
> any time, keeping data in memory becomes a big potential problem because the
> data will be gone after the app starting. This means you would have to save
> the new data into datastore immediately. If you have lots of intermediate
> data or temporary data, you have to save them to datastore immediately as
> well. This always-using-datastore situation created by GAE may slow down
> some applications in addition to a lot more coding for storage.
>
> Without knowing what exactly happens when GAE automatically shutdowns the
> app, my worry may be wrong.  Does anyone see the similar issue?  Any
> suggestion for safely keeping data in memory?
>
> -aj
>
>
> On Wed, Feb 17, 2010 at 10:00 AM, Vlad Skarzhevskyy <
> skarzhevs...@gmail.com> wrote:
>
>> There is an Custom Admin Console pages in new SDK 1.3.1.
>> I think the best place to preload the data to your application is
>> using servlet/page exposed in this Console.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>
>
> --
> AJ Chen, PhD
> Chair, Semantic Web SIG, sdforum.org
> http://web2express.org
> @web2express on twitter
> Palo Alto, CA, USA
> 650-283-4091
> *Monitoring social media in real time*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to