[google-appengine] List of all logged-in users + filtering that list.

2009-04-10 Thread slmnhq

Hi,

I am trying to build a community website which has a very familiar
pattern:
 - it displays the list of all users that are currently logged-in
 - it allows each user to filter the above list by some criteria (eg:
geo-location, age, etc).

I've never done this before, so I was hoping somebody could point me
to articles that talk about the ins-and-outs of these features. Also,
I want to understand how the DB and Memcache will factor into this.

One issue that is completely stumping me is when a user may be logged
in, but has been inactive for a long enough period of time that he/she
is effectively logged-out and should be removed from the list.

I will appreciate any ideas.

Thanks,
Salman



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



[google-appengine] Re: Global Application Configuration Data

2008-12-30 Thread slmnhq


On Dec 30, 6:46 pm, Adam  wrote:
> Put it into your main Python source file.

Won't that cause data coherence issues?

Whenever main.py is imported on a new server, it will assign values
defined in the source code. Right?

What if I want to change those values programatically?

In some systems, such configuration data is stored in an INI file
which is read/written by the admin interface.
In GAE, we cannot access the file system so an INI file is out of the
question.

It seems that the datastore is the only place to put this info. It
will essentially be a single-entity model.

Thanks,
Salman

>
> On Dec 30, 5:36 pm, slmnhq  wrote:
>
> > Hi,
>
> > Some applications have system variables like 'DEBUG_ENABLE',
> > 'MAP_API_KEY', etc that can change the overall behavior of the
> > application.
>
> > What is the best way to represent this data in our application?
>
> > One way to do this is have a module that exports this information as
> > variables. This works fine if we never need to change this data at
> > runtime. But what if an admin needs to change a system variable?
>
> > Is the answer here to use the datastore? How have other people done
> > this?
>
> > Thanks,
> > Salman
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Global Application Configuration Data

2008-12-30 Thread slmnhq

Hi,

Some applications have system variables like 'DEBUG_ENABLE',
'MAP_API_KEY', etc that can change the overall behavior of the
application.

What is the best way to represent this data in our application?

One way to do this is have a module that exports this information as
variables. This works fine if we never need to change this data at
runtime. But what if an admin needs to change a system variable?

Is the answer here to use the datastore? How have other people done
this?

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



[google-appengine] Re: How to open .html in .py file?

2008-12-19 Thread slmnhq

Hi Wen Long,

Jonathan B is exactly right. Please see the link he references.
Specifically, read the section titled "Handlers for static files".

[quote]
For efficiency, App Engine stores and serves static files separately
from application files. Static files are not available in the
application's file system. If you have data files that need to be read
by the application code, the data files must be application files, and
must not be matched by a static file pattern.
[/quote]


On Nov 25, 11:46 pm, Jonathan B  wrote:
> On Nov 23, 9:47 am, "myregc...@gmail.com"  wrote:
>
> > I just want to call a html file and display it,but I'don't know how to
> > do! foe example:
>
> GAE serves dynamic (.py) and static (e.g. .html) files separately. You
> need to specify which is which in your app.yaml file with a new static
> handler.
>
> For example:
>
> - url: /(.*\.(gif|png|jpg))
>   static_files: static/\1
>   upload: static/(.*\.(gif|png|jpg))
>
> The full details are 
> here:http://code.google.com/appengine/docs/configuringanapp.html
>
> --Jonathan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Messaging between multiple concurrent browser sessions

2008-11-07 Thread slmnhq

Thanks Calvin. I read the docs for AQS and it looks worthwhile, not to
mention cheap too.
Thanks for mentioning this.

On Nov 6, 12:24 am, "Calvin Spealman" <[EMAIL PROTECTED]> wrote:
> Let's not be tied to any one thing. Consider something like amazons queue
> service?
>
> On Nov 5, 2008 12:44 PM, "slmnhq" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm starting to build an interactive application where an event (eg:
> mouse click) in one user's browser needs to trigger another event (eg:
> show a message) in another user's browser. Sometimes data (eg: chat
> messages) will be passed from one session to another.
>
> The way I was going to implement this was was to have the event
> producer make a json-rpc call to the GAE application. The application
> would store the message in a "queue" which is just a list of messages
> in memcache. The event consumer will periodically poll (via json-rpc)
> to get messages intended for it. There will be one message queue for
> each session.
>
> Each browser session will have a session id - I have not figured out
> how and when to generate this id.
>
> This is a somewhat naive approach and I was curious if there are
> issues that I might run into.
>
> Thanks,
> Salman
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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
-~--~~~~--~~--~--~---



[google-appengine] Re: Messaging between multiple concurrent browser sessions

2008-11-05 Thread slmnhq

Thanks Tony. You are correct about the reliability issue with
memcache. Messages could be lost due to eviction. There might also be
coherence issues. If these start to become a deal-breaker then I will
look at using the data store and/or gae-utilities' Cache class as the
mechanism for storing messages.

Let me know if anyone has other thoughts.

Thanks!

On Nov 5, 5:13 pm, Tony Arkles <[EMAIL PROTECTED]> wrote:
> It seems like a pretty good approach to me.
>
> One thing to watch out for is that things can vanish from the memcache
> (due to memory pressure).  Don't assume it's going to be a reliable
> storage mechanism!  If you're OK with possibly losing events, then
> it's OK, but if you require all events to for sure be delivered, you
> might want to consider using the datastore instead.
>
> On Nov 5, 11:44 am, slmnhq <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I'm starting to build an interactive application where an event (eg:
> > mouse click) in one user's browser needs to trigger another event (eg:
> > show a message) in another user's browser. Sometimes data (eg: chat
> > messages) will be passed from one session to another.
>
> > The way I was going to implement this was was to have the event
> > producer make a json-rpc call to the GAE application. The application
> > would store the message in a "queue" which is just a list of messages
> > in memcache. The event consumer will periodically poll (via json-rpc)
> > to get messages intended for it. There will be one message queue for
> > each session.
>
> > Each browser session will have a session id - I have not figured out
> > how and when to generate this id.
>
> > This is a somewhat naive approach and I was curious if there are
> > issues that I might run into.
>
> > Thanks,
> > Salman
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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
-~--~~~~--~~--~--~---



[google-appengine] Messaging between multiple concurrent browser sessions

2008-11-05 Thread slmnhq

Hi,

I'm starting to build an interactive application where an event (eg:
mouse click) in one user's browser needs to trigger another event (eg:
show a message) in another user's browser. Sometimes data (eg: chat
messages) will be passed from one session to another.

The way I was going to implement this was was to have the event
producer make a json-rpc call to the GAE application. The application
would store the message in a "queue" which is just a list of messages
in memcache. The event consumer will periodically poll (via json-rpc)
to get messages intended for it. There will be one message queue for
each session.

Each browser session will have a session id - I have not figured out
how and when to generate this id.

This is a somewhat naive approach and I was curious if there are
issues that I might run into.

Thanks,
Salman
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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
-~--~~~~--~~--~--~---