Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dbix::class::storage::dbi::replicated::replicant(3) [osx man page]

DBIx::Class::Storage::DBI::Replicated::Replicant(3)	User Contributed Perl Documentation    DBIx::Class::Storage::DBI::Replicated::Replicant(3)

NAME
DBIx::Class::Storage::DBI::Replicated::Replicant - A replicated DBI Storage Role SYNOPSIS
This class is used internally by DBIx::Class::Storage::DBI::Replicated. DESCRIPTION
Replicants are DBI Storages that follow a master DBI Storage. Typically this is accomplished via an external replication system. Please see the documents for DBIx::Class::Storage::DBI::Replicated for more details. This class exists to define methods of a DBI Storage that only make sense when it's a classic 'slave' in a pool of slave databases which replicate from a given master database. ATTRIBUTES
This class defines the following attributes. active This is a boolean which allows you to programmatically activate or deactivate a replicant from the pool. This way you can do stuff like disallow a replicant when it gets too far behind the master, if it stops replicating, etc. This attribute DOES NOT reflect a replicant's internal status, i.e. if it is properly replicating from a master and has not fallen too many seconds behind a reliability threshold. For that, use "is_replicating" and "lag_behind_master". Since the implementation of those functions database specific (and not all DBIC supported DBs support replication) you should refer your database-specific storage driver for more information. master Reference to the master Storage. METHODS
This class defines the following methods. debugobj Override the debugobj method to redirect this method call back to the master. ALSO SEE
<http://en.wikipedia.org/wiki/Replicant>, DBIx::Class::Storage::DBI::Replicated AUTHOR
John Napiorkowski <john.napiorkowski@takkle.com> LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.16.2 2011-05-23 DBIx::Class::Storage::DBI::Replicated::Replicant(3)

Check Out this Related Man Page

DBIx::Class::Storage::DBI::Replicated::Balancer::Random(User Contributed Perl DocumentatDBIx::Class::Storage::DBI::Replicated::Balancer::Random(3)

NAME
DBIx::Class::Storage::DBI::Replicated::Balancer::Random - A 'random' Balancer SYNOPSIS
This class is used internally by DBIx::Class::Storage::DBI::Replicated. You shouldn't need to create instances of this class. DESCRIPTION
Given a pool (DBIx::Class::Storage::DBI::Replicated::Pool) of replicated database's (DBIx::Class::Storage::DBI::Replicated::Replicant), defines a method by which query load can be spread out across each replicant in the pool. This Balancer uses List::Util keyword 'shuffle' to randomly pick an active replicant from the associated pool. This may or may not be random enough for you, patches welcome. ATTRIBUTES
This class defines the following attributes. master_read_weight A number greater than 0 that specifies what weight to give the master when choosing which backend to execute a read query on. A value of 0, which is the default, does no reads from master, while a value of 1 gives it the same priority as any single replicant. For example: if you have 2 replicants, and a "master_read_weight" of 0.5, the chance of reading from master will be "20%". You can set it to a value higher than 1, making master have higher weight than any single replicant, if for example you have a very powerful master. METHODS
This class defines the following methods. next_storage Returns an active replicant at random. Please note that due to the nature of the word 'random' this means it's possible for a particular active replicant to be requested several times in a row. AUTHOR
John Napiorkowski <john.napiorkowski@takkle.com> LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2013-07-12 DBIx::Class::Storage::DBI::Replicated::Balancer::Random(3)
Man Page