Hi Blixt,

This is a common strategy if you're storing only a small amount of data. In
fact, several App-Engine-Friendly session libraries already support "Cookie
Only" sessions, including Beaker and gaeutilities.

-Nick Johnson


On Thu, Jun 10, 2010 at 1:21 PM, Blixt <[email protected]> wrote:

> Hey, I had an idea about optimizing for logged in users and wanted
> input from others how they do it.
>
> First of all, my first priority when developing a web site is not to
> optimize resource usage. My #1 priority is to experienced latency (for
> the visitor) of the site as low as possible.
>
> It's very common for sites to allow users to log in. This gives the
> user a session. You usually store this session id as a cookie, and
> then you fetch the user from the datastore using this session id,
> every request.
>
> My idea is this:
> Instead of the session id, you store an AES encrypted (using a server-
> side secret key) copy of the user data in a cookie. This data also has
> a timestamp so that it can be invalidated. This should reduce the
> number of datastore requests drastically (or memcache requests if you
> put the session data there). It will use more CPU and bandwidth, but
> overall it should speed up the user experience.
>
> What do you guys think? Does this seem to be a good way of reducing
> the experienced latency, or can you think of better ways?
>
> --
> 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.
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

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