NAME
Genezzo::Contrib::Clustered::ModPerlWrap - Mod Perl wrappers for Genezzo
SYNOPSIS
StartPage();
Connect("/dev/raw");
ProcessStmt("insert into t1 values (10, 'test10')");
ProcessStmt("insert into t1 values (11, 'test11')");
Commit();
FinishPage();
or
StartPage();
Connect("/dev/raw");
ProcessStmt("select * from t1");
FinishPage();
DESCRIPTION
The Apache web server is used to provide multi-user XML over HTTP access to the Clustered Genezzo database. A page containing multiple SQL statements acts much like a stored procedure. The web page parameters are used like stored procedure parameters, and the processing on the page forms the transaction boundary.
Note control flow on page does not continue after errors or FinishPage().
See genezzo_form.pl for examples.
May use "PerlModule ModPerlWrap" in apache2.conf. This preloads this module and the rest of the Genezzo modules so they are (initially) shared between all apache processes, saving memory.
FUNCTIONS
- Connect GNZ_HOME
-
Connects to Clustered Genezzo database with home GNZ_HOME. Only performed once per process.
- PrintForm
-
Prints form which can be used to sent SQL statements to web server.
- StartPage
-
Prints initial HTML and XML at beginning of response.
- ProcessStmt STMT
-
Processes SQL statement. Result rows are wrapped in XML and printed. On execute errors automatically does rollback and ends page processing.
- Rollback
-
Rolls back transaction. Often unnecessary as ProcessStmt execute errors are automatically rolled back.
- Commit
-
Commits transaction.
- Finish Page
-
Prints final closing XML tags and ends page processing. Note control flow does not continue beyond this point.
EXPORT
none
LIMITATIONS
Requires Apache 2 and Perl 5.8.4+. On Apache 1.3 SIGUSR2 delivery is often delayed. Note the standard web server on Mac OS X is Apache 1.3.
This is pre-alpha software; don't use it to store any data you hope to see again!
SEE ALSO
http://eric_rollins.home.mindspring.com/genezzo/ClusteredGenezzoDesign.html
http://eric_rollins.home.mindspring.com/genezzo/cluster.html
AUTHOR
Eric Rollins, rollins@acm.org
COPYRIGHT AND LICENSE
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