Re: Federated CGI to CGI



On 09/25/2006 12:47 AM, beowoof wrote:
Mumia W. (reading news) wrote:
On 09/24/2006 02:45 PM, beowoof wrote:
Hi all,

I have an interesting architecture that I'm trying to adapt a
configuration interface to.

At a high level, the architecture breaks down to:

Central Web Instance:
- let's call it www.web-central.bank.com
Regional Web Servers:
- www.web-usa.bank.com, www.web-eur.bank.com and
www.web-asia.bank.com

Now, ideally, users who want to configure each of the regional servers,
shouldn't have to actually log onto them locally. Instead, they would
log onto the central instance, select the region to modify and -- poof
-- the regional server is updated behind the scenes.

Next up, I have no intention of using anything like frames,
configuration databases, pull methods, etc. I want to be able to
"push" the configuration out to the regional servers from the central
instance ad hoc.

My first plan was to use xmlhttprequest to go off to a update.pl script
on the appropriate server and everything would be fine and dandy. Of
course, that didn't work. Calling a different web server causes
security warnings in IE and just won't work on Firefox.

So what I'd like are ideas on how to approach this, or where I'm going
wrong. I specifically only want to stay within the web framework -
ideally CGI -> CGI calls. I could of course have daemon processes
(this is all Linux/Apache btw), SSH push, etc... All of which I don't
want to do. I had this wonderfully "clean" idea of central web scripts
calling regional web scripts.

Thanks in advance.

Can you use a status 307 Temporary Redirect response to get the browser
to post the form to one of the regional web sites?

E.g.
Browser (POST) --------> www.web-central.bank.com

Browser <--------------- www.web-central.bank.com (307 Temporary
Redirect, Location: www.web-eur.bank.com/...)

Browser (POST) ---------> www.web-eur.bank.com

HTTP Specification:
ftp://ftp.isi.edu/in-notes/rfc2616.txt


Hi!

Thanks for that. It is something that occurred to me as well. However
it is a bit "clunky" in that everything gets POST'd twice and the
user's browser session gets taken to the regional server in the end.

What I was hoping to achieve was have the user click "Submit" to a
change, then Javascript picks up the data, posts to the Perl script on
the configuraiton server using xmlhttprequest. The Perl script will
then *somehow* invoke the change on the regional servers.

Now, ideally I'd like the Perl script to call
http://www.region-web.bank.com/cgi-bin/update.pl directly. But I can't
think of a way this could be done programmatically... Can Perl pretend
to be a invoke URLs, capture the result and return it?


Please bottom-post in this newsgroup. Here is a link to the posting guidelines for this ng: http://www.augustmail.com/~tadmc/clpmisc.shtml

You can use the WWW::Mechanize module to allow a perl script to interact with web pages as a browser would, or you can use WWw::Curl::easy to post a form, or you can use LWP, or you can use create the POST request using HTTP::Request and send it using Net::HTTP, or you can use the "curl" external program to post the form, or you can use the "lynx" external program to post, or you can use the "wget" external program, or ...



--
paduille.4058.mumia.w@xxxxxxxxxxxxx

.



Relevant Pages

  • Re: Federated CGI to CGI
    ... change, then Javascript picks up the data, posts to the Perl script on ... Now, ideally, users who want to configure each of the regional servers, ... configuration databases, pull methods, etc. ... I had this wonderfully "clean" idea of central web scripts ...
    (comp.lang.perl.misc)
  • Re: Federated CGI to CGI
    ... the architecture breaks down to: ... Now, ideally, users who want to configure each of the regional servers, ... configuration databases, pull methods, etc. ... I had this wonderfully "clean" idea of central web scripts ...
    (comp.lang.perl.misc)
  • Federated CGI to CGI
    ... the architecture breaks down to: ... Now, ideally, users who want to configure each of the regional servers, ... configuration databases, pull methods, etc. ... I had this wonderfully "clean" idea of central web scripts ...
    (comp.lang.perl.misc)
  • Re: [Apache] Vhost with mod_rewrite
    ... I don't want tu use a perl script or in any other language, ... don't want to relod apache each time i add a domain or a sub-domain. ... My goal is to do the configuration just one time and after never modify it. ... >> ServerName www.domaine.tld ...
    (Debian-User)