NAME

DiaColloDB::Client::list - diachronic collocation db: client: distributed

DESCRIPTION

DiaColloDB::Client::list is a subclass of DiaColloDB::Client for accessing a set of distributed DiaColloDB databases via a list:// URL whose path part is a space-separated list of sub-URLs supported by DiaColloDB::Client. It supports the DiaColloDB::Client API by calling the relevant methods on each of its sub-clients.

new() options and object structure:

##-- DiaColloDB::Client: options
url  => $url,       ##-- list url (space-separated sub-urls)
##
##-- DiaColloDB::Client::list
urls  => \@urls,     ##-- sub-urls
opts  => \%opts,     ##-- sub-client options
fudge => $coef,      ##-- get ($coef*$kbest) items from sub-clients (0:all; default=10)
logFudge => $level,  ##-- log-level for fudge-coefficient debugging (default='debug')
##
##-- guts
clis => \@clis,      ##-- per-url clients

The most important client parameter is the fudge=>$coef option, which requests that up to $coef*$kbest items be retrieved from sub-clients for each profile() call. If $coef <= 0, all collocates will be retrieved from each sub-client, and trimming will be performed exclusively by the superordinate DiaColloDB::Client::list object. The default value of 10 should return reasonable results without too large of a performance penalty in most cases, but be aware that the results may not be strictly correct due to sub-client local pruning.

Needs work for use in production environments, since the pruning semantics for the kbest request parameter are applied both by sub-clients (modulo the fudge client option) and must be re-evaluated after integrating data from all sub-clients. The current strategy is not strictly correct, and should probably use the kbest(union(which(...))) strategy used by comparison profiles.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2015-2016 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

DiaColloDB::Client(3pm), DiaColloDB(3pm), perl(1), ...