glasswalk3r has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks,

I've being studying mod_perl in the past to implement a project that uses Apache as a reverse proxy, receives a SOAP request, modifies the payload (XML), handles it to the real web application, and returns back the response to the requester.

What is the best practice in this case? I checked out Apache::ReverseProxy, but it defines a full handler and I'm guessing that using a Input or Output filter handler would be a better option (based on my readings of mod_perl2 User Guide book) combined with the standard Apache modules proxy and proxy_http to avoid reinventing the wheel.

PS: I know mod_perl2 is not the "sexiest" framework at the moment, but I want to take advantage of already having it available on particular web servers by default.

Thanks!

Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

Replies are listed 'Best First'.
Re: mod_perl best practices to increment XML payload
by hippo (Archbishop) on Jun 23, 2017 at 08:06 UTC
    I'm guessing that using a Input or Output filter handler would be a better option ... combined with the standard Apache modules proxy and proxy_http to avoid reinventing the wheel.

    It's certainly an option and likely one which involves less work on your part. You should essentially just be writing one simple(ish) filter handler (an Input Filter from your description of the problem) which you could test in isolation and then just the small matter of hooking it in early enough so that it acts before the proxy module gets to the request. I haven't tried this combination before but you should be able to rig a very simple test (eg. with a basic text-subtitution filter and a backend which just echoes the data) as proof of concept.

    I know mod_perl2 is not the "sexiest" framework at the moment

    It's always good to have one eye on the latest hot thing. 95% of them will come to nothing but the rest will form the next generation of de-facto standards. Nevertheless, it is a foolish monk indeed who forgets or disregards the established magic in pursuit of ephemeral fads. I recall being blown away by mod_perl when it was first shown to me and it is no less astonishing and powerful today. Good luck with your project.