Re: [Zope] Keep track of language.
Pattreeya Tanisaro writes:
Dieter, do we need to do something with database? I searched the CoreSession-how to and it said something I have to do with database...that's why I am confused. The term "database" is used in a very wide sense in Zope's context.
You surely have heard of the ZODB (Z Object Database). It is where Zope stores its objects. It is an embedded part of Zope. The CoreSession product currently supports two SessionDataManager types, a RAM session data manager that keeps the session information in RAM (i.e. no database) and an external SessionDataManager that stores the session information in ZODB. If you like (but I assume you do not), you could implement the SessionDataManager interface in your own class and then use an external database (or a file, or ...) to store your session data. Usually ZODB, itself an interface and not an implementation, is implemented by "FileStorage". This is an undoable storage that uses a file to store objects. Whenever you modify an object, a new object version is created and stored. This way, you can undo changes (as old versions are still there), but any small change increases the amount of storage necessary (for the new object version). Thus, the standard ZODB implementation is not very good to store the volatile session information. There are non-undoable ZODB implementation (not yet complete) that do not exhibit this problem. But probably, you will not go this way. You will either stick to a RAM based SessionDataManager or (if your load is expected to be low enough that you remain on a single computer) use a different session product. I, e.g., use FSSession, a file based session manager, and I am very satisfied. Such a file based solution will not scale well when the site needs to be spread over different computers. Dieter
The CoreSession product currently supports two SessionDataManager types, a RAM session data manager that keeps the session information in RAM (i.e. no database) and an external SessionDataManager that stores the session information in ZODB.
Technically, this isn't correct. Although a RAM-based ("internal") session data manager stores session data in RAM, it uses a custom RAM-based ZODB storage to do so. So even if you're using an internal data container, you're using the ZODB (although chances are you don't know it, and don't care). There's nothing preventing someone from writing a RDBMS-backed session data manager, however, as Dieter states. Nobody has done it yet, however.
participants (2)
-
Chris McDonough -
Dieter Maurer