Very large number of image files
Posted: 2021-06-02 21:31
First off, thanks as always to Ahmad and everyone in this community for an excellent product. While it has suffered through some unstable versions over the years, I've yet to see any other product that delivers such value.
What follows is not an AppGini problem per se, but would expand the power of AppGini to more large scale deployments.
An application I have been running for a client features a table with each record pointing to several image files. Users are able to upload image files using the image fields, and as of now there are about 55,000 image files pertaining to records in the table. (Think insurance claim records with images of damaged auto parts.)
Recently I had to migrate the database and all files to a new server using FTP. As far as the application is concerned a Linux directory has no practical limit to the number of image or other files that can be in it. (2^32 or approximately 4.3 billion files or "inodes") Nor is there any significant performance issue accessing the files when a record is accessed for now anyway. Shared hosting FTP servers do typically limit the number of displayable files to 10000 by the FTP server LimitRecursion setting which isnt always changeable. Having a virtual private server typically allows setting LimitRecursion to a higher value, but understandably not so in shared hosting environments.
My current workaround involves deleting moved files from the origin server so the not yet moved ones become visible to the FTP server in batches of 10000 files. If it becomes a run time performance issue I will probably develop hooks to manage the directories for saving/deleting files.
What would be great is if one could specify which directories AppGini saves files to, through some configuration option enabling multiple directories. For example it could be that each file goes to a directory named after the first one or two initials in the file name, or some such. That would not only make managing the files using FTP more feasible, it would also allow for performance tuning in large scale deployments.
Again this isn't an AppGini problem per se, but a concern for larger deployments. Just putting it out there.
Thanks.
What follows is not an AppGini problem per se, but would expand the power of AppGini to more large scale deployments.
An application I have been running for a client features a table with each record pointing to several image files. Users are able to upload image files using the image fields, and as of now there are about 55,000 image files pertaining to records in the table. (Think insurance claim records with images of damaged auto parts.)
Recently I had to migrate the database and all files to a new server using FTP. As far as the application is concerned a Linux directory has no practical limit to the number of image or other files that can be in it. (2^32 or approximately 4.3 billion files or "inodes") Nor is there any significant performance issue accessing the files when a record is accessed for now anyway. Shared hosting FTP servers do typically limit the number of displayable files to 10000 by the FTP server LimitRecursion setting which isnt always changeable. Having a virtual private server typically allows setting LimitRecursion to a higher value, but understandably not so in shared hosting environments.
My current workaround involves deleting moved files from the origin server so the not yet moved ones become visible to the FTP server in batches of 10000 files. If it becomes a run time performance issue I will probably develop hooks to manage the directories for saving/deleting files.
What would be great is if one could specify which directories AppGini saves files to, through some configuration option enabling multiple directories. For example it could be that each file goes to a directory named after the first one or two initials in the file name, or some such. That would not only make managing the files using FTP more feasible, it would also allow for performance tuning in large scale deployments.
Again this isn't an AppGini problem per se, but a concern for larger deployments. Just putting it out there.
Thanks.