Plack-App-DBI-Gofer

 view release on metacpan or  search on metacpan

lib/Plack/App/DBI/Gofer.pm  view on Meta::CPAN


This module implements a DBD::Gofer server-side http transport through PSGI.

This enables DBI to connect to databases through your PSGI-enabled HTTP server.

=head1 CONFIGURATION

=head2 Gofer Configuration

Rather than provide a DBI proxy that will connect to any database as any user,
you may well want to restrict access to just one or a few databases.

Or perhaps you want the database passwords to be stored only in your app.psgi so
you don't have to maintain them in all your clients. 

A typical usage might be to define configurations for each specific
database being used and then define a coresponding location for each of those.
That would also allow standard http location access controls to be used

That approach can also provide a level of indirection by avoiding the need for
the clients to know and use the actual DSN. The clients can just connect to the
specific gofer url with an empty DSN. This means you can change the DSN being used
without having to update the clients.

This enables the use of forking PSGI web servers and handlers, including 
L<Starman>, L<Monoceros> and L<Gazelle> as caching, stateless database proxies.   

At this time, this application doesn't support asynchronous, event driven servers
such as L<Twiggy>.

=over

=item config

Set to a hash of L<DBI::Gofer::Execute> options, optional.

=back

=head1 DIFFERENCES FROM L<DBI::Gofer::Transport::mod_perl>

=over 

=item * No equivalent for the L<Apache::Status> support

=item * No client side transport (relies instead on L<DBD::Gofer::Transport::http>)

=back

=head1 TO DO

=over 

=item * Add a lighter client side http transport that doesn't require installing mod_perl

Possibly using L<HTTP::Tiny> or L<HTTP::Lite>

=item * More tests

=item * Support http authorization (Basic and Digest)

=item * Support PSGI streaming and async.

=back 

Please report any bugs or feature requests to
C<bug-plack-app-dbi-gofer@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.

=head1 AUTHOR

Tim Bunce, L<http://www.linkedin.com/in/timbunce>

James Wright L<https://metacpan.org/author/JWRIGHT>

=head1 LICENCE AND COPYRIGHT

Copyright (c) 2007, Tim Bunce, Ireland. All rights reserved.

Copyright (c) 2018, James Wright, United States.

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.

=head1 SEE ALSO

=over

=item * L<DBD::Gofer>

=item * L<DBD::Gofer::Transport::http>

=item * L<Plack>

=back

=cut



( run in 0.698 second using v1.01-cache-2.11-cpan-140bd7fdf52 )