[Grok-dev] Store session data

bribon alvreinoso at gmail.com
Tue Aug 17 12:10:06 EDT 2010


I'm migrating my application based on ZODB to MySQL. I see in some features
MySQL is faster than ZODB. My concern is I need to call to the database
twice when I page is rendering. One is for generating the view, and another
one is for the client side. I use javascript in the client side and REST for
the communication between server and client.

Thus, I'm thinking of storing all the data related to whoever user in a
session object or something like that. I mean in my actual application every
time a page is rendered it needs to call the database to grab the data. All
the data in my application is related to whoever user. So when a user is log
in, I can grab all the data in one time and store it in session object.
Then, if a user switches the page or makes any change, I can play with the
session object, where the data of whoever user is stored, and I don't need
to call every time to the database.

I was trying to find out something like this for Grok, but I haven't found
out anything. I just found out for Zope a session object, but It seems like
the session object is going in every request. I need to store the data of
whoever user in the server (I guess in ZODB) and I can grab the user id from
the request. Because all the data from the client to the server is going in
JSON format.

It would be great if someone could guide me in this issue.

Thanks in advance!
View this message in context: http://old.nabble.com/Store-session-data-tp29449277p29449277.html
Sent from the Grok mailing list archive at Nabble.com.

More information about the Grok-dev mailing list