Apache2-POST200
view release on metacpan or search on metacpan
lib/Apache2/POST200.pod view on Meta::CPAN
C<Apache2::POST200> frees your application from handling the refreshing
problem by its own. Hence, developement becomes simpler.
=head2 Performance
Using C<Apache2::POST200> might even lead to a performance gain. Often the
application logic is almost the same (authentication, authorization,
fetching application data and so on) be it for the generation of the
Location header or for the redirected request. With this module these
checks are done only once.
=head2 Frontend / Backend
Here comes the most valuable point. WEB applications often use a frontend /
backend setup, where the backend serves the dynamic content. The
frontend is a lightweight WEB server that serves static content and
delegates request for dynamic content as a proxy to the backend.
This setup is chosen because generating dynamic content often leads to very
memory consuming processes and, thus, the necessity to limit their number.
But such a setup does not forbid using mod_perl also in the frontend.
Only the memory consumption must be small and limited. Since
C<Apache2::POST200> reads the data from the database one block at a time
it meets this condition.
Now look at what happens without C<Apache2::POST200>. The initial POST
request as well as the redirected GET occupy a frontend and a backend
instance. If C<Apache2::POST200> is used at the frontend only the
initial POST involves both frontend and backend. The subsequent GET
is handled exclusively by the frontend.
C<Apache2::POST200> may be used even at frontend and backend. The output
filter runs at the backend inserting data in the database. The response
handler runs at the frontend. Limit the block size in this case with
C<Post200DataBlockSize> to avoid bloating the frontend.
=head2 Repair external WEB applications
Another useful application of C<Apache2::POST200> is to repair external
applications. Suppose you have a WEB application written in some closed
language or running on an external server that emits code 200 replies to
POST requests. Setup a reverse or even forward proxy with C<Apache2::POST200>.
It repairs the application without having access to it.
=head1 TODO
=over 4
=item B<Caching>
With a keep-alive connection the redirected request is most likely to
come in over the same connection. Thus, some caching in a connection
pnote would be good.
=item B<User check>
Client IP checking may not be sufficient. The filter could check
C<$r-E<gt>user>, set a special flag in the redirect param and save the user
name. The rewrite rules could then check the flag and require a valid-user.
Then the response handler can verify C<$r-E<gt>user> against the saved user.
=back
=head1 SEE ALSO
=over 4
=item L<Apache2::Translation>
=back
=head1 AUTHOR
Torsten Foertsch, E<lt>torsten.foertsch@gmx.netE<gt>
=head1 SPONSORING
Sincere thanks to Arvato Direct Services (http://www.arvato.com/) for
sponsoring this module.
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2005 by Torsten Foertsch
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
( run in 1.306 second using v1.01-cache-2.11-cpan-63c85eba8c4 )