Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Hashed directory structure for detailed pages?

Quote Reply
Hashed directory structure for detailed pages?
Hi,

I need to implement a hashed directory structure for detailed pages, like there is for the files. Is there an option in Links SQL to implement this?

I don't think that it'll be very good for the file system if there are 30-40,000 files in a directory :(
Quote Reply
Re: [cwi] Hashed directory structure for detailed pages? In reply to
This is not currently possible.

Could be done through a plugin (or a hack), though.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Hashed directory structure for detailed pages? In reply to
In Reply To:
This is not currently possible.

Could be done through a plugin (or a hack), though.

Hi Ivan,

Thanks for your helpful response.

Are you planning on adding this functionality to your pagebuilder plugin?

Last edited by:

cwi: Feb 12, 2003, 4:36 AM
Quote Reply
Re: [cwi] Hashed directory structure for detailed pages? In reply to
There are no plans to add this to the plugin, but with the plugin you can build detailed pages in the directory where the category is built, which might also help you.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Hashed directory structure for detailed pages? In reply to
Hi Yogi,

Thanks for your response.

Would you be willing to add this extension in to Pagebuilder as "custom" work? (Payment via Paypal).
Quote Reply
Re: [cwi] Hashed directory structure for detailed pages? In reply to
How active is your site? With 30-40,000 detail pages, that might be a good excuse to check into dynamic serving of the pages.

There has to be a significant build time, so you count that against the dynamic serving time.

On the other end, I've been considering this for awhile, and I *think* I have to build this into the auction system. Pages that sit around for days can be built once, and only altered if bid on.

I have avoided Build.pm for about 2 years now, but there should be a way to override the default build for detail pages, and the default serve for a detail page, so that you break the pages up into a logical format. There were some suggestions awhile back on hashing algorithms, but one that seems to make sense, is to turn a number (ID) like 103842 into /10/38/42 This limits both the number of directories and files. (For file storage, you want to have a higher number of node directories, depending on how many attachments you have on each link).

Storing by categories has problems if you have very large categories. It doesn't provide as balanced a tree as using the numerical hash. The advantage, though, for the auction system, is that it would allow you to put different categories on different devices for load balancing or performance (storage?) issues.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [cwi] Hashed directory structure for detailed pages? In reply to
Did anyone ever develop a way to accomplish this? This would be an extremely useful feature for me as well.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Hashed directory structure for detailed pages? In reply to
The PageBuilder plugin can do this.

When you are building a 'links' page (i.e. a page for every link, but not the standard detailed page), you can define a hashed directory structure. You can for example set the 'Build Directory' to

somedir/<%hash%>/somethingelse/<%ID%>.html

<%ID%> will be replaced by the Link ID, and <%hash%> will be replaced by a hashed directory (e.g. '0' up to '9', but you can also set the upper limit to any number you like, e.g. '1000' ).

I hope this helps.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Hashed directory structure for detailed pages? In reply to
Thanks, Ivan. I may give that a shot. So if I understand you correctly, with PageBuilder I would "turn off" standard detailed pages and "turn on" custom detailed pages which could be built with the directory structure you outline? I take it the <%hash%> value is automatically generated based on the link ID? It doesn't have to be manually configured on a per link basis or anything, does it?

Thanks again.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund