File Repositpory Project


Problem statement:

Add a Tcl-based file upload utility to the CINEMA web interface, using the cgi.tcl library (see /home/hgs/html/cinema or CVS for code). Upload access is restricted to either moderators or members, based on the mySQL configuration for sipconf.

Milestones:

SQL Database:

We store all the file information in a SQL database named file_repository. Following fields can be considered in the file repository table.
conference varchar The id of the conference
creator varchar The id of the owner
file_id int The primary of the file, automatically incremented.
file_name varchar name of the file
file_type varchar text/plain or application/postscript(by Icon)
file_size int
file_description varchar The description of the file information.
file_access? Public or restricted
date_created datetime Create time for the uploaded file.
date_modified datetime latest modified time of the uploaded file.
Edit? Update/Delete, creator(update/delete), moderator(delete)

Henning's comments

Note that you should be able to handle a whole range of filetypes,
including PowerPoint, PDF, plain text, HTML, Word, etc.

Access should be:
- public
- member (any conference member)

Use an enum.

Instead of Edit?: should note whether the file can be overwritten or
deleted by
- moderator
- member (any conference member)

Also enum.

> I don't know whether it has been discussed earlier, but why do we need to
> store the files in the database (why not files in the file system).

Longer term, I'd like to store the file data in the database, as that
avoids access rights being different for the file system than for the
database. Also, the mySQL database allows replication for load
balancing, which wouldn't work if there are files involved. (We would
then have to assume that all replicas have a shared file system.)
Finally, if we want to introduce directories and file versioning, this
requires some hackery on the file system part.

Also, if you store files on the server, you now have to synchronize the
mime.types table to make sure that the file extension produces the
correct content-type.

Finally, it's easier to write a file access logging mechanism that way,
without having to rely on the web server. (This is far down the priority
list, but I'm planning ahead.)

However, currently the Tcl mysql library cannot handle binary data. I
had asked Kundan to take a look at libfbsql; I don't think this is hard
to fix.


By Huwei Zhang, Computer Science Department of Columbia University.