Forum OpenACS Development: What is the OpenACS 4 platform?

After spending considerable time surfing around on openacs.org, opennsd.org, postgresql.org, aolserver.com, arsdigita.com and sourceforge.net I have collected a set of files I think are the right ones for to run/develop OpenACS-4 on.

Please correct me if I'm wrong:

  • OpenACS-4
    from the openacs.org SDM/CVS

    I obtained the source it with:
    cvs -d:pserver:anonymous@openacs.org:/cvsroot login
    cvs -z3 -d:pserver:anonymous@openacs.org:/cvsroot checkout openacs-4

  • Postgres 7.1RC1
    from postgresql.org ftp server
    ftp://ftp.postgresql.org/pub/dev/postgresql-7.1RC1.tar.gz

  • Postgres driver
    It seems that Sourceforge hosts the latest version
    cvs -d:pserver:anonymous@cvs.acs-pg.sourceforge.net:/cvsroot/acs-pg login
    cvs -z3 -d:pserver:anonymous@cvs.acs-pg.sourceforge.net:/cvsroot/acs-pg co driver-2.3

  • AOLserver/OpenNSD
    Aolserver is a bit confusing... I found two things on OpenNSD.org: 1) 3.5.0b1 is planned for April 1st and 2) I could not do an anonymous login to the CVS server, and this discussion suggests that OpenNSD is not yet available.

    AOLserver 3.3.1 (http://aolserver.com/archive/pub/source/aolserver3_3_1.tar.gz) is probably also not the right version (does it have the '+ad12' patches?)

    So I finaly settled for the Arsdigita one (3.2+ad12): http://www.arsdigita.com/acs-repository/one-version?version_id=959 because this version also has the (required?) nscache, nsrewrite and nssha1 modules (and an older postgres driver which [does/does not] work with PG7.1?!?).

Is this list correct?

What I also want to know is how tricky/simple it is to run both Postgres 7.0.3 AND Postgres 7.1 on one box? This is kinda important to me because I intend to run a box with OpenACS 3 and 4. I intend to very frequently update that box, if possible nightly & automatic.

Collapse
Posted by Dan Wickstrom on
Your list looks ok.

Running two separate versions is pretty straight forward.  You need to run each version with its own install directory, its own port number and its own data directory.

I currently run two versions by having them installed under different user accounts with environment variables (PGPORT and PGDATA) set to a different port number and location for each version.

Don has recently added a change to the pg driver, so that the pg installation directory can be specified in your nsd.tcl file.  You could then build each pg version with the port and data directory already configured which would allow you to run multiple pg versions from the same user account without having to set environment variables.  Changing versions for a particular openacs installation could be done by editing your nsd.tcl file.

Collapse
Posted by Don Baccus on
Dan's comment about my recent changes aren't quite accurate so let me
clarify a bit...

For starters, the driver itself is linked against the PG client
library, with the appropriate path information to find the given
installation data etc.  To run two versions, you need two .so files.
On my system I have postgres.so and postgres7.1.so to run PG 7.0 and
7.1.  I simply configure the right driver in my "/ns/db/drivers"
section and OpenACS 3.1 works fine.

The package loader for ACS 4x needs to be able to run PSQL directly,
as well as access the driver.  This means that you need to give
OpenACS 4x two separate paths the the PG binaries to run two versions.

This is where the new config param Dan alludes to comes in.  I
"invented" a new /ns/db/driver/postgres param called "pgbin" that lets
you specify the path to the directory containing PG binaries.  At the
moment only PSQL is needed.

At the moment OpenACS 4x ignores your PGPATH and other environment
variables, which means you *must* supply the "pgbin" config param.
I'll clean that up after I get the APM working for both Oracle and PG,
since it's really just a convenience, not a showstopper.

Pascal - since you've offered to help with documentation, if you are
planning to run OpenACS 3.2+PG7.0 and OpenACS4x+PG7.1 on the same box,
would you be willing to write up what's needed in a more presentable
form?  I'll be more than willing to help you through any sticky spots
you hit while trying to get things configured and running ...

Collapse
Posted by Pascal Scheffers on
Some Postgres 7.1 questions:
  • Do I need to configure --with-CXX to be able to compile the pg-driver, or will that work anyway?
  • The comments near the BLCKSZ parameter in config.h.in states that now we have TOAST, we don't need to increase it to 16384. Which makes me wonder that maybe we should compile it with a value of 4096 for small linux boxen/IDE drives... The ACS/Oracle installation documentation says that this value is more appropriate for 'small linux boxes'.
  • '--enable-locale' and '--enable-multibyte' for Unicode support. Should we define this as a standard for the OpenACS platform? It seems that this (combined with TOAST) should not cause any problems with existing installations.
The standard OpenACS documentation should probably be updated for postgres 7.1
Collapse
Posted by Roberto Mello on
Pascal,

In what ways should the documentation be upgraded for PG 7.1? In the
February revision I added some notes for PG 7.1 to the installation
guide, including one on the "How to increase the block size" section
that says "(NOTE: This will be completely unnecessary in PostgreSQL
7.1 as it will be rid of this limitation)"

Let me know if there's anything I missed and I'll add it to the
documentation.

Thanks.

Collapse
Posted by Pascal Scheffers on
Roberto,

You're right :) I'm right :) Your note on the blocksize thing is in
the Open ACS installation guide. It is not, however, in the
simple-postgres-installation-guide, which is what I referenced.

I am still wondering about the that maybe a smaller block size is
better for small boxes. I might just run a test, if nobody else has
done it (maybe I should check the Postgres website)...

Collapse
Posted by Don Baccus on
Some data on the performance of PG 7.1 with the default 8KB blocksize vs. a larger blocksize would be interesting to have, Pascal.  I've not played with this at all.  I would think a larger blocksize would be better on larger systems and a smaller blocksize on smaller systems but that is nothing but intuition speaking.

You can emulate a smaller system on a larger box by varying the "-B" parameter given the postmaster along with changing the blocksize and recompiling PG.

Collapse
Posted by Pascal Scheffers on
I will have to look for some scripts that run for more than 30 minutes and stores rather large pieces of data in database, can someone guess what would be a good instruction mix for such a test? I think it should be based on what a rough ACS usage mix would be. I need a list like:
  • 10% single table lookups
  • 30% two-table joins
  • 15% three-table joins
  • 25% single table update
  • 10% multi-table transactions
  • 10% bulk full text searches
That way we can get a good idea what is good for OpenACS on different boxes. Mind you, we might end up with an advice like 'don't bother tweaking, you'll only gain 2% performance. It's cheaper to buy more RAM.'
Collapse
Posted by Don Baccus on
Your idea for a list is pretty good, but the actual ratio of SELECT
vs. UPDATE/INSERTs is skewed far too highly towards UPDATE/INSERTs
which in practice are infrequent.  I'd say a total of 10% of the load
due to UPDATE/INSERT statements would be more representative.

Likewise the sitewide search frequency would be far lower in practice
than you suggest.  Experience with photo.net shows that it's hard to
get people to use the search feature rather than ask duplicate
questions, for instance.

Collapse
Posted by Ahmed Moustafa on
Due to my firewall, I'm not able to checkout the latest versions of OpenACS-4 and Postgres driver from the CVS server on openacs.org. Is it possible to make it downloadable through HTTP or FTP?

Regards,