[gollem] FTP quota taken from SQL database

Oliver Kuhl okuhl at netcologne.de
Mon Jun 19 02:18:59 PDT 2006


Jan Schneider <jan at horde.org> schrieb:

> Zitat von Oliver Kuhl <okuhl at netcologne.de>:
>
>> our FTP quota/usage is stored in a MySQL database. If I'm right, I
>> need a special FTP-VFS driver, which supports SQL quotas. I would like
>> to implement a solution, which makes it back into the horde project,
>> so I like to discuss the way to solve the problem.
>>
>> Normally, I would simply extend the VFS_ftp driver to something like
>> VFS_ftp_sqlquota, but I'm not sure about this. It would be cleaner to
>> implement separate quota drivers which can be combined with other VFS
>> backends. But this means to change the whole quota implemenation in
>> gollem and maybe other applications.
>>
>> What is your opinion about this?
>
> How about implementing a composite pattern in Gollem, where you can
> configure one VFS driver to provide the actual FS backend, and a
> different driver to provide the quota?

I'm not sure if a composite pattern is really what we need here (or I  
just didn't understand it ;-) ).

However, Gollem does not provide the VFS drivers and so the quota  
stuff should be implemented somewhere in [Horde]/lib/VFS(.php),  
shouldn't it?

What we need here is a quota driver that simply reads the used quota  
and the limit from a database because the FTP server manages quota  
itself. So the quota drivers should be configurable as "read only" and  
the other problem is that the quota limit must be read from the  
database and not be hardcoded in Gollem's backends.php. At least  
optional.

My idea is to implement a VFS_composite driver which holds an VFS  
driver and a Quota driver. So there would be a new driver category  
"Quota" below [Horde]/lib/. This would affect all applications using  
VFS and not only Gollem.

What do you think about this? Is there any reason against this  
solution (dependencies, other apps, compatiblity, etc)?

Gruss,
     Oliver.





More information about the gollem mailing list