- Authors
- Contact
Michael JasonSmith <mpj17@onlinegroups.net>
- Date
2014-05-21
- Organization
- Copyright
This document is licensed under a Creative Commons Attribution-Share Alike 4.0 International License by OnlineGroups.net.
GroupServer stores most of its data using the PostgreSQL relational database1. The SQLAlchemy system is used to provide the connection between GroupServer and PostgreSQL 2. The gs.database
product provides some utilities to establish the connection, and use the connection more easily. Most code will perform a query in the same way, and not have to consider which database instance is being used.
See the Sphinx documentation in docs
for more information.
- Note
For GroupServer installations with only one site there can only be one database instance, so this section can be ignored.
GroupServer is highly scalable:
- One Zope instance can manage multiple GroupServer instances,
- One GroupServer instance can manage multiple sites, and
- One site can handle multiple groups.
The PostgreSQL database is independent of this. A single database instance can be shared by multiple sites. The main advantage of this is that the profile information is shared 3. However, the databases do not need to be shared.
The front-end HTTP proxy is used to set the correct database instance, in much the same way that the proxy is used to select the correct skin4. The proxy should set the HTTP_INSTANCEID
environment variable in the HTTP request to the ID of the database to connect to. The gs.database.core.getInstanceId
utility, which is called by both getTable
and getSession
, will then examine this environment variable to determine the correct database instance for the current request.
- Code repository: https://source.iopen.net/groupserver/gs.database
- Questions and comments to http://groupserver.org/groups/development
- Report bugs at https://redmine.iopen.net/projects/groupserver
Neither files, nor image caches are stored in the relational database. These are the the two major exceptions to the "data is in the database" rule.↩
The zope.sqlalchemy product also provides some integration between Zope transactions and the SQLAlchemy transactions.↩
By sharing profile information between sites people can use the same profile to log in to multiple sites, and do not have to verify their email address for each site.↩
Skins are not just colour-schemes, but entire collections of code. As crazy as it sounds, selecting a skin based on URL can change vast amounts of behaviour, and is normal with Zope.↩