Home
The Toolkit for Online Communities
17513 Community Members, 1 member online, 2311 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Development : How to store images?

Forum OpenACS Development: How to store images?

Icon of envelope Request notifications

Collapse
Posted by xx xx on
Hi, I need to store 3 (..or more) images for every user in my system.
What is "best practice" for storing and retrieving images?

If I look at dotLRN (header image) and OpenACS (user-portrait) I should conclude that the Content Repository is the way to go. However, this creates 2 objects per image and rows in 5 tables (I believe).

I plan to display these images, together, in another 'custom' object.
As I was reading Gratuitous use of acs_objects? I started to wonder whether storing images this way is the right way to go .

What is "best practice"? What gives "best performance"? Any suggestions?

Collapse
2: Re: How to store images? (response to 1)
Posted by Don Baccus on
I would store them in the CR and, assuming you're regularly backing up files as well as the database, use the CR's ability to store the data in a file rather than in the DB to improve performance when they're downloaded by users.

On the other hand, if you have the CR store them in the DB your DB backups will contain all the images making restoring from scratch a simpler process.  But returning them to users will be somewhat more expensive, particularly in the PG version.

As regards the expense of the CR I would say that while many have argued that it must be expensive to use none have proven that either the object system or the CR is truly a bottleneck on any live system.

The permissions system is a bottleneck, that we know, but that's due to its implementation and has nothing whatsoever to do with either objects or the CR.

Collapse
3: Re: How to store images? (response to 1)
Posted by Keith Paskett on
Doesn't the permissions system get slower as you add more objects? My experience with ACS4.2 taught me not to keep the number of objects on a site down to avoid permissions system slowdown.
Collapse
4: Re: How to store images? (response to 1)
Posted by Roberto Mello on
Hi Keith,

Nice to see you around here again... (Keith is my work supervisor at USU :-))

Did you mean to say that your experience has taught to keep the number of objects down (instead of not to keep it down)?

I know several things were fixed in 4.5 with respect to the permissions system (although I can't remember exactly what), and more things were improved in 4.6 (see http://www.brasileiro.net/roberto/artigos/new-changelog.html specially the acs-kernel and acs-tcl sections).

-Roberto