I thought on this, but I think this works fine only if I have just one
running copy of my application. If I have two or more (because the workload
can be high), they can be out of sync regarding their local clocks. Thus,
requests that arrive at approximately the same time at the different
instances, can get a different value to the "second" variable...


On Mon, Jun 27, 2011 at 12:58 PM, Bruno Fuster <brunofus...@gmail.com>wrote:

> You could just put this countdown date into your cache (or even a static
> property if it won't change) and calculate the seconds easily using
> jodatime
>
> int seconds = Seconds.secondsBetween(new DateTime(),
> cache.get(countdownDate)).getSeconds();
>
> After that, use javascript intervals to recalculate the countdown while the
> user is at your page instead of consuming some services on your back-end.
>
>
>
>
>  On Mon, Jun 27, 2011 at 12:48 PM, lorenoolive...@gmail.com <
> lorenoolive...@gmail.com> wrote:
>
>> Is it possible to implement a global count down timer in GAE/J? I would
>> like an unique timer to be shared among all the application instances. The
>> precision of the timer is seconds.
>>
>> Any idea?
>>
>> --
>> 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-java@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.
>>
>
>
>
> --
> Bruno Fuster
>
>  --
> 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-java@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.
>

-- 
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-java@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