If you're using Java, you could try loading a synchronized static
global object from an AppEngine database in a global static block.
This will trigger only when the servlet is first loaded by any server
and so you get both the speed of simple variables for requests without
having to call the database again for each.
For a static block, put your code inside your AbstractRobotServlet
extending class like so:
public class YourRobotServlet extends AbstractRobotServlet {
static {
//add database value retrieving code here and set your
synchronized static variables up
}
...
}
On Dec 11, 9:19 pm, "[email protected]" <[email protected]>
wrote:
> Thanks Pamela,
>
> It is a great option indeed but I found it quite slow. I compared it
> with the old global variables version and this one is slower.
>
> Is thee another way to do it? does normal storing to separate classes
> work in this case or it is similar to global variables (got reset
> after sometime).
>
> On Dec 10, 1:08 pm, "pamela (Google Employee)" <[email protected]>
> wrote:
>
> > Hi Maamoun -
>
> > This is an App Engine issue. App Engine runs your app from different
> > servers at different times, and this resets the value of global
> > variables. If you need to store something to persist across events,
> > then use the datastore or a data document.
>
> > - pamela
>
> > On Thu, Dec 10, 2009 at 12:14 AM, [email protected]
>
> > <[email protected]> wrote:
> > > Please could someone confirm this as it really got on my nerves.
>
> > > My Wave Robot Was working perfectly 3 days ago
> > > ([email protected]). I use global variables to set the language I
> > > want to translate to, and those variable are set by user at the
> > > begining of the robot creation.
>
> > > Since 3 days, I have noticed that if I leave the robot idle for 5
> > > minutes, the global variables reset the values by themselves and the
> > > user becomes unable to translate to his pre-chosen language.
>
> > > I am 100% that I haven't changed the code during last week, but I have
> > > noticed that it happened when my robot started getting load (although
> > > less the 50% of the dedicated loads).
>
> > > I have cloned the code to another ID, got same results. Tried it on
> > > Chrome and FF, same results.
>
> > > Can someone give a relief please since I am working on new robot, and
> > > this newly raised problem stopped me from doing so.
>
> > > Regards.
> > > Maamoun
>
> > > --
>
> > > You received this message because you are subscribed to the Google Groups
> > > "Google Wave API" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected].
> > > For more options, visit this group
> > > athttp://groups.google.com/group/google-wave-api?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Wave API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-wave-api?hl=en.