I'm guessing it wont be scalable because if I have 1000+ polling users, I
would have to query and fetch that many entries every time my task runs
every second or so.

Maybe that's not so bad?  It seems like a lot of querying and fetching to
me.

On Wed, Jun 23, 2010 at 4:01 AM, ping2ravi <[email protected]> wrote:

> I wouldnt suggest Memcache for this purpose as memcache doesnt
> guarntee that what you put in it will be available after 30 seconds.
> Memcach can be flushed because of number of reasons. And memcache
> defnitely will not be scalable, if your number of ysers goes high then
> least used entries will be deleted automatically even if that entry
> comes under criteria of last 30 seconds.
>
> I think your first thought about using datastore is good enough. Why
> do you think Datastore will not be scalable? May be you can explain
> your problem statement bit more.
>
>
> On Jun 23, 9:11 am, "l.denardo" <[email protected]> wrote:
> > I'm just giving a not-well-thought suggestion, but I'd rather use
> > memcache for this.
> >
> > I guess something like using a time-dependent code as the key (i.e. a
> > counter which increments every 30 seconds) and a list of user ids as
> > the value, and simply doing a get() on the cache for the current
> > counter value would work.
> >
> > I don't know how this could scale, due to concurrent updates, but I
> > definitely think Memcache is the way to go, not datastore.
> >
> > Regards
> > Lorenzo
> >
> > On Jun 23, 5:45 am, Ryan <[email protected]> wrote:
> >
> >
> >
> > > Each of my users is polling the server every few seconds. I need to
> > > keep a list of the users that have polled in the last 30 seconds handy
> > > for a task I have queued to run every few seconds.
> >
> > > The obvious way I see to do it is to update a datastore entry every
> > > time the user polls, and query the entries that have a timestamp
> > > within the last N seconds within my task queue. I can't imagine this
> > > scaling well.
> >
> > > Any recommendations?
> >
> > > Thanks.- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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-appengine?hl=en.

Reply via email to