Forum OpenACS Development: Notifications of File-storage

Collapse
Posted by David Ortega on
Hi all,

In the mark of the E-Lane project we are adding notifications to file-storage package.

There are many events that can cause a notification, such as: creating/deleting a new file/link/folder, adding a new version of an existing file, renaming a file/link/folder... but if we implement notifications for all these events,  too many emails may be produced.

I have already implemented code for creating new files/links and adding a new version of them. Users can request notifications for an entire root folder (including all subfolders) or for every subfolder.

¿What do you think about it? ¿do I add other events?

Thanks!

David

Collapse
Posted by Tilmann Singer on
Did you look at the patch that has been uploaded for this bug:

https://openacs.org/bugtracker/openacs/com/file-storage/bug?bug%5fnumber=19

Any reason why it cannot be applied?

Collapse
Posted by David Ortega on
At the end of that page says:

<blockquote>6/08/2004 Reassigned by Rocael Hernandez
This will be done by Telefonica I+D for the E-LANE project.
</blockquote>

I am working on it @ Telefonica I+D

Collapse
Posted by Tilmann Singer on
I got the impression from your initial posting that you are re-implementing functionality that is already available in that patch and just wanted to make sure you don't overlook its existence. It would be a pity to spend that effort again instead of investing it into something useful. In fact it's a pity that it stayed there so long without getting applied.

To give an answer to your original question - I think that notifiying on new files and versions and deletion is sufficient. Sending emails on renaming, moves and new folders sounds like too much email to me too.

Collapse
Posted by Nima Mazloumi on
HI David,
that is a great idea. I think new files/links and versions are the most important. Folders, Deleting/Renaming/Moving items are secondary. With moving I would see it as deleting and creating, so the creating part could result in a notification if the user has activated notification for the target folder.

Thank you for this extension. When will it be available?

Greetings,
Nima

Collapse
Posted by Dave Bauer on
David,

Can you coordinate this with me? I am working on the file-storage package. Thanks for this work, notifications for file-storage is very important.

Collapse
Posted by David Ortega on
Of course Dave, we can coodinate our works.
Collapse
Posted by Nima Mazloumi on
One thought that just came to my mind: Will it be possible to serve a link to the relevant files/folders so that a user can at its best download the file directly?
Collapse
Posted by Orzenil Silva Junior on
Hi Nima,

I don't know if it is relevant this thread but I am working in a way to enable a link to attachment service with news package. This way I pretend upload to file-storage files really relevant to a single news item so a user could download them directly.

You can see the initial job at http://oacs-cf.intertexto.info:8002/noticias-pncf/ (choose an news item an you see a list for attached files to - not formatted yet :) )

Thanks to file-storage integration we can choose an attach uploaded via webdav

OpenACS really rocks!

\Orzenil

Collapse
Posted by Rocael Hernández Rizzardini on
<blockquote>> Will it be possible to serve a link to the relevant files/folders so that a user can at its best download the file directly?
</blockquote>

great suggestion Nima!
David, I think is easy to include.

Collapse
Posted by Tilmann Singer on
Rocael - I guess you mean the tcl api for service contracts, yes that is easier to maintain. Still a pity for the duplicated effort.
Collapse
Posted by Rocael Hernández Rizzardini on
Oh, I haven't noticed that patch Tilmann, thanks saying that.
David, I think is worth to see that patch, but anyway, David will implement this with SC, which makes more sense nowadays + easier to maintain for oracle/pg. Also David, is important to coordinate with Dave since he's the major maintainer of the file-storage now.
Collapse
Posted by David Ortega on
Hi all,

I have already finished with the implementation of  notifications in file-storage (SC version).

It is a mixture between code of the patch and parts that I had done before knowing this patch.

The request of notifications in each folder is allowed separately,  but the subscription to an upper folder includes all those that contain. It's i18n-ize.
As Nima proposed, in the message I have included two links: one to directly download the file and other to see the content of folder in which it is.

Finally, the events that produce notifications are:

+to upload a new file
+to create a new Link
+to upload a new version of a file

It's tested with PG but not with Oracle since we do not have any version available.

Due to our proxy, we cannot access to cvs reason why I have been based on a version of file-storage that Rocael sends me last week.

Dave, these are the created or modified files:

tcl/apm-callback-procs.tcl
tcl/file-storage-notifications-procs-oracle.xql
tcl/file-storage-notifications-procs-postgresql.xql
tcl/file-storage-notifications-procs.xql
tcl/file-storage-notifications-procs.tcl
tcl/file-storage-procs.tcl
tcl/file-storage-dav-install-procs.tcl

www/index.adp
www/index.tcl
www/simple-add2.tcl

All the changes are labeled with "notification begin/end"

I can send it by email so that you review it. Oracle is not implemented (but it's only a query)

Collapse
Posted by Nima Mazloumi on
Tilmann...if I understand you correctly we already have notification for 5.1 or only a patch that needs to make its way to the source?
Collapse
Posted by Tilmann Singer on
Nima - only a patch that didn't make its way to the source in time apparently (here https://openacs.org/bugtracker/openacs/com/file-storage/patch?patch_number=146 - linked from the bug posted above).
Collapse
Posted by Orzenil Silva Junior on
Hi
This patch didn't aplly cleanly oacs-5-1. I tried to do it in a fresh install and didn't work fine.
I change manually some failed hunks and I think this patch works ok now. I tried it in
http://oacs-cf.intertexto.info:8002/noticias-arquivos/
You can see Request notification link and it works - I received an email by notification service :)
Notification for: File-Storage: File deleted Name of the File deleted: imagem1 View folder contents: http://oacs-cf.intertexto.info:8002/noticias-arquivos/?folder_id=1233

I'm trying make a new patch file and upload it to bug tracker.
/Orzenil
Collapse
Posted by Orzenil Silva Junior on
I submitted a slight modified patch file to add notifications to oacs-5-1-0 file-storage package.
There are no great changes from patch #146 submitted by Abhina Peddada.

You see it at https://openacs.org/bugtracker/openacs/patch?patch_number=534

Collapse
Posted by Tilmann Singer on
Patch applied to HEAD, thanks. If anyone has time please test on oracle. And if anyone has even more time, i18n-ize it ...
Collapse
Posted by Talli Somekh on
Hi David,

Thanks so much for taking up notification-izing FS. This is something that is really helpful and critical.

One feature that DaveB and I have been chatting about is a feature that Xythos has. This feature was identified by a sysadmin from Vassar College as a killer feature for their "home brewed" course management system.

The functionality is outside the scope of what you are doing now, but notifications is the first step to implementing them. It has the following features:

  • Email access to a file or folder - A person can enter an email address with a passcode (either with a password or the passcode embedded in the URL) so that a person who doesn't have general permissions to the page can access that information.
  • Limit access to items Each item that is sent to people using the above feature can be limited according to the following criteria
    • # of downloads limit the number of times a person can download the file
    • # of views limit the number of times the file/folder can be viewed
    • time window for access a recipient can only access the file until a certain expiration time set by the individual who sent access to the file/folder

these are the items that i can think of at the moment. there are probably others that we can come up with over time and hack according to the requirements that are developed.

talli