Genezzo::Contrib::Clustered::Clustered - Shared data cluster support for Genezzo
genprepundo.pl gendba.pl >@havok.sql >@syshook.sql >@clustered.sql
Genezzo is an extensible database with SQL and DBI. It is written in Perl. Basic routines inside Genezzo are overridden via Havok SysHooks. Override routines provide support for shared data clusters. Routines provide transactions, distributed locking, undo, and recovery.
All blocks are $Genezzo::Block::Std::DEFBLOCKSIZE
(block 0)
Frozen data structure stored via Genezzo::Block::RDBlock->HPush()
{ "procs" => $processes, "blocks_per_proc" => $blocks_per_process, "files" => { per fileidx => { fileidx, filename, full_filename, blocksize, numblocks, hdrsize } } };
(block 1 to $processes+1) ----------processid(10)================= to end of block 1st character is status: - = clear C = committed R = rolledback P = pending
(array of $blocks_per_process * $processes)
These are written paired (for recoverability), so only half number is actually available.
Undo blocks contain multiple rows. 1st row is {"tx"}, a transaction id. following rows are {"f" = $fileno, "b" = $blockno}. All are Frozen data structures stored via Genezzo::Block::RDBlock->HPush().
The list of fileno/blockno indicate which blocks should be replaced if the transaction rolls back, or which blocks should have the process id cleared if the transaction commits.
At process startup undo blocks for the process are initially all written with tx 0, so we can distinguish when we move to a block left over from a previous transaction.
The before image of each block is written at the tail of the file where it originates, at position $declared_file_length + $blocknum. So when this module is enabled data files actually grow to twice their declared size. Note dynamic data file growth (increase_by) is not supported with this module.
While a transaction is in progress blocks in the main portion of the file will contain the process id (PID) of the active process. Before-image blocks at the tail of the file should always have PIDs of 0 (or unset).
Wraps Genezzo::BufCa::BCFile::_filereadblock
Wraps Genezzo::BufCa::DirtyScalar::STORE
Called by Genezzo::BufCa::BCFile::_filewriteblock
Wraps Genezzo::GenDBI::Kgnz_Commit
Wraps Genezzo::GenDBI::Kgnz_Rollback
none
This is pre-alpha software; don't use it to store any data you hope to see again!
Transactions, Rollback, etc. are not fully implemented. Process death and necessary cleanup is not detected.
See README for current TODO list.
http://www.genezzo.com
http://eric_rollins.home.mindspring.com/genezzo/ClusteredGenezzoDesign.html
http://eric_rollins.home.mindspring.com/genezzo/cluster.html
http://opendlm.sourceforge.net/
Eric Rollins, rollins@acm.org
Copyright (C) 2005 by Eric Rollins. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Address bug reports and comments to rollins@acm.org
To install Genezzo::Contrib::Clustered::PrepUndo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Genezzo::Contrib::Clustered::PrepUndo
CPAN shell
perl -MCPAN -e shell install Genezzo::Contrib::Clustered::PrepUndo
For more information on module installation, please visit the detailed CPAN module installation guide.