I wrote a possible interface for sessions: http://aspn.activestate.com/ASPN/CodeDoc/Apache-mod_perl_guide/src/modules.html
It's not my most thoughtful effort, but maybe it can be a discussion point. Feel free to offer completely different APIs if you think this one sucks. I basically just threw in properties and methods for all the functionality I've thought of by reading a couple APIs and the discussion here, without actually thinking about how it goes together :-/ In this interface presumably you make subclasses of an abstract class to implement different storage backends and do some kinds of configuration. Thinking on it more, probably a good place to start would be agreeing on specific terminology for the objects involved, since I've seen several different sets of terminology, many of which use the same words for different ideas: Session: An instance of this represents one user/browser's session. SessionStore: An instance of this represents the persistence mechanism. This is a functional component, not embodying any policy. SessionManager: This is a container for sessions, and uses a SessionStore. This contains all the policy for loading, saving, locking, expiring sessions. Does that sound good? Note that the attached interface conflates SessionStore and SessionManager. Some interfaces make an explicit ApplicationSession, which is contained by Session and keyed off some application ID; my interface implies that separation, but does not enforce it, and does not offer any extra functionality at that level (e.g., per-ApplicationSession locks or transactions). _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com