Hey all,

In building a login system, I authorize the user, and
then put the user object into the session data.  That
works great, and I can always query the user's
permission easily, because the user object is easily
accessible.  The user object is a middlekit object,
and therein lies the problem.

When the AppServer attempts to move the session to
file, that user object can not be pickled, because
apparently there is no support for pickling a
middlekit model.  I'm left with invalid session data,
and i need to delete the session data and restart the
AppServer to continue.

I see several ways around this, but I'm not sure what
is the best design.  What do others do?

1. Store only a handle to the user in the session, and
retrieve the user object from the database when
necessary
2. Store the relevant information from the user in the
session, instead of just stuffing the whole object
into the session
3. Enhance MiddleKit to allow this to work
4. Build a user cache into the user manager (which
appears to be what the design for UserKit is allowing
for, but is not implemented).

To me, option 3 seems like the best design, but I
don't  have a clue as to what that would require.  The
design of UserKit seems to suggest that option 4 is
the desired design.  Option 1 would require a lot of
database queries, and option 2 seems like a hack, but
both would be easy to do.

Thoughts?

Thanks,
Wayne


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus � Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to