[Zope] RAM session management

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Thu, 17 Feb 2000 12:45:14 +1100 (EST)


On Wed, 16 Feb 2000, Hung Jung Lu wrote:

> Has anyone done RAM session management? (storing
> session information in RAM.)
> 
> I am thinking in implementing RAM session management.
> The picture I have is:
> 
> (1) Implementing a mini TCP/IP server at a port in
>     an internal server machine. Most likely I'll
>     use Python.
> 
> (2) The web server then talks to the session server
>     via TCP/IP.
> 
> Does this scheme seem OK? (Security, performance,
> scalabilty, etc.)

This is probably overkill.

It is quite possible to store the information in a package global
dictionary/class/datastructure of a standard Zope product - just make 
sure you use locking on it where appropriate so it is thread safe.
This allows you to share information between the Zope threads (but won't
work for ZEO instances). If you take this approach, it could be trivially
implemented by subclassing or hacking the FSSession product.

One thing to dwell on - if you use the FSSession product, it will store
the session information on the local file system. Although peoples first
impression is that this will reduce performance, remember that the memory
saved can be used by your OS for disk caching. Of course, if you want 
Session access for a CDROM Zope distribution it won't help you much :-)

-- 
 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen