Kenneth,

I have a system that tracks signatures and we get thousands of signatures every 
day.  We started storing these several years ago and we were originally storing 
all images in one place.  Our first attempt we stored the .png files as Image 
fields with the store outside the datafile setting on.  It was so easy to setup 
and we were off to the races but then we ran into problem.  Next we tried 
storing all of the images into one OS folder.  Once we got up over about 25k 
signature .png files in a directory we starting seeing problems.  The main 
problem here is if you ever need to browse to the directory manually and try 
and find/fix something the OS freezes for some time.  It gets worse as the 
number of files grow.  We currently have about 10 million signature images 
stored and we break it down by several groupings per day now with a few 
thousand images per directory.  This has solved the majority of our problems.

Regarding storing in the datafile (externally stored)....don't do it if you 
have a high volume of documents.   Here's a few of the problems I have had with 
this method.

1.  Backup takes much longer to backup your data as it also has to backup all 
of your documents stored externally
2.  Your 4D backups can get HUGE
3.  Restoring your backup takes much much longer because it has to write out 
all of the externally stored documents to disk.  This really really hurt one 
day when our server crashed and the restore took several hours vs. about 25 
minutes since removing the images.  Our datafile is about 70gb of data not 
counting our signature images.
4.  If something happens and you get a corrupt document on disk or a corrupt 
directory 4D's compact/verify freaks out because it can't access an externally 
stored document it wants.  You then have to essentially loop through the 
datafile and attempt to load each document that is stored on disk and see if 
you get an error and if you do re-save the record with the document removed 
from the record.  Without this your compact/verify fails.

I highly recommend segmenting out your documents into smaller chunks of up to a 
few thousand files per directory.  I also recommend using something like Amazon 
S3 with geo redundant storage for storage and backup of those documents.  It's 
more work upfront but can make your life much easier over the long run.  The 4D 
Method user group had a presentation on using AWS a couple years ago that can 
help get you on the right track there.



Thanks
Justin
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to