Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] master/slave catalogs - (products & checkout)



******    message to minivend-users from Dave Barr <barrd@cricinfo.com>     ******

>  > I'm hoping that someone might be able to help/advise me as to the
>>  best course of action regarding LARGE numbers of catalogs (in time
>>  several thousand, ulp ;).
>
>Hmm. This would argue for a completely table-based virtual catalog
>setup. This is very doable with Interchange, and we will be coming out
>with a template eventually. Consider:
>
>in minivend.cfg:
>
>GlobalSub <<EOR
>sub setcat {
>	my $db = Vend::Database::database_exists_ref('store');
>	my $c_id = $::Scratch->{store_id} || 'default';
>	my $settings = $db->row_hash($c_id);
>	unless ($settings) {
>		::logError "$c_id not a store.\n";
>		$settings = $db->row_hash('default');
>	}
>	for(qw/COMPANY ADDRESS STATE COUNTRY POSTCODE YOU_GET_THE_IDEA/) {
>		$::Variable->{$_} = $settings->{lc $_};
>	}
>	return;
>}
>EOR
>
>in catalog.cfg:
>
>Autoload setcat
>
>The problem with that many subcats is they end up eating all of your
>memory. If you have any significant differences between them, each one
>will add X kbytes to your memory footprint.
>
>You just set up an Autoload that looks for the catalog ID

Thanks Mike (& Chris) for your answers, looks like the way to go, 
unfortunately due to some astoundingly bad management decisions I 
have been left with no time to implement these ideas into phase 1 
(six shops are to be built using the "traditional shop model") over 
the coming weeks. However I look forward to the up and coming 
versions of Interchange and conversing around such notable
topics as how to spread the load across a cluster of machines whilst 
retaining state, getting the most from your memory footprint etc etc 
ad nauseum..... ;)

Rgds
Dave

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: