Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

DBD::Gofer::Transport::http
DBD::Gofer client transport using http

DBD::Gofer::Transport::http - DBD::Gofer client transport using http


NAME




DBD::Gofer::Transport::http - DBD::Gofer client transport using http


SYNOPSIS


  my $remote_dsn = "..."

  DBI->connect("dbi:Gofer:transport=http;url=http://gofer.example.com/gofer;dsn=$remote_dsn",...)

or, enable by setting the DBI_AUTOPROXY environment variable:


  export DBI_AUTOPROXY='dbi:Gofer:transport=http;url=http://gofer.example.com/gofer'

which will force all DBI connections to be made via that Gofer server.


DESCRIPTION

Connect with DBI::Gofer servers that use http transports, i.e., the DBI::Gofer::Transport::mod_perl manpage.

This module currently uses the the LWP::UserAgent manpage and the HTTP::Request manpage modules to manage the http protocol. The default timeout is undef (unlimited). The LWP::UserAgent env_proxy option is enabled.


ATTRIBUTES

See the DBD::Gofer::Transport::Base manpage for a description of the Gofer transport attributes that are common to all transports, and another common features such as enabling gofer transport tracing.

The DBD::Gofer::Transport::http transport doesn't add any extra attributes.

go_timeout

The timeout provided by the DBD::Gofer::Transport::Base manpage is used. The go_timeout value is also passed to LWP::UserAgent as its timeout value. In practice the DBD::Gofer::Transport::Base timeout would almost certainly fire first. This area is subject to change in future releases.


PROTOCOL

The request is sent as a POST with a content type of 'application/x-perl-gofer-request-binary'.

The user-agent string is 'DBD::Gofer::Transport::http/<$DBI::VERSION>/<$VERSION>'.


METHODS

transmit_request_by_transport


  $response = $transport->transmit_request_by_transport( $request );

Freezes and transmits the request using the the LWP::UserAgent manpage and the HTTP::Request manpage modules. Waits for and returns response. Any exception is caught and returned as a response object.

receive_response_by_transport

This method isn't used because transmit_request_by_transport() always returns a response object. If called it throws an exception.


ENVIRONMENT VARIABLES

DBD_GOFER_RETRY_ON_EMPTY

Used to workaround problems with buggy load balancers (e.g. a Juniper DX with standing connections enabled) which cause some requests to fail whithout ever reaching the gofer server.

If set to 1 then empty responses will be retried. If is_idempotent() is true then upto 20 retries will be performed, else just 1 retry. The retries happen without any delay and log a warning each time.

If set to a higher value then the retry counts are multiplied by that amount, so a value of 3 will retry idempotent requests 30 times, for example.

This mechanism is not recommended for non-readonly databases because there's a risk that the server did receive and act on the request, so retrying it would cause the database change to be repeated, which may cause other problems.


BUGS AND LIMITATIONS

There is currently no support for http authentication.

Please report any bugs or feature requests to bug-dbi-gofer-transport-mod_perl@rt.cpan.org, or through the web interface at http://rt.cpan.org.


SEE ALSO

the DBD::Gofer manpage and the DBI::Gofer::Transport::mod_perl manpage


AUTHOR

Tim Bunce, http://www.tim.bunce.name


LICENCE AND COPYRIGHT

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

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

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy