home > Sessions (GSoC)

Sessions (GSoC)

Usage

example

simple example, a counter

Specification

Summary

The main session object will be created depending on the configuration. However the user/developer will choose it's usage. If needed the user will call start() method and there by inicializing handlers, variables from db-config like variables. The session will be implemented as storage object. Session identification will mostly rely on client cookies (optionally also on client IP address). All data will be stored/retrieved through handler object (DB-, file-, cookie?- based). Save/commit & destroy methods will be created. The user will have the option to set various settings including expiration timeout, handler, session id generator (a default will be provided).

Design

The session functionality will rely on a two-layer implementation: Session -> Handler. The Session class will provide identification & verification of the client request while the Handler-like classes will guarante data persistence.

Implementation details

Session class

The Session class is a derivate of Storage. It will store as a dict anyhow called variable, but through the Storage interface only variables not named as internal private variables.

Private variables

Public methods

Private methods

Main session parameters

web.config.session_parameters - Storage object:

Handler class

An abstract class which defines a interface to store/retreive/remove session data.

Public methods

Handler parameters

web.config.handler_parameters as Storage object will include additional parameters that are necessary for various Handlers

DBHandler

FileHandler

*Handler specs

Notes

[edit][history][backlinks] last modified August 18, 2007