Forum OpenACS Development: Should we make more use of the content repository?

As an example, the "postcard" package stores blobs directly in its
table rather than within the content repository.

Why is this a problem?  Well ... the differences between Oracle and PG
large-object handling is hard to hide in the simple model we're using
in the query dispatcher.  The content repository itself can hide these
differences internally and provides a consistent API to clients which
easily fits into the query dispatcher scheme of customizing SQL.

The content repository also optionally allows the creation of objects
under its control in the host file system rather than the DB.  While
not particularly relevant to the "postcard" package, it does make
sense to at allow optional configuration of, say, the photo album
package to store photos directly in the file system for increased
system performance (especially in PG, where BLOBs are base64'd by my
driver hack and therefore require conversion whenever a user downloads
one).

OK - two advantages, one of them - hiding LOB differences behind a
consistent API - major.

The disadvantages?  Possible issues in regard to scalability.
Slightly more complicated code in the package using LOBs.  Other than
that I can't think of any.

The scalability issue worries me a bit, but the benefit of hiding LOB
differences is significant now that we support both PG and Oracle.
And that significance increases for every RDBMS we add to the list in
the future.

So, what do people think?  Is the cost too high to mandate use of the
CR for all modules which store BLOBs?

(BTW the APM's already been converted to store tarballs in the CR,
DanW did it and the changes look quite simple).

If you can't store content in the content repository, what can you do with it? If there's scalability issues (are there?) it needs to be fixed, not ditched.

As you mention, there is the 'publish to file system' feature which should speed things up considerably, espescially for packages like bboard with their hierarchical structure (Oracle 'connect by').

Having a consistent api layer for hiding lob differences would be nice, and as Don stated the changes necessary to hook into the content repository are quite simple.

I think scalablity will be an issue, but on the plus side the CR's extensive api helps shield the packages that use it from most of the internal implementation.  So, if we do some redesign to improve performance, the CR api will remain mostly the same, and there should be little or no change for the packages that use its services.

Overall, I think tying packages into the CR whenever possible is a plus, because it opens up interesting new ways of sharing data throughout the system via the use of a consistent interface.