Index: openacs-4/packages/acs-core-docs/www/acs-admin.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-admin.html,v diff -u -r1.41.2.2 -r1.41.2.3 --- openacs-4/packages/acs-core-docs/www/acs-admin.html 12 Dec 2010 00:07:01 -0000 1.41.2.2 +++ openacs-4/packages/acs-core-docs/www/acs-admin.html 12 Dec 2010 01:37:24 -0000 1.41.2.3 @@ -1,7 +1,2 @@ -<<<<<<< acs-admin.html - -
Table of Contents
Table of Contents
Table of Contents
Tutorials and reference material for creating new OpenACS packages. -
Table of Contents
Tutorials and reference material for creating new OpenACS packages. -
Table of Contents
Tutorials and reference material for creating new OpenACS packages. +
Table of Contents
Table of Contents
Table of Contents
Prev | Home | Next |
Appendix D. Using CVS with an OpenACS Site | Up | Chapter 14. Kernel Documentation |
Table of Contents
Prev | Home | Next |
Appendix C. Using CVS with an OpenACS Site | Up | Chapter 15. Kernel Documentation |
Analog is a program with processes webserver access logs, performs DNS lookup, and outputs HTML reports. Analog should - already be + already be installed. A modified configuration file is included in the OpenACS tarball.
[root src]#su - $OPENACS_SERVICE_NAME
[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
Index: openacs-4/packages/acs-core-docs/www/aolserver4.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/aolserver4.html,v diff -u -r1.23.2.2 -r1.23.2.3 --- openacs-4/packages/acs-core-docs/www/aolserver4.html 12 Dec 2010 00:07:02 -0000 1.23.2.2 +++ openacs-4/packages/acs-core-docs/www/aolserver4.html 12 Dec 2010 01:37:24 -0000 1.23.2.3 @@ -1,10 +1,5 @@ -<<<<<<< aolserver4.html - -Install AOLserver 4 -=======Install AOLserver 4 ->>>>>>> 1.25 OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
Check suitability of previously installed TCL. Start tcl (type
tclsh
or find it usingwhich tclsh
). @@ -104,34 +99,17 @@ OpenACS code, but don't forget to come back. (Note to maintainers: this should be moved to the next page and integrated into the text there) -<<<<<<< aolserver4.html -
Oracle
[root aolserver]# cd /usr/local/aolserver/bin -[root bin]# cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle -[root bin]# chmod 750 nsd-oracle -=======
Oracle
[root aolserver]#cd /usr/local/aolserver/bin
[root bin]#cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
[root bin]#chmod 750 nsd-oracle
->>>>>>> 1.25 [root bin]# cd /usr/local/aolserver/bin -<<<<<<< aolserver4.html cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle -chmod 750 nsd-oraclePostgreSQL
[root aolserver]# cd /usr/local/aolserver/bin -[root bin]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres -[root bin]# chmod 755 nsd-postgres -======= -cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle chmod 750 nsd-oraclePostgreSQL
[root aolserver]#cd /usr/local/aolserver/bin
[root bin]#cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
[root bin]#chmod 755 nsd-postgres
->>>>>>> 1.25 [root bin]# cd /usr/local/aolserver/bin cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres chmod 755 nsd-postgresYou may need to edit these scripts if you are not using -<<<<<<< aolserver4.html - /usr/local/aolserver as the directory of Aolserver4.
Change startup script (optional). If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/service0/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)
($Id$)View comments on this page at openacs.org -======= - /usr/local/aolserver as the directory of Aolserver4.Change startup script (optional). If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the
/var/lib/aolserver/service0/etc/daemontools/run
script according to the documentation found there (namely: Add the -b yourip:yourport switch)($Id$)View comments on this page at openacs.org ->>>>>>> 1.25 + /usr/local/aolserver as the directory of Aolserver4.Change startup script (optional). If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the
/var/lib/aolserver/service0/etc/daemontools/run
script according to the documentation found there (namely: Add the -b yourip:yourport switch)($Id$)
By Bryan Quinn
-======= -By Bryan Quinn
->>>>>>> 1.38 +By Bryan Quinn
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Tcl API
@@ -26,17 +21,10 @@ Examples of applications include Forums and News. -<<<<<<< apm-design.html -
OpenACS Services: the aforementioned building blocks. -Examples of services include the OpenACS -Content Repository, the OpenACS Templating -System, and the OpenACS Kernel, which includes -=======
OpenACS Services: the aforementioned building blocks. Examples of services include the OpenACS Content Repository, the OpenACS Templating -System, and the OpenACS Kernel, which includes ->>>>>>> 1.38 +System, and the OpenACS Kernel, which includes APM.
An installation of the OpenACS includes the OpenACS Kernel, some services that extend the kernel's functionality, and some applications intended for end-users. Packages function as individual pieces of subsites. A subsite can contain multiple @@ -551,12 +539,6 @@ repositories worldwide.
Another anticipated change is to split the APM UI into separate systems for authoring, maintaining, and installing packages. The current UI presents all of this functionality in one interface and it can be confusing from a -<<<<<<< apm-design.html -usability perspective.
System creator: Bryan Quinn, Jon Salz, Michael Yoon, Lars Pind, Todd -Nightingale.
System owner: Bryan Quinn
Documentation author: Bryan Quinn, building from earlier versions by Jon -Salz, Michael Yoon, and Lars Pind.
System creator: Bryan Quinn, Jon Salz, Michael Yoon, Lars Pind, Todd Nightingale.
System owner: Bryan Quinn
Documentation author: Bryan Quinn, building from earlier versions by Jon Salz, Michael Yoon, and Lars Pind.
By Bryan Quinn and Todd Nightingale
-======= -By Bryan Quinn and Todd Nightingale
->>>>>>> 1.34 +By Bryan Quinn and Todd Nightingale
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.The following is a requirements document for the OpenACS Package Manager Index: openacs-4/packages/acs-core-docs/www/automated-backup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/automated-backup.html,v diff -u -r1.10.2.1 -r1.10.2.2 --- openacs-4/packages/acs-core-docs/www/automated-backup.html 18 Jun 2010 21:29:34 -0000 1.10.2.1 +++ openacs-4/packages/acs-core-docs/www/automated-backup.html 12 Dec 2010 01:37:24 -0000 1.10.2.2 @@ -1,4 +1,4 @@ - -
The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup and then backs up all of /var/lib/aolserver/$OPENACS_SERVICE_NAME to a single zip file, and then copies that zip file to another computer.
Make sure that the manual backup process described above works.
Customize the default backup script. Edit /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh with your specific parameters.
- Make sure the file is executable:
chmod +x backup.sh
- Set this file to run automatically by adding a line to root's crontab. (Typically, with export EDITOR=emacs; crontab -e.) This example runs the backup script at 1:30 am every day.
30 1 * * * sh /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh
The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup
and then backs up all of /var/lib/aolserver/$OPENACS_SERVICE_NAME
to a single zip file, and then copies that zip file to another computer.
Make sure that the manual backup process described above works.
Customize the default backup script. Edit /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh
with your specific parameters.
+ Make sure the file is executable:
chmod +x backup.sh
+ Set this file to run automatically by adding a line to root's crontab. (Typically, with export EDITOR=emacs; crontab -e
.) This example runs the backup script at 1:30 am every day.
30 1 * * * sh /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh
By Jeff Davis
-======= -By Jeff Davis
->>>>>>> 1.26 +By Jeff Davis
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Best practices in writing OpenACS automated tests
Special characters in Tcl. @@ -30,8 +25,4 @@ Make sure that if a duplicate name is entered that there is a reasonable error rather than a server error. Check for insert, move, copy, and rename. -<<<<<<< automated-testing-best-practices.html
Table of Contents
By Don Baccus with additions - by Joel Aufrecht
We will cover some basic backup and recovery strategies. These are intended to -======= - -
Table of Contents
By Don Baccus with additions - by Joel Aufrecht
We will cover some basic backup and recovery strategies. These are intended to ->>>>>>> 1.41 + +
Table of Contents
By Don Baccus with additions + by Joel Aufrecht
We will cover some basic backup and recovery strategies. These are intended to be robust but simple enough to set up. For a large scale production site you would probably need to create your own backup strategies (in particular full dumps from oracle, while easy to set up, are far from the best solution).
There are three basic things which need to be backed up, the database data, the server source tree, and the acs-content-repository (which is in the server source tree).
-
+
CVS-only backup is often appropriate for development sites. If you are already using CVS and your data is not important, you probably don't + +
CVS-only backup is often appropriate for development sites. If you are already using CVS and your data is not important, you probably don't need to do anything to back up your files. Just make sure that your current work is checked into the system. You can then roll back based on date - note the current system time, down to the minute. For maximum safety, you can apply a tag to your current - files. You will still need to back up your database.
Note that, if you did the CVS options in this document, the /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc directory is not included in cvs and you may want to add it.
[root root]# su - $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs commit -m "last-minute commits before upgrade to 4.6" + files. You will still need to back up your database.Note that, if you did the CVS options in this document, the
/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc
directory is not included in cvs and you may want to add it.[root root]#su - $OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cvs commit -m "last-minute commits before upgrade to 4.6"
cvs commit: Examining . cvs commit: Examining bin (many lines omitted) -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs tag before_upgrade_to_4_6 +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cvs tag before_upgrade_to_4_6
cvs server: Tagging bin T bin/acs-4-0-publish.sh T bin/ad-context-server.pl (many lines omitted) -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$exit
[root root]# su - $OPENACS_SERVICE_NAME cd /var/lib/aolserver/$OPENACS_SERVICE_NAME -cvs commit -m "last-minute commits before upgrade to 4.6" +cvs commit -m "last-minute commits before upgrade to 4.6" cvs tag before_upgrade_to_4_6 -exitTo restore files from a cvs tag such as the one used above:
[root root]# su - $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs up -r current -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit +exit
To restore files from a cvs tag such as the one used above:
[root root]#su - $OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cvs up -r current
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$exit
su - $OPENACS_SERVICE_NAME cd /var/lib/aolserver/$OPENACS_SERVICE_NAME cvs up -r current
By Jon Salz
-======= -By Jon Salz
->>>>>>> 1.47 +By Jon Salz
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Tcl code: /tcl/0-acs-init.tcl and /packages/acs-kernel/bootstrap.tcl
This document describes the startup (bootstrapping) process for an AOLserver
@@ -91,8 +86,4 @@
At this point, bootstrap.tcl
is done executing. AOLserver
proceeds to source the remaining files in the /tcl
directory
(i.e., unpackaged libraries) and begins listening for connections.
-<<<<<<< bootstrap-acs.html
-
Prev | Home | Next |
Documenting Tcl Files: Page Contracts and Libraries | Up | External Authentication Requirements |
Prev | Home | Next |
Prerequisite Software | Up | Install a Unix-like system and supporting software |
Prev | Home | Next |
Prerequisite Software | Up | Install a Unix-like system and supporting software |
by Jade Rubick
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< configuring-configuring-packages.html -After you've installed and mounted your package, you can ->>>>>>> 1.8 +
After you've installed and mounted your package, you can configure each instance to act as you would like.
This is done from the Applications page. Log in, go to the Admin or Control Panel, click on the subsite the application is in, and click on Applications. If you click on the 'Parameters' Index: openacs-4/packages/acs-core-docs/www/configuring-configuring-permissions.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-configuring-permissions.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/configuring-configuring-permissions.html 12 Dec 2010 00:07:02 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/configuring-configuring-permissions.html 12 Dec 2010 01:37:24 -0000 1.6.2.3 @@ -2,11 +2,7 @@
by Jade Rubick
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< configuring-configuring-permissions.html -After you've installed and mounted your package, you can -======= -
After you've installed and mounted your package, you can ->>>>>>> 1.8 +
After you've installed and mounted your package, you can configure each instance to act as you would like.
This is done from the Applications page. Log in, go to the Admin or Control Panel, click on the subsite the application is in, and click on Applications. If you click on the 'Permissions' Index: openacs-4/packages/acs-core-docs/www/configuring-install-packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-install-packages.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/configuring-install-packages.html 12 Dec 2010 00:07:02 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/configuring-install-packages.html 12 Dec 2010 01:37:24 -0000 1.6.2.3 @@ -2,11 +2,7 @@
by Jade Rubick
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< configuring-install-packages.html -An OpenACS package extends your website and lets it do things it wasn't able to do before. You can have a weblog, a forums, a calendar, or even do sophisticated project-management via your website.
After you've installed OpenACS, you can congratulate Index: openacs-4/packages/acs-core-docs/www/configuring-mounting-packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-mounting-packages.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/configuring-mounting-packages.html 12 Dec 2010 00:07:02 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/configuring-mounting-packages.html 12 Dec 2010 01:37:24 -0000 1.6.2.3 @@ -2,11 +2,7 @@
by Jade Rubick
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< configuring-mounting-packages.html -After you've installed your packages, you have to 'mount' them in order to make them appear on your website.
Make sure you are logged in, and then click on the 'Admin' or 'Control Panel' link to get to the Site-Wide Administration page (at /acs-admin). Click on the subsite you'd Index: openacs-4/packages/acs-core-docs/www/credits.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/credits.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/credits.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/credits.html 12 Dec 2010 01:37:24 -0000 1.44.2.3 @@ -1,5 +1,5 @@ -
Table of Contents
By Vinod Kurup
+Table of Contents
By Vinod Kurup
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Vinod Kurup put @@ -31,12 +31,6 @@ Fred Yankowski, Dan Chak, Sebastiano Pilla, Reuven Lerner, Malte Sussdorff, Stan Kaufman and Pascal Scheffers.
-<<<<<<< credits.html - All questions and comments regarding - this guide should be posted on the OpenACS forums. -
By Joel Aufrecht with input from Jeff Davis, Branimir Dolicki, and Jade Rubick.
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -
All OpenACS code is available anonymously. To get code
anonymously, use the parameter
-d:pserver:anonymous@cvs.openacs.org:/cvsroot
immediately after cvs
in a cvs command to check out or export code.
@@ -51,7 +51,7 @@
cd CVSROOT
emacs avail
Add an avail line of the form:
avail|username|openacs-4
cvs commit -m "added commit on X for username" avail
Branimir suggests an additional level of abstraction. If you put
Host cvs-server
HostName cvs.openacs.org
- User yournamehere
into your ~/.ssh/config
file, then you can use -d :ext:cvs-server:/cvsroot
instead of -d :ext:cvs.openacs.org:/cvsroot
. You can then change the definition of cvs-server
by changing one file instead of editing hundreds of CVSROOT/Repository
files.
If you are actively developing a non-core package, you + User yournamehere
into your ~/.ssh/config
file, then you can use -d :ext:cvs-server:/cvsroot
instead of -d :ext:cvs.openacs.org:/cvsroot
. You can then change the definition of cvs-server
by changing one file instead of editing hundreds of CVSROOT/Repository
files.
If you are actively developing a non-core package, you should work from the latest core release branch. Currently this is oacs-5-6. This ensures that you are working on top of a stable OpenACS core, but still allows you to commit feature @@ -66,13 +66,13 @@ Inventory and Package maintainers and status for a list of available packages and their current state. -
If you are actively developing packages in the OpenACS
Core, work from the HEAD branch. HEAD is used for active
development of the next version of core OpenACS. It may be very
buggy; it may not even install correctly. Do not use this branch for
development of non-core features unless your work depends on some
of the HEAD core work. To check out HEAD, omit the
- -r
tag.
To check out HEAD for development, which requires an OpenACS developer account:
cvs -d:ext:cvs.openacs.org:/cvsroot checkout acs-core
To check out HEAD anonymously:
cvs -d:pserver:anonymous@cvs.openacs.org:/cvsroot checkout acs-core
+ -r
tag.
To check out HEAD for development, which requires an OpenACS developer account:
cvs -d:ext:cvs.openacs.org:/cvsroot checkout acs-core
To check out HEAD anonymously:
cvs -d:pserver:anonymous@cvs.openacs.org:/cvsroot checkout acs-core
.LRN consists of a given version openacs core, plus a set of packages. These are collectively packages together to form a distrubution of .LRN. F .LRN 2.0.0 sits on top of OpenACS 5.0.0. @@ -87,7 +87,7 @@ mv dotlrn/install.xml ..
Once you have a checkout you can use some commands to track
what has changed since you checked out your copy. cvs -n update
does not change any files, but reports which changes have been updated or locally modified, or are not present in CVS.
-
To update your files, use cvs update
. This will merge changes from the repository with your local files. It has no effect on the cvs.openacs.org repository.
All OpenACS code resides within a single CVS module, openacs-4
. (The openacs-4 directory contains code for all versions of OpenACS 4 and later, and .LRN 1 and later.) Checking out this module retrieves all openacs code of any type. For convenience, subsets of openacs-4
are repackaged as smaller modules.
acs-core
contains only critical common
packages. It does not have any user applications, such as forums,
@@ -115,7 +115,7 @@
project-manager-all
contains the packages required, in combination with acs-core, to run the project-manager package.
Each OpenACS package (i.e., directory in openacs-4/packages/
) is also aliased as a module of the same name.
-
Informal guidelines which may be obsolete in places and should be reviewed: Index: openacs-4/packages/acs-core-docs/www/cvs-tips.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/cvs-tips.html,v diff -u -r1.31.2.1 -r1.31.2.2 --- openacs-4/packages/acs-core-docs/www/cvs-tips.html 12 Dec 2010 00:07:02 -0000 1.31.2.1 +++ openacs-4/packages/acs-core-docs/www/cvs-tips.html 12 Dec 2010 01:37:24 -0000 1.31.2.2 @@ -1,9 +1,9 @@ -
Add the Service to CVS - OPTIONAL. These steps take an existing OpenACS directory and add - it to a CVS +
Add the Service to CVS - OPTIONAL. These steps take an existing OpenACS directory and add + it to a CVS repository.
Create and set permissions on a subdirectory in the local cvs repository.
[root root]#mkdir /cvsroot/$OPENACS_SERVICE_NAME
[root root]#chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /cvsroot/$OPENACS_SERVICE_NAME
[root root]# Index: openacs-4/packages/acs-core-docs/www/db-api-detailed.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api-detailed.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/db-api-detailed.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/db-api-detailed.html 12 Dec 2010 01:37:24 -0000 1.44.2.3 @@ -1,29 +1,24 @@ -<<<<<<< db-api-detailed.html - -Database Access API By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.
-======= -Database Access API By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.
->>>>>>> 1.46 +Database Access API By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -
Tcl procedures: /packages/acs-kernel/10-database-procs.tcl
Tcl initialization: /packages/acs-kernel/database-init.tcl
Tcl procedures: /packages/acs-kernel/10-database-procs.tcl
Tcl initialization: /packages/acs-kernel/database-init.tcl
One of OpenACS's great strengths is that code written for it is very close to the database. It is very easy to interact with the database from anywhere within OpenACS. Our goal is to develop a coherent API for database access which makes this even easier.
There were four significant problems with the way OpenACS previously used the -database (i.e., directly through the ns_db interface):
Handle management. We required code to pass database +database (i.e., directly through the
ns_db
interface):
Handle management. We required code to pass database handles around, and for routines which needed to perform database access but didn't receive a database handle as input, it was difficult to know from -which of the three "magic pools" (main, subquery, and log) to +which of the three "magic pools" (main, subquery, and log) to allocate a new handle. -
Nested transactions. In our Oracle driver, begin -transaction really means "turn auto-commit mode off" and -end transaction means "commit the current transaction and -turn auto-commit mode on." Thus if transactional code needed to call a +
Nested transactions. In our Oracle driver,
begin +transaction
really means "turn auto-commit mode off" and +end transaction
means "commit the current transaction and +turn auto-commit mode on." Thus if transactional code needed to call a routine which needed to operate transactionally, the semantics were non-obvious. Consider:@@ -34,47 +29,47 @@ } db_transaction { -db_dml unused "insert into greeble(bork) values(33)" +db_dml unused "insert into greeble(bork) values(33)" foo $db -db_dml unused "insert into greeble(bork) values(50)" +db_dml unused "insert into greeble(bork) values(50)" }-This would insert greeble #33 and do all the stuff in foo -transactionally, but the end transaction in foo +This would insert greeble #33 and do all the stuff in
foo
+transactionally, but theend transaction
infoo
would actually cause a commit, and greeble #50 would later be inserted in auto-commit mode. This could cause subtle bugs: e.g., in the case that the -insert for greeble #50 failed, part of the "transaction" would have +insert for greeble #50 failed, part of the "transaction" would have already have been committed!. This is not a good thing. -Unorthodox use of variables. The standard mechanism for +
Unorthodox use of variables. The standard mechanism for mapping column values into variables involved the use of the -set_variables_after_query routine, which relies on an uplevel -variable named selection (likewise for -set_variables_after_subquery and subselection). +
set_variables_after_query
routine, which relies on an uplevel +variable namedselection
(likewise for +set_variables_after_subquery
andsubselection
). -Hard-coded reliance on Oracle. It's difficult to +
Hard-coded reliance on Oracle. It's difficult to write code supporting various different databases (dynamically using the appropriate dialect based on the type of database being used, e.g., using -DECODE on Oracle and CASE ... WHEN on +
DECODE
on Oracle andCASE ... WHEN
on Postgres).The Database Access API addresses the first three problems by: -
making use of database handles transparent
wrapping common database operations (including transaction management) in +
making use of database handles transparent
wrapping common database operations (including transaction management) in Tcl control structures (this is, after all, what Tcl is good at!)
It lays the groundwork for addressing the fourth problem by assigning each SQL statement a logical name. In a future version of the OpenACS Core, this API will translate logical statement names into actual SQL, based on the type of database in use. (To smooth the learning curve, we provide a facility for -writing SQL inline for a "default SQL dialect", which we assume to +writing SQL inline for a "default SQL dialect", which we assume to be Oracle for now.)
To be clear, SQL abstraction is not fully implemented in OpenACS 3.3.1. The statement names supplied to each call are not used by the API at all. The API's design for SQL abstraction is in fact incomplete; -unresolved issues include:
how to add WHERE clause criteria dynamically
how to build a dynamic ORDER BY clause (Ben Adida has a -proposed solution for this)
how to define a statement's formal interface (i.e., what bind -variables it expects, what columns its SELECT clause must +unresolved issues include:
how to add
WHERE
clause criteria dynamicallyhow to build a dynamic
ORDER BY
clause (Ben Adida has a +proposed solution for this)how to define a statement's formal interface (i.e., what bind +variables it expects, what columns its
SELECT
clause must contain if it's a query) without actually implementing the statement in a specific SQL dialectSo why is the incremental change of adding statement naming to the API worth @@ -83,81 +78,81 @@ design. Therefore, we know that the effort will not be wasted, and taking advantage of the new support for bind variables will already require code that uses 3.3.0 version of the API to be updated. -
-set_variables_after_query is gone! (Well, it's still there, +
+
set_variables_after_query
is gone! (Well, it's still there, but you'll never need to use it.) The new API routines set local variables automatically. For instance:-db_1row select_names "select first_names, last_name from users where user_id = [ad_get_user_id]" -doc_body_append "Hello, $first_names $last_name!" +db_1row select_names "select first_names, last_name from users where user_id = [ad_get_user_id]" +doc_body_append "Hello, $first_names $last_name!"-Like ns_db 1row, this will bomb if the query doesn't return +Like
ns_db 1row
, this will bomb if the query doesn't return any rows (no such user exists). If this isn't what you want, you can write:-if { [db_0or1row select_names "select first_names, last_name from users where user_id = [ad_get_user_id]"] } { - doc_body_append "Hello, $first_names $last_name!" +if { [db_0or1row select_names "select first_names, last_name from users where user_id = [ad_get_user_id]"] } { + doc_body_append "Hello, $first_names $last_name!" } else { # Executed if the query returns no rows. - doc_body_append "There's no such user!" + doc_body_append "There's no such user!" }Selecting a bunch of rows is a lot prettier now:
-db_foreach select_names "select first_names, last_name from users" { - doc_body_append "Say hi to $first_names $last_name for me!<br>" +db_foreach select_names "select first_names, last_name from users" { + doc_body_append "Say hi to $first_names $last_name for me!<br>" }-That's right, db_foreach is now like ns_db -select plus a while loop plus -set_variables_after_query plus an if statement +That's right,
db_foreach
is now likens_db +select
plus awhile
loop plus +set_variables_after_query
plus anif
statement (containing code to be executed if no rows are returned).-db_foreach select_names "select first_names, last_name from users where last_name like 'S%'" { - doc_body_append "Say hi to $first_names $last_name for me!<br>" +db_foreach select_names "select first_names, last_name from users where last_name like 'S%'" { + doc_body_append "Say hi to $first_names $last_name for me!<br>" } if_no_rows { - doc_body_append "There aren't any users with last names beginnings with S!" + doc_body_append "There aren't any users with last names beginnings with S!" } -The new API keeps track of which handles are in use, and automatically allocates new handles when they are necessary (e.g., to perform subqueries while a select is active). For example:
-doc_body_append "<ul>" -db_foreach select_names "select first_names, last_name, user_id from users" { +doc_body_append "<ul>" +db_foreach select_names "select first_names, last_name, user_id from users" { # Automatically allocated a database handle from the main pool. - doc_body_append "<li>User $first_names $last_name\n<ul>" + doc_body_append "<li>User $first_names $last_name\n<ul>" - db_foreach select_groups "select group_id from user_group_map where user_id = $user_id" { + db_foreach select_groups "select group_id from user_group_map where user_id = $user_id" { # There's a selection in progress, so we allocated a database handle # from the subquery pool for this selection. - doc_body_append "<li>Member of group #$group_id.\n" + doc_body_append "<li>Member of group #$group_id.\n" } if_no_rows { # Not a member of any groups. - doc_body_append "<li>Not a member of any group.\n" + doc_body_append "<li>Not a member of any group.\n" } } -doc_body_append "</ul>" +doc_body_append "</ul>" db_release_unused_handlesA new handle isn't actually allocated and released for every selection, of course - as a performance optimization, the API keeps old handles around -until db_release_unused_handles is invoked (or the script +until
db_release_unused_handles
is invoked (or the script terminates). -Note that there is no analogue to ns_db gethandle - the -handle is always automatically allocated the first time it's needed.
Introduction
+
Note that there is no analogue to
ns_db gethandle
- the +handle is always automatically allocated the first time it's needed.Introduction
Most SQL statements require that the code invoking the statement pass along data associated with that statement, usually obtained from the user. For instance, in order to delete a WimpyPoint presentation, a Tcl script might @@ -167,10 +162,10 @@ delete from wp_presentations where presentation_id = some_presentation_id
-where some_presentation_id is a number which is a valid +where
some_presentation_id
is a number which is a valid presentation ID of the presentation I want to delete. It's easy to write code handling situations like this since SQL statements can include -bind variables, which represent placeholders for actual +bind variables, which represent placeholders for actual data. A bind variable is specified as a colon followed by an identifier, so the statement above can be coded as:@@ -181,43 +176,43 @@When this SQL statement is invoked, the value for the bind variable -:some_presentation_id is pulled from the Tcl variable -$some_presentation_id (in the caller's environment). Note +
:some_presentation_id
is pulled from the Tcl variable +$some_presentation_id
(in the caller's environment). Note that bind variables are not limited to one per statement; you can use an arbitrary number, and each will pull from the correspondingly named Tcl -variable. (Alternatively, you can also specify an list or ns_set +variable. (Alternatively, you can also specify an list orns_set
providing bind variables' values; see Usage.)The value of a bind variable is taken literally by the database driver, so there is never any need to put single-quotes around the value for a bind -variable, or to use db_quote to escape single-quotes contained +variable, or to use
db_quote
to escape single-quotes contained in the value. The following works fine, despite the apostrophe:-set exclamation "That's all, folks!" +set exclamation "That's all, folks!" db_dml exclamation_insert { insert into exclamations(exclamation) values(:exclamation) }Note that you can use a bind variable in a SQL statement only where you could use a literal (a number or single-quoted string). Bind variables cannot be placeholders for things like SQL keywords, table names, or column names, -so the following will not work, even if $table_name is set +so the following will not work, even if
$table_name
is set properly:select * from :table_name -Why Bind Variables Are Useful
+
Why Bind Variables Are Useful
Why bother with bind variables at all - why not just write the Tcl statement above like this:
-db_dml presentation_delete " +db_dml presentation_delete " delete from wp_presentations where presentation_id = $some_presentation_id -" +"(Note the use of double-quotes to allow the variable reference to -$some_presentation_id to be interpolated in.) This will work, +
$some_presentation_id
to be interpolated in.) This will work, but consider the case where some devious user causes -some_presentation_id to be set to something like '3 or -1 = 1', which would result in the following statement being +some_presentation_id
to be set to something like'3 or +1 = 1'
, which would result in the following statement being executed:@@ -227,24 +222,24 @@ This deletes every presentation in the database! Using bind variables eliminates this gaping security hole: since bind variable values are taken literally. Oracle will attempt to delete presentations whose presentation ID -is literally '3 or 1 = 1' (i.e., no presentations, since -'3 or 1 = 1' can't possibly be a valid integer -primary key for wp_presentations. In general, since Oracle +is literally'3 or 1 = 1'
(i.e., no presentations, since +'3 or 1 = 1'
can't possibly be a valid integer +primary key forwp_presentations
. In general, since Oracle always considers the values of bind variables to be literals, it becomes more difficult for users to perform URL surgery to trick scripts into running dangerous queries and DML. -Usage
Every db_* command accepting a SQL command as an argument -supports bind variables. You can either
specify the -bind switch to provide a set with bind variable -values, or
specify the -bind switch to explicitly provide a list of -bind variable names and values, or
not specify a bind variable list at all, in which case Tcl variables are +
Usage
Every
db_*
command accepting a SQL command as an argument +supports bind variables. You can either
specify the
-bind
switch to provide a set with bind variable +values, orspecify the
-bind
switch to explicitly provide a list of +bind variable names and values, ornot specify a bind variable list at all, in which case Tcl variables are used as bind variables.
-The default behavior (i.e., if the -bind switch is omitted) is +The default behavior (i.e., if the
-bind
switch is omitted) is that these procedures expect to find local variables that correspond in name to the referenced bind variables, e.g.:set user_id 123456 -set role "administrator" +set role "administrator" db_foreach user_group_memberships_by_role { select g.group_id, g.group_name @@ -254,18 +249,18 @@ and map.role = :role } { # do something for each group of which user 123456 is in the role - # of "administrator" + # of "administrator" }-The value of the local Tcl variable user_id (123456) is bound to -the user_id bind variable. -
The -bind switch can takes the name of an ns_set +The value of the local Tcl variable
user_id
(123456) is bound to +theuser_id
bind variable. +The
-bind
switch can takes the name of anns_set
containing keys for each bind variable named in the query, e.g.:set bind_vars [ns_set create] ns_set put $bind_vars user_id 123456 -ns_set put $bind_vars role "administrator" +ns_set put $bind_vars role "administrator" db_foreach user_group_memberships_by_role { select g.group_id, g.group_name @@ -275,11 +270,11 @@ and map.role = :role } -bind $bind_vars { # do something for each group in which user 123456 has the role - # of "administrator" + # of "administrator" }-Alternatively, as an argument to -bind you can specify a list of +Alternatively, as an argument to
-bind
you can specify a list of alternating name/value pairs for bind variables:@@ -289,22 +284,22 @@ where g.group_id = map.user_id and map.user_id = :user_id and map.role = :role -} -bind [list user_id 123456 role "administrator"] { +} -bind [list user_id 123456 role "administrator"] { # do something for each group in which user 123456 has the role - # of "administrator" + # of "administrator" } -+
When processing a DML statement, Oracle coerces empty strings into -null. (This coercion does not occur in the -WHERE clause of a query, i.e. -col = '' and -col is null are not equivalent.) +
null
. (This coercion does not occur in the +WHERE
clause of a query, i.e. +col = ''
and +col is null
are not equivalent.)As a result, when using bind variables, the only way to make Oracle set a -column value to null is to set the corresponding bind variable +column value to
null
is to set the corresponding bind variable to the empty string, since a bind variable whose value is the string -"null" will be interpreted as the literal string -"null".These Oracle quirks complicate the process of writing clear and abstract +"null" will be interpreted as the literal string +"null".
These Oracle quirks complicate the process of writing clear and abstract DML difficult. Here is an example that illustrates why:
# @@ -316,259 +311,259 @@ # ); # -set bar "" -set baz "" +set bar "" +set baz "" -db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)" +db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)" # -# the values of the "bar" and "baz" columns in the new row are both +# the values of the "bar" and "baz" columns in the new row are both # null, because Oracle has coerced the empty string (even for the -# numeric column "bar") into null in both cases +# numeric column "bar") into null in both casesSince databases other than Oracle do not coerce empty strings into -null, this code has different semantics depending on the +
null
, this code has different semantics depending on the underlying database (i.e., the row that gets inserted may not have null as its column values), which defeats the purpose of SQL abstraction.Therefore, the Database Access API provides a database-independent way to -represent null (instead of the Oracle-specific idiom of the -empty string): db_null.
Use it instead of the empty string whenever you want to set a column value -explicitly to null, e.g.:
+representnull
(instead of the Oracle-specific idiom of the +empty string):db_null
.Use it instead of the empty string whenever you want to set a column value +explicitly to
null
, e.g.:set bar [db_null] set baz [db_null] -db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)" +db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)" # -# sets the values for both the "bar" and "baz" columns to null +# sets the values for both the "bar" and "baz" columns to null -We now require that each SQL statement be assigned a logical name for the statement that is unique to the procedure or page in which it is defined. This is so that (eventually) we can implement logically named statements with alternative SQL for non-Oracle databases (e.g., Postgres). More on this later. -
-Normally, db_foreach, db_0or1row, and -db_1row places the results of queries in Tcl variables, so you +
+Normally,
db_foreach
,db_0or1row
, and +db_1row
places the results of queries in Tcl variables, so you can say:-db_foreach users_select "select first_names, last_name from users" { - doc_body_append "<li>$first_names $last_name\n" +db_foreach users_select "select first_names, last_name from users" { + doc_body_append "<li>$first_names $last_name\n" }However, sometimes this is not sufficient: you may need to examine the rows returned, to dynamically determine the set of columns returned by the query, or to avoid collisions with existing variables. You can use the --column_array and -column_set switches to -db_foreach, db_0or1row, and db_1row to +
-column_array
and-column_set
switches to +db_foreach
,db_0or1row
, anddb_1row
to instruct the database routines to place the results in a Tcl array or -ns_set, respectively, where the keys are the column names and +ns_set
, respectively, where the keys are the column names and the values are the column values. For example:-db_foreach users_select "select first_names, last_name from users" -column_set columns { +db_foreach users_select "select first_names, last_name from users" -column_set columns { # Now $columns is an ns_set. - doc_body_append "<li>" + doc_body_append "<li>" for { set i 0 } { $i < [ns_set size $columns] } { incr i } { - doc_body_append "[ns_set key $columns $i] is [ns_set value $columns $i]. \n" + doc_body_append "[ns_set key $columns $i] is [ns_set value $columns $i]. \n" } }will write something like: -
first_names is Jon. last_name is Salz.
first_names is Lars. last_name is Pind.
first_names is Michael. last_name is Yoon.
-Note that you never have to use ns_db anymore (including -ns_db gethandle)! Just start doing stuff, and (if you want) call -db_release_unused_handles when you're done as a hint to +
first_names is Jon. last_name is Salz.
first_names is Lars. last_name is Pind.
first_names is Michael. last_name is Yoon.
+Note that you never have to use
ns_db
anymore (including +ns_db gethandle
)! Just start doing stuff, and (if you want) call +db_release_unused_handles
when you're done as a hint to release the database handle. -
- db_null +
db_null
-db_null +db_null
Returns a value which can be used in a bind variable to represent the SQL -value null. See Nulls and Bind Variables +value
null
. See Nulls and Bind Variables above.- -db_foreach +
db_foreach
-db_foreach statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \ +db_foreach statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \ [ -column_array array_name | -column_set set_name ] \ code_block [ if_no_rows if_no_rows_block ] -Performs the SQL query sql, executing -code_block once for each row with variables set to -column values (or a set or array populated if -column_array or -column_set is specified). If the query returns no rows, executes -if_no_rows_block (if provided).
Example:
+Performs the SQL query
sql
, executing +code_block
once for each row with variables set to +column values (or a set or array populated if-column_array
or +column_set
is specified). If the query returns no rows, executes +if_no_rows_block
(if provided).Example:
-db_foreach select_foo "select foo, bar from greeble" { - doc_body_append "<li>foo=$foo; bar=$bar\n" +db_foreach select_foo "select foo, bar from greeble" { + doc_body_append "<li>foo=$foo; bar=$bar\n" } if_no_rows { - doc_body_append "<li>There are no greebles in the database.\n" + doc_body_append "<li>There are no greebles in the database.\n" }-The code block may contain break statements (which terminate the -loop and flush the database handle) and continue statements -(which continue to the next row of the loop).
- db_1row
-db_1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \ +The code block may containbreak
statements (which terminate the +loop and flush the database handle) andcontinue
statements +(which continue to the next row of the loop).db_1row
+db_1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \ [ -column_array array_name | -column_set set_name ] -Performs the SQL query sql, setting variables to +
Performs the SQL query
sql
, setting variables to column values. Raises an error if the query does not return exactly 1 row.Example:
-db_1row select_foo "select foo, bar from greeble where greeble_id = $greeble_id" +db_1row select_foo "select foo, bar from greeble where greeble_id = $greeble_id" # Bombs if there's no such greeble! # Now $foo and $bar are set. -- db_0or1row
-db_0or1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \ +db_0or1row
+db_0or1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \ [ -column_array array_name | -column_set set_name ] -Performs the SQL query sql. If a row is returned, +
Performs the SQL query
sql
. If a row is returned, sets variables to column values and returns 1. If no rows are returned, -returns 0. If more than one row is returned, throws an error.- db_string
-db_string statement-name sql [ -default default ] [ -bind bind_set_id | -bind bind_value_list ] +returns 0. If more than one row is returned, throws an error.db_string
+db_string statement-name sql [ -default default ] [ -bind bind_set_id | -bind bind_value_list ]Returns the first column of the result of SQL query -sql. If sql doesn't return a -row, returns default (or throws an error if -default is unspecified). Analogous to -database_to_tcl_string and -database_to_tcl_string_or_null. +
sql
. Ifsql
doesn't return a +row, returnsdefault
(or throws an error if +default
is unspecified). Analogous to +database_to_tcl_string
and +database_to_tcl_string_or_null
. -- db_nextval
-db_nextval sequence-name +db_nextval
+db_nextval sequence-nameReturns the next value for the sequence sequence-name (using a -SQL statement like SELECT sequence-name.nextval FROM -DUAL). If sequence pooling is enabled for the sequence, transparently +SQL statement like
SELECT
sequence-name
.nextval FROM +DUAL
). If sequence pooling is enabled for the sequence, transparently uses a value from the pool if available to save a round-trip to the database. -- db_list
-db_list statement-name sql [ -bind bind_set_id | -bind bind_value_list ] +db_list
+db_list statement-name sql [ -bind bind_set_id | -bind bind_value_list ]Returns a Tcl list of the values in the first column of the result of SQL -query sql. If sql doesn't +query
sql
. Ifsql
doesn't return any rows, returns an empty list. Analogous to -database_to_tcl_list. +database_to_tcl_list
. -- db_list_of_lists
-db_list_of_lists statement-name sql [ -bind bind_set_id | -bind bind_value_list ] +db_list_of_lists
+db_list_of_lists statement-name sql [ -bind bind_set_id | -bind bind_value_list ]Returns a Tcl list, each element of which is a list of all column values -in a row of the result of SQL query sql. If -sql doesn't return any rows, returns an empty list. -(Analogous to database_to_tcl_list_list.) +in a row of the result of SQL query
sql
. If +sql
doesn't return any rows, returns an empty list. +(Analogous todatabase_to_tcl_list_list
.) -- db_list_of_ns_sets
-db_list_of_ns_sets statement-name sql [ -bind bind_set_id | -bind bind_value_list ] +db_list_of_ns_sets
+db_list_of_ns_sets statement-name sql [ -bind bind_set_id | -bind bind_value_list ]Returns a list of ns_sets with the values of each column of each row - returned by the sql query specified. -
- db_dml
-db_dml statement-name sql \ + returned by thesql
query specified. +db_dml
+db_dml statement-name sql \ [ -bind bind_set_id | -bind bind_value_list ] \ [ -blobs blob_list | -clobs clob_list | -blob_files blob_file_list | -clob_files clob_file_list ] -Performs the DML or DDL statement sql.
If a length-n list of blobs or clobs is provided, then the SQL +
Performs the DML or DDL statement
sql
.If a length-n list of blobs or clobs is provided, then the SQL should return n blobs or clobs into the bind variables -:1, :2, ... :n. -blobs or clobs, if specified, +
:1
,:2
, ... :n
. +blobs
orclobs
, if specified, should be a list of individual BLOBs or CLOBs to insert; -blob_files or clob_files, if +blob_files
orclob_files
, if specified, should be a list of paths to files containing the data to -insert. Only one of -blobs, -clobs, --blob_files, and -clob_files may be provided.Example:
+insert. Only one of-blobs
,-clobs
, +-blob_files
, and-clob_files
may be provided.Example:
-db_dml insert_photos " +db_dml insert_photos " insert photos(photo_id, image, thumbnail_image) values(photo_id_seq.nextval, empty_blob(), empty_blob()) returning image, thumbnail_image into :1, :2 - " -blob_files [list "/var/tmp/the_photo" "/var/tmp/the_thumbnail"] + " -blob_files [list "/var/tmp/the_photo" "/var/tmp/the_thumbnail"]-This inserts a new row into the photos table, with the contents -of the files /var/tmp/the_photo and -/var/tmp/the_thumbnail in the image and -thumbnail columns, respectively. +This inserts a new row into the
photos
table, with the contents +of the files/var/tmp/the_photo
and +/var/tmp/the_thumbnail
in theimage
and +thumbnail
columns, respectively.- -db_write_clob, -db_write_blob, -db_blob_get_file +
db_write_clob
, +db_write_blob
, +db_blob_get_file
-db_write_clob statement-name sql [ -bind bind_set_id | -bind bind_value_list ] +db_write_clob statement-name sql [ -bind bind_set_id | -bind bind_value_list ] -db_write_blob statement-name sql [ -bind bind_set_id | -bind bind_value_list ] +db_write_blob statement-name sql [ -bind bind_set_id | -bind bind_value_list ] -db_blob_get_file statement-name sql [ -bind bind_set_id | -bind bind_value_list ] -Analagous to ns_ora write_clob/write_blob/blob_get_file. +db_blob_get_file statement-name sql [ -bind bind_set_id | -bind bind_value_list ] +
Analagous to
ns_ora write_clob/write_blob/blob_get_file
. -- db_release_unused_handles
-db_release_unused_handles -
Releases any allocated, unused database handles.
- db_transaction
-db_transaction code_block [ on_error { code_block } ] -Executes code_block transactionally. Nested -transactions are supported (end transaction is transparently -ns_db dml'ed when the outermost transaction completes). The -db_abort_transaction command can be used to abort all levels of -transactions. It is possible to specify an optional on_error +
db_release_unused_handles
+db_release_unused_handles +
Releases any allocated, unused database handles.
db_transaction
+db_transaction code_block [ on_error { code_block } ] +Executes
code_block
transactionally. Nested +transactions are supported (end transaction
is transparently +ns_db dml
'ed when the outermost transaction completes). The +db_abort_transaction
command can be used to abort all levels of +transactions. It is possible to specify an optionalon_error
code block that will be executed if some code in code_block throws -an exception. The variable errmsg will be bound in that scope. -If there is no on_error code, any errors will be propagated.Example:
+an exception. The variableerrmsg
will be bound in that scope. +If there is noon_error
code, any errors will be propagated.Example:
proc replace_the_foo { col } { db_transaction { - db_dml "delete from foo" - db_dml "insert into foo(col) values($col)" + db_dml "delete from foo" + db_dml "insert into foo(col) values($col)" } } proc print_the_foo {} { - doc_body_append "foo is [db_string "select col from foo"]<br>\n" + doc_body_append "foo is [db_string "select col from foo"]<br>\n" } replace_the_foo 8 -print_the_foo ; # Writes out "foo is 8" +print_the_foo ; # Writes out "foo is 8" db_transaction { replace_the_foo 14 - print_the_foo ; # Writes out "foo is 14" - db_dml "insert into some_other_table(col) values(999)" + print_the_foo ; # Writes out "foo is 14" + db_dml "insert into some_other_table(col) values(999)" ... db_abort_transaction } on_error { - doc_body_append "Error in transaction: $errmsg" + doc_body_append "Error in transaction: $errmsg" } -print_the_foo ; # Writes out "foo is 8" +print_the_foo ; # Writes out "foo is 8" -- db_abort_transaction +
db_abort_transaction
-db_abort_transaction +db_abort_transactionAborts all levels of a transaction. That is if this is called within several nested transactions, all of them are terminated. Use this insetead of -db_dml "abort" "abort transaction". +
db_dml "abort" "abort transaction"
. -- db_multirow
-db_multirow [ -local ] [ -append ] [ -extend column_list ] \ +db_multirow
+db_multirow [ -local ] [ -append ] [ -extend column_list ] \ var-name statement-name sql \ [ -bind bind_set_id | -bind bind_value_list ] \ code_block [ if_no_rows if_no_rows_block ]- Performs the SQL query sql, saving results in variables + Performs the SQL query
sql
, saving results in variables of the form - var_name:1, var_name:2, etc, - setting var_name:rowcount to the total number - of rows, and setting var_name:columns to a +var_name:1
,var_name:2
, etc, + settingvar_name:rowcount
to the total number + of rows, and settingvar_name:columns
to a list of column names.Each row also has a column, rownum, automatically added and set to the row number, starting with 1. Note that this will override any column in the SQL statement named 'rownum', also if you're using the Oracle rownum pseudo-column.
- If the -local is passed, the variables defined + If the
-local
is passed, the variables defined by db_multirow will be set locally (useful if you're compiling dynamic templates in a function or similar situations).@@ -581,19 +576,19 @@ multirow.
You may also add additional, computed columns to the multirow, using the - -extend { col_1 col_2 ... } switch. This is +
-extend { col_1 col_2 ... }
switch. This is useful for things like constructing a URL for the object retrieved by the query.If you're constructing your multirow through multiple queries with the same set of columns, but with different rows, you can use the - -append switch. This causes the rows returned by this query +
-append
switch. This causes the rows returned by this query to be appended to the rows already in the multirow, instead of starting a clean multirow, as is the normal behavior. The columns must match the columns in the original multirow, or an error will be thrown.- Your code block may call continue in order to skip a row - and not include it in the multirow. Or you can call break + Your code block may call
continue
in order to skip a row + and not include it in the multirow. Or you can callbreak
to skip this row and quit looping.@@ -608,28 +603,28 @@ } { set user_url [acs_community_member_url -user_id $user_id] } -
- db_resultrows
-db_resultrows +
db_resultrows
+db_resultrows
Returns the number of rows affected or returned by the previous statement. -
- db_with_handle
-db_with_handle var code_block -Places a database handle into the variable var and -executes code_block. This is useful when you don't -want to have to use the new API (db_foreach, -db_1row, etc.), but need to use database handles explicitly.
Example:
+db_with_handle
+db_with_handle var code_block +Places a database handle into the variable
var
and +executescode_block
. This is useful when you don't +want to have to use the new API (db_foreach
, +db_1row
, etc.), but need to use database handles explicitly.Example:
proc lookup_the_foo { foo } { db_with_handle db { - return [db_string unused "select ..."] + return [db_string unused "select ..."] } } db_with_handle db { # Now there's a database handle in $db. - set selection [ns_db select $db "select foo from bar"] + set selection [ns_db select $db "select foo from bar"] while { [ns_db getrow $db $selection] } { set_variables_after_query @@ -638,103 +633,99 @@ }- - - + +
db_name -
- + + - - db_name - + +db_name
+Returns the name of the database, as returned by the driver.
- - - + +
db_type -
- + + - - db_type - + +db_type
+Returns the RDBMS type (i.e. oracle, postgresql) this OpenACS installation is using. The nsv ad_database_type is set up during the bootstrap process.
- - - + +
db_compatible_rdbms_p -
- + + - db_compatible_rdbms_p db_type + db_compatible_rdbms_p db_typeReturns 1 if the given db_type is compatible with the current RDBMS.
- - - + +
db_package_supports_rdbms_p -
- + + - db_package_supports_rdbms_p db_type_list + db_package_supports_rdbms_p db_type_listReturns 1 if db_type_list contains the current RDMBS type. A package intended to run with a given RDBMS must note this in it's package info file regardless of whether or not it actually uses the database.
- - - + +
db_legacy_package_p -
- + + - db_legacy_package_p db_type_list + db_legacy_package_p db_type_listReturns 1 if the package is a legacy package. We can only tell for certain if it explicitly supports Oracle 8.1.6 rather than the OpenACS more general oracle.
- - - + +
db_version -
- + + - db_version + db_versionReturns the RDBMS version (i.e. 8.1.6 is a recent Oracle version; 7.1 a recent PostgreSQL version.
- - - + +
db_current_rdbms -
- + + - db_current_rdbms + db_current_rdbmsReturns the current rdbms type and version.
- - - + +
db_known_database_types -
- + + - db_known_database_types + db_known_database_typesReturns a list of three-element lists describing the database engines known to OpenACS. Each sublist contains the internal database name (used in file - paths, etc), the driver name, and a "pretty name" to be used in selection + paths, etc), the driver name, and a "pretty name" to be used in selection forms displayed to the user.
The nsv containing the list is initialized by the bootstrap script and should never be referenced directly by user code. Returns the current rdbms type and version. -<<<<<<< db-api-detailed.html
($Id$)View comments on this page at openacs.org -======= -($Id$)View comments on this page at openacs.org ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/db-api.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api.html,v diff -u -r1.46.2.2 -r1.46.2.3 --- openacs-4/packages/acs-core-docs/www/db-api.html 12 Dec 2010 00:07:02 -0000 1.46.2.2 +++ openacs-4/packages/acs-core-docs/www/db-api.html 12 Dec 2010 01:37:24 -0000 1.46.2.3 @@ -1,10 +1,5 @@ -<<<<<<< db-api.html - -The OpenACS Database Access API -======= -
The OpenACS Database Access API ->>>>>>> 1.48 +
The OpenACS Database Access API By Pete Su and Jon Salz. Modified by Roberto Mello.
One of OpenACS's great strengths is that code written for it is @@ -13,13 +8,8 @@ coherent API for database access which makes this even easier.
More detailed information about the DB api is available at -<<<<<<< db-api.html - Database Access API. -
-======= Database Access API.
->>>>>>> 1.48 The OpenACS database API is meant to save developers from making common mistakes and to provide a more structured syntax for specifying database operations, including transactions. Here's @@ -666,13 +656,8 @@ db_dml foo_insert "insert into foo(baz) values(:1)" {[db_nullify_empty_string $baz]}
-<<<<<<< db-api.html
($Id$)-
The database API allows for direct caching of query results. Repeated calls will -======= -
($Id$)
The database API allows for direct caching of query results. Repeated calls will ->>>>>>> 1.48 return the cached value until it is either explicitly flushed using db_flush_cache, times out (configured the ns_cache is called to create the cache), or another cached query fills the cache, causing older entries to be flushed. Index: openacs-4/packages/acs-core-docs/www/dev-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/dev-guide.html,v diff -u -r1.32.2.2 -r1.32.2.3 --- openacs-4/packages/acs-core-docs/www/dev-guide.html 12 Dec 2010 00:07:02 -0000 1.32.2.2 +++ openacs-4/packages/acs-core-docs/www/dev-guide.html 12 Dec 2010 01:37:24 -0000 1.32.2.3 @@ -1,7 +1,2 @@ -<<<<<<< dev-guide.html - -
Chapter 11. Development Reference Table of Contents
- OpenACS Packages
- OpenACS Data Models and the Object System
- The Request Processor
- The OpenACS Database Access API
- Using Templates in OpenACS
- Groups, Context, Permissions
- Writing OpenACS Application Pages
- Parties in OpenACS
- OpenACS Permissions Tediously Explained
- Object Identity
- Programming with AOLserver
- Using Form Builder: building html forms dynamically
View comments on this page at openacs.org -======= -Chapter 10. Development Reference Section missingTable of Contents
- OpenACS Packages
- OpenACS Data Models and the Object System
- The Request Processor
- The OpenACS Database Access API
- Using Templates in OpenACS
- Groups, Context, Permissions
- Writing OpenACS Application Pages
- Parties in OpenACS
- Object Identity
- Programming with AOLserver
- Using Form Builder: building html forms dynamically
View comments on this page at openacs.org ->>>>>>> 1.34 +Chapter 11. Development Reference Section missingTable of Contents
- OpenACS Packages
- OpenACS Data Models and the Object System
- The Request Processor
- The OpenACS Database Access API
- Using Templates in OpenACS
- Groups, Context, Permissions
- Writing OpenACS Application Pages
- Parties in OpenACS
- OpenACS Permissions Tediously Explained
- Object Identity
- Using Form Builder: building html forms dynamically
View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/doc-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/doc-standards.html,v diff -u -r1.14.2.2 -r1.14.2.3 --- openacs-4/packages/acs-core-docs/www/doc-standards.html 12 Dec 2010 00:07:02 -0000 1.14.2.2 +++ openacs-4/packages/acs-core-docs/www/doc-standards.html 12 Dec 2010 01:37:24 -0000 1.14.2.3 @@ -1,7 +1,2 @@ -<<<<<<< doc-standards.html - -Chapter 13. Documentation Standards View comments on this page at openacs.org -======= -Chapter 12. Documentation Standards Section missingView comments on this page at openacs.org ->>>>>>> 1.16 +Chapter 13. Documentation Standards View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/docbook-primer.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/docbook-primer.html,v diff -u -r1.48.2.2 -r1.48.2.3 --- openacs-4/packages/acs-core-docs/www/docbook-primer.html 12 Dec 2010 00:07:02 -0000 1.48.2.2 +++ openacs-4/packages/acs-core-docs/www/docbook-primer.html 12 Dec 2010 01:37:24 -0000 1.48.2.3 @@ -1,10 +1,5 @@ -<<<<<<< docbook-primer.html - -OpenACS Documentation Guide -======= -
OpenACS Documentation Guide ->>>>>>> 1.50 +
OpenACS Documentation Guide By Claus Rasmussen, with additions by Roberto Mello, Vinod Kurup, and the OpenACS Community
OpenACS documentation development is subject to the constraints of the software project development and release -<<<<<<< docbook-primer.html - methods and cycles (???). -======= methods and cycles (Using CVS with OpenACS). ->>>>>>> 1.50 Essentially, all phases of work may be active to accommodate the asynchronous nature of multiple subprojects evolving by the efforts of a global base of participants with culturally @@ -587,11 +578,7 @@ DTD. The remaining discussion is about publishing using Docbook.
-<<<<<<< docbook-primer.html - -======= - ->>>>>>> 1.50 + is a publishing standard based on XML with similar goals to the OpenACS Documentation project. Some specific reasons why we are using DocBook:
@@ -653,15 +640,9 @@ list of elements and use more exotic features in your documents. The list is made up of SGML-elements but basically -<<<<<<< docbook-primer.html - the same elements are valid in the XML DTD as long as you remember to: - -
-======= the same elements are valid in the XML DTD as long as you remember to: - +
->>>>>>> 1.50 Always close your tags with corresponding end-tags and to not use other tag minimization
@@ -709,11 +690,7 @@ The documentation for each package will make up a little "book" that is structured like this - examples are emphasized: -<<<<<<< docbook-primer.html - -======= - ->>>>>>> 1.50 +
book : Docs for one package - templating @@ -736,43 +713,23 @@ and we will provide a set of templates for documenting an entire package.For now you can take a look at the sources of these DocBook documents to get an idea of how they are tied together. -<<<<<<< docbook-primer.html -
- - Given that your job starts at the sect1-level, all your documents should open with a - <sect1>-tag and end - with the corresponding </sect1>. -
- - You need to feed every <sect1> two attributes. The first attribute, - id, is standard and can be used with all elements. It comes in very - handy when interlinking between documents (more about this when talking about links in Section , “Links”). - The value of id has to be unique - throughout the book you're making since the id's in your - sect1's will turn into filenames when the book is parsed into HTML. -
- - The other attribute is xreflabel. The value of this is the text that will appear - as the link when referring to this sect1. -=======
- + Given that your job starts at the
sect1
-level, all your documents should open with a<sect1>
-tag and end with the corresponding</sect1>
.- + You need to feed every
<sect1>
two attributes. The first attribute,id
, is standard and can be used with all elements. It comes in very handy when interlinking between documents (more about this when talking about links in Links). The value ofid
has to be unique throughout the book you're making since theid
's in yoursect1
's will turn into filenames when the book is parsed into HTML.- + The other attribute is
xreflabel
. The value of this is the text that will appear as the link when referring to thissect1
. ->>>>>>> 1.50Right after the opening tag you put the title of the document - this is usually the same as
xreflabel
-attribute. E.g. the top level of the document you're @@ -785,26 +742,16 @@ </sect1>-<<<<<<< docbook-primer.html - -======= - ->>>>>>> 1.50 + Inside this container your document will be split up into
<sect2>
's, each with the same requirements -id
andxreflabel
attributes, and a<title>
-tag inside. Actually, thexreflabel
is never required in sections, but it makes linking to that section a lot easier.When it comes to naming your -<<<<<<< docbook-primer.html - sect2's and below, prefix them with some abbreviation of the id in the sect1 such as requirements-overview. -
- -=======
sect2
's and below, prefix them with some abbreviation of theid
in thesect1
such asrequirements-overview
.- ->>>>>>> 1.50 + For displaying a snippet of code, a filename or anything else you just want to appear as a part of a sentence, we use
<computeroutput>
@@ -818,28 +765,16 @@<programlisting>
is used. Just wrap your code block in it; mono-spacing, indents and all that stuff is taken care of automatically.For expressing user interaction via a terminal window, we wrap -<<<<<<< docbook-primer.html - the <screen> - tag around text that has been wrapped by combinations of <computeroutput> - and <userinput> -
- -======= the
<screen>
tag around text that has been wrapped by combinations of<computeroutput>
and<userinput>
- ->>>>>>> 1.50 + Linking falls into two different categories: inside the book you're making and outside:
- 1. Inside linking, cross-referencing other parts of your book
By having unique
id
's you can cross-reference any part of your book with a simple tag, regardless of where that part is. -<<<<<<< docbook-primer.html -Check out how I link to a subsection of the Developer's Guide:
Put this in your XML:
-======= -Check out how I link to a subsection of the Developer's Guide:
Put this in your XML:
->>>>>>> 1.50 +Check out how I link to a subsection of the Developer's Guide:
Put this in your XML:
- Find information about creating a package in <xref linkend="packages-making-a-package"></xref>.And the output is:
@@ -862,13 +797,8 @@ Note that since I haven't provided anxreflabel
for the subsection,packages-looks
, the parser will try its best to explain where the link takes you. -<<<<<<< docbook-primer.html -- 2. Linking outside the documentation
- 2. Linking outside the documentation
- ->>>>>>> 1.50 + If you're hyper-linking out of the documentation, it works almost the same way as HTML - the tag is just a little different @@ -889,11 +819,7 @@ for you.
-<<<<<<< docbook-primer.html - -======= - ->>>>>>> 1.50 + To insert a graphic we use the elements
<mediaobject>
,<imageobject>
, @@ -918,13 +844,8 @@Put your graphics in a separate directory ("images") and link to them only with relative paths. -<<<<<<< docbook-primer.html -
- ->>>>>>> 1.50 + Here's how you make the DocBook equivalent of the three usual HTML-lists:
- 1. How to make an <ul>
Making an unordered list is pretty much like doing the same thing in HTML - if you close your
<li>
, that is. The only differences are that each list item has to be wrapped in something more, such as @@ -968,13 +889,8 @@ </varlistentry> </variablelist> -<<<<<<< docbook-primer.html -- ->>>>>>> 1.50 + DocBook supports several types of tables, but in most cases, the
<informaltable>
is enough: @@ -1010,13 +926,8 @@ If you want cells to span more than one row or column, it gets a bit more complicated - check out<table>
for an example. -<<<<<<< docbook-primer.html -- ->>>>>>> 1.50 + Our documentation uses two flavors of emphasis - italics and bold type. DocBook uses one -
<emphasis>
.@@ -1070,13 +981,8 @@ to PSGML Mode. nXML Mode can validate a file as it is edited.
David Lutterkort -<<<<<<< docbook-primer.html - wrote an intro to the PSGML Mode in Emacs -
-======= wrote an intro to the PSGML Mode in Emacs
->>>>>>> 1.50 James Clark's free Java parser XP. Note that this does not validate XML, only parses it. @@ -1097,8 +1003,4 @@ script with directions (now via archive.org) that gets you most of the way. -<<<<<<< docbook-primer.html
View comments on this page at openacs.org -======= -View comments on this page at openacs.org ->>>>>>> 1.50 Index: openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 12 Dec 2010 01:37:24 -0000 1.44.2.3 @@ -1,10 +1,5 @@ -<<<<<<< eng-standards-constraint-naming.html - -Constraint naming standard By Michael Bryzek
-======= -Constraint naming standard By Michael Bryzek
->>>>>>> 1.46 +Constraint naming standard By Michael Bryzek
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.View comments on this page at openacs.org -======= -($Id$)View comments on this page at openacs.org ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 12 Dec 2010 01:37:24 -0000 1.44.2.3 @@ -1,10 +1,5 @@ -<<<<<<< eng-standards-filenaming.html - -ACS File Naming and Formatting Standards By Michael Yoon and Aurelius Prochazka
-======= -ACS File Naming and Formatting Standards By Michael Yoon and Aurelius Prochazka
->>>>>>> 1.46 +ACS File Naming and Formatting Standards By Michael Yoon and Aurelius Prochazka
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.@@ -100,11 +95,7 @@ This can be at the top or bottom of the file.
Using ad_page_contractFor non-library Tcl files (those not in the private Tcl directory), -<<<<<<< eng-standards-filenaming.html -use ad_page_contract -======= use
ad_page_contract
->>>>>>> 1.46 after the file path comment (this supersedes set_the_usual_form_variables and ad_return_complaint). Here is an example of using ad_page_contract, which serves both documentation and page input @@ -150,11 +141,7 @@ set_the_usual_form_variables. The use of bind variables makes such previous variable syntax obsolete.Using ad_library-<<<<<<< eng-standards-filenaming.html -For shared Tcl library files, use ad_library after -======= For shared Tcl library files, use
ad_library
after ->>>>>>> 1.46 the file path comment. Its only argument is a doc_string in the standard (javadoc-style) format, likead_page_contract
. Don't forget to put the @cvs-id in @@ -178,11 +165,7 @@ -- author -- created -- -<<<<<<< eng-standards-filenaming.html --- $Id$ -======= -- $Id$ ->>>>>>> 1.46Of course, replace "
--
" with the comment delimiter appropriate for the language in which you are programming. @@ -245,8 +228,4 @@View comments on this page at openacs.org -======= -($Id$)View comments on this page at openacs.org ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -1,10 +1,5 @@ -<<<<<<< eng-standards-plsql.html - -PL/SQL Standards -======= -
PL/SQL Standards ($Id$)View comments on this page at openacs.org ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 12 Dec 2010 01:37:24 -0000 1.47.2.3 @@ -1,10 +1,5 @@ -<<<<<<< eng-standards-versioning.html - -Release Version Numbering ($Id$)By Ron Henderson, Revised by Joel Aufrecht
-======= -Release Version Numbering ($Id$)By Ron Henderson, Revised by Joel Aufrecht
->>>>>>> 1.49 +Release Version Numbering ($Id$)By Ron Henderson, Revised by Joel Aufrecht
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.@@ -90,18 +85,10 @@
Level 3: Mature and Standard. Same as level 2, plus meets published coding standards; is fully internationalized; available on both supported databases. -<<<<<<< eng-standards-versioning.html -
Database upgrade scripts must be named very precisely in order for the Package Manager to run the correct script at the correct time.
Upgrade scripts should be named /packages/myfirstpackage/sql/postgresql/upgrade/upgrade-OLDVERSION-NEWVERSION.sql
If the version you are working on is a later version than the current released version, OLDVERSION should be the current version. The current version is package version in the APM and in /packages/myfirstpackage/myfirstpackage.info. So if forums is at 2.0.1, OLDVERSION should be 2.0.1d1. Note that this means that new version development that includes an upgrade must start at d2, not d1. -
If you are working on a pre-release version of a package, use the current package version as OLDVERSION. Increment the package version as appropriate (see above) and use the new version as NEWVERSION. For example, if you are working on 2.0.1d3, make it 2.0.1d4 and use upgrade-2.0.1d3-2.0.1d4.sql.
Database upgrades should be confined to development releases, not alpha or beta releases.
- Never use a final release number as a NEWVERSION. If you do, then it is impossible to add any more database upgrades without incrementing the overall package version.
Use only the d, a, and b letters in OLDVERSION and NEWVERSION. rc is not supported by OpenACS APM.
The distance from OLDVERSION to NEWVERSION should never span a release. For example if we had a bug fix in -acs-kernel on 5.1.0 you wouldn't want a file upgrade-5.0.4-5.1.0d1.sql since if you subsequently need to provide a 5.0.4-5.0.5 upgrade you will have to rename the 5.0.4-5.1.0 upgrade since you can't have upgrades which overlap like that. Instead, use upgrade-5.1.0d1-5.1.0d2.sql -
View comments on this page at openacs.org -=======Database upgrade scripts must be named very precisely in order for the Package Manager to run the correct script at the correct time.
Upgrade scripts should be named
/packages/myfirstpackage/sql/postgresql/upgrade/upgrade-OLDVERSION-NEWVERSION.sql
If the version you are working on is a later version than the current released version, OLDVERSION should be the current version. The current version is package version in the APM and in
/packages/myfirstpackage/myfirstpackage.info
. So if forums is at 2.0.1, OLDVERSION should be 2.0.1d1. Note that this means that new version development that includes an upgrade must start at d2, not d1.If you are working on a pre-release version of a package, use the current package version as OLDVERSION. Increment the package version as appropriate (see above) and use the new version as NEWVERSION. For example, if you are working on 2.0.1d3, make it 2.0.1d4 and use
upgrade-2.0.1d3-2.0.1d4.sql
.Database upgrades should be confined to development releases, not alpha or beta releases.
Never use a final release number as a NEWVERSION. If you do, then it is impossible to add any more database upgrades without incrementing the overall package version.
Use only the d, a, and b letters in OLDVERSION and NEWVERSION. rc is not supported by OpenACS APM.
The distance from OLDVERSION to NEWVERSION should never span a release. For example if we had a bug fix in acs-kernel on 5.1.0 you wouldn't want a file upgrade-5.0.4-5.1.0d1.sql since if you subsequently need to provide a 5.0.4-5.0.5 upgrade you will have to rename the 5.0.4-5.1.0 upgrade since you can't have upgrades which overlap like that. Instead, use
upgrade-5.1.0d1-5.1.0d2.sql
View comments on this page at openacs.org ->>>>>>> 1.49 Index: openacs-4/packages/acs-core-docs/www/eng-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards.html,v diff -u -r1.28.2.2 -r1.28.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards.html 12 Dec 2010 00:07:02 -0000 1.28.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards.html 12 Dec 2010 01:37:24 -0000 1.28.2.3 @@ -1,9 +1,4 @@ -<<<<<<< eng-standards.html - -Chapter 12. Engineering Standards Section missing
Prev Home Next Using Form Builder: building html forms dynamically Up OpenACS Style Guide
docs@openacs.orgView comments on this page at openacs.org -======= -Chapter 11. Engineering Standards Table of Contents
- OpenACS Style Guide
- +
Chapter 12. Engineering Standards
Prev Home Next Using Form Builder: building html forms dynamically Up OpenACS Style Guide
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.30 Index: openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html,v diff -u -r1.36.2.2 -r1.36.2.3 --- openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 12 Dec 2010 00:07:02 -0000 1.36.2.2 +++ openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 12 Dec 2010 01:37:24 -0000 1.36.2.3 @@ -1,10 +1,5 @@ -<<<<<<< ext-auth-requirements.html - -External Authentication Requirements People have plenty of usernames and passwords already, we -======= -
External Authentication Requirements People have plenty of usernames and passwords already, we ->>>>>>> 1.38 +
External Authentication Requirements People have plenty of usernames and passwords already, we don't want them to have yet another. We want people to be able to log in to OpenACS with the same password they use to log in to any other system.
Besides, administrators have better things to do than create @@ -48,15 +43,9 @@ Directory.
Authentication API: The API through which login pages and applications talk to the authentication service. There's one and only one implementation of the authentication API, namly the one -<<<<<<< ext-auth-requirements.html - included in OpenACS Core.
Authentication Driver API: The service contract which - authentication drivers implement.
Authentication:
-
Account Management (NO PICTURE YET)
Batch Synchronization (NO PICTURE YET)
Feature Status Description New API EXT-AUTH-01 A Extend Authentication/Acct Status API EXT-AUTH-03 A Account Creation API EXT-AUTH-05 A Password Management API EXT-AUTH-30 A Authority Management API
Feature Status Description Login EXT-AUTH-04 A Rewrite login, register, and admin pages to use APIs EXT-AUTH-38 A ad_form complain feature EXT-AUTH-19 A Rewrite password recovery to use API EXT-AUTH-21 A Rewrite email verification with API EXT-AUTH-28 A Username is email switch Users will log in using a username, a authority, and a -======= included in OpenACS Core.
Authentication Driver API: The service contract which authentication drivers implement.
Authentication:
-
Account Management (NO PICTURE YET)
Batch Synchronization (NO PICTURE YET)
Feature Status Description New API EXT-AUTH-01 A Extend Authentication/Acct Status API EXT-AUTH-03 A Account Creation API EXT-AUTH-05 A Password Management API EXT-AUTH-30 A Authority Management API
Feature Status Description Login EXT-AUTH-04 A Rewrite login, register, and admin pages to use APIs EXT-AUTH-38 A ad_form complain feature EXT-AUTH-19 A Rewrite password recovery to use API EXT-AUTH-21 A Rewrite email verification with API EXT-AUTH-28 A Username is email switch Users will log in using a username, a authority, and a ->>>>>>> 1.38 +
Account Management (NO PICTURE YET)
Batch Synchronization (NO PICTURE YET)
Feature Status Description New API EXT-AUTH-01 A Extend Authentication/Acct Status API EXT-AUTH-03 A Account Creation API EXT-AUTH-05 A Password Management API EXT-AUTH-30 A Authority Management API
Feature Status Description Login EXT-AUTH-04 A Rewrite login, register, and admin pages to use APIs EXT-AUTH-38 A ad_form complain feature EXT-AUTH-19 A Rewrite password recovery to use API EXT-AUTH-21 A Rewrite email verification with API EXT-AUTH-28 A Username is email switch Users will log in using a username, a authority, and a password. The authority is the source for user/password verification. OpenACS can be an authority itself.
Each user in OpenACS will belong to exactly one authority, which can either be the "local" OpenACS users table, in which case the @@ -387,8 +376,4 @@ PAM specification
Draft Proposal by Andrew Grumet.
Yale CAS, a centrl authentication service a' la -<<<<<<< ext-auth-requirements.html - Passport.
View comments on this page at openacs.org -======= - Passport.View comments on this page at openacs.org ->>>>>>> 1.38 + Passport.View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/filename.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/filename.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/filename.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/filename.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -1,5 +1,5 @@ - -Detailed Design Documentation Template By You
+ +
Detailed Design Documentation Template By You
NOTE: Some of the sections of this template may not apply to your package, e.g. there may be no user-visible UI elements for a component of the OpenACS Core. Furthermore, it may be easier in some circumstances @@ -11,48 +11,48 @@ your own judgment, consult with peers when possible, and adapt intelligently.
- Also, bear in mind the audience for detailed design: fellow + Also, bear in mind the audience for detailed design: fellow programmers who want to maintain/extend the software, AND parties interested in evaluating software quality. -
When applicable, each of the following items should receive its own link: -
User directory
OpenACS administrator directory
Subsite administrator directory
Tcl script directory (link to the API browser page for the package)
PL/SQL file (link to the API browser page for the package)
Data model
Requirements document
ER diagram
Transaction flow diagram
+
User directory
OpenACS administrator directory
Subsite administrator directory
Tcl script directory (link to the API browser page for the package)
PL/SQL file (link to the API browser page for the package)
Data model
Requirements document
ER diagram
Transaction flow diagram
This section should provide an overview of the package and address at least the following issues: -
What this package is intended to allow the user (or different - classes of users) to accomplish.
Within reasonable bounds, what this package is not intended to allow users to - accomplish.
The application domains where this package is most likely to be of use.
A high-level overview of how the package meets its +
What this package is intended to allow the user (or different + classes of users) to accomplish.
Within reasonable bounds, what this package is not intended to allow users to + accomplish.
The application domains where this package is most likely to be of use.
A high-level overview of how the package meets its requirements (which should have been documented elsewhere). This - is to include relevant material from the "features" section of the + is to include relevant material from the "features" section of the cover sheet (the cover sheet is a wrapper doc with links to all other package docs).
Also worthy of treatment in this section: -
When applicable, a careful demarcation between the +
When applicable, a careful demarcation between the functionality of this package and others which - at least superficially - appear to address the same requirements.
Note: it's entirely possible that a discussion of what a package is not intended to do differs from a discussion of future improvements for the package. -
For a given set of requirements, typically many possible implementations and solutions exist. Although eventually only one solution is implemented, a discussion of the alternative solutions canvassed - noting why they were rejected - proves helpful to both current and future developers. All readers would be reminded as to why and how the particular solution developed over time, avoiding re-analysis of problems already solved. -
Although currently only a few package documentation pages contain a discussion of competing software, (e.g. chat, portals), this section should be present whenever such competition exists. -
If your package exhibits features missing from competing - software, this fact should be underscored.
If your package lacks features which are present in competing +
If your package exhibits features missing from competing + software, this fact should be underscored.
If your package lacks features which are present in competing software, the reasons for this should be discussed here; our sales team needs to be ready for inquiries regarding features our software lacks.
Note that such a discussion may differ from a discussion of a package's potential future improvements. -
No single design solution can optimize every desirable software attribute. For example, an increase in the security of a system will likely entail a decrease in its ease-of-use, and an increase in the @@ -62,14 +62,14 @@ should include a discussion of the tradeoffs involved with the design chosen, and the reasons for your choices. Some areas of importance to keep in mind are: -
Areas of interest to users:
Performance: availability and efficiency
Flexibility
Interoperability
Reliability and robustness
Usability
Areas of interest to developers:
Maintainability
Portability
Reusability
Testability
+
Areas of interest to users:
Performance: availability and efficiency
Flexibility
Interoperability
Reliability and robustness
Usability
Areas of interest to developers:
Maintainability
Portability
Reusability
Testability
Here's where you discuss the abstractions used by your package, such as the procedures encapsulating the legal transactions on the data model. Explain the organization of procedures and their particulars (detail above and beyond what is documented in the code), including: -
Problem-domain components: key algorithms, e.g. a specialized - statistics package would implement specific mathematical procedures.
User-interface components: e.g. HTML widgets that the package may need.
Data management components: procedures that provide a stable +
Problem-domain components: key algorithms, e.g. a specialized + statistics package would implement specific mathematical procedures.
User-interface components: e.g. HTML widgets that the package may need.
Data management components: procedures that provide a stable interface to database objects and legal transactions - the latter often correspond to tasks.
Remember that the correctness, completeness, and stability of the API @@ -80,64 +80,60 @@ handle transactions, instead of encapsulating them via procedures). Experience has taught us that we need to focus on the API for maintainability of our systems in the face of constant change. -
The data model discussion should do more than merely display the SQL code, since this information is already be available via a link in the - "essentials" section above. Instead, there should be a high-level + "essentials" section above. Instead, there should be a high-level discussion of how your data model meets your solution requirements: why the database entities were defined as they are, and what transactions you expect to occur. (There may be some overlap with the API section.) Here are some starting points: -
The data model discussion should address the intended usage +
The data model discussion should address the intended usage of each entity (table, trigger, view, procedure, etc.) when this information is not obvious from an inspection of the data model - itself.
If a core service or other subsystem is being used (e.g., the + itself.
If a core service or other subsystem is being used (e.g., the new parties and groups, permissions, etc.) this should also be - mentioned.
Any default permissions should be identified herein.
Discuss any data model extensions which tie into other - packages.
Transactions
Discuss modifications which the database may undergo from + mentioned.
Any default permissions should be identified herein.
Discuss any data model extensions which tie into other + packages.
Transactions
Discuss modifications which the database may undergo from your package. Consider grouping legal transactions according to the invoking user class, i.e. transactions by an OpenACS-admin, by - subsite-admin, by a user, by a developer, etc.
In this section, discuss user interface issues and pages to be built; you can organize by the expected classes of users. These may include: -
Developers
OpenACS administrators (previously known as site-wide administrators)
Subsite administrators
End users
+
Developers
OpenACS administrators (previously known as site-wide administrators)
Subsite administrators
End users
You may want to include page mockups, site-maps, or other visual aids. Ideally this section is informed by some prototyping you've done, to establish the package's usability with the client and other interested parties.
Note: In order that developer documentation be uniform across different system documents, these users should herein be designated as - "the developer," "the OpenACS-admin," "the sub-admin," and "the user," + "the developer," "the OpenACS-admin," "the sub-admin," and "the user," respectively.
Finally, note that as our templating system becomes more entrenched within the OpenACS, this section's details are likely to shift from UI specifics to template interface specifics. -
Under OpenACS 5.6.0, parameters are set at two levels: at the global level by the OpenACS-admin, and at the subsite level by a sub-admin. In this section, list and discuss both levels of parameters. -
If the system presently lacks useful/desirable features, note details here. You could also comment on non-functional improvements to the package, such as usability.
- Note that a careful treatment of the earlier "competitive analysis" + Note that a careful treatment of the earlier "competitive analysis" section can greatly facilitate the documenting of this section. -
Although a system's data model file often contains this information, this isn't always the case. Furthermore, data model files often undergo substantial revision, making it difficult to track down the system creator. An additional complication: package documentation may be authored by people not directly involved in coding. Thus to avoid unnecessary confusion, include email links to the following roles as they may apply: -
System creator
System owner
Documentation author
The revision history table below is for this template - modify it as needed for your actual design document. -<<<<<<< filename.html
Document Revision # Action Taken, Notes When? By Whom? 0.3 Edited further, incorporated feedback from Michael Yoon 9/05/2000 Kai Wu 0.2 Edited 8/22/2000 Kai Wu 0.1 Creation 8/21/2000 Josh Finkler, Audrey McLoghlin ($Id$)View comments on this page at openacs.org -======= -
Document Revision # Action Taken, Notes When? By Whom? 0.3 Edited further, incorporated feedback from Michael Yoon 9/05/2000 Kai Wu 0.2 Edited 8/22/2000 Kai Wu 0.1 Creation 8/21/2000 Josh Finkler, Audrey McLoghlin ($Id$)View comments on this page at openacs.org ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/for-everyone.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/for-everyone.html,v diff -u -r1.25.2.1 -r1.25.2.2 --- openacs-4/packages/acs-core-docs/www/for-everyone.html 12 Dec 2010 00:07:02 -0000 1.25.2.1 +++ openacs-4/packages/acs-core-docs/www/for-everyone.html 12 Dec 2010 01:37:24 -0000 1.25.2.2 @@ -1,2 +1,2 @@ -Part I. OpenACS For Everyone
Prev Home Next OpenACS Core Documentation Up Chapter 1. High level information: What is OpenACS?
docs@openacs.orgView comments on this page at openacs.org +Part I. OpenACS For Everyone Table of Contents
Prev Home Next OpenACS Core Documentation Up Chapter 1. High level information: What is OpenACS?
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/form-builder.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/form-builder.html,v diff -u -r1.26.2.2 -r1.26.2.3 --- openacs-4/packages/acs-core-docs/www/form-builder.html 12 Dec 2010 00:07:02 -0000 1.26.2.2 +++ openacs-4/packages/acs-core-docs/www/form-builder.html 12 Dec 2010 01:37:24 -0000 1.26.2.3 @@ -1,22 +1,12 @@ -<<<<<<< form-builder.html - -Using Form Builder: building html forms dynamically ($Id$)-======= -Using Form Builder: building html forms dynamically ($Id$)->>>>>>> 1.28 +Using Form Builder: building html forms dynamically ($Id$)OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.OpenACS has a form manager called ad_form. Ad_form has an adaptable UI. Error handling includes inline error reporting, and is customizable. However, ad_form can be tricky to use. In addition to this document, -<<<<<<< form-builder.html - the ad_form api - documentation is helpful.
Some elements have more than one choice, or can submit more than one value.
Creating the form element. Populate a list of lists with values for the option list.
set foo_options [db_list_of_lists foo_option_list " -======= the ad_form api - documentation is helpful.Some elements have more than one choice, or can submit more than one value.
Creating the form element. Populate a list of lists with values for the option list.
set foo_options [db_list_of_lists foo_option_list " ->>>>>>> 1.28 + documentation is helpful.Some elements have more than one choice, or can submit more than one value.
Creating the form element. Populate a list of lists with values for the option list.
set foo_options [db_list_of_lists foo_option_list " select foo, foo_id from foos @@ -60,12 +50,6 @@ ns_log notice the following form was submitted on my page ns_set print $mypage } -<<<<<<< form-builder.html -View comments on this page at openacs.org -=======View comments on this page at openacs.org ->>>>>>> 1.28 + encounter them:View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/general-documents.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/general-documents.html,v diff -u -r1.25.2.1 -r1.25.2.2 --- openacs-4/packages/acs-core-docs/www/general-documents.html 12 Dec 2010 00:07:02 -0000 1.25.2.1 +++ openacs-4/packages/acs-core-docs/www/general-documents.html 12 Dec 2010 01:37:24 -0000 1.25.2.2 @@ -1,2 +1,2 @@ -Chapter 1. High level information: What is OpenACS? Table of Contents
View comments on this page at openacs.org +Chapter 1. High level information: What is OpenACS? Release Notes Section MissingTable of Contents
View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/groups-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-design.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/groups-design.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/groups-design.html 12 Dec 2010 01:37:24 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< groups-design.html - -Groups Design By Rafael H. Schloming and Mark Thomas
-======= -Groups Design By Rafael H. Schloming and Mark Thomas
->>>>>>> 1.32 +Groups Design By Rafael H. Schloming and Mark Thomas
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
User directory
Sitewide administrator directory
Subsite administrator directory
TCL script directory
Data model
PL/SQL file
Index: openacs-4/packages/acs-core-docs/www/groups-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-requirements.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/groups-requirements.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/groups-requirements.html 12 Dec 2010 01:37:24 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< groups-requirements.html - -
Groups Requirements By Rafael H. Schloming, Mark Thomas
-======= -Groups Requirements By Rafael H. Schloming, Mark Thomas
->>>>>>> 1.32 +Groups Requirements By Rafael H. Schloming, Mark Thomas
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Almost all database-backed websites have users, and need to model the Index: openacs-4/packages/acs-core-docs/www/high-avail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/high-avail.html,v diff -u -r1.20.2.2 -r1.20.2.3 --- openacs-4/packages/acs-core-docs/www/high-avail.html 12 Dec 2010 00:07:02 -0000 1.20.2.2 +++ openacs-4/packages/acs-core-docs/www/high-avail.html 12 Dec 2010 01:37:24 -0000 1.20.2.3 @@ -1,7 +1,2 @@ -<<<<<<< high-avail.html - -
High Availability/High Performance Configurations
Prev Home Next Running multiple services on one machine Up Staged Deployment for Production Networks
docs@openacs.orgView comments on this page at openacs.org -======= -High Availability/High Performance Configurations
Prev Home Next Running multiple services on one machine Up Staged Deployment for Production Networks
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.22 +High Availability/High Performance Configurations
Prev Home Next Running multiple services on one machine Up Staged Deployment for Production Networks
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/how-do-I.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/how-do-I.html,v diff -u -r1.23.2.2 -r1.23.2.3 --- openacs-4/packages/acs-core-docs/www/how-do-I.html 12 Dec 2010 00:07:02 -0000 1.23.2.2 +++ openacs-4/packages/acs-core-docs/www/how-do-I.html 12 Dec 2010 01:37:24 -0000 1.23.2.3 @@ -1,19 +1,7 @@ -<<<<<<< how-do-I.html - -How Do I? The easiest way is to install the Edit-This-Page package.
Log in to the web site as an administrator.
Click on Admin > Install Software > Install from OpenACS Repository / Install new application
Choose Edit This Page and install
Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).
Go to /admin/permissions and grant Create to Registered Users
Suppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.
On the front page, click the Admin button.
On the administration page, click Parameters link.
Change the parameter IndexRedirectUrl to be the URI of the desired application. For a default weblogger installation, this would be weblogger/. Note the trailing slash.
Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from /var/lib/aolserver/$OPENACS_SERVICE_NAME/www. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:
cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-subsite/www/index* /var/lib/aolserver/$OPENACS_SERVICE_NAME/wwwEdit the new index.adp to change the text; you shouldn't need to edit index.tcl unless you are adding new functionality.
Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:
-======= -
How Do I? The easiest way is to install the Edit-This-Page package.
Log in to the web site as an administrator.
Click on Admin > Install Software > Install from OpenACS Repository / Install new application
Choose Edit This Page and install
Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).
Go to
/admin/permissions
and grant Create to Registered UsersSuppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.
On the front page, click the
Admin
button.On the administration page, click
Parameters
link.Change the parameter
IndexRedirectUrl
to be the URI of the desired application. For a default weblogger installation, this would be. Note the trailing slash.
weblogger/
Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from
/var/lib/aolserver/$OPENACS_SERVICE_NAME/www
. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:
cp
/var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-subsite/www/index*
/var/lib/aolserver/$OPENACS_SERVICE_NAME/www
Edit the new
index.adp
to change the text; you shouldn't need to editindex.tcl
unless you are adding new functionality.Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:
->>>>>>> 1.25 +
How Do I? The easiest way is to install the Edit-This-Page package.
Log in to the web site as an administrator.
Click on Admin > Install Software > Install from OpenACS Repository / Install new application
Choose Edit This Page and install
Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).
Go to
/admin/permissions
and grant Create to Registered UsersSuppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.
On the front page, click the
Admin
button.On the administration page, click
Parameters
link.Change the parameter
IndexRedirectUrl
to be the URI of the desired application. For a default weblogger installation, this would be. Note the trailing slash.
weblogger/
Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from
/var/lib/aolserver/$OPENACS_SERVICE_NAME/www
. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:
cp
/var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-subsite/www/index*
/var/lib/aolserver/$OPENACS_SERVICE_NAME/www
Edit the new
index.adp
to change the text; you shouldn't need to editindex.tcl
unless you are adding new functionality.Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:
A templated page uses an ADP/TCL pair. The first line in the ADP file is usually: -<<<<<<< how-do-I.html -
<master>If it appears exactly like this, without any arguments, the template processer uses default-master for that subsite. For pages in /var/lib/aolserver/$OPENACS_SERVICE_NAME/www, this is /var/lib/aolserver/$OPENACS_SERVICE_NAME/www/default-master.adp and the associated .tcl file. -
The default-master is itself a normal ADP page. It draws the subsite navigation elements and invokes site-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/site-master.adp and .tcl)
The site-master draws site-wide navigation elements and invokes blank-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/blank-master.adp and .tcl).
Blank-master does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.
Steps to Reproduce. The events package does not allow users to register for new events.
Go to the http://yourserver.net/events as a visitor (ie, log out and, if necessary, clear cookies). This in on a 4.6.3 site with events version 0.1d3.
Select an available event
A link such as Registration: Deadline is 03/15/2004 10:00am. -» Login or sign up to register for this event. is visible. Click on "Login or sign up" -
Complete a new registration. Afterwards, you should be redirected back to the same page.
Actual Results: The page says "You do not have permission to register for this event."
Expected results: A link or form to sign up for the event is shown.
Finding the problem. We start with the page that has the error. In the URL it's http://myserver.net/events/event-info.tcl, so open the file /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/events/www/event-info.tcl. It contains this line:
set can_register_p [events::security::can_register_for_event_p -event_id $event_id]We need to know what that procedure does, so go to /api-doc, paste events::security::can_register_for_event_p into the ACS Tcl API Search box, and click Feeling Lucky. The next pages shows the proc, and we click "show source" to see more information. The body of the proc is simply
return [permission::permission_p -party_id $user_id -object_id $event_id -privilege write]This means that a given user must have the write privilige on the event in order to register. Let's assume that the priviliges inherit, so that if a user has the write privilige on the whole package, they will have the write privilege on the event.
Setting Permissions. A permission has three parts: the privilige, the object of the privilige, and the subject being granted the privilige. In this case the privilige is "write," the object is the Events package, and the subject is all Registered Users.
To grant permissions on a package, start at the site map. Find the event package and click "Set permissions".
Click "Grant Permission"
Grant the write permission to Registered Users.
OpenACS 5.0 offers a prettier version at /admin/applications.
View comments on this page at openacs.org -=======<master>If it appears exactly like this, without any arguments, the template processer uses
default-master
for that subsite. For pages in/var/lib/aolserver/$OPENACS_SERVICE_NAME/www
, this is/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/default-master.adp
and the associated .tcl file. -The
default-master
is itself a normal ADP page. It draws the subsite navigation elements and invokessite-master
(/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/site-master.adp
and .tcl)The
site-master
draws site-wide navigation elements and invokesblank-master
(/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/blank-master.adp
and .tcl).
Blank-master
does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.
Steps to Reproduce. The events package does not allow users to register for new events.
Go to the http://yourserver.net/events as a visitor (ie, log out and, if necessary, clear cookies). This in on a 4.6.3 site with events version 0.1d3.
Select an available event
A link such as
Registration: Deadline is 03/15/2004 10:00am. +
The
default-master
is itself a normal ADP page. It draws the subsite navigation elements and invokessite-master
(/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/site-master.adp
and .tcl)The
site-master
draws site-wide navigation elements and invokesblank-master
(/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/blank-master.adp
and .tcl).
Blank-master
does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.
Steps to Reproduce. The events package does not allow users to register for new events.
Go to the http://yourserver.net/events as a visitor (ie, log out and, if necessary, clear cookies). This in on a 4.6.3 site with events version 0.1d3.
Select an available event
A link such as
Registration: Deadline is 03/15/2004 10:00am. » Login or sign up to register for this event.
is visible. Click on "Login or sign up" -Complete a new registration. Afterwards, you should be redirected back to the same page.
Actual Results: The page says
"You do not have permission to register for this event."
Expected results: A link or form to sign up for the event is shown.
Finding the problem. We start with the page that has the error. In the URL it's
http://myserver.net/events/event-info.tcl
, so open the file/var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/events/www/event-info.tcl
. It contains this line:set can_register_p [events::security::can_register_for_event_p -event_id $event_id]We need to know what that procedure does, so go to /api-doc, paste events::security::can_register_for_event_p into the ACS Tcl API Search box, and click Feeling Lucky. The next pages shows the proc, and we click "show source" to see more information. The body of the proc is simply
return [permission::permission_p -party_id $user_id -object_id $event_id -privilege write]This means that a given user must have the write privilige on the event in order to register. Let's assume that the priviliges inherit, so that if a user has the write privilige on the whole package, they will have the write privilege on the event.
Setting Permissions. A permission has three parts: the privilige, the object of the privilige, and the subject being granted the privilige. In this case the privilige is "write," the object is the Events package, and the subject is all Registered Users.
To grant permissions on a package, start at the site map. Find the event package and click "Set permissions".
Click "Grant Permission"
Grant the write permission to Registered Users.
OpenACS 5.0 offers a prettier version at /admin/applications.
View comments on this page at openacs.org ->>>>>>> 1.25 +Complete a new registration. Afterwards, you should be redirected back to the same page.
Actual Results: The page says
"You do not have permission to register for this event."
Expected results: A link or form to sign up for the event is shown.
Finding the problem. We start with the page that has the error. In the URL it's
http://myserver.net/events/event-info.tcl
, so open the file/var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/events/www/event-info.tcl
. It contains this line:set can_register_p [events::security::can_register_for_event_p -event_id $event_id]We need to know what that procedure does, so go to /api-doc, paste events::security::can_register_for_event_p into the ACS Tcl API Search box, and click Feeling Lucky. The next pages shows the proc, and we click "show source" to see more information. The body of the proc is simply
return [permission::permission_p -party_id $user_id -object_id $event_id -privilege write]This means that a given user must have the write privilige on the event in order to register. Let's assume that the priviliges inherit, so that if a user has the write privilige on the whole package, they will have the write privilege on the event.
Setting Permissions. A permission has three parts: the privilige, the object of the privilige, and the subject being granted the privilige. In this case the privilige is "write," the object is the Events package, and the subject is all Registered Users.
To grant permissions on a package, start at the site map. Find the event package and click "Set permissions".
Click "Grant Permission"
Grant the write permission to Registered Users.
OpenACS 5.0 offers a prettier version at /admin/applications.
View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/i18n-convert.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-convert.html,v diff -u -r1.22.2.2 -r1.22.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-convert.html 12 Dec 2010 00:07:02 -0000 1.22.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-convert.html 12 Dec 2010 01:37:24 -0000 1.22.2.3 @@ -1,10 +1,5 @@ -<<<<<<< i18n-convert.html - -How to Internationalize a Package Tip
-======= -
How to Internationalize a Package Tip
->>>>>>> 1.24 +
How to Internationalize a Package Tip
For multilingual websites we recommend using the UTF8 charset. In order for AOLserver to use utf8 you need to set the config parameters OutputCharset and @@ -77,13 +72,8 @@ test. If you don't provide the package_key argument then all packages with catalog files will be checked. The script will run its checks primarily on en_US xml catalog files. -<<<<<<< i18n-convert.html -
Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.
The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:
<p class="form-help-text"><b>Invitations</b> are sent, - when this wizard is completed and casting begins.</p>has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:
Instead, we cancel those keys, edit the file manually, and put in a single temporary message tag:
<p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent, -======= -
Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an
if
command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:
<p class="form-help-text"><b>Invitations</b> are sent, +
Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an
if
command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:
<p class="form-help-text"><b>Invitations</b> are sent, when this wizard is completed and casting begins.</p>has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:
Instead, we cancel those keys, edit the file manually, and put in a single temporary message tag:
<p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent, ->>>>>>> 1.24 when this wizard is completed and casting begins.#> </p>Complex if statements may produce convoluted message keys that are very hard to localize. Rewrite these if statements. For example:
Select which case <if @simulation.casting_type@ eq "open">and role</if> to join, or create a new case for yourself. If you do not Index: openacs-4/packages/acs-core-docs/www/i18n-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-design.html,v diff -u -r1.12.2.2 -r1.12.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-design.html 12 Dec 2010 00:07:02 -0000 1.12.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-design.html 12 Dec 2010 01:37:24 -0000 1.12.2.3 @@ -1,8 +1,3 @@ -<<<<<<< i18n-design.html - -Design Notes User locale is a property of ad_conn, ad_conn locale. The request processor sets this by calling lang::conn::locale, which looks for the following in order of precedence:
Use user preference for this package (stored in ad_locale_user_prefs)
Use system preference for the package (stored in apm_packages)
Use user's general preference (stored in user_preferences)
Use Browser header (Accept-Language HTTP header)
Use system locale (an APM parameter for acs_lang)
default to en_US
For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the _ function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is -======= -
Design Notes User locale is a property of ad_conn,
ad_conn locale
. The request processor sets this by callinglang::conn::locale
, which looks for the following in order of precedence:
Use user preference for this package (stored in ad_locale_user_prefs)
Use system preference for the package (stored in apm_packages)
Use user's general preference (stored in user_preferences)
Use Browser header (
Accept-Language
HTTP header)Use system locale (an APM parameter for acs_lang)
default to en_US
For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the
_
function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is ->>>>>>> 1.14 +Design Notes User locale is a property of ad_conn,
ad_conn locale
. The request processor sets this by callinglang::conn::locale
, which looks for the following in order of precedence:
Use user preference for this package (stored in ad_locale_user_prefs)
Use system preference for the package (stored in apm_packages)
Use user's general preference (stored in user_preferences)
Use Browser header (
Accept-Language
HTTP header)Use system locale (an APM parameter for acs_lang)
default to en_US
For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the
_
function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is found, then that locale is offered instead.View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/i18n-introduction.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-introduction.html,v diff -u -r1.14.2.2 -r1.14.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-introduction.html 12 Dec 2010 00:07:02 -0000 1.14.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-introduction.html 12 Dec 2010 01:37:24 -0000 1.14.2.3 @@ -1,10 +1,5 @@ -<<<<<<< i18n-introduction.html - -How Internationalization/Localization works in OpenACS -======= -
How Internationalization/Localization works in OpenACS ->>>>>>> 1.16 +
How Internationalization/Localization works in OpenACS This document describes how to develop internationalized OpenACS packages, including writing new packages with internationalization and converting old packages. Text that Index: openacs-4/packages/acs-core-docs/www/i18n-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-overview.html,v diff -u -r1.12.2.2 -r1.12.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-overview.html 12 Dec 2010 00:07:02 -0000 1.12.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-overview.html 12 Dec 2010 01:37:24 -0000 1.12.2.3 @@ -1,7 +1,2 @@ -<<<<<<< i18n-overview.html - -
Internationalization and Localization Overview Table 14.1. Internationalization and Localization Overview
Stage Task Who Internationalization Package Developer uses the acs-lang tools to replace all visible text in a package with message keys. (More information) Package Developer Release Management The newly internationalized package is released. Package Developer The translation server is updated with the new package. Translation server maintainers Localization Translators work in their respective locales to write text for each message key. (More information) Translators Release Management The translated text in the database of the translation server is compared to the current translations in the OpenACS code base, conflicts are resolved, and the new text is written to catalog files on the translation server. Translation server maintainers The catalog files are committed to the OpenACS code base. Translation server maintainers A new version of OpenACS core and/or affected packages is released and published in the OpenACS.org repository. Release Manager Upgrading Site Administrators upgrade their OpenACS sites, either via the automatic upgrade from the Repository or via tarball or CVS Site Administrators Site Administrators import the new translations. Existing local translations, if they exist, are not overwritten. Site Administrators
Prev Home Next Chapter 14. Internationalization Up How Internationalization/Localization works in OpenACS
docs@openacs.orgView comments on this page at openacs.org -======= -Internationalization and Localization Overview Table 13.1. Internationalization and Localization Overview
Stage Task Who Internationalization Package Developer uses the acs-lang tools to replace all visible text in a package with message keys. (More information) Package Developer Release Management The newly internationalized package is released. Package Developer The translation server is updated with the new package. Translation server maintainers Localization Translators work in their respective locales to write text for each message key. (More information) Translators Release Management The translated text in the database of the translation server is compared to the current translations in the OpenACS code base, conflicts are resolved, and the new text is written to catalog files on the translation server. Translation server maintainers The catalog files are committed to the OpenACS code base. Translation server maintainers A new version of OpenACS core and/or affected packages is released and published in the OpenACS.org repository. Release Manager Upgrading Site Administrators upgrade their OpenACS sites, either via the automatic upgrade from the Repository or via tarball or CVS Site Administrators Site Administrators import the new translations. Existing local translations, if they exist, are not overwritten. Site Administrators
Prev Home Next Chapter 13. Internationalization Up How Internationalization/Localization works in OpenACS
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.14 +Internationalization and Localization Overview Table 14.1. Internationalization and Localization Overview
Stage Task Who Internationalization Package Developer uses the acs-lang tools to replace all visible text in a package with message keys. (More information) Package Developer Release Management The newly internationalized package is released. Package Developer The translation server is updated with the new package. Translation server maintainers Localization Translators work in their respective locales to write text for each message key. (More information) Translators Release Management The translated text in the database of the translation server is compared to the current translations in the OpenACS code base, conflicts are resolved, and the new text is written to catalog files on the translation server. Translation server maintainers The catalog files are committed to the OpenACS code base. Translation server maintainers A new version of OpenACS core and/or affected packages is released and published in the OpenACS.org repository. Release Manager Upgrading Site Administrators upgrade their OpenACS sites, either via the automatic upgrade from the Repository or via tarball or CVS Site Administrators Site Administrators import the new translations. Existing local translations, if they exist, are not overwritten. Site Administrators
Prev Home Next Chapter 14. Internationalization Up How Internationalization/Localization works in OpenACS
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/i18n-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-requirements.html,v diff -u -r1.22.2.2 -r1.22.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-requirements.html 12 Dec 2010 00:07:02 -0000 1.22.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-requirements.html 12 Dec 2010 01:37:24 -0000 1.22.2.3 @@ -1,18 +1,9 @@ -<<<<<<< i18n-requirements.html - -OpenACS Internationalization Requirements by Henry Minsky, - Yon Feldman, - Lars Pind, - Peter Marklund, - Christian Hvid, -======= -
OpenACS Internationalization Requirements by Henry Minsky, +
OpenACS Internationalization Requirements by Henry Minsky, Yon Feldman, Lars Pind, Peter Marklund, Christian Hvid, ->>>>>>> 1.24 and others.
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -99,21 +90,12 @@ for other locales. This would include support for creating resources such as message catalogs, non-text assets such as graphics, and use of templates which help to separate application -<<<<<<< i18n-requirements.html -logic from presentation.Other application servers: ATG Dyanmo, Broadvision, Vignette, -... ? Anyone know how they deal with i18n ?
System/Package "coversheet" - where all -documentation for this software is linked off of
User's guide
Other-cool-system-related-to-this-one -document
Other application servers: ATG Dyanmo, Broadvision, Vignette, ... ? Anyone know how they deal with i18n ?
System/Package "coversheet" - where all -documentation for this software is linked off of
User's guide
Other-cool-system-related-to-this-one +documentation for this software is linked off of
User's guide
Other-cool-system-related-to-this-one document
LI18NUX ->>>>>>> 1.24 2000 Globalization Specification: http://www.li18nux.net/
Mozilla i18N Guidelines: Index: openacs-4/packages/acs-core-docs/www/i18n-translators.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-translators.html,v diff -u -r1.12.2.2 -r1.12.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-translators.html 12 Dec 2010 00:07:02 -0000 1.12.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-translators.html 12 Dec 2010 01:37:24 -0000 1.12.2.3 @@ -1,7 +1,2 @@ -<<<<<<< i18n-translators.html - -
Translator's Guide Most translators use the OpenACS Public Translation Server, because the process of getting new message keys onto the server and getting new translations back into the distribution are handled by the maintainers of that machine. You can also do translation work on your own OpenACS site; this makes your own translations more readily available to you but also means that your work will not be shared with other users unless you take extra steps (contacting an OpenACS core developer or submitting a patch) to get your work back to the OpenACS core.
The basic steps for translators:
Go to the Localization page and choose the locale that you are translating to. If the locale is not present you need to visit Administration of Localization and create the locale.
Translating with Translator Mode. To translate messages in the pages they appear, Toggle Translator Mode and then browse to the page you want to translate. Untranslated messages will have a yellow background and a red star that you click to translate the message. Translated messages have a green star next to them that is a hyperlink to editing your translation. There is a history mechanism that allows you to see previous translations in case you would want to revert a translation.
While in Translator mode, a list of all message keys appears at the bottom of each page.
Batch translation. To translate many messages at once, go to Administration of Localization, click on the locale to translate, then click on a package, and then click Batch edit these messages.
When creating a new locale based on an existing one, such as creating the Guatamalan version of Spanish, you can copy the existing locale's catalog files using the script /packages/acs-core-docs/www/files/create-new-catalog.sh.
View comments on this page at openacs.org -======= -Translator's Guide Most translators use the OpenACS Public Translation Server, because the process of getting new message keys onto the server and getting new translations back into the distribution are handled by the maintainers of that machine. You can also do translation work on your own OpenACS site; this makes your own translations more readily available to you but also means that your work will not be shared with other users unless you take extra steps (contacting an OpenACS core developer or submitting a patch) to get your work back to the OpenACS core.
The basic steps for translators:
Go to the Localization page and choose the locale that you are translating to. If the locale is not present you need to visit Administration of Localization and create the locale.
Translating with Translator Mode. To translate messages in the pages they appear, Toggle Translator Mode and then browse to the page you want to translate. Untranslated messages will have a yellow background and a red star that you click to translate the message. Translated messages have a green star next to them that is a hyperlink to editing your translation. There is a history mechanism that allows you to see previous translations in case you would want to revert a translation.
While in Translator mode, a list of all message keys appears at the bottom of each page.
Batch translation. To translate many messages at once, go to Administration of Localization, click on the locale to translate, then click on a package, and then click
Batch edit these messages
.When creating a new locale based on an existing one, such as creating the Guatamalan version of Spanish, you can copy the existing locale's catalog files using the script
/packages/acs-core-docs/www/files/create-new-catalog.sh
.View comments on this page at openacs.org ->>>>>>> 1.14 +Translator's Guide Most translators use the OpenACS Public Translation Server, because the process of getting new message keys onto the server and getting new translations back into the distribution are handled by the maintainers of that machine. You can also do translation work on your own OpenACS site; this makes your own translations more readily available to you but also means that your work will not be shared with other users unless you take extra steps (contacting an OpenACS core developer or submitting a patch) to get your work back to the OpenACS core.
The basic steps for translators:
Go to the Localization page and choose the locale that you are translating to. If the locale is not present you need to visit Administration of Localization and create the locale.
Translating with Translator Mode. To translate messages in the pages they appear, Toggle Translator Mode and then browse to the page you want to translate. Untranslated messages will have a yellow background and a red star that you click to translate the message. Translated messages have a green star next to them that is a hyperlink to editing your translation. There is a history mechanism that allows you to see previous translations in case you would want to revert a translation.
While in Translator mode, a list of all message keys appears at the bottom of each page.
Batch translation. To translate many messages at once, go to Administration of Localization, click on the locale to translate, then click on a package, and then click
Batch edit these messages
.When creating a new locale based on an existing one, such as creating the Guatamalan version of Spanish, you can copy the existing locale's catalog files using the script
/packages/acs-core-docs/www/files/create-new-catalog.sh
.View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/i18n.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/i18n.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n.html 12 Dec 2010 01:37:24 -0000 1.30.2.3 @@ -1,14 +1,7 @@ -<<<<<<< i18n.html - -Chapter 14. Internationalization Table of Contents
- By Peter Marklund - and Lars Pind -======= -
Chapter 13. Internationalization Table of Contents
+
Chapter 14. Internationalization Table of Contents
By Peter Marklund and Lars Pind ->>>>>>> 1.32
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/index.html,v diff -u -r1.49.2.2 -r1.49.2.3 --- openacs-4/packages/acs-core-docs/www/index.html 12 Dec 2010 00:07:02 -0000 1.49.2.2 +++ openacs-4/packages/acs-core-docs/www/index.html 12 Dec 2010 01:37:24 -0000 1.49.2.3 @@ -1,9 +1,4 @@ -<<<<<<< index.html - -OpenACS Core Documentation Table of Contents
- I. OpenACS For Everyone
- II. Administrator's Guide
- 2. Installation Overview
- 3. Complete Installation
- 4. Configuring a new OpenACS Site
- 5. Upgrading
- 6. Production Environments
- Starting and Stopping an OpenACS instance.
- AOLserver keepalive with inittab
- Running multiple services on one machine
- High Availability/High Performance Configurations
- Staged Deployment for Production Networks
- Installing SSL Support for an OpenACS service
- Set up Log Analysis Reports
- External uptime validation
- Diagnosing Performance Problems
- 7. Database Management
- 8. Backup and Recovery
- A. Install Red Hat 8/9
- B. Install additional supporting software
- Unpack the OpenACS tarball
- Initialize CVS (OPTIONAL)
- Add PSGML commands to emacs init file (OPTIONAL)
- Install Daemontools (OPTIONAL)
- Install qmail (OPTIONAL)
- Install Analog web file analyzer
- Install nspam
- Install Full Text Search using Tsearch2
- Install Full Text Search using OpenFTS (deprecated see tsearch2)
- Install nsopenssl
- Install tclwebtest.
- Install PHP for use in AOLserver
- Install Squirrelmail for use as a webmail system for OpenACS
- Install PAM Radius for use as external authentication
- Install LDAP for use as external authentication
- Install AOLserver 3.3oacs1
- C. Credits
- III. For OpenACS Package Developers
- 9. Development Tutorial
- 10. Advanced Topics
- Write the Requirements and Design Specs
- Add the new package to CVS
- OpenACS Edit This Page Templates
- Adding Comments
- Admin Pages
- Categories
- Profile your code
- Prepare the package for distribution.
- Distributing upgrades of your package
- Notifications
- Hierarchical data
- Using .vuh files for pretty urls
- Laying out a page with CSS instead of tables
- Sending HTML email from your application
- Basic Caching
- Scheduled Procedures
- Enabling WYSIWYG
- Adding in parameters for your package
- Writing upgrade scripts
- Connect to a second database
- Future Topics
- 11. Development Reference
- OpenACS Packages
- OpenACS Data Models and the Object System
- The Request Processor
- The OpenACS Database Access API
- Using Templates in OpenACS
- Groups, Context, Permissions
- Writing OpenACS Application Pages
- Parties in OpenACS
- OpenACS Permissions Tediously Explained
- Object Identity
- Programming with AOLserver
- Using Form Builder: building html forms dynamically
- 12. Engineering Standards
- 13. Documentation Standards
- 14. Internationalization
- IV. For OpenACS Platform Developers
- 15. Kernel Documentation
- Overview
- Object Model Requirements
- Permissions Requirements
- Permissions Design
- Groups Requirements
- Groups Design
- Subsites Requirements
- Subsites Design Document
- Package Manager Requirements
- Package Manager Design
- Database Access API
- OpenACS Internationalization Requirements
- Security Requirements
- Security Design
- Security Notes
- Request Processor Requirements
- Request Processor Design
- Bootstrapping OpenACS
- External Authentication Requirements
- 16. Releasing OpenACS
- Index
List of Figures
- 4.1. Site Templates
- 4.2. Granting Permissions
- 4.3. Granting Permissions in 5.0
- 5.1. Upgrading with the APM
- 5.2. Upgrading a local CVS repository
- 6.1. Multiple-server configuration
- 6.2. Simple A/B Deployment - Step 1
- 6.3. Simple A/B Deployment - Step 2
- 6.4. Simple A/B Deployment - Step 3
- 6.5. Complex A/B Deployment - Step 1
- 6.6. Complex A/B Deployment - Step 2
- 6.7. Complex A/B Deployment - Step 3
- 6.8. Query Analysis example
- 8.1. Backup and Recovery Strategy
- 9.1. Assumptions in this section
- 9.2. Tutorial Data Model
- 9.3. The Database Creation Script
- 9.4. Database Deletion Script
- 9.5. Page Map
- 10.1. Upgrading a local CVS repository
- 11.1. Server file layout diagram
- 11.2. Package file layout diagram
List of Tables
List of Examples
View comments on this page at openacs.org -======= -OpenACS Core Documentation Table of Contents
- I. OpenACS For Everyone
- II. Administrator's Guide
- 2. Installation Overview
- 3. Complete Installation
- 4. Configuring a new OpenACS Site
- 5. Upgrading
- 6. Production Environments
- Starting and Stopping an OpenACS instance.
- AOLserver keepalive with inittab
- Running multiple services on one machine
- High Availability/High Performance Configurations
- Staged Deployment for Production Networks
- Installing SSL Support for an OpenACS service
- Set up Log Analysis Reports
- External uptime validation
- Diagnosing Performance Problems
- 7. Database Management
- A. Install Red Hat 8/9
- B. Install additional supporting software
- Unpack the OpenACS tarball
- Initialize CVS (OPTIONAL)
- Add PSGML commands to emacs init file (OPTIONAL)
- Install Daemontools (OPTIONAL)
- Install qmail (OPTIONAL)
- Install Analog web file analyzer
- Install nspam
- Install Full Text Search using Tsearch2
- Install Full Text Search using OpenFTS (deprecated see tsearch2)
- Install nsopenssl
- Install tclwebtest.
- Install PHP for use in AOLserver
- Install Squirrelmail for use as a webmail system for OpenACS
- Install PAM Radius for use as external authentication
- Install LDAP for use as external authentication
- Install AOLserver 3.3oacs1
- C. Credits
- III. For OpenACS Package Developers
- 8. Development Tutorial
- 9. Advanced Topics
- Write the Requirements and Design Specs
- Add the new package to CVS
- OpenACS Edit This Page Templates
- Adding Comments
- Admin Pages
- Categories
- Profile your code
- Prepare the package for distribution.
- Distributing upgrades of your package
- Notifications
- Hierarchical data
- Using .vuh files for pretty urls
- Laying out a page with CSS instead of tables
- Sending HTML email from your application
- Basic Caching
- Scheduled Procedures
- Enabling WYSIWYG
- Adding in parameters for your package
- Writing upgrade scripts
- Connect to a second database
- Future Topics
- 10. Development Reference
- OpenACS Packages
- OpenACS Data Models and the Object System
- The Request Processor
- The OpenACS Database Access API
- Using Templates in OpenACS
- Groups, Context, Permissions
- Writing OpenACS Application Pages
- Parties in OpenACS
- Object Identity
- Programming with AOLserver
- Using Form Builder: building html forms dynamically
- 11. Engineering Standards
- OpenACS Style Guide
- +
OpenACS Core Documentation Table of Contents
- I. OpenACS For Everyone
- II. Administrator's Guide
- 2. Installation Overview
- 3. Complete Installation
- 4. Configuring a new OpenACS Site
- 5. Upgrading
- 6. Production Environments
- Starting and Stopping an OpenACS instance.
- AOLserver keepalive with inittab
- Running multiple services on one machine
- High Availability/High Performance Configurations
- Staged Deployment for Production Networks
- Installing SSL Support for an OpenACS service
- Set up Log Analysis Reports
- External uptime validation
- Diagnosing Performance Problems
- 7. Database Management
- 8. Backup and Recovery
- A. Install Red Hat 8/9
- B. Credits
- III. For OpenACS Package Developers
- 9. Development Tutorial
- 10. Advanced Topics
- Write the Requirements and Design Specs
- Add the new package to CVS
- OpenACS Edit This Page Templates
- Adding Comments
- Admin Pages
- Categories
- Profile your code
- Prepare the package for distribution.
- Distributing upgrades of your package
- Notifications
- Hierarchical data
- Using .vuh files for pretty urls
- Laying out a page with CSS instead of tables
- Sending HTML email from your application
- Basic Caching
- Scheduled Procedures
- Enabling WYSIWYG
- Adding in parameters for your package
- Writing upgrade scripts
- Connect to a second database
- Future Topics
- 11. Development Reference
- OpenACS Packages
- OpenACS Data Models and the Object System
- The Request Processor
- The OpenACS Database Access API
- Using Templates in OpenACS
- Groups, Context, Permissions
- Writing OpenACS Application Pages
- Parties in OpenACS
- OpenACS Permissions Tediously Explained
- Object Identity
- Using Form Builder: building html forms dynamically
- 12. Engineering Standards
- 12. Documentation Standards
- 13. Internationalization
- D. Using CVS with an OpenACS Site
- IV. For OpenACS Platform Developers
- 14. Kernel Documentation
- Overview
- Object Model Requirements
- Object Model Design
- Permissions Requirements
- Permissions Design
- Groups Requirements
- Groups Design
- Subsites Requirements
- Subsites Design Document
- Package Manager Requirements
- Package Manager Design
- Database Access API
- OpenACS Internationalization Requirements
- Security Requirements
- Security Design
- Security Notes
- Request Processor Requirements
- Request Processor Design
- Documenting Tcl Files: Page Contracts and Libraries
- Bootstrapping OpenACS
- External Authentication Requirements
- 15. Releasing OpenACS
- Index
List of Figures
- 4.1. Site Templates
- 4.2. Granting Permissions
- 4.3. Granting Permissions in 5.0
- 5.1. Upgrading with the APM
- 5.2. Upgrading a local CVS repository
- 6.1. Multiple-server configuration
- 6.2. Simple A/B Deployment - Step 1
- 6.3. Simple A/B Deployment - Step 2
- 6.4. Simple A/B Deployment - Step 3
- 6.5. Complex A/B Deployment - Step 1
- 6.6. Complex A/B Deployment - Step 2
- 6.7. Complex A/B Deployment - Step 3
- 6.8. Query Analysis example
- 8.1. Assumptions in this section
- 8.2. Tutorial Data Model
- 8.3. The Database Creation Script
- 8.4. Database Deletion Script
- 8.5. Page Map
- 9.1. Upgrading a local CVS repository
- 10.1. Server file layout diagram
- 10.2. Package file layout diagram
List of Tables
List of Examples
View comments on this page at openacs.org ->>>>>>> 1.51 +- Release Version Numbering
- Constraint naming standard
- ACS File Naming and Formatting Standards
- PL/SQL Standards
- Variables
- Automated Testing
- 13. Documentation Standards
- 14. Internationalization
- C. Using CVS with an OpenACS Site
- IV. For OpenACS Platform Developers
- 15. Kernel Documentation
- Overview
- Object Model Requirements
- Object Model Design
- Permissions Requirements
- Permissions Design
- Groups Requirements
- Groups Design
- Subsites Requirements
- Subsites Design Document
- Package Manager Requirements
- Package Manager Design
- Database Access API
- OpenACS Internationalization Requirements
- Security Requirements
- Security Design
- Security Notes
- Request Processor Requirements
- Request Processor Design
- Documenting Tcl Files: Page Contracts and Libraries
- Bootstrapping OpenACS
- External Authentication Requirements
- 16. Releasing OpenACS
- Index
List of Figures
- 4.1. Site Templates
- 4.2. Granting Permissions
- 4.3. Granting Permissions in 5.0
- 5.1. Upgrading with the APM
- 5.2. Upgrading a local CVS repository
- 6.1. Multiple-server configuration
- 6.2. Simple A/B Deployment - Step 1
- 6.3. Simple A/B Deployment - Step 2
- 6.4. Simple A/B Deployment - Step 3
- 6.5. Complex A/B Deployment - Step 1
- 6.6. Complex A/B Deployment - Step 2
- 6.7. Complex A/B Deployment - Step 3
- 6.8. Query Analysis example
- 8.1. Backup and Recovery Strategy
- 9.1. Assumptions in this section
- 9.2. Tutorial Data Model
- 9.3. The Database Creation Script
- 9.4. Database Deletion Script
- 9.5. Page Map
- 10.1. Upgrading a local CVS repository
- 11.1. Server file layout diagram
- 11.2. Package file layout diagram
List of Tables
List of Examples
View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/individual-programs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/individual-programs.html,v diff -u -r1.29.2.2 -r1.29.2.3 --- openacs-4/packages/acs-core-docs/www/individual-programs.html 12 Dec 2010 00:07:02 -0000 1.29.2.2 +++ openacs-4/packages/acs-core-docs/www/individual-programs.html 12 Dec 2010 01:37:24 -0000 1.29.2.3 @@ -10,11 +10,7 @@Table 2.2. Version Compatibility Matrix
OpenACS Version 3.2.5 4.5 4.6 4.6.1 4.6.2 4.6.3 5.0 5.1 5.2 5.3 5.4 5.5 AOLserver 3 Yes No 3.3+ad13 Maybe Yes No 3.3oacs1 Maybe Yes No 3.4.4 No 3.4.4oacs1 Maybe Yes No 3.5.5 Maybe Yes No 4.0 Maybe Yes 4.5 No Yes Tcl 8.4 Yes 8.5.4 - Maybe PostgreSQL 7.0 Yes No 7.2 Maybe Yes No 7.3.2 - 7.3.x No Yes No 7.4 No Yes No 8.0 No Maybe Yes 8.1 No Yes 8.2 No CVS version only Yes 8.3 No Yes Oracle 8.1.6 Maybe Yes Maybe 8.1.7 Maybe Yes Maybe 9i No Yes 10g No Yes 11g No Maybe The OpenACS installation instructions assume the operating system and build environment are installed. The instructions explain installation of TCL, Tcllib, tDOM, tclwebtest, a Web Server, a Database, a Process Controller, and Source Control software. The following external links are for reference only. -<<<<<<< individual-programs.html -
OpenACS 5.6.0. The OpenACS tarball comprises the core packages and -=======
OpenACS 5.6.0. The OpenACS tarball comprises the core packages and ->>>>>>> 1.31 many useful additional packages. This includes a full set of documentation. The tarball works with both PostgreSQL and Oracle. Some scripts require bash shell.
Operating System. OpenACS is designed for a Unix-like system. It is @@ -43,21 +39,12 @@ different --use gmake.
TCL 8.4.x.
TCL 8.4.x, REQUIRED. OpenACS is written in TCL, an interpreted language. A threaded version of the TCL interpreter must be installed for OpenACS to work. The TCL interpreter that is included in most standard -<<<<<<< individual-programs.html - distributions may not be thread safe.
TCL 8.4.x development headers and libraries, OPTIONAL. The site-wide-search service, OpenFTS, requires these to - compile. (Debian users: apt-get install - tcl8.4-dev). You need this - to install OpenFTS.
Tcllib, REQUIRED. - OpenACS 5.6.0 uses those Tcl extensions to send e-mail out, among others. -
tDOM, REQUIRED. OpenACS 5.6.0 stores -======= distributions may not be thread safe.
TCL 8.4.x development headers and libraries, OPTIONAL. The site-wide-search service, OpenFTS, requires these to compile. (Debian users:
apt-get install tcl8.4-dev
). You need this to install OpenFTS.Tcllib, REQUIRED. OpenACS 5.6.0 uses those Tcl extensions to send e-mail out, among others.
tDOM, REQUIRED. OpenACS 5.6.0 stores ->>>>>>> 1.31 queries in XML files, so we use an AOLserver module called tDOM to parse these files. (This replaces libxml2, which was used prior to 4.6.4.)
tclwebtest, OPTIONAL. tclwebtest is a tool for testing web interfaces via tcl scripts.
Web Server. The web server handles incoming HTTP requests, provides @@ -141,8 +128,4 @@ get patched and development code in between releases) use cvs.
cvs 1.11.18, OPTIONAL. cvs is included in most unix distributions. You need this if you want to track old versions of your files, do controlled deployment of code from development -<<<<<<< individual-programs.html to production, or get or contribute development code from openacs.org.
($Id$)View comments on this page at openacs.org -======= - to production, or get or contribute development code from openacs.org.($Id$)View comments on this page at openacs.org ->>>>>>> 1.31 Index: openacs-4/packages/acs-core-docs/www/install-next-add-server.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-add-server.html,v diff -u -r1.13.2.2 -r1.13.2.3 --- openacs-4/packages/acs-core-docs/www/install-next-add-server.html 12 Dec 2010 00:07:02 -0000 1.13.2.2 +++ openacs-4/packages/acs-core-docs/www/install-next-add-server.html 12 Dec 2010 01:37:24 -0000 1.13.2.3 @@ -1,12 +1,6 @@ -<<<<<<< install-next-add-server.html - -Running multiple services on one machine Services on different ports. To run a different service on another port but the same - ip, simply repeat Install OpenACS 5.6.0 replacing -=======
Running multiple services on one machine Services on different ports. To run a different service on another port but the same ip, simply repeat Install OpenACS 5.6.0 replacing ->>>>>>> 1.15 $OPENACS_SERVICE_NAME, and change the
set httpport 8000 set httpsport 8443Index: openacs-4/packages/acs-core-docs/www/install-next-backups.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-backups.html,v diff -u -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/acs-core-docs/www/install-next-backups.html 18 Jun 2010 21:29:35 -0000 1.9.2.1 +++ openacs-4/packages/acs-core-docs/www/install-next-backups.html 12 Dec 2010 01:37:24 -0000 1.9.2.2 @@ -1,36 +1,36 @@ - -
Backup Strategy + +
Backup Strategy The purpose of backup is to enable recovery. Backup and recovery are always risky; here are some steps that minimize the chance recovery is necessary: -
+
Store everything on a fault-tolerant disk array (RAID 1 or 5 or better). -
+
Use battery backup. -
+
Use more reliable hardware, such as SCSI instead of IDE. -
These steps improve the chances of successful recovery:
+
These steps improve the chances of successful recovery:
Store backups on a third disk on another controller -
+
Store backups on a different computer on a different network in a different physical location. (Compared to off-line backup such as tapes and CDRs, on-line backup is faster and more likely to succeed, but requires maintenance of another machine.) -
+
Plan and configure for recovery from the beginning. -
+
Test your recovery strategy from time to time. -
+
Make it easy to maintain and test your recovery strategy, so that you are more likely to do it.
OpenACS installations comprise files and database contents. If you follow the reference install and put all files, including configuration files, in - /var/lib/aolserver/$OPENACS_SERVICE_NAME/, +
/var/lib/aolserver/$OPENACS_SERVICE_NAME/
, and back up the database nightly to a file in - /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup, +/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup
, then you can apply standard file-based backup strategies to - /var/lib/aolserver/$OPENACS_SERVICE_NAME +/var/lib/aolserver/$OPENACS_SERVICE_NAME
View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html,v diff -u -r1.19.2.2 -r1.19.2.3 --- openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html 12 Dec 2010 00:07:02 -0000 1.19.2.2 +++ openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html 12 Dec 2010 01:37:24 -0000 1.19.2.3 @@ -1,14 +1,7 @@ -<<<<<<< install-next-nightly-vacuum.html - -Vacuum Postgres nightly - The "vacuum" command must be run periodically to reclaim space - in versions of PostgreSQL before 7.4. The "vacuum analyze" form -======= -
Vacuum Postgres nightly +
Vacuum Postgres nightly The "vacuum" command must be run periodically to reclaim space in versions of PostgreSQL before 7.4. The "vacuum analyze" form ->>>>>>> 1.21 additionally collects statistics on the disbursion of columns in the database, which the optimizer uses when it calculates just how to execute queries. The availability of this @@ -23,8 +16,4 @@ step.
Edit your crontab:
[joeuser ~]$crontab -e
We'll set vacuum up to run nightly at 1 AM. Add the following line:
-<<<<<<< install-next-nightly-vacuum.html 0 1 * * * /usr/local/pgsql/bin/vacuumdb $OPENACS_SERVICE_NAME
($Id$)View comments on this page at openacs.org -======= -0 1 * * * /usr/local/pgsql/bin/vacuumdb $OPENACS_SERVICE_NAME($Id$)View comments on this page at openacs.org ->>>>>>> 1.21 Index: openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html,v diff -u -r1.20.2.2 -r1.20.2.3 --- openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html 12 Dec 2010 00:07:02 -0000 1.20.2.2 +++ openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html 12 Dec 2010 01:37:24 -0000 1.20.2.3 @@ -1,5 +1,5 @@ -Starting and Stopping an OpenACS instance. The simplest way to start and stop and OpenACS site is to run the startup shell script provided,
/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run
. This runs as a regular task, and logs to the logfile. To stop the site, kill the script.A more stable way to run OpenACS is with a "keepalive" mechanism of some sort, so that whenever the server halts or is stopped for a reset, it restarts automatically. This is recommended for development and production servers.
The Reference Platform uses Daemontools to control AOLserver. A simpler method, using
init
, is here.
Daemontools must already be installed. If not, install it.
Each service controlled by daemontools must have a +
Starting and Stopping an OpenACS instance. The simplest way to start and stop and OpenACS site is to run the startup shell script provided,
/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run
. This runs as a regular task, and logs to the logfile. To stop the site, kill the script.A more stable way to run OpenACS is with a "keepalive" mechanism of some sort, so that whenever the server halts or is stopped for a reset, it restarts automatically. This is recommended for development and production servers.
The Reference Platform uses Daemontools to control AOLserver. A simpler method, using
init
, is here.
Daemontools must already be installed. If not, install it.
Each service controlled by daemontools must have a directory in
/service
. That directory must have a file calledrun
. It works like this:
The
init
program starts every @@ -64,12 +64,6 @@ Most of this information comes from Tom Jackson's AOLserver+Daemontools Mini-HOWTO. -<<<<<<< install-openacs-keepalive.html -Table 6.1. How it Works
Program Invoked by this program ... ... using this file Where to find errors Log goes to Use these commands to control it svscanboot - init /etc/inittab ps -auxw | grep readproctitle n/a aolserver supervise -(a child of svscanboot) /service/$OPENACS_SERVICE_NAME/run /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/error.log /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME.log svc -k /service/$OPENACS_SERVICE_NAME postgresql Redhat init scripts during boot /etc/init.d/postgresql /usr/local/pgsql/data/server.log service postgresql start (Red Hat), /etc/init.d/postgresql start (Debian)
Prev Home Next Chapter 6. Production Environments Up AOLserver keepalive with inittab
docs@openacs.orgView comments on this page at openacs.org -======= -Table 6.1. How it Works
Program Invoked by this program ... ... using this file Where to find errors Log goes to Use these commands to control it svscanboot + Table 6.1. How it Works
Program Invoked by this program ... ... using this file Where to find errors Log goes to Use these commands to control it svscanboot init /etc/inittab ps -auxw | grep readproctitle n/a aolserver supervise (a child of svscanboot)
/service/$OPENACS_SERVICE_NAME/run /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/error.log /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME.log svc -k /service/$OPENACS_SERVICE_NAME postgresql Redhat init scripts during boot /etc/init.d/postgresql /usr/local/pgsql/data/server.log service postgresql start (Red Hat), /etc/init.d/postgresql start (Debian)
Prev Home Next Chapter 6. Production Environments Up AOLserver keepalive with inittab
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.22 Index: openacs-4/packages/acs-core-docs/www/install-origins.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-origins.html,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/acs-core-docs/www/install-origins.html 12 Dec 2010 00:07:02 -0000 1.14.2.1 +++ openacs-4/packages/acs-core-docs/www/install-origins.html 12 Dec 2010 01:37:24 -0000 1.14.2.2 @@ -1,5 +1,5 @@ -Where did this document come from? +
Where did this document come from? This document was created by Vinod Kurup, but it's really just plagiarism from a number of documents that came before it. If I've used something that you've written without proper credit, let me @@ -19,5 +19,5 @@ Joel Aufrecht's OpenACS 4.5 Quick Guide.
- Please also see the Credits section for more acknowledgements. -
View comments on this page at openacs.org + Please also see the Credits section for more acknowledgements. +View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/install-redhat.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-redhat.html,v diff -u -r1.37.2.2 -r1.37.2.3 --- openacs-4/packages/acs-core-docs/www/install-redhat.html 12 Dec 2010 00:07:02 -0000 1.37.2.2 +++ openacs-4/packages/acs-core-docs/www/install-redhat.html 12 Dec 2010 01:37:24 -0000 1.37.2.3 @@ -1,10 +1,5 @@ -<<<<<<< install-redhat.html - -Appendix A. Install Red Hat 8/9 -======= -Appendix A. Install Red Hat 8/9 ->>>>>>> 1.39 +Appendix A. Install Red Hat 8/9 OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.This section takes a blank PC and sets up some supporting @@ -32,11 +27,7 @@
Unplug the network cable from your computer. We don't want to connect to the network until we're sure the computer is secure. -<<<<<<< install-redhat.html - -======= - ->>>>>>> 1.39 + (Wherever you see the word secure, you should always read it as, "secure enough for our purposes, given the amount of work we're @@ -59,21 +50,12 @@
Next
.Reformat the hard drive. If you know what you're doing, do this step on your own. Otherwise: we're going to let the installer wipe out the everything on the main hard drive and then arrange things to -<<<<<<< install-redhat.html - its liking.
Choose Automatically Partition - and click Next
Uncheck -Review (and modify if needed) the partitions created and click Next
On the pop-up window asking "Are you sure - you want to do this?" click - Yes - IF YOU ARE WIPING YOUR HARD DRIVE.
Click Next on the boot loader screen
Configure Networking. -======= its liking.
Choose
Automatically Partition
and clickNext
Uncheck
Review (and modify if needed) the partitions created
and clickNext
On the pop-up window asking "Are you sure you want to do this?" click
Yes
- IF YOU ARE WIPING YOUR HARD DRIVE.Click
Next
on the boot loader screenConfigure Networking. ->>>>>>> 1.39 + IF YOU ARE WIPING YOUR HARD DRIVE.
Click
Next
on the boot loader screenConfigure Networking. Again, if you know what you're doing, do this step yourself, being sure to note the firewall holes. Otherwise, follow the instructions in this step to set up a computer directly connected to the internet with a dedicated IP address.
DHCP is a system by which a computer that @@ -89,21 +71,12 @@ we'll add a few holes to the firewall for services which we need and know are secure. Choose
High
security level. Check -<<<<<<< install-redhat.html -WWW, -SSH, and -Mail (SMTP). In the Other ports -box, enter 443, 8000, 8443. Click -Next. -Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.Select any additional languages you want the -=======
WWW
,SSH
, andMail (SMTP)
. In theOther ports
box, enter443, 8000, 8443
. ClickNext
. -Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.Select any additional languages you want the ->>>>>>> 1.39 +Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.
Select any additional languages you want the computer to support and then click
Next
Choose your time zone and click
Next
.Type in a root password, twice.
On the Package selection page, we're going to @@ -115,23 +88,13 @@ risk that's still screened by the firewall, or a resource hog. Just don't install a database or web server, because that would conflict with the database and web server we'll install later. -<<<<<<< install-redhat.html -
At the bottom, check Select Individual Packages and click Next
We need to fine-tune the exact list of packages. -======= -
At the bottom, check
Select Individual Packages
and clickNext
We need to fine-tune the exact list of packages. ->>>>>>> 1.39 +
At the bottom, check
Select Individual Packages
and clickNext
We need to fine-tune the exact list of packages. The same rules apply as in the last step - you can add more stuff, but you shouldn't remove anything the guide adds. We're going to go through all the packages in one big list, so select -<<<<<<< install-redhat.html -Flat -View and wait. In a minute, a -list of packages will appear.
Red Hat isn't completely happy with the combination -=======
Flat View
and wait. In a minute, a -list of packages will appear.Red Hat isn't completely happy with the combination ->>>>>>> 1.39 +list of packages will appear.
Red Hat isn't completely happy with the combination of packages we've selected, and wants to satisfy some dependencies. Don't let it. On the next screen, choose
Ignore Package @@ -156,13 +119,8 @@ kernel and openssl/openssh root exploits, so you should be upgrading all of that. Since you are upgrading the kernel, reboot after this step. -<<<<<<< install-redhat.html -
Lock down SSH
Lock down SSH
- ->>>>>>> 1.39 + SSH is the protocol we use to connect securely to the computer (replacing telnet, which is insecure). sshd is the daemon that listens for incoming @@ -243,4 +201,4 @@ cd /var/tmp wget http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm rpm -Uvh kernel-2.4.18-27.7.x.i686.rpm -reboot
Prev Home Next Using CVS for backup-recovery Up Appendix B. Install additional supporting software
docs@openacs.orgView comments on this page at openacs.org +rebootView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/install-resources.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-resources.html,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/acs-core-docs/www/install-resources.html 12 Dec 2010 00:07:02 -0000 1.14.2.1 +++ openacs-4/packages/acs-core-docs/www/install-resources.html 12 Dec 2010 01:37:24 -0000 1.14.2.2 @@ -1,5 +1,5 @@ -Resources +
Resources Here are some resources that OpenACS users have found useful.
Index: openacs-4/packages/acs-core-docs/www/install-ssl.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-ssl.html,v diff -u -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/acs-core-docs/www/install-ssl.html 12 Dec 2010 00:07:02 -0000 1.12.2.1 +++ openacs-4/packages/acs-core-docs/www/install-ssl.html 12 Dec 2010 01:37:24 -0000 1.12.2.2 @@ -1,5 +1,5 @@ -
Installing SSL Support for an OpenACS service Debian Users:
apt-get install openssl
before proceeding.
Make sure nsopenssl.so is installed for AOLserver.
Uncomment this line from
config.tcl
.#ns_param nsopenssl ${bindir}/nsopenssl.so +Installing SSL Support for an OpenACS service Debian Users:
apt-get install openssl
before proceeding.
Make sure nsopenssl.so is installed for AOLserver.
Uncomment this line from
config.tcl
.#ns_param nsopenssl ${bindir}/nsopenssl.soPrepare a certificate directory for the service.
[$OPENACS_SERVICE_NAME etc]$mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
[$OPENACS_SERVICE_NAME etc]$chmod 700 /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
[$OPENACS_SERVICE_NAME etc]$ Index: openacs-4/packages/acs-core-docs/www/install-steps.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-steps.html,v diff -u -r1.31.2.2 -r1.31.2.3 --- openacs-4/packages/acs-core-docs/www/install-steps.html 12 Dec 2010 00:07:02 -0000 1.31.2.2 +++ openacs-4/packages/acs-core-docs/www/install-steps.html 12 Dec 2010 01:37:24 -0000 1.31.2.3 @@ -5,15 +5,9 @@ Install PostgreSQL).Install AOLserver (Install AOLserver 4) .
Create a unique database and system user. Install the OpenACS tarball, start and AOLserver instance, and use the OpenACS web pages to complete installation -<<<<<<< install-steps.html - (see Install OpenACS 5.6.0).
Specific instructions are available for Mac OS X and - Windows2000 (see Section , “OpenACS Installation Guide for Mac OS X” or - Section , “OpenACS Installation Guide for Windows2000”).
You can try out OpenACS using some binary installers. In -======= (see Install OpenACS 5.6.0).
Specific instructions are available for Mac OS X and Windows2000 (see OpenACS Installation Guide for Mac OS X or OpenACS Installation Guide for Windows2000).
You can try out OpenACS using some binary installers. In ->>>>>>> 1.33 general, they are not yet supported by the community, so they are mostly for evaluation purposes. Installing OpenACS
You can see a list of current installers. @@ -47,18 +41,10 @@ su - $OPENACS_SERVICE_NAME svc -d /service/$OPENACS_SERVICE_NAME dropdb $OPENACS_SERVICE_NAME -<<<<<<< install-steps.html -createdb $OPENACS_SERVICE_NAME
Setting a global shell variable for cut and paste. In order to cut and paste the instructions into your shell, you must set the environment variable $OPENACS_SERVICE_NAME. In order to set it globally so that it works for any new users or special service users you may create, edit the file /etc/profile ( /etc/share/skel/dot.profile for FreeBSD) and add this line:
export OPENACS_SERVICE_NAME=service0
Table 2.1. Default directories for a standard install
Fully qualified domain name of your server yourserver.test name of administrative access account remadmin OpenACS service $OPENACS_SERVICE_NAME (set to service0 in default install) OpenACS service account $OPENACS_SERVICE_NAME OpenACS database name $OPENACS_SERVICE_NAME Root of OpenACS service file tree (SERVERROOT) /var/lib/aolserver/$OPENACS_SERVICE_NAME Location of source code tarballs for new software /var/tmp The OpenACS tarball contains some files which -======= -createdb $OPENACS_SERVICE_NAME Setting a global shell variable for cut and paste. In order to cut and paste the instructions into your shell, you must set the environment variable $OPENACS_SERVICE_NAME. In order to set it globally so that it works for any new users or special service users you may create, edit the file
/etc/profile
(/etc/share/skel/dot.profile
for FreeBSD) and add this line:export OPENACS_SERVICE_NAME=service0
Table 2.1. Default directories for a standard install
->>>>>>> 1.33 None of these locations are set in stone - they're simply the values that we've chosen. The values that you'll probably want to change, such as service name, are @@ -107,10 +93,5 @@
If you find errors in this document or if you have ideas about making it better, please post them in our -<<<<<<< install-steps.html - BugTracker. -
($Id$)View comments on this page at openacs.org -======= BugTracker.($Id$)View comments on this page at openacs.org ->>>>>>> 1.33 Index: openacs-4/packages/acs-core-docs/www/ix01.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ix01.html,v diff -u -r1.25.2.2 -r1.25.2.3 --- openacs-4/packages/acs-core-docs/www/ix01.html 12 Dec 2010 00:07:02 -0000 1.25.2.2 +++ openacs-4/packages/acs-core-docs/www/ix01.html 12 Dec 2010 01:37:24 -0000 1.25.2.3 @@ -1,9 +1,3 @@ -<<<<<<< ix01.html - -Index Symbols
- $OPENACS_SERVICE_NAME, Paths and Users
A
- AOLserver
- configuration, Installation Option 2: Install from tarball
- Automated tests, Write automated tests
C
- computeroutput
- code, Code
- cvs
- initializing, Initialize CVS (OPTIONAL)
D
- daemontools
- installation, Install Daemontools (OPTIONAL)
- docbook
- installation, Install Red Hat 8/9
- DocBook
- DTD, OpenACS Documentation Strategy: Why DocBook?
- emacs configuration for, Add PSGML commands to emacs init file (OPTIONAL)
- Document structure, Document Structure
E
- emacs
- installation, Install Red Hat 8/9
- emphasis
- bold, italics, Emphasis
F
- full text search
G
- Graphics
- Images, Graphics
I
- informaltable
- table, Tables
L
- language
- installation, Install Red Hat 8/9
- Linking, Links
- lists, Lists
O
- OpenACS Package, What a Package Looks Like
P
- photo-album
- installation (see ImageMagick)
- Postgres
- Vacuuming, Installation Option 2: Install from tarball
Q
- qmail
- installation, Install qmail (OPTIONAL)
- Maildir, Install qmail (OPTIONAL)
- rcpthosts error message, Install qmail (OPTIONAL)
S
- sect1, Headlines, Sections
- sect2, Headlines, Sections
- Sections
- Headlines, Headlines, Sections
- security
- definition, Install Red Hat 8/9
- firewall, Install Red Hat 8/9
- sendmail
- removing, Install qmail (OPTIONAL)
- ssh, Install Red Hat 8/9
T
- The publish point for new packages should be - fixed., Prepare the package for distribution.
U
- ulink, Links
- upgrade
- OpenACS 4.5 to 4.6.x
- Linux/Unix, Upgrading 4.5 or higher to 4.6.3
X
- XML guidelines, OpenACS Documentation Strategy: Why DocBook?
- xref
- linkend, Links
- xreflabel, Headlines, Sections
View comments on this page at openacs.org -======= -Index Symbols
- $OPENACS_SERVICE_NAME, Paths and Users
A
- AOLserver
- configuration, Installation Option 2: Install from tarball
- Automated tests, Write automated tests
C
- computeroutput
- code, Code
- cvs
- initializing, Initialize CVS (OPTIONAL)
- setup, Using CVS with an OpenACS Site
D
- daemontools
- installation, Install Daemontools (OPTIONAL)
- docbook
- installation, Install Red Hat 8/9
- DocBook
- DTD, OpenACS Documentation Strategy: Why DocBook?
- emacs configuration for, Add PSGML commands to emacs init file (OPTIONAL)
- Document structure, Document Structure
E
- emacs
- installation, Install Red Hat 8/9
- emphasis
- bold, italics, Emphasis
F
- full text search
G
- Graphics
- Images, Graphics
I
- informaltable
- table, Tables
L
- language
- installation, Install Red Hat 8/9
- Linking, Links
- lists, Lists
O
- OpenACS Package, What a Package Looks Like
P
- photo-album
- installation (see ImageMagick)
- Postgres
- Vacuuming, Installation Option 2: Install from tarball
Q
- qmail
- installation, Install qmail (OPTIONAL)
- Maildir, Install qmail (OPTIONAL)
- rcpthosts error message, Install qmail (OPTIONAL)
S
- sect1, Headlines, Sections
- sect2, Headlines, Sections
- Sections
- Headlines, Headlines, Sections
- security
- definition, Install Red Hat 8/9
- firewall, Install Red Hat 8/9
- sendmail
- removing, Install qmail (OPTIONAL)
- ssh, Install Red Hat 8/9
T
- The publish point for new packages should be +
Index Symbols
- $OPENACS_SERVICE_NAME, Paths and Users
A
- AOLserver
- configuration, Installation Option 2: Install from tarball
- Automated tests, Write automated tests
C
- computeroutput
- code, Code
- cvs
D
- docbook
- installation, Install Red Hat 8/9
- DocBook
- Document structure, Document Structure
E
- emacs
- installation, Install Red Hat 8/9
- emphasis
- bold, italics, Emphasis
G
- Graphics
- Images, Graphics
I
- informaltable
- table, Tables
L
- language
- installation, Install Red Hat 8/9
- Linking, Links
- lists, Lists
O
- OpenACS Package, What a Package Looks Like
P
- photo-album
- installation (see ImageMagick)
- Postgres
- Vacuuming, Installation Option 2: Install from tarball
S
- sect1, Headlines, Sections
- sect2, Headlines, Sections
- Sections
- Headlines, Headlines, Sections
- security
- definition, Install Red Hat 8/9
- firewall, Install Red Hat 8/9
- ssh, Install Red Hat 8/9
T
- The publish point for new packages should be fixed., Prepare the package for distribution.
U
- ulink, Links
- upgrade
- OpenACS 4.5 to 4.6.x
- Linux/Unix, Upgrading 4.5 or higher to 4.6.3
X
- XML guidelines, OpenACS Documentation Strategy: Why DocBook?
- xref
- linkend, Links
- xreflabel, Headlines, Sections
View comments on this page at openacs.org ->>>>>>> 1.27 Index: openacs-4/packages/acs-core-docs/www/kernel-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/kernel-doc.html,v diff -u -r1.33.2.2 -r1.33.2.3 --- openacs-4/packages/acs-core-docs/www/kernel-doc.html 12 Dec 2010 00:07:02 -0000 1.33.2.2 +++ openacs-4/packages/acs-core-docs/www/kernel-doc.html 12 Dec 2010 01:37:24 -0000 1.33.2.3 @@ -1,7 +1,2 @@ -<<<<<<< kernel-doc.html - -Chapter 15. Kernel Documentation Section missingSection missingTable of Contents
- Overview
- Object Model Requirements
- Permissions Requirements
- Permissions Design
- Groups Requirements
- Groups Design
- Subsites Requirements
- Subsites Design Document
- Package Manager Requirements
- Package Manager Design
- Database Access API
- OpenACS Internationalization Requirements
- Security Requirements
- Security Design
- Security Notes
- Request Processor Requirements
- Request Processor Design
- Bootstrapping OpenACS
- External Authentication Requirements
View comments on this page at openacs.org -======= -Chapter 14. Kernel Documentation Table of Contents
- Overview
- Object Model Requirements
- Object Model Design
- Permissions Requirements
- Permissions Design
- Groups Requirements
- Groups Design
- Subsites Requirements
- Subsites Design Document
- Package Manager Requirements
- Package Manager Design
- Database Access API
- OpenACS Internationalization Requirements
- Security Requirements
- Security Design
- Security Notes
- Request Processor Requirements
- Request Processor Design
- Documenting Tcl Files: Page Contracts and Libraries
- Bootstrapping OpenACS
- External Authentication Requirements
View comments on this page at openacs.org ->>>>>>> 1.35 +Chapter 15. Kernel Documentation Table of Contents
- Overview
- Object Model Requirements
- Object Model Design
- Permissions Requirements
- Permissions Design
- Groups Requirements
- Groups Design
- Subsites Requirements
- Subsites Design Document
- Package Manager Requirements
- Package Manager Design
- Database Access API
- OpenACS Internationalization Requirements
- Security Requirements
- Security Design
- Security Notes
- Request Processor Requirements
- Request Processor Design
- Documenting Tcl Files: Page Contracts and Libraries
- Bootstrapping OpenACS
- External Authentication Requirements
View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/kernel-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/kernel-overview.html,v diff -u -r1.27.2.2 -r1.27.2.3 --- openacs-4/packages/acs-core-docs/www/kernel-overview.html 12 Dec 2010 00:07:02 -0000 1.27.2.2 +++ openacs-4/packages/acs-core-docs/www/kernel-overview.html 12 Dec 2010 01:37:24 -0000 1.27.2.3 @@ -1,10 +1,5 @@ -<<<<<<< kernel-overview.html - -Overview
-======= -
Overview
->>>>>>> 1.29 +
Overview
The OpenACS Kernel, which handles system-wide necessities such as metadata, security, users and groups, subsites, and package @@ -27,10 +22,5 @@
This document provides a high level overview of the kernel -<<<<<<< kernel-overview.html - package. Documentation for other packages on this server -
View comments on this page at openacs.org -======= package. Documentation for other packages on this server -View comments on this page at openacs.org ->>>>>>> 1.29 +View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/mac-installation.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/mac-installation.html,v diff -u -r1.39.2.2 -r1.39.2.3 --- openacs-4/packages/acs-core-docs/www/mac-installation.html 12 Dec 2010 00:07:02 -0000 1.39.2.2 +++ openacs-4/packages/acs-core-docs/www/mac-installation.html 12 Dec 2010 01:37:24 -0000 1.39.2.3 @@ -5,10 +5,5 @@ readline-4.3 ./configure make -<<<<<<< mac-installation.html -make installProceed with the Unix-like system instructions. OS X is incompatible with Oracle 8, and Oracle 9i on OSX is not yet verified for OpenACS. So continue with Install PostgreSQL. Additional special steps for OS X are documented inline with the standard Unix-like instructions.
Additional resources for installing on OS X.
($Id$)
Prev Home Next OpenACS Installation Guide for Windows2000 Up Chapter 4. Configuring a new OpenACS Site
docs@openacs.orgView comments on this page at openacs.org -======= make installProceed with the Unix-like system instructions. OS X is incompatible with Oracle 8, and Oracle 9i on OSX is not yet verified for OpenACS. So continue with Install PostgreSQL. Additional special steps for OS X are documented inline with the standard Unix-like instructions.
Additional resources for installing on OS X.
($Id$)
Prev Home Next OpenACS Installation Guide for Windows2000 Up Chapter 4. Configuring a new OpenACS Site
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.40 Index: openacs-4/packages/acs-core-docs/www/maint-performance.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maint-performance.html,v diff -u -r1.25.2.2 -r1.25.2.3 --- openacs-4/packages/acs-core-docs/www/maint-performance.html 12 Dec 2010 00:07:02 -0000 1.25.2.2 +++ openacs-4/packages/acs-core-docs/www/maint-performance.html 12 Dec 2010 01:37:24 -0000 1.25.2.3 @@ -1,13 +1,8 @@Diagnosing Performance Problems
Did performance problems happen overnight, or did they sneak up on you? Any clue what caused the performance problems (e.g. loading 20K -<<<<<<< maint-performance.html - users into .LRN)
Is the file system out of space? Is the machine swapping to disk constantly?
Isolating and solving database problems.
Without daily internal maintenance, most databases slowly degrade in performance. For PostGreSQL, see Section , “Vacuum Postgres nightly”. For Oracle, use exec dbms_stats.gather_schema_stats('SCHEMA_NAME') (Andrew Piskorski's Oracle notes).
You can track the exact amount of time each database query on a page takes:
Go to Main Site : Site-Wide Administration : Install Software
Click on "Install New Application" in "Install from OpenACS Repository"
Choose "ACS Developer Support">
After install is complete, restart the server.
Browse to Developer Support, which is automatically mounted at /ds. -
Turn on Database statistics
Browse directly to a slow page and click "Request Information" at the bottom of the page.
This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.
Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.
Log in to SQL*Plus as the admin:
[$OPENACS_SERVICE_NAME ~]$ svrmgrl -======= users into .LRN)
Is the file system out of space? Is the machine swapping to disk constantly?
Isolating and solving database problems.
Without daily internal maintenance, most databases slowly degrade in performance. For PostGreSQL, see Vacuum Postgres nightly. For Oracle, use
exec dbms_stats.gather_schema_stats('SCHEMA_NAME')
(Andrew Piskorski's Oracle notes).You can track the exact amount of time each database query on a page takes:
Go to Main Site : Site-Wide Administration : Install Software
Click on "Install New Application" in "Install from OpenACS Repository"
Choose "ACS Developer Support">
After install is complete, restart the server.
Browse to Developer Support, which is automatically mounted at
/ds
. -Turn on Database statistics
Browse directly to a slow page and click "Request Information" at the bottom of the page.
This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.
Identify a runaway Oracle query: first, use
ps aux
ortop
to get the UNIX process ID of a runaway Oracle process.Log in to SQL*Plus as the admin:
[$OPENACS_SERVICE_NAME ~]$ svrmgrl ->>>>>>> 1.27 +
Turn on Database statistics
Browse directly to a slow page and click "Request Information" at the bottom of the page.
This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.
Identify a runaway Oracle query: first, use
ps aux
ortop
to get the UNIX process ID of a runaway Oracle process.Log in to SQL*Plus as the admin:
[$OPENACS_SERVICE_NAME ~]$ svrmgrl Oracle Server Manager Release 3.1.7.0.0 - Production @@ -63,13 +58,8 @@ Oracle Support information.To be able to get a overview of how Oracle executes a particular query, -<<<<<<< maint-performance.html - install "autotrace". I usually follow the instructions here http://asktom.oracle.com/~tkyte/article1/autotrace.html. -
-======= install "autotrace". I usually follow the instructions here http://asktom.oracle.com/~tkyte/article1/autotrace.html. -
->>>>>>> 1.27 +
The Oracle Cost Based optimizer is a piece of software that tries to find the "optimal" execution plan for a given SQL statement. For that it estimates the costs of running a SQL query in a particular way (by default Index: openacs-4/packages/acs-core-docs/www/maintenance-deploy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maintenance-deploy.html,v diff -u -r1.20.2.2 -r1.20.2.3 --- openacs-4/packages/acs-core-docs/www/maintenance-deploy.html 12 Dec 2010 00:07:02 -0000 1.20.2.2 +++ openacs-4/packages/acs-core-docs/www/maintenance-deploy.html 12 Dec 2010 01:37:24 -0000 1.20.2.3 @@ -1,17 +1,8 @@ -<<<<<<< maintenance-deploy.html - -
Staged Deployment for Production Networks ($Id$)-=======Staged Deployment for Production Networks ($Id$)->>>>>>> 1.22 OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< maintenance-deploy.html -This section describes two minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)
Control: You know for sure that the change you are making is the change that you intend to make and is the change that you tested.
Rollback: If anything goes wrong, you can return to the previous working configuration safely and quickly.
This section describes two minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)
Control: You know for sure that the change you are making is the change that you intend to make and is the change that you tested.
Rollback: If anything goes wrong, you can return to the previous working configuration safely and quickly.
This section describes two minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)
Control: You know for sure that the change you are making is the change that you intend to make and is the change that you tested.
Rollback: If anything goes wrong, you can return to the previous working configuration safely and quickly.
With this method, we control the files on a site via CVS. This example uses one developmental server (service0-dev) and one production server (service0). Depending on your needs, you can also have a staging server for extensive testing before you go @@ -76,8 +67,4 @@ cvs up -Pd index.adp
If you make changes that require changes to the database, test them out first on service0-dev, using either -create.sql or upgrade scripts. Once you've tested them, you then update and -<<<<<<< maintenance-deploy.html - run the upgrade scripts from the package manager.
The production site can run "HEAD" from cvs.
The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...
The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.
This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.
Prev Home Next High Availability/High Performance Configurations Up Installing SSL Support for an OpenACS service
docs@openacs.orgView comments on this page at openacs.org -======= - run the upgrade scripts from the package manager.The production site can run "HEAD" from cvs.
The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...
The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.
This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.
Prev Home Next High Availability/High Performance Configurations Up Installing SSL Support for an OpenACS service
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.22 + run the upgrade scripts from the package manager.The production site can run "HEAD" from cvs.
The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...
The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.
This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.
Prev Home Next High Availability/High Performance Configurations Up Installing SSL Support for an OpenACS service
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/nxml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/nxml-mode.html,v diff -u -r1.14.2.2 -r1.14.2.3 --- openacs-4/packages/acs-core-docs/www/nxml-mode.html 12 Dec 2010 00:07:02 -0000 1.14.2.2 +++ openacs-4/packages/acs-core-docs/www/nxml-mode.html 12 Dec 2010 01:37:24 -0000 1.14.2.3 @@ -1,23 +1,11 @@ -<<<<<<< nxml-mode.html - -Using nXML mode in Emacs By Jeff Davis
-======= -Using nXML mode in Emacs By Jeff Davis
->>>>>>> 1.16 +Using nXML mode in Emacs By Jeff Davis
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.An alternative to psgml mode is nXML by James Clark, a new major mode for GNU Emacs for editing XML, and which features highlighting, indentation, and on the fly validation versus a RelaxNG Schema. -<<<<<<< nxml-mode.html -
An - introduction to nXML mode at xmlhack.com. -
The nXML mode mail list at groups.yahoo.com. -
The nXML download page at thaiopensource.com.
View comments on this page at openacs.org -=======
An introduction to nXML mode at xmlhack.com.
The nXML mode mail list at groups.yahoo.com. -
The nXML download page at thaiopensource.com.
View comments on this page at openacs.org ->>>>>>> 1.16 +The nXML download page at thaiopensource.com.
View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/object-identity.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-identity.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/object-identity.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/object-identity.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -1,21 +1,10 @@ -<<<<<<< object-identity.html - -Object Identity -======= -Object Identity ->>>>>>> 1.47 +Object Identity OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< object-identity.htmlOne of the major design features of OpenACS 5.6.0 is the explicit representation -of object identity. The reason I say "explicit -representation" is because the concept of object identity has been -======= -
One of the major design features of OpenACS 5.6.0 is the explicit representation of object identity. The reason I say "explicit representation" is because the concept of object identity has been ->>>>>>> 1.47 around forever. It is inherent to our problem domain. Consider the example of 3.x style scoping. The 3.x data models use the triple (user_id, group_id, scope) to identify an object. In the 5.6.0 data model this @@ -43,8 +32,4 @@ even capable of fully tracking the history of membership state.
The design choice of explicitly representing object identity with an integer primary key that is derived from a globally unique sequence is the key to eliminating redundant code and replacing it with generic object -<<<<<<< object-identity.html -level services.
($Id$)View comments on this page at openacs.org -======= -level services.($Id$)View comments on this page at openacs.org ->>>>>>> 1.47 +level services.($Id$)
Prev Home Next OpenACS Permissions Tediously Explained Up Using Form Builder: building html forms dynamically
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/object-system-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-system-design.html,v diff -u -r1.31.2.1 -r1.31.2.2 --- openacs-4/packages/acs-core-docs/www/object-system-design.html 12 Dec 2010 00:07:02 -0000 1.31.2.1 +++ openacs-4/packages/acs-core-docs/www/object-system-design.html 12 Dec 2010 01:37:24 -0000 1.31.2.2 @@ -1,5 +1,5 @@ -Object Model Design By Pete Su, Michael Yoon, Richard Li, Rafael Schloming
+Object Model Design By Pete Su, Michael Yoon, Richard Li, Rafael Schloming
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
Index: openacs-4/packages/acs-core-docs/www/object-system-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-system-requirements.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/object-system-requirements.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/object-system-requirements.html 12 Dec 2010 01:37:24 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< object-system-requirements.html - -
Object Model Requirements By Pete Su
-======= -Object Model Requirements By Pete Su
->>>>>>> 1.32 +Object Model Requirements By Pete Su
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.A major goal in OpenACS 4 is to unify and normalize many of the core services @@ -90,11 +85,7 @@ between data.
Design Note: While this doesn't really belong in a requirements document, the fact that we are constrained to using relational databases means that certain constraints on the overall design of the object -<<<<<<< object-system-requirements.html -data model exist, which you can read about in ???.
Modifiable Data Models
Another recurring applications problem is how to store a modifiable data -======= data model exist, which you can read about in Summary and Design Considerations.
Modifiable Data Models
Another recurring applications problem is how to store a modifiable data ->>>>>>> 1.32 model, or how to store information that may change extensively between releases or in different client installations. Furthermore, we want to avoid changes to an application's database queries in the face of any custom @@ -135,13 +126,8 @@ that store metadata on application objects. The object type system supports subtyping with inheritance, so new object types can be defined in terms of existing object types.
The OM data model forms the main part of the OpenACS 4 Kernel data model. The -<<<<<<< object-system-requirements.html -other parts of the Kernel data model include:
Parties and Groups
Permissions
Each of these is documented elsewhere at length.
The data model for the object system provides support for the following -kinds of schema patterns that are used by many existing OpenACS modules:
- 10.0 Object Identification and Storage
Object identification is a central mechanism in the new metadata system. -======= other parts of the Kernel data model include:
Parties and Groups
Permissions
Each of these is documented elsewhere at length.
The data model for the object system provides support for the following kinds of schema patterns that are used by many existing OpenACS modules:
- 10.0 Object Identification and Storage
Object identification is a central mechanism in the new metadata system. ->>>>>>> 1.32 The fact that every object has a known unique identifier means that the core can deal with all objects in a generic way. Thus the only action required of an application to obtain any general service is to "hook into" the @@ -216,17 +202,10 @@ developers to represent a hierarchy of object contexts. These contexts are used as the basis for the permissions system. In general, if an object has no explicit permissions attached to it, then it inherits -<<<<<<< object-system-requirements.html -permissions from its context.
The context data model also forms the basis of the subsites system, and is -a basic part of the permissions system, -described in separate documents.
The context data model should provide the following facilities:
50.10 Unique ID
Every context should have a unique ID in the system.
50.20 Tree Structure
The data model should support a tree structured organization of contexts. -That is, contexts can be logically "contained" within other -======= permissions from its context.
The context data model also forms the basis of the subsites system, and is a basic part of the permissions system, described in separate documents.
The context data model should provide the following facilities:
50.10 Unique ID
Every context should have a unique ID in the system.
50.20 Tree Structure
The data model should support a tree structured organization of contexts. That is, contexts can be logically "contained" within other ->>>>>>> 1.32 contexts (i.e. contexts have parents) and contexts can contain other contexts (i.e. contexts can have children).
50.30 Data Model Constraints
All objects must have a context ID. This ID must refer to an existing context or be NULL. The meaning of a NULL context is determined by the @@ -285,4 +264,4 @@ this integrate with application level SQL queries?
Document Revision # Action Taken, Notes When? By Whom? 0.1 Creation 08/10/2000 Bryan Quinn 0.2 Major re-write 08/11/2000 Pete Su 0.3 Draft completed after initial reviews 08/22/2000 Pete Su 0.4 Edited, updated to conform to requirements template, pending freeze 08/23/2000 Kai Wu Final edits before freeze 08/24/2000 Pete Su 0.5 Edited for consistency 08/27/2000 Kai Wu 0.6 Put Object ID stuff first, because it makes more sense 08/28/2000 Pete Su 0.7 Added requirement that knowledge-level objects must be moveable between databases. 08/29/2000 Richard Li 0.8 Rewrote intro to match language and concepts in the design document. Also cleaned up usage a bit in the requirements section. Added short vague -requirements on relation types. 09/06/2000 Pete Su 0.9 Edited for ACS 4 Beta release. 09/30/2000 Kai Wu View comments on this page at openacs.org +requirements on relation types.09/06/2000 Pete Su 0.9 Edited for ACS 4 Beta release. 09/30/2000 Kai Wu View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/objects.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/objects.html,v diff -u -r1.48.2.2 -r1.48.2.3 --- openacs-4/packages/acs-core-docs/www/objects.html 12 Dec 2010 00:07:02 -0000 1.48.2.2 +++ openacs-4/packages/acs-core-docs/www/objects.html 12 Dec 2010 01:37:24 -0000 1.48.2.3 @@ -1,19 +1,9 @@ -<<<<<<< objects.html - -OpenACS Data Models and the Object System By Pete Su
-======= -OpenACS Data Models and the Object System By Pete Su
->>>>>>> 1.50 +OpenACS Data Models and the Object System By Pete Su
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< objects.html -Developing data models in OpenACS 5.6.0 is much like developing data models ->>>>>>> 1.50 for OpenACS 3, save for the implementation. As usual, you need to examine how to model the information that the application must store and manipulate, and define a suitable set of SQL tables. In our Notes @@ -87,17 +77,10 @@ system.
Fire up your text editor and open the -<<<<<<< objects.html -ROOT/packages/notes/sql/oracle/notes-create.sql (ROOT/packages/notes/sql/postgresql/notes-create.sql for the PG version) file created -when we created the package. Then, do the following: -
-First, add an entry to the acs_object_types table with the following PL/SQL call: -=======
ROOT/packages/notes/sql/oracle/notes-create.sql
(ROOT/packages/notes/sql/postgresql/notes-create.sql
for the PG version) file created when we created the package. Then, do the following: -+
First, add an entry to the
acs_object_types
table with the following PL/SQL call: ->>>>>>> 1.50begin acs_object_type.create_type ( @@ -156,11 +139,7 @@ because the new typenote
is a subtype ofacs_object
, it will inherit these attributes, so there is no need for us to define them. -<<<<<<< objects.html -The next thing we do is make a small modification to the data model to reflect the fact that each row in the
notes
table represents something that is not only an object of type @@ -184,13 +163,8 @@ we model inheritance; it guarantees that any services that use theacs_objects
table to find objects will transparently find any objects that are instances of any subtype of -<<<<<<< objects.html -acs_objects. -The next step is to define a PL/SQL package for your new type, and write some basic procedures to create and delete objects. Here is a package definition for our new type: @@ -238,11 +212,7 @@ object OBJ was "read only", then any other object that used OBJ as its context would also be "read only" by default. We'll talk about this more later. -<<<<<<< objects.html -
The PL/SQL package body contains the implementations of the procedures defined above. The only subtle thing going on here is that we must use
acs_object.new
to insert a row into @@ -399,13 +369,8 @@ when to use inherited attributes is fairly straightforward, but requires a good amount of thought at design time even for simple applications. -<<<<<<< objects.html -Hooking into the OpenACS 5.6.0 object system brings the application developer ->>>>>>> 1.50 numerous benefits, and doing it involves only four easy steps: @@ -429,8 +394,4 @@ especially true for the
context_id
field.-<<<<<<< objects.html
($Id$)View comments on this page at openacs.org -======= -($Id$)View comments on this page at openacs.org ->>>>>>> 1.50 Index: openacs-4/packages/acs-core-docs/www/openacs-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs-overview.html,v diff -u -r1.26.2.1 -r1.26.2.2 --- openacs-4/packages/acs-core-docs/www/openacs-overview.html 12 Dec 2010 00:07:02 -0000 1.26.2.1 +++ openacs-4/packages/acs-core-docs/www/openacs-overview.html 12 Dec 2010 01:37:24 -0000 1.26.2.2 @@ -1,5 +1,5 @@ -Overview +
Overview OpenACS (Open Architecture Community System) is an advanced toolkit for building scalable, community-oriented web applications. If you're thinking of building an @@ -49,4 +49,4 @@ can help you in your endeavors with the system. Visit our web site and feel free to ask questions or provide feedback. -
Prev Home Next Chapter 1. High level information: What is OpenACS? Up OpenACS Release Notes
docs@openacs.orgView comments on this page at openacs.org +
Prev Home Next Chapter 1. High level information: What is OpenACS? Up Part II. Administrator's Guide
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/openacs.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/openacs.html 12 Dec 2010 01:37:24 -0000 1.47.2.3 @@ -1,10 +1,5 @@ -<<<<<<< openacs.html - -Install OpenACS 5.6.0 by Vinod Kurup
-=======Install OpenACS 5.6.0 by Vinod Kurup
->>>>>>> 1.49 OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.@@ -57,7 +52,7 @@ [root root]# mkdir /var/lib/aolserver chgrp web /var/lib/aolserver -chmod 770 /var/lib/aolserver
A bash script is available to automate all of the steps for the rest of this section. It requires tclwebtest. The automated script can greatly accelerate the install process, but is very sensitive to the install environment. We recommend that you run the automated install and, if it does not work the first time, consider switching to a manual installation.
Get the install script from CVS. It is located within +chmod 770 /var/lib/aolserver
A bash script is available to automate all of the steps for the rest of this section. It requires tclwebtest. The automated script can greatly accelerate the install process, but is very sensitive to the install environment. We recommend that you run the automated install and, if it does not work the first time, consider switching to a manual installation.
Get the install script from CVS. It is located within the main cvs tree, at /etc/install. Use anonymous CVS checkout to get that directory in the home directory of the service's dedicated user. We put it there so that it is not @@ -89,16 +84,6 @@ to the
/var/tmp
directory. If not, download the OpenACS tarball and save it in -<<<<<<< openacs.html - /var/tmp and proceed:
Unpack the OpenACS tarball and rename it to $OPENACS_SERVICE_NAME. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.
FreeBSD note: Change the period in chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME to a colon: chown -R $OPENACS_SERVICE_NAME:$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME -
[root root]# su - $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver -[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /var/tmp/openacs-5.6.0.tgz -[$OPENACS_SERVICE_NAME aolserver]$ mv openacs-5.6.0 $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME aolserver]$ ls -al -=======/var/tmp
and proceed:
Unpack the OpenACS tarball and rename it to
$OPENACS_SERVICE_NAME
. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.FreeBSD note: Change the period in
chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME
to a colon:chown -R $OPENACS_SERVICE_NAME:$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME
[root root]#su - $OPENACS_SERVICE_NAME
[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cd /var/lib/aolserver
@@ -107,7 +92,6 @@ [$OPENACS_SERVICE_NAME aolserver]$chmod -R 775 $OPENACS_SERVICE_NAME
[$OPENACS_SERVICE_NAME aolserver]$chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME
[$OPENACS_SERVICE_NAME aolserver]$ls -al
->>>>>>> 1.49 total 3 drwxrwx--- 3 root web 1024 Mar 29 16:41 . drwxr-xr-x 25 root root 1024 Mar 29 16:24 .. @@ -121,11 +105,7 @@ mv openacs-5.6.0 $OPENACS_SERVICE_NAME chmod -R 755 $OPENACS_SERVICE_NAME chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME -<<<<<<< openacs.html -exitAdd the Service to CVS (OPTIONAL)
Prepare the database
Prepare Oracle for OpenACS. If you won't be using Oracle, skip to Prepare PostgreSQL for an OpenACS Service
-======= exit
Add the Service to CVS (OPTIONAL)
Prepare the database
Prepare Oracle for OpenACS. If you won't be using Oracle, skip to Prepare PostgreSQL for an OpenACS Service
->>>>>>> 1.49 You should be sure that your user account (e.g.
$OPENACS_SERVICE_NAME
) is in thedba
group. @@ -258,33 +238,22 @@ CREATE DATABASE [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ su - $OPENACS_SERVICE_NAME -<<<<<<< openacs.html -/usr/local/pgsql/bin/createdb -E UNICODE $OPENACS_SERVICE_NAMEAutomate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.
[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ export EDITOR=emacs;crontab -eAdd these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day, and every (*) day of month, month, and day of week. Type man 5 crontab for more information.
0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze $OPENACS_SERVICE_NAME -======= -/usr/local/pgsql/bin/createdb -E UNICODE $OPENACS_SERVICE_NAMEAutomate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended:
VACUUM ANALYZE
every hour andVACUUM FULL ANALYZE
every day.[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$export EDITOR=emacs;crontab -e
Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day, and every (*) day of month, month, and day of week. Type
man 5 crontab
for more information.0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze $OPENACS_SERVICE_NAME ->>>>>>> 1.49 +/usr/local/pgsql/bin/createdb -E UNICODE $OPENACS_SERVICE_NAMEAutomate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended:
VACUUM ANALYZE
every hour andVACUUM FULL ANALYZE
every day.[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$export EDITOR=emacs;crontab -e
Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day, and every (*) day of month, month, and day of week. Type
man 5 crontab
for more information.0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze $OPENACS_SERVICE_NAME 0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze $OPENACS_SERVICE_NAMEDepending on your distribution, you may receive email when the crontab items are executed. If you don't want to receive email for those crontab items, you can add
> /dev/null 2>&1
to the end of each crontab - lineAdd Full Text Search Support (OPTIONAL)
At this point the database should be ready for installing OpenACS.
Configure an AOLserver Service for OpenACS.
Add Full Text Search Support (OPTIONAL)
At this point the database should be ready for installing OpenACS.
Configure an AOLserver Service for OpenACS.
The AOLserver architecture lets you run an arbitrary number of virtual servers. A virtual server is an HTTP service running on a specific port, e.g. port 80. In order for OpenACS to work, you need to configure a virtual server. The Reference Platform uses a configuration file included in the OpenACS tarball, -<<<<<<< openacs.html - /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl. - Open it in an editor to adjust the parameters.
[root root]# su - $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc -[$OPENACS_SERVICE_NAME etc]$ emacs config.tcl -=======/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl
. - Open it in an editor to adjust the parameters.[root root]#su - $OPENACS_SERVICE_NAME
+ Open it in an editor to adjust the parameters.[root root]#su - $OPENACS_SERVICE_NAME
[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc
[$OPENACS_SERVICE_NAME etc]$emacs config.tcl
->>>>>>> 1.49You can continue without changing any values in the file. However, if you don't change
address
to match the computer's ip address, you won't be able to browse to your server from other machines.
httpport - If you want your @@ -306,7 +275,7 @@ AOLserver is very configurable. These settings should get you started, but for more options, read the AOLserver docs. -
Enable OpenFTS Full Text Search (OPTIONAL)
Enable OpenFTS Full Text Search (OPTIONAL)
Install nsopenssl for SSL support. (OPTIONAL)
Verify AOLserver startup.
Kill any current running AOLserver processes and start a new one. The recommended way to start an AOLserver process is by running the included script,
/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run
. If you are not using the default file paths and names, you will need to editrun
.If you want to use port 80, there are complications. AOLserver must be root to use system ports such as @@ -323,15 +292,9 @@ nsd: no process killed [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
/usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl
[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: starting to read config file... -<<<<<<< openacs.html -[08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: finished reading config file.- Attempt to connect to the service from a web browser. You should specify a URL like: http://yourserver.test:8000
- You should see a page that looks like this. If you imported your files into -======= [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: finished reading config file.
Attempt to connect to the service from a web browser. You should specify a URL like:
http://yourserver.test:8000
You should see a page that looks like this. If you imported your files into ->>>>>>> 1.49 cvs, now that you know it worked you can erase the temp directory with
rm -rf /var/lib/aolserver/$OPENACS_SERVICE_NAME.orig
.@@ -349,13 +312,8 @@ AOLserver keepalive (OPTIONAL)
Configure a Service with the OpenACS Installer. Now that you've got AOLserver up and running, let's install OpenACS -<<<<<<< openacs.html 5.6.0. -
-======= - 5.6.0.
->>>>>>> 1.49 You should see a page from the webserver titled
OpenACS Installation: Welcome
. You will be warned if your version of @@ -410,27 +368,14 @@ Give the server a few minutes to start up. Then reload the final page above. You should see the front page, with an area to login near the upper right. Congratulations, OpenACS -<<<<<<< openacs.html 5.6.0 is now up and running! -If you want to track fresh code developments inbetween releases, or you are an OpenACS core developer, you may want to install from CVS. This is identical to Option 2 except that you get the files from CVS instead of the tarball: CVS Checkout Instructions. So, instead of tar xzf /var/tmp/openacs-5.6.0.tgz, cvs -z3 -d :pserver:anonymous@openacs.org:/cvsroot co acs-core.
Use daemontools supervise and svc, or inittab, to automate server startup and shutdown.
Install Full Text Search (OPTIONAL). If you have installed OpenFTS and enabled - OpenFTS, you can now install the OpenFTS Driver package and - Full Text Search Engine package in the OpenACS service.
This is a good time to make a backup of your service. If this is a - production site, you should set up automatic nightly backups.
If you want traffic reports, set up analog or another log - processing program.
Follow the instruction on the home page to -======= - 5.6.0 is now up and running! -
If you want to track fresh code developments inbetween releases, or you are an OpenACS core developer, you may want to install from CVS. This is identical to Option 2 except that you get the files from CVS instead of the tarball: CVS Checkout Instructions. So, instead of
,
tar xzf /var/tmp/openacs-5.6.0.tgz
.
cvs -z3 -d :pserver:anonymous@openacs.org:/cvsroot co acs-core
Use daemontools
supervise
andsvc
, orinittab
, to automate server startup and shutdown.Install Full Text Search (OPTIONAL). If you have installed OpenFTS and enabled - OpenFTS, you can now install the OpenFTS Driver package and - Full Text Search Engine package in the OpenACS service.
This is a good time to make a backup of your service. If this is a - production site, you should set up automatic nightly backups.
If you want traffic reports, set up analog or another log +
If you want to track fresh code developments inbetween releases, or you are an OpenACS core developer, you may want to install from CVS. This is identical to Option 2 except that you get the files from CVS instead of the tarball: CVS Checkout Instructions. So, instead of
,
tar xzf /var/tmp/openacs-5.6.0.tgz
.
cvs -z3 -d :pserver:anonymous@openacs.org:/cvsroot co acs-core
Use daemontools
supervise
andsvc
, orinittab
, to automate server startup and shutdown.Install Full Text Search (OPTIONAL). If you have installed OpenFTS and enabled + OpenFTS, you can now install the OpenFTS Driver package and + Full Text Search Engine package in the OpenACS service.
This is a good time to make a backup of your service. If this is a + production site, you should set up automatic nightly backups.
If you want traffic reports, set up analog or another log processing program.
Follow the instruction on the home page to ->>>>>>> 1.49 change the appearance of your service or add more -<<<<<<< openacs.html - packages. (more information)
Proceed to the tutorial to learn how to develop your own packages.
Set up database environment variables for the site -======= - packages. (more information)
Proceed to the tutorial to learn how to develop your own packages.
Set up database environment variables for the site ->>>>>>> 1.49 + packages. (more information)
Proceed to the tutorial to learn how to develop your own packages.
Set up database environment variables for the site user. Depending on how you installed Oracle or PostGreSQL, these settings may be necessary for working with the database while logged in as the service user. They do not directly affect the service's run-time connection with the @@ -462,8 +407,4 @@ LD_LIBRARY_PATH=/ora8/m01/app/oracle/product/8.1.7/lib:/lib:/usr/lib ORACLE_SID=ora8 ORACLE_TERM=vt100 -<<<<<<< openacs.html -ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
Test your backup and recovery procedure.
($Id$)View comments on this page at openacs.org -======= -ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/dataTest your backup and recovery procedure.
Set up External uptime validation.
($Id$)View comments on this page at openacs.org ->>>>>>> 1.49 +ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/dataTest your backup and recovery procedure.
Set up External uptime validation.
($Id$)View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/oracle.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/oracle.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/oracle.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/oracle.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -5,11 +5,7 @@If you are installing PostGreSQL instead of Oracle, skip this section.
-<<<<<<< oracle.html - OpenACS 5.6.0 will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues. See Andrew Piskorski's Oracle 9i notes for guidance. -======= OpenACS 5.6.0 will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues. See Andrew Piskorski's Oracle 9i notes for guidance. ->>>>>>> 1.47
This installation guide attempts to present all of the information necessary to complete an OpenACS installation. We try hard to make all of the steps possible in one pass, rather than having a step which amounts to "go away and develop a profound understanding of software X and then come back and, in 99% of all cases, type these two lines." The exception to our rule is Oracle production systems. This page describes a set of steps to get a working Oracle development server, but it is unsuitable for production systems. If you will be using OpenACS on Oracle in a production environment, you will experience many problems unless you develop a basic understanding of Oracle which is outside the scope of this document. T
@@ -1239,14 +1235,7 @@ For more information on Oracle, please consult the documentation.
We used the following defaults while installing Oracle.
Variable Value Reason ORACLE_HOME /ora8/m01/app/oracle/product/8.1.7 This is the default Oracle installation directory. ORACLE_SERVICE ora8 The service name is a domain-qualified identifier for your Oracle server. ORACLE_SID ora8 This is an identifier for your Oracle server. ORACLE_OWNER oracle The user who owns all of the oracle files. ORACLE_GROUP dba The special oracle group. Users in the dba group are -<<<<<<< oracle.html - authorized to do a connect - internal within - svrmgrl to gain full system - access to the Oracle system. ($Id$)
Prev Home Next Install a Unix-like system and supporting software Up Install PostgreSQL
docs@openacs.orgView comments on this page at openacs.org -======= authorized to do aconnect internal
withinsvrmgrl
to gain full system access to the Oracle system.($Id$)
Prev Home Next Install a Unix-like system and supporting software Up Install PostgreSQL
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/os-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/os-install.html,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/acs-core-docs/www/os-install.html 12 Dec 2010 00:07:02 -0000 1.14.2.1 +++ openacs-4/packages/acs-core-docs/www/os-install.html 12 Dec 2010 01:37:25 -0000 1.14.2.2 @@ -1,5 +1,5 @@ -Linux Install Guides +
Linux Install Guides Here's a list of some helpful documentation for various OS's
Painless Debian Index: openacs-4/packages/acs-core-docs/www/os-security.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/os-security.html,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/acs-core-docs/www/os-security.html 12 Dec 2010 00:07:02 -0000 1.14.2.1 +++ openacs-4/packages/acs-core-docs/www/os-security.html 12 Dec 2010 01:37:25 -0000 1.14.2.2 @@ -1,5 +1,5 @@ -
Security Information +
Security Information Once you get your OS installed, it's imperative that you secure your installation. As Jon Griffin repeatedly warns us, "No distribution is secure out of the box." The Reference Platform implements Index: openacs-4/packages/acs-core-docs/www/packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/packages.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/packages.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/packages.html 12 Dec 2010 01:37:25 -0000 1.47.2.3 @@ -1,10 +1,5 @@ -<<<<<<< packages.html - -
OpenACS Packages By Pete Su and Bryan Quinn
-======= -OpenACS Packages By Pete Su and Bryan Quinn
->>>>>>> 1.49 +OpenACS Packages By Pete Su and Bryan Quinn
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Here is how an OpenACS 5 server is laid out starting from the Server root (ROOT): -<<<<<<< packages.html -
Figure 11.1. Server file layout diagram
-======= -Figure 10.1. Server file layout diagram
->>>>>>> 1.49 +Figure 11.1. Server file layout diagram
ROOT/ bin/ Various executables and scripts for server maintanence. @@ -59,13 +50,8 @@To illustrate the general structure of a package, let's see what the -<<<<<<< packages.html - package for the "notes" application should look like. -
Figure 11.2. Package file layout diagram
-======= package for the "notes" application should look like. -Figure 10.2. Package file layout diagram
->>>>>>> 1.49 +Figure 11.2. Package file layout diagram
ROOT/ +-- packages/ APM Root | @@ -138,11 +124,7 @@ directories. This makes it suitable for storing icons, css files, javascript, and other static content which can be treated this way. -<<<<<<< packages.html -Table 11.1. Package files
File Type Its Use Naming Convention Package Specification File The package specification file is an XML file generated and -======= - Table 10.1. Package files
File Type Its Use Naming Convention Package Specification File The package specification file is an XML file generated and ->>>>>>> 1.49 + Table 11.1. Package files
File Type Its Use Naming Convention Package Specification File The package specification file is an XML file generated and maintained by the OpenACS Package Manager (APM). It specifies information about the package including its parameters and its files. notes.info
Data Model Creation Script @@ -367,11 +349,7 @@ this point, you should add your package files to your CVS repository. I'll assume that you have set up your development repository according to the standards described in -<<<<<<< packages.html - this appendix. If so, then you just do this: -======= this appendix. If so, then you just do this: ->>>>>>> 1.49 % cd ROOT/packages % cvs add notes % cd notes @@ -383,13 +361,8 @@ % cvs commit -m "add new package for notes"Now you can start developing the package. In addition to writing code, -<<<<<<< packages.html - you should also consider the tasks outlined in the package development tutorial. -
-======= you should also consider the tasks outlined in the package development tutorial.
->>>>>>> 1.49 At this point, you are probably excited to see your new package in action. But, we haven't added any user visible pages yet. By convention, user visible pages go in the @@ -416,11 +389,7 @@ of many indedendent applications that actually run on a single shared code base. The request-processor document shows you how OpenACS figures out which instance of your application was -<<<<<<< packages.html - requested by the user at any given time. The page development tutorial shows you how to use this -======= requested by the user at any given time. The page development tutorial shows you how to use this ->>>>>>> 1.49 information in your user interface.
In order to make the new
notes
application visible to @@ -442,13 +411,8 @@ yet written Notes application at various places in the site. In a later document, we'll see how to write your application so that the code can detect from what URL it was invoked. This is the key -<<<<<<< packages.html - to supporting subsites. --======= to supporting subsites.
->>>>>>> 1.49 The APM performs the following tasks in an OpenACS site:
Manages creation, installation, and removal of packages from the @@ -463,8 +427,4 @@
Writes out package distribution files for other people to download and install. We'll cover this later. -<<<<<<< packages.html -
($Id$)
Prev Home Next Chapter 11. Development Reference Up OpenACS Data Models and the Object System
docs@openacs.orgView comments on this page at openacs.org -======= -($Id$)
Prev Home Next Chapter 10. Development Reference Up OpenACS Data Models and the Object System
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.49 +($Id$)
Prev Home Next Chapter 11. Development Reference Up OpenACS Data Models and the Object System
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/parties.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/parties.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/parties.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/parties.html 12 Dec 2010 01:37:25 -0000 1.47.2.3 @@ -1,10 +1,5 @@ -<<<<<<< parties.html - -Parties in OpenACS -======= -Parties in OpenACS ->>>>>>> 1.49 +Parties in OpenACS OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.While many applications must deal with individuals and many applications @@ -350,8 +345,4 @@ single integer primary key in what could be thought of as a pure relation. Because a membership relation is an ordinary acs object with object identity, it is as easy to extend the membership relation to store extra information as it is to extend the users -<<<<<<< parties.html table or the groups table.
($Id$)
Prev Home Next Writing OpenACS Application Pages Up OpenACS Permissions Tediously Explained
docs@openacs.orgView comments on this page at openacs.org -======= -table or the groups table.($Id$)View comments on this page at openacs.org ->>>>>>> 1.49 Index: openacs-4/packages/acs-core-docs/www/permissions-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-design.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/permissions-design.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/permissions-design.html 12 Dec 2010 01:37:25 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< permissions-design.html - -Permissions Design By John Prevost and Rafael H. Schloming
-======= -Permissions Design By John Prevost and Rafael H. Schloming
->>>>>>> 1.32 +Permissions Design By John Prevost and Rafael H. Schloming
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
Tcl in
packages/acs-kernel
Index: openacs-4/packages/acs-core-docs/www/permissions-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-requirements.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/permissions-requirements.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/permissions-requirements.html 12 Dec 2010 01:37:25 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< permissions-requirements.html - -
Permissions Requirements By John McClary Prevost
-======= -Permissions Requirements By John McClary Prevost
->>>>>>> 1.32 +Permissions Requirements By John McClary Prevost
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.This document records requirements for the OpenACS 4 Permissions system, a @@ -91,12 +86,6 @@ current user has access to should not be much slower than the
SELECT
on its own.120.0 Ease of Use
Since most SQL queries will contain an allowed target check in the where clause, whatever mechanism is used to make checks in SQL should be fairly -<<<<<<< permissions-requirements.html -small and simple.
In particular, constraining a SELECT to return only rows the -current user has access to should not add more than one line to a query.
Document Revision # Action Taken, Notes When? By Whom? 0.1 Creation 8/17/2000 John Prevost 0.2 Revised, updated with new terminology 8/25/2000 John Prevost 0.3 Edited, reformatted to conform to requirements template, pending -freeze. 8/26/2000 Kai Wu 0.4 Edited for ACS 4 Beta release. 10/03/2000 Kai Wu View comments on this page at openacs.org -======= small and simple.In particular, constraining a
SELECT
to return only rows the current user has access to should not add more than one line to a query.View comments on this page at openacs.org ->>>>>>> 1.32 Index: openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html,v diff -u -r1.43.2.1 -r1.43.2.2 --- openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 18 Jun 2010 21:29:35 -0000 1.43.2.1 +++ openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 12 Dec 2010 01:37:25 -0000 1.43.2.2 @@ -1,29 +1,29 @@ - -OpenACS Permissions Tediously Explained + +
OpenACS Permissions Tediously Explained by Vadim Nasardinov. Modified and converted to Docbook XML by Roberto Mello -
The code has been modified since this document was written so it is now out of date. See this forum thread.
Who - (grantee_id) can do what - (privilege) on which object - (object_id). -
+
The code has been modified since this document was written so it is now out of date. See this forum thread.
Who + (
grantee_id
) can do what + (privilege
) on which object + (object_id
). +The general permissions system has a flexible (and relatively complex) data model in OpenACS. Developers who have not had the time to learn the internals of the data model may end up writing seemingly correct code that crashes their system in weird ways. This writeup is the result of my running into such a piece of code and trying to understand exactly what went wrong. It is geared towards developers who understand the general permissions system to the extent that is described in the - + Groups, Context, Permissions documentation, but who have not had the opportunity to take a long, careful look at the system internals.
In OpenACS, most of the interesting tables are expected to extend (subtype) - the acs_objects table, i.e. they are expected to have an integer - primary key column that references the object_id column of - acs_objects. + the
acs_objects
table, i.e. they are expected to have an integer + primary key column that references theobject_id
column of +acs_objects
.-create table acs_objects ( +create table acs_objects ( object_id integer not null constraint acs_objects_pk primary key, @@ -47,50 +47,50 @@ );This means that items that want to use the features of the - OpenACS object system needs to have an entry in the acs_objects. This + OpenACS object system needs to have an entry in the
acs_objects
. This allows developers to define relationships between any two entities A and B by defining a relationship between their corresponding entries - in the acs_objects table. One of the applications of this + in theacs_objects
table. One of the applications of this powerful capability is the general permissions system.- At the heart of the permission system are two tables: acs_privileges - and acs_permissions. + At the heart of the permission system are two tables:
acs_privileges
+ andacs_permissions
.- create table acs_privileges ( + create table acs_privileges ( privilege varchar2(100) not null constraint acs_privileges_pk primary key, pretty_name varchar2(100), pretty_plural varchar2(100) );- create table acs_permissions ( + create table acs_permissions ( object_id not null - constraint acs_permissions_on_what_id_fk references acs_objects (object_id), + constraint acs_permissions_on_what_id_fk references acs_objects (object_id), grantee_id not null - constraint acs_permissions_grantee_id_fk references parties (party_id), + constraint acs_permissions_grantee_id_fk references parties (party_id), privilege not null - constraint acs_permissions_priv_fk references acs_privileges (privilege), + constraint acs_permissions_priv_fk references acs_privileges (privilege), constraint acs_permissions_pk primary key (object_id, grantee_id, privilege) );- The acs_privileges table stores + The
acs_privileges
table stores named privileges like read, write, delete, create, and - admin. The acs_permissions + admin. Theacs_permissions
table stores assertions of the form:- Who (grantee_id) can do what (privilege) - on which object (object_id). + Who (
grantee_id
) can do what (privilege
) + on which object (object_id
).The micromanaging approach to system security would be to require application developers to store permission information explicitly about every object, i.e. if the system has 100,000 and 1,000 users who have the read privilege on all objects, then we would need to store 100,000,000 entries of the form: -
object_id grantee_id privilege object_id_1 user_id_1 'read' object_id_1 user_id_2 'read' ... object_id_1 user_id_n 'read' object_id_2 user_id_1 'read' object_id_2 user_id_2 'read' ... object_id_2 user_id_n 'read' ... ... object_id_m user_id_1 'read' object_id_m user_id_2 'read' ... object_id_m user_id_n 'read' +
object_id grantee_id privilege object_id_1 user_id_1 'read' object_id_1 user_id_2 'read' ... object_id_1 user_id_n 'read' object_id_2 user_id_1 'read' object_id_2 user_id_2 'read' ... object_id_2 user_id_n 'read' ... ... object_id_m user_id_1 'read' object_id_m user_id_2 'read' ... object_id_m user_id_n 'read' Although quite feasible, this approach fails to take advantage of the fact that objects in the system are commonly organized hierarchally, and permissions usually follow the hierarchical structure, so that if user @@ -102,42 +102,60 @@ necessity to explicitly maintain security information for every single object. There are three kinds of hierarchies involved. These are discussed in the following sections. -
Suppose objects A, B, ..., and F form the following hierarchy. -
Table 11.2. Context Hierarchy Example
A - object_id=10 -
B - object_id=20 -
C - object_id=30 -
D - object_id=40 -
E - object_id=50 -
F - object_id=60 -
+
Table 11.2. Context Hierarchy Example
+ A + +
+object_id=10
++ B + +
+object_id=20
++ C + +
+object_id=30
++ D + +
+object_id=40
++ E + +
+object_id=50
++ F + +
+object_id=60
+This can be represented in the - acs_objects table + acs_objects table by the following entries: -
+
The first entry tells us that object 20 is the descendant of object 10, and the third entry shows that object 40 is the descendant of object 20. By - running a CONNECT BY query, + running a CONNECT BY query, we can compute that object 40 is the second-generation descendant of object 10. With this in mind, if we want to record the fact that user Joe has the read privilege on objects A, ..., F, we only need to record one entry in the - acs_permissions table. -
object grantee privilege A Joe read + acs_permissions table. +
object grantee privilege A Joe read The fact that Joe can also read B, C, ..., and F can be derived by ascertaining that these objects are children of A by traversing the context hierarchy. As it turns out, hierarchical queries are expensive. As Rafael Schloming put it so aptly, Oracle can't deal with hierarchies for shit.
One way to solve this problem is to cache a flattened view of the context tree like so: -
object ancestor n_generations A A 0 B B 0 B A 1 C C 0 C A 1 D D 0 D B 1 D A 2 E E 0 E B 1 E A 2 F F 0 F C 1 F A 2 +
object ancestor n_generations A A 0 B B 0 B A 1 C C 0 C A 1 D D 0 D B 1 D A 2 E E 0 E B 1 E A 2 F F 0 F C 1 F A 2 Note that the number of entries in the flattened view grows exponentially with respect to the depth of the context tree. For instance, if you have a fully populated binary tree with a depth of n, then the number of entries @@ -147,15 +165,15 @@ Despite its potentially great storage costs, maintaining a flattened representation of the context tree is exactly what OpenACS does. The flattened context tree is stored in the - acs_object_context_index table. +
acs_object_context_index
table.- create table acs_object_context_index ( + create table acs_object_context_index ( object_id not null - constraint acs_obj_context_idx_obj_id_fk references acs_objects (object_id), + constraint acs_obj_context_idx_obj_id_fk references acs_objects (object_id), ancestor_id not null - constraint acs_obj_context_idx_anc_id_fk references acs_objects (object_id), + constraint acs_obj_context_idx_anc_id_fk references acs_objects (object_id), n_generations integer not null constraint acs_obj_context_idx_n_gen_ck check (n_generations >= 0), @@ -164,75 +182,87 @@ ) organization index;A few things to note about this table are these. Number one, it is - an index-organized + an index-organized table, which means it is substantially optimized for access by primary key. Number two, as the above computations suggest, the size of the table - grows polynomially + grows polynomially with respect to the average number of descendants that an object - has, and exponentially + has, and exponentially with respect to the depth of the context tree.
- The acs_object_context_index is kept in sync with the - acs_objects + The
acs_object_context_index
is kept in sync with the + acs_objects table by triggers like this:create or replace trigger acs_objects_context_id_in_tr -after insert on acs_objects +after insert on acs_objects for each row begin - insert into acs_object_context_index + insert into acs_object_context_index (object_id, ancestor_id, n_generations) values (:new.object_id, :new.object_id, 0); if :new.context_id is not null and :new.security_inherit_p = 't' then - insert into acs_object_context_index + insert into acs_object_context_index (object_id, ancestor_id, n_generations) select :new.object_id as object_id, ancestor_id, n_generations + 1 as n_generations - from acs_object_context_index + from acs_object_context_index where object_id = :new.context_id; elsif :new.object_id != 0 then -- 0 is the id of the security context root object - insert into acs_object_context_index + insert into acs_object_context_index (object_id, ancestor_id, n_generations) values (:new.object_id, 0, 1); end if; end;One final note about - acs_objects. By setting - an object's security_inherit_p column to 'f', you can stop permissions + acs_objects. By setting + an object's
security_inherit_p
column to 'f', you can stop permissions from cascading down the context tree. In the following example, Joe does not have the read permissions on C and F. -
+
-A
-object_id=10
+
+
+A
+object_id=10
readable by Joe
- +
-B
-object_id=20
++
+B
+object_id=20
readable by Joe
- +
-C
-object_id=30
++
+C
+object_id=30
security_inherit_p = 'f'
not readable by Joe
-
-D
-object_id=40
-
-E
-object_id=50
- +
-F
-object_id=60
++ +
+D
+object_id=40
++ +
+E
+object_id=50
++
+F
+object_id=60
security_inherit_p = 'f'
not readable by Joe
-Privileges are also organized hierarchically. In addition to the five main system privileges defined in the ACS Kernel data model, application developers may define their own. Note, @@ -246,42 +276,42 @@ privileges on an object, it is sufficient to grant the user the admin privilege to which the first four privileges are tied. Privileges are structured as follows. -
admin create delete read write - Note that admin privileges are +
admin create delete read write + Note that
admin
privileges are greater than read, write, create and delete privileges combined. Issuing someone read, write, create and delete privileges will not result in the person getting - admin privileges.The parent-child relationship between privileges is represented in - the acs_privilege_hierarchy table: +
admin
privileges.The parent-child relationship between privileges is represented in + the
acs_privilege_hierarchy
table:- create table acs_privilege_hierarchy ( + create table acs_privilege_hierarchy ( privilege not null - constraint acs_priv_hier_priv_fk references acs_privileges (privilege), + constraint acs_priv_hier_priv_fk references acs_privileges (privilege), child_privilege not null - constraint acs_priv_hier_child_priv_fk references acs_privileges (privilege), + constraint acs_priv_hier_child_priv_fk references acs_privileges (privilege), constraint acs_privilege_hierarchy_pk primary key (privilege, child_privilege) );As in the case of the context hierarchy, it is convenient to have a flattened representation of this hierarchal structure. This is accomplished by defining the following view.
- create or replace view acs_privilege_descendant_map + create or replace view acs_privilege_descendant_map as select p1.privilege, p2.privilege as descendant from - acs_privileges p1, - acs_privileges p2 + acs_privileges p1, + acs_privileges p2 where p2.privilege in (select child_privilege from - acs_privilege_hierarchy + acs_privilege_hierarchy start with privilege = p1.privilege connect by @@ -293,51 +323,59 @@ reasonably small, there is no pressing need to cache the flattened ansector-descendant view of the privilege hierarchy in a specially maintained table like it is done in the case of the context hierarchy. -Now for the third hierarchy playing a promiment role in the permission system. The party data model is set up as follows. -
- create table parties ( ++ create table parties ( party_id not null - constraint parties_party_id_fk references acs_objects (object_id) + constraint parties_party_id_fk references acs_objects (object_id) constraint parties_pk primary key, email varchar2(100) constraint parties_email_un unique, url varchar2(200) );- create table persons ( + create table persons ( person_id not null - constraint persons_person_id_fk references parties (party_id) + constraint persons_person_id_fk references parties (party_id) constraint persons_pk primary key, first_names varchar2(100) not null, last_name varchar2(100) not null );- create table users ( + create table users ( user_id not null - constraint users_user_id_fk references persons (person_id) + constraint users_user_id_fk references persons (person_id) constraint users_pk primary key, password char(40), -- other attributes );- create table groups ( + create table groups ( group_id not null - constraint groups_group_id_fk references parties (party_id) + constraint groups_group_id_fk references parties (party_id) constraint groups_pk primary key, group_name varchar2(100) not null );- Recall that the grantee_id column of the - acs_permissions table references - parties.party_id. + Recall that the
grantee_id
column of the + acs_permissions table references +parties.party_id
. This means that you can grant a privilege on an object to a party, person, user, or group. Groups represent aggregations of parties. The most common scenario that you are likely to encounter is a group that is a collection of users, although you could also @@ -348,39 +386,45 @@ a group named Pranksters, you can assign membership to Pete, Poly, and Penelope. The fact that these users are members of the Pranksters group will be recorded in the - membership_rels and acs_rels tables: +membership_rels
andacs_rels
tables:- create table acs_rels ( + create table acs_rels ( rel_id not null - constraint acs_rels_rel_id_fk references acs_objects (object_id) + constraint acs_rels_rel_id_fk references acs_objects (object_id) constraint acs_rels_pk primary key, rel_type not null constraint acs_rels_rel_type_fk references acs_rel_types (rel_type), object_id_one not null - constraint acs_object_rels_one_fk references acs_objects (object_id), + constraint acs_object_rels_one_fk references acs_objects (object_id), object_id_two not null - constraint acs_object_rels_two_fk references acs_objects (object_id), + constraint acs_object_rels_two_fk references acs_objects (object_id), constraint acs_object_rels_un unique (rel_type, object_id_one, object_id_two) );- create table membership_rels ( + create table membership_rels ( rel_id - constraint membership_rel_rel_id_fk references acs_rels (rel_id) + constraint membership_rel_rel_id_fk references acs_rels (rel_id) constraint membership_rel_rel_id_pk primary key, -- null means waiting for admin approval member_state varchar2(20) constraint membership_rel_mem_ck check (member_state in ('approved', 'banned', 'rejected', 'deleted')) );- The acs_rels + The acs_rels table entries would look like so: -
rel_type object_one object_two +
+ rel_type
++ object_one
++ object_two
+membership_rel Pranksters @@ -398,28 +442,34 @@ Pranksters Penelope - Read acs_rels: right-side is a +
Read
acs_rels
: right-side is a subset of left-side, ie - object2 is a part of - object1. +object2
is a part of +object1
.Another way of building up groups is by adding subgroups. Suppose we define Merry Pranksters and Sad Pranksters as subgroups of Pranksters. We say that the Pranksters group - is composed of + is composed of groups Merry Pranksters and Sad Pranksters. This - information is stored in the acs_rels - and composition_rels tables. + information is stored in the acs_rels + and
composition_rels
tables.-create table composition_rels ( +create table composition_rels ( rel_id - constraint composition_rels_rel_id_fk references acs_rels (rel_id) + constraint composition_rels_rel_id_fk references acs_rels (rel_id) constraint composition_rels_rel_id_pk primary key );The relevant entries in the - acs_rels look like so. -
rel_type object_one object_two + acs_rels look like so. +
+ rel_type
++ object_one
++ object_two
+composition_rel Pranksters @@ -444,58 +494,58 @@ of G3. Traversing the group composition hierarchy requires running - hierarchical queries, + hierarchical queries, which are expensive in Oracle. As we saw in the Context Hierarchy section, one way of reducing the performance hit incurred by hierarchical queries is to cache query results in a table maintained by triggers. The OpenACS data model defines two such tables:
- create table group_component_index ( + create table group_component_index ( group_id not null constraint group_comp_index_group_id_fk - references groups (group_id), + references groups (group_id), component_id not null constraint group_comp_index_comp_id_fk - references groups (group_id), + references groups (group_id), rel_id not null constraint group_comp_index_rel_id_fk references composition_rels (rel_id), container_id not null constraint group_comp_index_cont_id_ck - references groups (group_id), + references groups (group_id), constraint group_component_index_ck check (group_id != component_id), constraint group_component_index_pk primary key (group_id, component_id, rel_id) ) organization index;- create table group_member_index ( + create table group_member_index ( group_id not null - constraint group_member_index_grp_id_fk references groups (group_id), + constraint group_member_index_grp_id_fk references groups (group_id), member_id not null - constraint group_member_index_mem_id_fk references parties (party_id), + constraint group_member_index_mem_id_fk references parties (party_id), rel_id not null - constraint group_member_index_rel_id_fk references membership_rels (rel_id), + constraint group_member_index_rel_id_fk references membership_rels (rel_id), container_id not null - constraint group_member_index_cont_id_fk references groups (group_id), + constraint group_member_index_cont_id_fk references groups (group_id), constraint group_member_index_pk primary key (member_id, group_id, rel_id) ) organization index;- The group_component_index table stores a flattened representation of the - group composition hierarchy that is maintained in sync with the acs_rels - and composition_rels tables through triggers. -
additional comments
- As far as the group_member_index table goes, I am not sure I understand its + The
group_component_index
table stores a flattened representation of the + group composition hierarchy that is maintained in sync with the acs_rels + andcomposition_rels
tables through triggers. +additional comments
+ As far as the
group_member_index
table goes, I am not sure I understand its purpose. It maintains group-member relationships that are resolved with respect to group composition. Note that information stored in - group_member_index can be trivially derived by joining - membership_rels, - acs_rels, - and group_component_index. Here + group_member_index can be trivially derived by joining + membership_rels, + acs_rels, + and group_component_index. Here is a view that does it. (This view is not part of the OpenACS Kernel data model.)create or replace view group_member_view @@ -507,21 +557,21 @@ select group_id, group_id as component_id from - groups + groups union select group_id, component_id from group_component_index ) gci, - membership_rels mr, - acs_rels r + membership_rels mr, + acs_rels r where mr.rel_id = r.rel_id and r.object_id_one = gci.component_id;- A heuristic way to verify that group_member_view is essentially identical - to group_member_index is to compute the + A heuristic way to verify that
group_member_view
is essentially identical + to group_member_index is to compute the symmetric difference between the two:select @@ -530,34 +580,34 @@ ( select group_id, member_id from group_member_view minus - select group_id, member_id from group_member_index + select group_id, member_id from group_member_index ) union select group_id, member_id from ( - select group_id, member_id from group_member_index + select group_id, member_id from group_member_index minus select group_id, member_id from group_member_view )The query returns no rows. The important point is, if we have a flattened view of the composition hierarchy -- like one provided - by the group_component_index table -- + by the group_component_index table -- membership relationship resolution can be computed trivially with no hierarchical queries involved. There is no need to keep the view in a denormalized table, unless doing so results in substantial performance gains. -
- Security information is queried by calling the acs_permission.permission_p +
+ Security information is queried by calling the
acs_permission.permission_p
function in OpenACS. This is accessible from Tcl via the - permission::permission_p procedure. +permission::permission_p
procedure.create or replace package body acs_permission as -- some stuff removed for the sake of brevity - function permission_p ( + function permission_p ( object_id acs_objects.object_id%TYPE, party_id parties.party_id%TYPE, privilege acs_privileges.privilege%TYPE @@ -567,30 +617,30 @@ begin -- XXX This must be fixed: -1 shouldn't be hardcoded (it is the public) select decode(count(*),0,'f','t') into exists_p - from acs_object_party_privilege_map + from acs_object_party_privilege_map where object_id = permission_p.object_id and party_id in (permission_p.party_id, -1) and privilege = permission_p.privilege; return exists_p; end; end acs_permission; -problem avoidance
+
problem avoidance
The function queries - acs_object_party_privilege_map, + acs_object_party_privilege_map, which is a humongous view that joins three flattened hierarchies: the context tree, the privilege hierarchy, the party composition (and membership) hierarchy. It contains an extremely large number of rows. About the only kind of query you can run against it is the one - performed by the acs_permission.permission_p + performed by the
acs_permission.permission_p
function. Anything other than that would take forever to finish or would ultimately result in a query error.For example, do not try to do things like
select count(*) - from acs_object_party_privilege_map; + from acs_object_party_privilege_map;To give another example of things to avoid, I have seen code like this:
@@ -599,7 +649,7 @@ select object_id, party_id from - acs_object_party_privilege_map + acs_object_party_privilege_map where privilege = 'foo_create'; begin @@ -619,7 +669,7 @@ end; /- The acs_permission.revoke_permission function merely runs a + The
acs_permission.revoke_permission
function merely runs a delete statement like so:delete from @@ -629,9 +679,15 @@ and grantee_id = revoke_permission.grantee_id and privilege = revoke_permission.privilege;- Note that in the above example, acs_permissions had only + Note that in the above example,
acs_permissions
had only one entry that needed to be deleted: -
object_id grantee_id privilege +
+ object_id
++ grantee_id
++ privilege
+default_context registered_users @@ -640,17 +696,17 @@ The above script would never get around to deleting this entry because it had to loop through a gazillion rows in the humongous - acs_object_party_privilege_map view. -
+create or replace view acs_object_party_privilege_map as select ogpm.object_id, gmm.member_id as party_id, ogpm.privilege from - acs_object_grantee_priv_map ogpm, - group_member_map gmm + acs_object_grantee_priv_map ogpm, + group_member_map gmm where ogpm.grantee_id = gmm.group_id union @@ -659,49 +715,49 @@ grantee_id as party_id, privilege from - acs_object_grantee_priv_map; + acs_object_grantee_priv_map;-create or replace view acs_object_grantee_priv_map +create or replace view acs_object_grantee_priv_map as select a.object_id, a.grantee_id, m.descendant as privilege from - acs_permission_all a, - acs_privilege_descendant_map m + acs_permission_all a, + acs_privilege_descendant_map m where a.privilege = m.privilege;-create or replace view acs_permissions_all +create or replace view acs_permissions_all as select op.object_id, p.grantee_id, p.privilege from - acs_object_paths op, - acs_permissions p + acs_object_paths op, + acs_permissions p where op.ancestor_id = p.object_id;-create or replace view acs_object_paths +create or replace view acs_object_paths as select object_id, ancestor_id, n_generations from - acs_object_context_index; + acs_object_context_index;-create or replace view group_member_map +create or replace view group_member_map as select group_id, member_id, rel_id, container_id from - group_member_index; + group_member_index;View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/permissions.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions.html,v diff -u -r1.46.2.2 -r1.46.2.3 --- openacs-4/packages/acs-core-docs/www/permissions.html 12 Dec 2010 00:07:02 -0000 1.46.2.2 +++ openacs-4/packages/acs-core-docs/www/permissions.html 12 Dec 2010 01:37:25 -0000 1.46.2.3 @@ -1,19 +1,9 @@ -<<<<<<< permissions.html - -Groups, Context, Permissions By Pete Su
-======= -Groups, Context, Permissions By Pete Su
->>>>>>> 1.48 +Groups, Context, Permissions By Pete Su
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< permissions.html -The OpenACS 5.6.0 Permissions system allows developers and administrators to ->>>>>>> 1.48 set access control policies at the object level, that is, any application or system object represented by a row in the
acs_objects
table can be access-controlled via a @@ -30,13 +20,8 @@ together into larger security domains.The rest of this document discusses each of these parts, and how they fit together with the permissions system. -<<<<<<< permissions.html -
OpenACS 5.6.0 has an abstraction called a party. Parties have a recursive ->>>>>>> 1.48 definition. We can illustrate how it works with the following simplified data model. First, we define the
parties
table, where each party has an email address and a URL for contact @@ -89,7 +74,7 @@NOTE: Much more detailed information about the permissions system and how to use it is available in the - ??? document. + OpenACS Permissions Tediously Explained document.
The permissions data model is a mapping between privileges, parties and objects. Parties and @@ -150,15 +135,9 @@ would become very tedious. OpenACS provides a object contexts as a means for controlling permissions of a large group of objects at the same time. -<<<<<<< permissions.html -
-In OpenACS 5.6.0, object context is a scoping -mechanism. "Scoping" and "scope" are terms best -=======
In OpenACS 5.6.0, object context is a scoping mechanism. "Scoping" and "scope" are terms best ->>>>>>> 1.48 explained by example: consider some hypothetical rows in the
address_book
table:
... scope
user_id
group_id
... ... user
123
... ... group
456
... ... public
... @@ -219,15 +198,9 @@
context_id
is null, this context is used by default.See the package developer tutorials for examples on how to use permissions code. -<<<<<<< permissions.html -
-OpenACS 5.6.0 defines three separate mechanisms for specifying access control -in applications.
-=======
OpenACS 5.6.0 defines three separate mechanisms for specifying access control in applications.
->>>>>>> 1.48 The Groups data model allows you to define hierarchical organizations of users and groups of users.
@@ -238,8 +211,4 @@ permissions in a hierarchical fashion.
A PL/SQL or Tcl API is then used to check permissions in application pages. -<<<<<<< permissions.html
($Id$)View comments on this page at openacs.org -======= -($Id$)View comments on this page at openacs.org ->>>>>>> 1.48 Index: openacs-4/packages/acs-core-docs/www/postgres.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/postgres.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/postgres.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/postgres.html 12 Dec 2010 01:37:25 -0000 1.47.2.3 @@ -2,11 +2,7 @@Install PostgreSQL by Vinod Kurup
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< postgres.html -Skip this section if you will run only Oracle.
OpenACS 5.6.0 will run with PostgreSQL 7.3.2, 7.3.3, and 7.3.4 and 7.4.x. 7.4.7 is the recommended version of PostgreSQL.
Skip this section if you will run only Oracle.
OpenACS 5.6.0 will run with PostgreSQL 7.3.2, 7.3.3, and 7.3.4 and 7.4.x. 7.4.7 is the recommended version of PostgreSQL.
Special notes for Mac OS X. If you are running Mac OS X prior to 10.3, you should be ->>>>>>> 1.49 able to install and use PostGreSQL 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4.
Debian stable user should install PostGreSQL from source as detailed below, or they should use the www.backports.org @@ -217,19 +213,11 @@ bunch of symlinks that ensure that, when the operating system changes runlevels, postgresql goes to the appropriate state. Red Hat and Debian and SuSE each work a little -<<<<<<< postgres.html - differently. If you haven't untarred the OpenACS tarball, you will need to do so now to access the postgresql.txt file. -
Red Hat RPM:
The init script is already installed; just turn it on for the appropriate run levels.
[root root]# chkconfig --level 345 postgresql on -[root root]#Red Hat from source:
[root src]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql -[root src]# chown root.root /etc/rc.d/init.d/postgresql -[root src]# chmod 755 /etc/rc.d/init.d/postgresql -======= differently. If you haven't untarred the OpenACS tarball, you will need to do so now to access the postgresql.txt file.
Red Hat RPM:
The init script is already installed; just turn it on for the appropriate run levels.
[root root]#chkconfig --level 345 postgresql on
[root root]#Red Hat from source:
[root src]#cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
[root src]#chown root.root /etc/rc.d/init.d/postgresql
[root src]#chmod 755 /etc/rc.d/init.d/postgresql
->>>>>>> 1.49 [root src]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql chown root.root /etc/rc.d/init.d/postgresql @@ -272,15 +260,9 @@ /etc/rc5.d/S20postgresql -> ../init.d/postgresql [root ~]#/etc/init.d/postgresql start
Starting PostgreSQL: ok -<<<<<<< postgres.html -[root ~]#FreeBSD:
[root ~]# cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /usr/local/etc/rc.d/postgresql.sh -[root ~]# chown root:wheel /usr/local/etc/rc.d/postgresql.sh -[root ~]# chmod 755 /usr/local/etc/rc.d/postgresql.sh -======= [root ~]#FreeBSD:
[root ~]#cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /usr/local/etc/rc.d/postgresql.sh
[root ~]#chown root:wheel /usr/local/etc/rc.d/postgresql.sh
[root ~]#chmod 755 /usr/local/etc/rc.d/postgresql.sh
->>>>>>> 1.49 [root ~]# cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /usr/local/etc/rc.d/postgresql.sh chown root:wheel /usr/local/etc/rc.d/postgresql.sh @@ -300,15 +282,9 @@rc.d/
part in each of the following commands. -<<<<<<< postgres.html -[root ~]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql -[root ~]# chown root.root /etc/rc.d/init.d/postgresql -[root ~]# chmod 755 /etc/rc.d/init.d/postgresql-=======
[root ~]#cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql
[root ~]#chown root.root /etc/rc.d/init.d/postgresql
[root ~]#chmod 755 /etc/rc.d/init.d/postgresql
->>>>>>> 1.49 Test the script. @@ -405,8 +381,4 @@ PostgreSQL Performance Tuning -<<<<<<< postgres.html
($Id$)View comments on this page at openacs.org -======= -($Id$)View comments on this page at openacs.org ->>>>>>> 1.49 Index: openacs-4/packages/acs-core-docs/www/profile-code.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/profile-code.html,v diff -u -r1.11.2.2 -r1.11.2.3 --- openacs-4/packages/acs-core-docs/www/profile-code.html 12 Dec 2010 00:07:02 -0000 1.11.2.2 +++ openacs-4/packages/acs-core-docs/www/profile-code.html 12 Dec 2010 01:37:25 -0000 1.11.2.3 @@ -1,10 +1,5 @@ -<<<<<<< profile-code.html - -Profile your code by Jade Rubick
-======= -Profile your code by Jade Rubick
->>>>>>> 1.13 +Profile your code by Jade Rubick
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.There are several facilities for profiling your code in Index: openacs-4/packages/acs-core-docs/www/psgml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/psgml-mode.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/psgml-mode.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/psgml-mode.html 12 Dec 2010 01:37:25 -0000 1.44.2.3 @@ -1,58 +1,53 @@ -<<<<<<< psgml-mode.html - -
Using PSGML mode in Emacs By David Lutterkort
-======= -Using PSGML mode in Emacs By David Lutterkort
->>>>>>> 1.46 +Using PSGML mode in Emacs By David Lutterkort
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -Note: nxml mode replaces and/or complements psgml mode. More information.
Note:
nxml
mode replaces and/or complements psgml mode. More information.PSGML Mode is a mode for editing, umm, SGML and XML documents in emacs. It can parse a DTD and help you insert the right tags in the right place, knows about tags' attributes and can tell you in which contexts a tag can be used. If you give it the right DTD, that is. But even without a DTD, -it can save you some typing since pressing C-c/ will close an open -tag automatically.
Most newer emacsen come with PSGML mode preinstalled. You can find out -whether your emacs has it with the locate-library command. In Emacs, -type M-x locate-library and enter psgml. Emacs will tell +it can save you some typing since pressing
C-c/
will close an open +tag automatically.Most newer emacsen come with PSGML mode preinstalled. You can find out +whether your emacs has it with the
locate-library
command. In Emacs, +typeM-x locate-library
and enterpsgml
. Emacs will tell you if it found it or not.If you don't have PSGML preinstalled in your Emacs, there are two -things you can do:
On Linux: Get the -psgml rpm from RedHat's -docbook-tools and install it as usual.
On other systems: Get the tarball from the PSGML Website. -Unpack it and follow the install instructions.
The easiest way to teach PSGML mode about a DTD is by adding it to your -own CATALOG. Here is an example of how you can set that up for the -Docbook XML DTD.
Get the Docbook XML DTD -zip archive from docbook.org
Go somewhere in your working directory and do
+things you can do:
On Linux: Get the +psgml rpm from RedHat's +docbook-tools and install it as usual.
On other systems: Get the tarball from the PSGML Website. +Unpack it and follow the install instructions.
The easiest way to teach PSGML mode about a DTD is by adding it to your +own
CATALOG
. Here is an example of how you can set that up for the +Docbook XML DTD.
Get the Docbook XML DTD +zip archive from docbook.org
Go somewhere in your working directory and do
mkdir -p dtd/docbook-xml cd dtd/docbook-xml unzip -a <docbook XML DTD zip archive> -Create a file with the name CATALOG in the dtd +
Create a file with the name
CATALOG
in thedtd
directory and put the line- CATALOG "docbook-xml/docbook.cat" + CATALOG "docbook-xml/docbook.cat"-in it. By maintaining your own CATALOG, it is easy to add more +in it. By maintaining your own
CATALOG
, it is easy to add more DTD's without changing your emacs settings. (How about that HTML 4.01 DTD you -always wanted to get from W3C ? The +always wanted to get from W3C ? The DTD is in the zip archives and tarballs available on the site.)That's it. Now you are ready to tell emacs all about PSGML mode and -that funky CATALOG
If you installed PSGML mode in a non-standard location, e.g., somewhere in -your home directory, you need to add this to the load-path by adding -this line to your .emacs file:
- (add-to-list 'load-path "/some/dir/that/contains/psgml.elc") +that funkyCATALOG
If you installed PSGML mode in a non-standard location, e.g., somewhere in +your home directory, you need to add this to the
load-path
by adding +this line to your.emacs
file:+ (add-to-list 'load-path "/some/dir/that/contains/psgml.elc") -To let PSGML mode find your CATALOG and to enable PSGML mode for -all your editing, add these lines to your .emacs:
+To let PSGML mode find your
CATALOG
and to enable PSGML mode for +all your editing, add these lines to your.emacs
:(require 'psgml) - (add-to-list 'auto-mode-alist '("\\.html" . sgml-mode)) - (add-to-list 'auto-mode-alist '("\\.adp" . xml-mode)) - (add-to-list 'auto-mode-alist '("\\.xml" . xml-mode)) - (add-to-list 'auto-mode-alist '("\\.xsl" . xml-mode)) + (add-to-list 'auto-mode-alist '("\\.html" . sgml-mode)) + (add-to-list 'auto-mode-alist '("\\.adp" . xml-mode)) + (add-to-list 'auto-mode-alist '("\\.xml" . xml-mode)) + (add-to-list 'auto-mode-alist '("\\.xsl" . xml-mode)) - (add-to-list 'sgml-catalog-files "/path/to/your/dtd/CATALOG") + (add-to-list 'sgml-catalog-files "/path/to/your/dtd/CATALOG")If you want font-locking and indentation, you can also add these lines -into the .emacs file:
+into the.emacs
file:(setq sgml-markup-faces '((start-tag . font-lock-function-name-face) (end-tag . font-lock-function-name-face) (comment . font-lock-comment-face) @@ -64,37 +59,28 @@ (setq sgml-set-face t) (setq-default sgml-indent-data t) ;; Some convenient key definitions: - (define-key sgml-mode-map "\C-c\C-x\C-e" 'sgml-describe-element-type) - (define-key sgml-mode-map "\C-c\C-x\C-i" 'sgml-general-dtd-info) - (define-key sgml-mode-map "\C-c\C-x\C-t" 'sgml-describe-entity) + (define-key sgml-mode-map "\C-c\C-x\C-e" 'sgml-describe-element-type) + (define-key sgml-mode-map "\C-c\C-x\C-i" 'sgml-general-dtd-info) + (define-key sgml-mode-map "\C-c\C-x\C-t" 'sgml-describe-entity) -All SGML and XML documents that should conform to a DTD have to declare a -doctype. For the docbook XML, all your .xml files whould start with +
All SGML and XML documents that should conform to a DTD have to declare a +doctype. For the docbook XML, all your
.xml
files whould start with the line- <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "docbookx.dtd"> + <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "docbookx.dtd">If your document is only part of a larger XML document, you can tell PSGML mode about it by appending the following lines to your file. In this case, do not include a DOCTYPE declaration in your file.
<!-- Local Variables: - sgml-parent-document: ("top.xml" "book" "sect1") + sgml-parent-document: ("top.xml" "book" "sect1") End: -->Which says that the parent of this document can be found in the file -<<<<<<< psgml-mode.html -top.xml, that the element in the parent that will enclose the -current document is a book and that the current file's topmost -element is a sect1.
Of course, you should read the emacs texinfo pages that come with PSGML -mode from start to finish. Barring that, here are some handy commands:
Key Command C-c C-e Insert an element. Uses completion and only lets you insert elements that -are valid C-c C-a Edit attributes of enclosing element. C-c C-x C-i Show information about the document's DTD. C-c C-x C-e Describe element. Shows for one element which elements can be parents, -what its contents can be and lists its attributes. View comments on this page at openacs.org -=======top.xml
, that the element in the parent that will enclose the current document is abook
and that the current file's topmost element is asect1
.Of course, you should read the emacs texinfo pages that come with PSGML mode from start to finish. Barring that, here are some handy commands:
Key Command C-c C-e
Insert an element. Uses completion and only lets you insert elements that are valid C-c C-a
Edit attributes of enclosing element. C-c C-x C-i
Show information about the document's DTD. C-c C-x C-e
Describe element. Shows for one element which elements can be parents, what its contents can be and lists its attributes. View comments on this page at openacs.org ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html,v diff -u -r1.16.2.2 -r1.16.2.3 --- openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html 12 Dec 2010 00:07:02 -0000 1.16.2.2 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html 12 Dec 2010 01:37:25 -0000 1.16.2.3 @@ -1,10 +1,5 @@ -<<<<<<< releasing-openacs-core.html - -OpenACS Core and .LRN
Update Translations. Section , “How to Update the translations”
Rebuild the Changelog. Rebuild the Changelog. I use a tool called cvs2cl. Run this command from the package root to automatically generate a Changelog file in the same dir. We generate two changelogs, one for the minor branch and one for the most recent release. The example below is for OpenACS 5.0.2:
cd /var/lib/aolserver/$OPENACS_SERVICE_NAME -======= -
OpenACS Core and .LRN
Update Translations. How to Update the translations
Rebuild the Changelog. Rebuild the Changelog. I use a tool called cvs2cl. Run this command from the package root to automatically generate a Changelog file in the same dir. We generate two changelogs, one for the minor branch and one for the most recent release. The example below is for OpenACS 5.0.2:
cd /var/lib/aolserver/$OPENACS_SERVICE_NAME ->>>>>>> 1.18 +
OpenACS Core and .LRN
Update Translations. How to Update the translations
Rebuild the Changelog. Rebuild the Changelog. I use a tool called cvs2cl. Run this command from the package root to automatically generate a Changelog file in the same dir. We generate two changelogs, one for the minor branch and one for the most recent release. The example below is for OpenACS 5.0.2:
cd /var/lib/aolserver/$OPENACS_SERVICE_NAME cvs2cl -F oacs-5-0 --delta openacs-5-0-0-final:oacs-5-0 -f ChangeLog cvs2cl -F oacs-5-0 --delta openacs-5-0-1-final:oacs-5-0 -f ChangeLog-recent
Update Version Numbers. The version numbers in the documentation and in the packages must be updated. This should only happen after a release candidate is approved.
.LRN: this must be repeated for .LRN modules (dotlrn-core in the dotlrn cvs tree) and for any modified modules in the .LRN prerequisites (dotlrn-prereq in openacs cvs tree). My current working model is that I bulk-update .LRN and OpenACS core but that I don't touch dotlrn-prereq modules - I just use the most recent release and it's up to individual package developers to tag and release those packages when they change. This model is already broken because following it means that dotlrn-prereqs don't get new translations.
Update /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/xml/variables.ent with the new version number.
Add new section in /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/xml/for-everyone/release-notes.xml @@ -144,8 +139,4 @@ # Clean up after ourselves... cd $BASE && rm -rf dotlrn-tarball tarball openacs-4 dotlrn-packages -<<<<<<< releasing-openacs-core.html
($Id$)
Prev Home Next Chapter 16. Releasing OpenACS Up How to Update the OpenACS.org repository
docs@openacs.orgView comments on this page at openacs.org -======= -($Id$)
Prev Home Next Chapter 15. Releasing OpenACS Up How to Update the OpenACS.org repository
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.18 Index: openacs-4/packages/acs-core-docs/www/releasing-openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-openacs.html,v diff -u -r1.25.2.2 -r1.25.2.3 --- openacs-4/packages/acs-core-docs/www/releasing-openacs.html 12 Dec 2010 00:07:02 -0000 1.25.2.2 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs.html 12 Dec 2010 01:37:25 -0000 1.25.2.3 @@ -1,7 +1,2 @@ -<<<<<<< releasing-openacs.html - -Chapter 16. Releasing OpenACS View comments on this page at openacs.org -======= -Chapter 15. Releasing OpenACS View comments on this page at openacs.org ->>>>>>> 1.27 +Chapter 16. Releasing OpenACS View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/releasing-package.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-package.html,v diff -u -r1.11.2.2 -r1.11.2.3 --- openacs-4/packages/acs-core-docs/www/releasing-package.html 12 Dec 2010 00:07:02 -0000 1.11.2.2 +++ openacs-4/packages/acs-core-docs/www/releasing-package.html 12 Dec 2010 01:37:25 -0000 1.11.2.3 @@ -1,10 +1,5 @@ -<<<<<<< releasing-package.html - -How to package and release an OpenACS Package In this example, we are packaging and releasing myfirstpackage as version 1.0.0, which is compatible with OpenACS 5.0.x.
Update the version number, release date, and package maturity of your package in the APM.
Make sure all changes are committed.
Tag the updated work.:
cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage -======= -
How to package and release an OpenACS Package In this example, we are packaging and releasing
myfirstpackage
as version 1.0.0, which is compatible with OpenACS 5.0.x.
Update the version number, release date, and package maturity of your package in the APM.
Make sure all changes are committed.
Tag the updated work.:
cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage ->>>>>>> 1.13 +
How to package and release an OpenACS Package In this example, we are packaging and releasing
myfirstpackage
as version 1.0.0, which is compatible with OpenACS 5.0.x.
Update the version number, release date, and package maturity of your package in the APM.
Make sure all changes are committed.
Tag the updated work.:
cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage cvs tag myfirstpackages-1-0-0-final cvs tag -F openacs-5-0-compat
Done. The package will be added to the repository automatically. If the correct version does not show up within 24 hours, ask for help on the OpenACS.org development forum.
Prev Home Next How to Update the OpenACS.org repository Up How to Update the translations
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/request-processor.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/request-processor.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/request-processor.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/request-processor.html 12 Dec 2010 01:37:25 -0000 1.45.2.3 @@ -1,29 +1,13 @@ -<<<<<<< request-processor.html - -The Request Processor By Pete Su
-======= -The Request Processor By Pete Su
->>>>>>> 1.47 +The Request Processor By Pete Su
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< request-processor.html --This document is a brief introduction to the OpenACS 5.6.0 Request Processor; -more details can be found in the OpenACS 4 Request Processor Design. Here we cover the high level concepts behind the -=======
This document is a brief introduction to the OpenACS 5.6.0 Request Processor; more details can be found in the OpenACS 4 Request Processor Design. Here we cover the high level concepts behind the ->>>>>>> 1.47 system, and implications and usage for the application developer. -<<<<<<< request-processor.html -
-The 5.6.0 Request Processor is a global filter and set of Tcl procs that -=======
The 5.6.0 Request Processor is a global filter and set of Tcl procs that ->>>>>>> 1.47 respond to every incoming URL reaching the server. The following diagram summarizes the stages of the request processor assuming a URL request like
http://someserver.com/notes/somepage.adp
. @@ -33,25 +17,15 @@
- Stage 1: Search Site Map
The first thing the RP does is to map the given URL to the appropriate physical directory in the filesystem, from which to serve content. We -<<<<<<< request-processor.html -do this by searching the site map data model (touched on in the Packages, and further -discussed in Writing OpenACS Application Pages). This data model maps URLs to objects representing -======= do this by searching the site map data model (touched on in the Packages, and further discussed in Writing OpenACS Application Pages). This data model maps URLs to objects representing ->>>>>>> 1.47 content, and these objects are typically package instances.
After looking up the appropriate object, the RP stores the URL, the ID of the object it found, and the package and package instance the object belongs to into the environment of the connection. This -<<<<<<< request-processor.html -environment can be queried using the ad_conn procedure, -which is described in detail in OpenACS 4 Request Processor Design. The page -======= environment can be queried using the
ad_conn
procedure, which is described in detail in OpenACS 4 Request Processor Design. The page ->>>>>>> 1.47 development tutorial shows you how to use this interface to make your pages aware of which instance was requested.- Stage 2: Authentication
@@ -62,15 +36,9 @@ extracts or sets up new session tokens for the user.
- Stage 3: Authorization
Next, the Request Processor checks if the user has appropriate access -<<<<<<< request-processor.html privileges to the requested part of the site. In OpenACS 5.6.0, access control -is dictated by the permissions system. In -this case, the RP checks if the user has "read" priviledges on the -======= -privileges to the requested part of the site. In OpenACS 5.6.0, access control is dictated by the permissions system. In this case, the RP checks if the user has "read" priviledges on the ->>>>>>> 1.47 object in the site map specified by the URL. This object is typically a package instance, but it could easily be something more granular, such as whehter the user can view a particular piece of content within @@ -159,8 +127,4 @@
In a .vuh file, path_info is the trailing part of the URL not matched by the .vuh file. -<<<<<<< request-processor.html
($Id$)
Prev Home Next OpenACS Data Models and the Object System Up The OpenACS Database Access API
docs@openacs.orgView comments on this page at openacs.org -======= -($Id$)
Prev Home Next OpenACS Data Models and the Object System Up The OpenACS Database Access API
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/requirements-template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/requirements-template.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/requirements-template.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/requirements-template.html 12 Dec 2010 01:37:25 -0000 1.45.2.3 @@ -1,10 +1,5 @@ -<<<<<<< requirements-template.html - -System/Application Requirements Template By You
-======= -System/Application Requirements Template By You
->>>>>>> 1.47 +System/Application Requirements Template By You
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.@@ -86,8 +81,4 @@ pre-existing system or prototype first, and thus you may want to write some thoughts on implementation, for aiding and guiding yourself or other programmers. -<<<<<<< requirements-template.html -
Prev Home Next Detailed Design Documentation Template Up Chapter 14. Internationalization
docs@openacs.orgView comments on this page at openacs.org -======= -View comments on this page at openacs.org ->>>>>>> 1.47 +
Prev Home Next Detailed Design Documentation Template Up Chapter 14. Internationalization
docs@openacs.orgView comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/rp-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-design.html,v diff -u -r1.33.2.2 -r1.33.2.3 --- openacs-4/packages/acs-core-docs/www/rp-design.html 12 Dec 2010 00:07:02 -0000 1.33.2.2 +++ openacs-4/packages/acs-core-docs/www/rp-design.html 12 Dec 2010 01:37:25 -0000 1.33.2.3 @@ -1,10 +1,5 @@ -<<<<<<< rp-design.html - -Request Processor Design -======= -Request Processor Design ->>>>>>> 1.35 +Request Processor Design OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.[ad_conn sec_validated]
This becomes "secure" when the connection uses SSL Database API [ad_conn db,handles]
What are the list of handles available to AOL? [ad_conn db,n_handles_used]
How many database handles are currently used? [ad_conn db,last_used]
Which database handle did we use last? [ad_conn db,transaction_level,$db]
Specifies what transaction level we are in [ad_conn db,db_abort_p,$dbh]
Whether the transaction is aborted APM [ad_conn xml_loaded_p]
Checks whether the XML parser is loaded so that it only gets loaded once. Set in apm_load_xml_packages Packages [ad_conn package_id]
The package_id of the package associated with the URL. [ad_conn package_url]
The URL on which the package is mounted. Miscellaneous [ad_conn system_p]
If true then the request has been made to one of the special directories specified in the config file (somewhere), and no authentication or -<<<<<<< rp-design.html -authorization has been performed. Documentation [ad_conn api_page_documentation_mode_p] View comments on this page at openacs.org -======= authorization has been performed.Documentation [ad_conn api_page_documentation_mode_p]
Prev Home Next Request Processor Requirements Up Documenting Tcl Files: Page Contracts and Libraries
docs@openacs.orgView comments on this page at openacs.org ->>>>>>> 1.35 Index: openacs-4/packages/acs-core-docs/www/rp-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-requirements.html,v diff -u -r1.29.2.2 -r1.29.2.3 --- openacs-4/packages/acs-core-docs/www/rp-requirements.html 12 Dec 2010 00:07:02 -0000 1.29.2.2 +++ openacs-4/packages/acs-core-docs/www/rp-requirements.html 12 Dec 2010 01:37:25 -0000 1.29.2.3 @@ -1,10 +1,5 @@ -<<<<<<< rp-requirements.html - -Request Processor Requirements -======= -Request Processor Requirements ->>>>>>> 1.31 +Request Processor Requirements OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.The following is a requirements document for the OpenACS 4.0 request Index: openacs-4/packages/acs-core-docs/www/security-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-design.html,v diff -u -r1.31.2.2 -r1.31.2.3 --- openacs-4/packages/acs-core-docs/www/security-design.html 12 Dec 2010 00:07:02 -0000 1.31.2.2 +++ openacs-4/packages/acs-core-docs/www/security-design.html 12 Dec 2010 01:37:25 -0000 1.31.2.3 @@ -1,10 +1,5 @@ -<<<<<<< security-design.html - -
Security Design By Richard Li and Archit Shah
-======= -Security Design By Richard Li and Archit Shah
->>>>>>> 1.33 +Security Design By Richard Li and Archit Shah
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Index: openacs-4/packages/acs-core-docs/www/security-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-notes.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/security-notes.html 12 Dec 2010 00:07:03 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/security-notes.html 12 Dec 2010 01:37:25 -0000 1.45.2.3 @@ -1,10 +1,5 @@ -<<<<<<< security-notes.html - -
Security Notes By Richard Li
-======= -Security Notes By Richard Li
->>>>>>> 1.47 +Security Notes By Richard Li
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.@@ -59,10 +54,5 @@
The set of string match expressions in the procedure above should be extended appropriately for other registration pages. This procedure does not use -<<<<<<< security-notes.html -ad_parameter or regular expressions for performance reasons, as -it is called by the request processor.
($Id$)View comments on this page at openacs.org -=======ad_parameter
or regular expressions for performance reasons, as it is called by the request processor.($Id$)View comments on this page at openacs.org ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/security-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-requirements.html,v diff -u -r1.31.2.2 -r1.31.2.3 --- openacs-4/packages/acs-core-docs/www/security-requirements.html 12 Dec 2010 00:07:03 -0000 1.31.2.2 +++ openacs-4/packages/acs-core-docs/www/security-requirements.html 12 Dec 2010 01:37:25 -0000 1.31.2.3 @@ -1,10 +1,5 @@ -<<<<<<< security-requirements.html - -Security Requirements By Richard Li
-======= -Security Requirements By Richard Li
->>>>>>> 1.33 +Security Requirements By Richard Li
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Index: openacs-4/packages/acs-core-docs/www/snapshot-backup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/snapshot-backup.html,v diff -u -r1.10.2.1 -r1.10.2.2 --- openacs-4/packages/acs-core-docs/www/snapshot-backup.html 18 Jun 2010 21:29:36 -0000 1.10.2.1 +++ openacs-4/packages/acs-core-docs/www/snapshot-backup.html 12 Dec 2010 01:37:25 -0000 1.10.2.2 @@ -1,35 +1,35 @@ - -
Manual backup and recovery This section describes how to make a one-time backup and + +
Manual backup and recovery This section describes how to make a one-time backup and restore of the files and database. This is useful for rolling back to known-good versions of a service, such as at initial installation and just before an upgrade. First, you back up the database to a file within the file tree. Then, you back up the file tree. All of the information needed to rebuild the site, including the AOLserver config files, is then in tree for regular - file system backup.
Back up the database to a file.
- Download the backup script. Save the file export-oracle.txt as - /var/tmp/export-oracle.txt -
+ file system backup.
Back up the database to a file.
+ Download the backup script. Save the file export-oracle.txt as +
/var/tmp/export-oracle.txt
+Login as root. The following commands will install the export script: -
[joeuser ~]$ su - -[root ~]# cp /var/tmp/export-oracle.txt /usr/sbin/export-oracle -[root ~]# chmod 700 /usr/sbin/export-oracle+
[joeuser ~]$su -
+[root ~]#cp /var/tmp/export-oracle.txt /usr/sbin/export-oracle
+[root ~]#chmod 700 /usr/sbin/export-oracle
Setup the export directory; this is the directory where backups will be stored. We recommend the directory - /ora8/m02/oracle-exports.
[root ~]# mkdir /ora8/m02/oracle-exports -[root ~]# chown oracle:dba /ora8/m02/oracle-exports -[root ~]# chmod 770 /ora8/m02/oracle-exports+
/ora8/m02/oracle-exports
.[root ~]#mkdir /ora8/m02/oracle-exports
+[root ~]#chown oracle:dba /ora8/m02/oracle-exports
+[root ~]#chmod 770 /ora8/m02/oracle-exports
Now edit - /usr/sbin/export-oracle and - change the SERVICE_NAME and - DATABASE_PASSWORD fields to +
/usr/sbin/export-oracle
and + change theSERVICE_NAME
and +DATABASE_PASSWORD
fields to their correct values. If you want to use a directory other than - /ora8/m02/oracle-exports, you +/ora8/m02/oracle-exports
, you also need to change the - exportdir setting. +exportdir
setting.Test the export procedure by running the command: -
[root ~]# /usr/sbin/export-oracle +[root ~]#/usr/sbin/export-oracle
mv: /ora8/m02/oracle-exports/oraexport-service_name.dmp.gz: No such file or directory Export: Release 8.1.6.1.0 - Production on Sun Jun 11 18:07:45 2000 @@ -64,70 +64,70 @@ . exporting dimensions . exporting post-schema procedural objects and actions . exporting statistics -Export terminated successfully without warnings.PostgreSQL. Create a backup file and verify that it was created and has a reasonable size (several megabytes).
[root root]# su - $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ pg_dump -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ ls -al /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp +Export terminated successfully without warnings.PostgreSQL. Create a backup file and verify that it was created and has a reasonable size (several megabytes).
[root root]#su - $OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$pg_dump -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp $OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ls -al /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp
-rw-rw-r-x 1 $OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME 4005995 Feb 21 18:28 /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$exit
[root root]# su - $OPENACS_SERVICE_NAME pg_dump -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp openacs-dev ls -al /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp -exitBack up the file system. Back up all of the files in the service, including the +exit
Back up the file system. Back up all of the files in the service, including the database backup file but excluding the auto-generated - supervise directory, which is - unneccesary and has complicated permissions.
In the tar command,
c create a - new tar archive
p preserves permissions.
s preserves file sort order
z compresses the output with gzip.
The --exclude clauses skips some daemontools files that +
supervise
directory, which is + unneccesary and has complicated permissions.In the tar command,
c
create a + new tar archive
p
preserves permissions.
s
preserves file sort order
z
compresses the output with gzip.The
--exclude
clauses skips some daemontools files that are owned by root and thus cannot be backed up by the service owner. These files are autogenerated and we don't - break anything by omitting them.The --file clause + break anything by omitting them.
The
--file
clause specifies the name of the output file to be generated; we - manually add the correct extensions.The last clause, - /var/lib/aolserver/$OPENACS_SERVICE_NAME/, + manually add the correct extensions.
The last clause, +
/var/lib/aolserver/$OPENACS_SERVICE_NAME/
, specifies the starting point for backup. Tar defaults to - recursive backup.[root root]# su - $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ tar -cpsz --exclude /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/supervise \ - --file /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz /var/lib/aolserver/$OPENACS_SERVICE_NAME/ + recursive backup.[root root]#su - $OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$tar -cpsz --exclude /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/supervise \ + --file /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz /var/lib/aolserver/$OPENACS_SERVICE_NAME/
tar: Removing leading `/' from member names -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$Suffer a catastrophic failure on your production system. (We'll simulate this step)
[root root]# svc -d /service/$OPENACS_SERVICE_NAME -[root root]# mv /var/lib/aolserver/$OPENACS_SERVICE_NAME/ /var/lib/aolserver/$OPENACS_SERVICE_NAME.lost -[root root]# rm /service/$OPENACS_SERVICE_NAME +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$Suffer a catastrophic failure on your production system. (We'll simulate this step)
[root root]#svc -d /service/$OPENACS_SERVICE_NAME
+[root root]#mv /var/lib/aolserver/$OPENACS_SERVICE_NAME/ /var/lib/aolserver/$OPENACS_SERVICE_NAME.lost
+[root root]#rm /service/$OPENACS_SERVICE_NAME
rm: remove symbolic link `/service/$OPENACS_SERVICE_NAME'? y -[root root]# ps -auxw | grep $OPENACS_SERVICE_NAME +[root root]#ps -auxw | grep $OPENACS_SERVICE_NAME
root 1496 0.0 0.0 1312 252 ? S 16:58 0:00 supervise $OPENACS_SERVICE_NAME -[root root]# kill 1496 -[root root]# ps -auxw | grep $OPENACS_SERVICE_NAME -[root root]# su - postgres -[postgres pgsql]$ dropdb $OPENACS_SERVICE_NAME +[root root]#kill 1496
+[root root]#ps -auxw | grep $OPENACS_SERVICE_NAME
+[root root]#su - postgres
+[postgres pgsql]$dropdb $OPENACS_SERVICE_NAME
DROP DATABASE -[postgres pgsql]$ dropuser $OPENACS_SERVICE_NAME +[postgres pgsql]$dropuser $OPENACS_SERVICE_NAME
DROP USER -[postgres pgsql]$ exit +[postgres pgsql]$exit
logout -[root root]#
Restore the operating system and required software. +[root root]#
Restore the operating system and required software. You can do this with standard backup processes or by keeping copies of the install material (OS CDs, OpenACS tarball and supporting software) and repeating the install - guide. Recreate the service user ($OPENACS_SERVICE_NAME).
Restore the OpenACS files and database backup file.
[root root]# su - $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver -[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz -[$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.web $OPENACS_SERVICE_NAMERestore the database
Oracle.
Set up a clean Oracle database user and - tablespace with the same names as the ones exported from (more information).
Invoke the import command
imp $OPENACS_SERVICE_NAME/$OPENACS_SERVICE_NAME FILE=/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/nighty_backup.dmp FULL=Y
Postgres. If the database user does not already exist, create it.
[root root]# su - postgres -[postgres ~]$ createuser $OPENACS_SERVICE_NAME -Shall the new user be allowed to create databases? (y/n) y -Shall the new user be allowed to create more new users? (y/n) y + guide. Recreate the service user ($OPENACS_SERVICE_NAME).Restore the OpenACS files and database backup file.
[root root]#su - $OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$cd /var/lib/aolserver
+[$OPENACS_SERVICE_NAME aolserver]$tar xzf /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz
+[$OPENACS_SERVICE_NAME aolserver]$chmod -R 775 $OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME aolserver]$chown -R $OPENACS_SERVICE_NAME.web $OPENACS_SERVICE_NAME
Restore the database
Oracle.
Set up a clean Oracle database user and + tablespace with the same names as the ones exported from (more information).
Invoke the import command
imp $OPENACS_SERVICE_NAME/$OPENACS_SERVICE_NAME FILE=/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/nighty_backup.dmp FULL=Y
Postgres. If the database user does not already exist, create it.
[root root]#su - postgres
+[postgres ~]$createuser $OPENACS_SERVICE_NAME
+Shall the new user be allowed to create databases? (y/n)y
+Shall the new user be allowed to create more new users? (y/n)y
CREATE USER -[postgres ~]$ exit -Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects. Next, restore the database from the dump file. The restoration will show some error messages at the beginning for objects that were pre-created from the OpenACS initialization script, which can be ignored.
[root root]# su - $OPENACS_SERVICE_NAME -[$OPENACS_SERVICE_NAME ~]$ createdb $OPENACS_SERVICE_NAME +[postgres ~]$exit
+Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects. Next, restore the database from the dump file. The restoration will show some error messages at the beginning for objects that were pre-created from the OpenACS initialization script, which can be ignored.
[root root]#su - $OPENACS_SERVICE_NAME
+[$OPENACS_SERVICE_NAME ~]$createdb $OPENACS_SERVICE_NAME
CREATE DATABASE -[$OPENACS_SERVICE_NAME ~]$ psql -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-kernel/sql/postgresql/postgresql.sql $OPENACS_SERVICE_NAME +[$OPENACS_SERVICE_NAME ~]$psql -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-kernel/sql/postgresql/postgresql.sql $OPENACS_SERVICE_NAME
(many lines omitted) -[$OPENACS_SERVICE_NAME ~]$ psql $OPENACS_SERVICE_NAME < /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/database-backup.dmp +[$OPENACS_SERVICE_NAME ~]$psql $OPENACS_SERVICE_NAME < /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/database-backup.dmp
(many lines omitted) -[$OPENACS_SERVICE_NAME ~]$ exit -[postgres ~]$ exit -logoutActivate the service
[root root]# ln -s /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools /service/$OPENACS_SERVICE_NAME -[root root]# sleep 10 -[root root]# svgroup web /service/$OPENACS_SERVICE_NAMEView comments on this page at openacs.org +[$OPENACS_SERVICE_NAME ~]$exit
+[postgres ~]$exit
+logoutActivate the service
[root root]#ln -s /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools /service/$OPENACS_SERVICE_NAME
+[root root]#sleep 10
+[root root]#svgroup web /service/$OPENACS_SERVICE_NAME
View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/style-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/style-guide.html,v diff -u -r1.24.2.2 -r1.24.2.3 --- openacs-4/packages/acs-core-docs/www/style-guide.html 12 Dec 2010 00:07:03 -0000 1.24.2.2 +++ openacs-4/packages/acs-core-docs/www/style-guide.html 12 Dec 2010 01:37:25 -0000 1.24.2.3 @@ -1,10 +1,5 @@ -<<<<<<< style-guide.html - -OpenACS Style Guide -======= -
OpenACS Style Guide ->>>>>>> 1.26 +
OpenACS Style Guide By Jeff Davis
View comments on this page at openacs.org -======= -
Prev Home Next Chapter 11. Engineering Standards Up +
Document Revision # Action Taken, Notes When? By Whom? 0.1 Creation 12/2003 Jeff Davis ($Id$)View comments on this page at openacs.org ->>>>>>> 1.26 Index: openacs-4/packages/acs-core-docs/www/subsites-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites-design.html,v diff -u -r1.31.2.2 -r1.31.2.3 --- openacs-4/packages/acs-core-docs/www/subsites-design.html 12 Dec 2010 00:07:03 -0000 1.31.2.2 +++ openacs-4/packages/acs-core-docs/www/subsites-design.html 12 Dec 2010 01:37:25 -0000 1.31.2.3 @@ -1,19 +1,10 @@ -<<<<<<< subsites-design.html - -Subsites Design Document -======= -Subsites Design Document ->>>>>>> 1.33 +Subsites Design Document OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.*Note* This document has not gone through the any of the required QA process yet. It is being tagged as stable due to high -<<<<<<< subsites-design.html -demand.
An OpenACS 4 subsite is a managed suite of applications that work together for -======= demand.
An OpenACS 4 subsite is a managed suite of applications that work together for ->>>>>>> 1.33 a particular user community. This definition covers a very broad range of requirements: from a Geocities style homepage where a user can install whatever available application he wants (e.g. a single user could have their @@ -220,8 +211,4 @@ a particular configuration of site nodes/packages. As we build more fundamental applications that can be applied in more general areas, this feature will become more and more in demand since more problems will be -<<<<<<< subsites-design.html -solvable by configuration instead of coding.
View comments on this page at openacs.org -======= solvable by configuration instead of coding.View comments on this page at openacs.org ->>>>>>> 1.33 Index: openacs-4/packages/acs-core-docs/www/subsites-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites-requirements.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/subsites-requirements.html 12 Dec 2010 00:07:03 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/subsites-requirements.html 12 Dec 2010 01:37:25 -0000 1.30.2.3 @@ -1,36 +1,31 @@ -<<<<<<< subsites-requirements.html - -Subsites Requirements By Rafael H. Schloming and Dennis Gregorovic
-======= -Subsites Requirements By Rafael H. Schloming and Dennis Gregorovic
->>>>>>> 1.32 +Subsites Requirements By Rafael H. Schloming and Dennis Gregorovic
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -The following is a requirements document for OpenACS 4 Subsites, part of the OpenACS 4 Kernel. The Subsites system allows one OpenACS server instance to serve multiple user communities, by enabling the suite of available OpenACS -applications to be customized for defined user communities.
Many online communities are also collections of discrete subcommunities, +applications to be customized for defined user communities.
Many online communities are also collections of discrete subcommunities, reflecting real-world relationships. For example, a corporate intranet/extranet website serves both units within the company (e.g., offices, departments, teams, projects) and external parties (e.g., customers, partners, vendors). Subsites enable a single OpenACS instance to provide each -subcommunity with its own "virtual website," by assembling OpenACS +subcommunity with its own "virtual website," by assembling OpenACS packages that together deliver a feature set tailored to the needs of the -subcommunity.
The OpenACS subsite system allows a single OpenACS installation to serve multiple +subcommunity.
The OpenACS subsite system allows a single OpenACS installation to serve multiple communities. At an implementation level this is primarily accomplished by -having an application "scope" its content to a particular package -instance. The request +having an application "scope" its content to a particular package +instance. The request processor then figures out which package_id a particular URL references -and then provides this information through the ad_conn api ([ad_conn -package_id], [ad_conn package_url]).
The other piece of the subsite system is a subsite package that provides -subsite admins a "control panel" for administering their subsite. +and then provides this information through the
ad_conn
api ([ad_conn +package_id]
,[ad_conn package_url]
).The other piece of the subsite system is a subsite package that provides +subsite admins a "control panel" for administering their subsite. This is the same package used to provide all the community core functionality -available at the "main" site which is in fact simply another -subsite.
The Subsites functionality is intended for use by two different classes of -users:
Package programmers (referred to as 'the programmer') must -develop subcommunity-aware applications.
Site administrators (referred to as 'the administrator') use -subsites to provide tailored "virtual websites" to different +available at the "main" site which is in fact simply another +subsite.
The Subsites functionality is intended for use by two different classes of +users:
Package programmers (referred to as 'the programmer') must +develop subcommunity-aware applications.
Site administrators (referred to as 'the administrator') use +subsites to provide tailored "virtual websites" to different subcommunities.
Joe Programmer is working on the forum package and wants to make it subsite-aware. Using [ad_conn package_id], Joe adds code that only displays forum messages associated with the current package instance. Joe is happy to @@ -45,18 +40,18 @@ http://www.company.com/offices/boston/forum, and similarly for the Austin office. At this point, the Boston and Austin office admins can customize the configurations for each of their forums, or they can just use the -defaults.
Test plan (Not available yet)
A subsite API is required for programmers to ensure their packages are -subsite-aware. The following functions should be sufficient for this:
10.10.0 Package creation
The system must provide an API call to create a package, and it must be -possible for the context (to which the package belongs) to be specified.
10.20.0 Package deletion
The system must provide an API call to delete a package and all related -objects in the subsite's context.
10.30.0 Object's package information
Given an object ID, the system must provide an API call to determine the -package (ID) to which the object belongs.
10.40.0 URL from package
Given a package (ID), the system must provide an API call to return the -canonical URL for that package.
10.50.0 Main subsite's package_id
The system must provide an API call to return a package ID corresponding -to the main subsite's package ID (the degenerate subsite).
The Programmer's User Interface
There is no programmer's UI, other than the API described above.
The Administrator's User Interface
The UI for administrators is a set of HTML pages that are used to drive +defaults.
Test plan (Not available yet)
A subsite API is required for programmers to ensure their packages are +subsite-aware. The following functions should be sufficient for this:
10.10.0 Package creation
The system must provide an API call to create a package, and it must be +possible for the context (to which the package belongs) to be specified.
10.20.0 Package deletion
The system must provide an API call to delete a package and all related +objects in the subsite's context.
10.30.0 Object's package information
Given an object ID, the system must provide an API call to determine the +package (ID) to which the object belongs.
10.40.0 URL from package
Given a package (ID), the system must provide an API call to return the +canonical URL for that package.
10.50.0 Main subsite's package_id
The system must provide an API call to return a package ID corresponding +to the main subsite's package ID (the degenerate subsite).
The Programmer's User Interface
There is no programmer's UI, other than the API described above.
The Administrator's User Interface
The UI for administrators is a set of HTML pages that are used to drive the underlying API for package instance management (i.e. adding, removing, or altering packages). It is restricted to administrators of the current subsite such that administrators can only manage their own subsites. Of course, -Site-Wide Administrators can manage all subsites.
20.10.0 Package creation
20.10.1 The administrator should be able to create a -package and make it available at a URL underneath the subsite.
20.20.0 Package deactivation
20.20.1 The administrator should be able to deactivate -any package, causing it to be inaccessible to users.
20.20.5 Deactivating a package makes the package no +Site-Wide Administrators can manage all subsites.
20.10.0 Package creation
20.10.1 The administrator should be able to create a +package and make it available at a URL underneath the subsite.
20.20.0 Package deactivation
20.20.1 The administrator should be able to deactivate +any package, causing it to be inaccessible to users.
20.20.5 Deactivating a package makes the package no longer accessible, but it does not remove data created within the context of -that package.
View comments on this page at openacs.org +that package.View comments on this page at openacs.org Index: openacs-4/packages/acs-core-docs/www/subsites.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/subsites.html 12 Dec 2010 00:07:03 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/subsites.html 12 Dec 2010 01:37:25 -0000 1.44.2.3 @@ -1,13 +1,8 @@ -<<<<<<< subsites.html - -Writing OpenACS Application Pages By Rafael H. Schloming and Pete Su
-======= -Writing OpenACS Application Pages By Rafael H. Schloming and Pete Su
->>>>>>> 1.46 +Writing OpenACS Application Pages By Rafael H. Schloming and Pete Su
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -In this document, we'll examine the user interface pages of the Notes application in more detail, covering two separate aspects of page development in OpenACS. First, we'll talk about the code needed to make @@ -16,8 +11,8 @@ form-based user interfaces in OpenACS. While these seem like unrelated topics, they both come up in the example page that we are going to look at, so it makes sense to address them at the same time. -
-As you will recall from the packages tutorial, the Request +
+As you will recall from the packages tutorial, the Request Processor (RP) and Package Manager (APM) allow site administrators to define an arbitrary mapping from URLs in the site to objects representing content. These objects may represent single @@ -27,63 +22,63 @@ particular URL. The tutorial also showed how a given URL is translated into a physical file to serve using the site map. We'll repeat this description here, assuming that you have mounted an -instance of Notes at the URL /notes as we did in the packages-example: -
-AOLserver receives your request for the URL /notes/somepage. -
+instance of Notes at the URL
/notes
as we did in the packages-example: +
+AOLserver receives your request for the URL
/notes/somepage
. +This URL is passed to the request processor. -
+
The RP looks up the URL in the site map, and sees that the object -mounted at that location is an instance of the notes +mounted at that location is an instance of the
notes
application. -+
The RP asks the package manager where in the file system the Notes package lives. In the standard case, this would be -ROOT/packages/notes. -
+
ROOT/packages/notes
. +The RP translates the URL to serve a page relative to the page root of the application, which is -ROOT/packages/notes/www/. Therefore, the page that is -finally served is ROOT/packages/notes/www/hello.html, +
ROOT/packages/notes/www/
. Therefore, the page that is +finally served isROOT/packages/notes/www/hello.html
, which is what we wanted.What is missing from this description is a critical fact for application developers: In addition to working out what file to serve, the RP also stores information about which package instance the file belongs to into the AOLserver connection environment. The following -ad_conn interfaces can be used to extract this +
ad_conn
interfaces can be used to extract this information: -
- [ad_conn package_url]
+
[ad_conn package_url]
If the URL refers to a package instance, this is the URL to the root of the tree where the package is mounted. -
- [ad_conn package_id]
+
[ad_conn package_id]
If the URL refers to a package instance, this is the ID of that package instance. -
- [ad_conn package_key] +
[ad_conn package_key]
If the URL refers to a package instance, this is the unique key name of the package. -
- [ad_conn extra_url] +
[ad_conn extra_url]
If we found the URL in the site map, this is the tail of the URL following the part that matched a site map entry.
In the Notes example, we are particularly interested in the -package_id field. If you study the data model and code, -you'll see why. As we said before in the data modeling tutorial, the Notes application points the -context_id of each Note object that it creates to the -package instance that created it. That is, the context_id -corresponds exactly to the package_id that comes in from +
package_id
field. If you study the data model and code, +you'll see why. As we said before in the data modeling tutorial, the Notes application points the +context_id
of each Note object that it creates to the +package instance that created it. That is, thecontext_id
+corresponds exactly to thepackage_id
that comes in from the RP. This is convenient because it allows the administrator and the owner of the package to easily define access control policies for all the notes in a particular instance just my setting permissions on the package instance itself.The code for adding and editing notes, in -notes/www/add-edit.tcl, shows how this works. At the top -of the page, we extract the package_id and use it to do +
notes/www/add-edit.tcl
, shows how this works. At the top +of the page, we extract thepackage_id
and use it to do permission checks:@@ -92,11 +87,11 @@ if {[info exists note_id]} { permission::require_permission -object_id $note_id -privilege write - set context_bar [ad_context_bar "Edit Note"] + set context_bar [ad_context_bar "Edit Note"] } else { permission::require_permission -object_id $note_id -privilege create - set context_bar [ad_context_bar "New Note"] + set context_bar [ad_context_bar "New Note"] }@@ -105,7 +100,7 @@ for each action.
Later, when we actually create a note, the SQL that we run ensures -that the context_id is set the right way: +that the
context_id
is set the right way:db_dml new_note { @@ -129,25 +124,25 @@ without generating a lot of duplicated HTML in your pages. It also encapsulates most of the common logic that we use in dealing with forms, which we'll discuss next. -The forms API is pretty simple: You use calls in the -template::form namespace in your Tcl script to create +
template::form
namespace in your Tcl script to create form elements. The final template page then picks this stuff up and lays the form out for the user. The form is set up to route submit buttons and whatnot back to the same Tcl script that set up the form, so your Tcl script will also contain the logic needed to process these requests.So, given this outline, here is a breakdown of how the forms code -works in the add-edit.tcl page. First, we create a form object -called new_note: +works in the
add-edit.tcl
page. First, we create a form object +callednew_note
:template::form create new_noteAll the forms related code in this page will refer back to this -object. In addition, the adp part of this page does +object. In addition, the
adp
part of this page does nothing but display the form object:@@ -158,7 +153,7 @@ <hr> <center> -<formtemplate id="new_note"></formtemplate> +<formtemplate id="new_note"></formtemplate> </center>@@ -181,31 +176,31 @@ }
-The if_request call returns true if we are asking the +The
if_request
call returns true if we are asking the page to render the form for the first time. That is, we are rendering -the form to ask the user for input. The tcl part of a +the form to ask the user for input. Thetcl
part of a form page can be called in 3 different states: the initial request, the initial submission, and the validated submission. These states reflect the typical logic of a forms based page in OpenACS: -
+
First render the input form. -
+
Next, control passes to a validation page that checks and confirms the inputs. -
+
Finally, control passes to the page that performs the update in the database.
-The rest of the if condition figures out if we are +The rest of the
if
condition figures out if we are creating a new note or editing an existing note. If -note_id is passed to us from the calling page, we assume +note_id
is passed to us from the calling page, we assume that we are editing an existing note. In this case, we do a database query to grab the data for the note so we can populate the form with it.The next two calls create form elements where the user can insert or edit the title and body of the Note. The interface to -template::element is pretty straightforward. +
template::element
is pretty straightforward.Finally, the code at the bottom of the page performs the actual database updates when the form is submitted and validated: @@ -239,7 +234,7 @@ } } - ad_returnredirect "." + ad_returnredirect "." }
@@ -248,7 +243,7 @@ the HTML rendering, input validation and database transaction logic on your behalf. This means that you can write pages without duplicating all of that code in every set of pages that uses forms. -
To watch all of this work, use the installer to update the Notes package with the new code that you grabbed out of CVS or the package repository, mount an instance of Notes somewhere in your server and @@ -266,13 +261,8 @@ simple, and special purpose application to something that has the potential to be a very useful, general-purpose tool, complete with multi-user features, access control, and centralized administration. -<<<<<<< subsites.html -
In OpenACS 5.6.0, application pages and scripts can be aware of the package ->>>>>>> 1.46 instance, or subsite in which they are executing. This is a powerful general purpose mechanism that can be used to structure web services in very flexible ways. @@ -284,8 +274,4 @@
We also saw how to use the templating system's forms API in a simple way, to create forms based pages with minimal duplication of code. -<<<<<<< subsites.html
($Id$)View comments on this page at openacs.org -======= -($Id$)View comments on this page at openacs.org ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/tcl-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tcl-doc.html,v diff -u -r1.46.2.1 -r1.46.2.2 --- openacs-4/packages/acs-core-docs/www/tcl-doc.html 12 Dec 2010 00:07:03 -0000 1.46.2.1 +++ openacs-4/packages/acs-core-docs/www/tcl-doc.html 12 Dec 2010 01:37:25 -0000 1.46.2.2 @@ -1,5 +1,5 @@ -Documenting Tcl Files: Page Contracts and Libraries By Jon Salz on 3 July 2000
+Documenting Tcl Files: Page Contracts and Libraries By Jon Salz on 3 July 2000
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
Tcl procedures: /packages/acs-kernel/tcl-documentation-procs.tcl
In versions of the OpenACS prior to 3.4, the standard Index: openacs-4/packages/acs-core-docs/www/templates.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/templates.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/templates.html 12 Dec 2010 00:07:03 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/templates.html 12 Dec 2010 01:37:25 -0000 1.45.2.3 @@ -1,10 +1,5 @@ -<<<<<<< templates.html - -
Using Templates in OpenACS By Pete Su
-======= -Using Templates in OpenACS By Pete Su
->>>>>>> 1.47 +Using Templates in OpenACS By Pete Su
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.@@ -83,15 +78,9 @@
Some things to note about this code: -<<<<<<< templates.html -
-The procedure ad_page_contract is -always the first thing a .tcl file calls, if it's under -=======
The procedure ad_page_contract is always the first thing a
.tcl
file calls, if it's under ->>>>>>> 1.47 the www/ directory (i.e. not a Tcl library file). It does validation of input values from the HTTP request (i.e. form variables) and in this case, the-properties
clause is used to set up the @@ -179,12 +168,6 @@ inserting properties into the text of the page. Later on we'll get into templates more deeply, and show how to use database queries as data sources. -<<<<<<< templates.html -View comments on this page at openacs.org -=======View comments on this page at openacs.org ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html,v diff -u -r1.11.2.2 -r1.11.2.3 --- openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html 12 Dec 2010 00:07:03 -0000 1.11.2.2 +++ openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html 12 Dec 2010 01:37:25 -0000 1.11.2.3 @@ -1,10 +1,5 @@ -<<<<<<< tutorial-admin-pages.html - -Admin Pages -======= -
Admin Pages ->>>>>>> 1.13 +
Admin Pages There are at least two flavors of admin user interface:
Admins use same pages as all other users, except that they are offered admin links and buttons where appropriate. Index: openacs-4/packages/acs-core-docs/www/tutorial-advanced.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-advanced.html,v diff -u -r1.32.2.2 -r1.32.2.3 --- openacs-4/packages/acs-core-docs/www/tutorial-advanced.html 12 Dec 2010 00:07:03 -0000 1.32.2.2 +++ openacs-4/packages/acs-core-docs/www/tutorial-advanced.html 12 Dec 2010 01:37:25 -0000 1.32.2.3 @@ -1,10 +1,5 @@ -<<<<<<< tutorial-advanced.html - -
Chapter 10. Advanced Topics Table of Contents
- Write the Requirements and Design Specs
- Add the new package to CVS
- OpenACS Edit This Page Templates
- Adding Comments
- Admin Pages
- Categories
- Profile your code
- Prepare the package for distribution.
- Distributing upgrades of your package
- Notifications
- Hierarchical data
- Using .vuh files for pretty urls
- Laying out a page with CSS instead of tables
- Sending HTML email from your application
- Basic Caching
- Scheduled Procedures
- Enabling WYSIWYG
- Adding in parameters for your package
- Writing upgrade scripts
- Connect to a second database
- Future Topics
-======= -Chapter 9. Advanced Topics Table of Contents
- Write the Requirements and Design Specs
- Add the new package to CVS
- OpenACS Edit This Page Templates
- Adding Comments
- Admin Pages
- Categories
- Profile your code
- Prepare the package for distribution.
- Distributing upgrades of your package
- Notifications
- Hierarchical data
- Using .vuh files for pretty urls
- Laying out a page with CSS instead of tables
- Sending HTML email from your application
- Basic Caching
- Scheduled Procedures
- Enabling WYSIWYG
- Adding in parameters for your package
- Writing upgrade scripts
- Connect to a second database
- Future Topics
->>>>>>> 1.34 +Chapter 10. Advanced Topics Table of Contents
- Write the Requirements and Design Specs
- Add the new package to CVS
- OpenACS Edit This Page Templates
- Adding Comments
- Admin Pages
- Categories
- Profile your code
- Prepare the package for distribution.
- Distributing upgrades of your package
- Notifications
- Hierarchical data
- Using .vuh files for pretty urls
- Laying out a page with CSS instead of tables
- Sending HTML email from your application
- Basic Caching
- Scheduled Procedures
- Enabling WYSIWYG
- Adding in parameters for your package
- Writing upgrade scripts
- Connect to a second database
- Future Topics
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.This tutorial covers topics which are not essential to Index: openacs-4/packages/acs-core-docs/www/tutorial-caching.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-caching.html,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/acs-core-docs/www/tutorial-caching.html 12 Dec 2010 00:07:03 -0000 1.8.2.2 +++ openacs-4/packages/acs-core-docs/www/tutorial-caching.html 12 Dec 2010 01:37:25 -0000 1.8.2.3 @@ -1,10 +1,5 @@ -<<<<<<< tutorial-caching.html - -
Basic Caching Based on a post by Dave Bauer.
-======= -Basic Caching Based on a post by Dave Bauer.
->>>>>>> 1.10 +Basic Caching Based on a post by Dave Bauer.
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.Caching using the database API is described in the database API tutorial.
Caching using util_memoize
Implement your proc as
my_proc_not_cached
Create a version of your proc called
my_proc
which wraps the non-cached version in the caching mechanism. In this example, my_proc_not_cached takes one argument, -foo, so the wrapper passes that on. The wrapper also uses the list command, to ensure that the arguments get passed correctly and to prevent commands passed in as arguments from being executed.ad_proc my_proc {-foo} { Index: openacs-4/packages/acs-core-docs/www/tutorial-categories.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-categories.html,v diff -u -r1.11.2.2 -r1.11.2.3 --- openacs-4/packages/acs-core-docs/www/tutorial-categories.html 12 Dec 2010 00:07:03 -0000 1.11.2.2 +++ openacs-4/packages/acs-core-docs/www/tutorial-categories.html 12 Dec 2010 01:37:25 -0000 1.11.2.3 @@ -1,10 +1,5 @@ -<<<<<<< tutorial-categories.html - -Categories