Re: scalable web gallery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Why not use a hash table based upon the name of the file and distribute files that way?

sorry tedd, i don't really get it. but i am interested to know more
about the hash table concept.
can you explain a little bit more..

thanks..

On 7/11/08, tedd <tedd.sperling@xxxxxxxxx> wrote:
> At 10:41 AM -0400 7/10/08, Daniel Brown wrote:
>>     Still, I'd create 16 subdirectories under the images directory:
>>0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f.  Then name the file as an MD5 hash of
>>the image uploaded, and place it in the directory matching the first
>>character of the new file name.
>
> Why not use a hash table based upon the name of the file and
> distribute files that way?
>
> You don't even need a directory until you actually need one -- then
> create one 'on-the-fly' and drop the file into it.
>
> As such, it's easy to find the file again by simply hashing it's name
> -- you don't even need to store a path for the file, only the name of
> the file.
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux