----- Original Message -----
From: Jonathan Chum <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 01, 2002 3:27 PM
Subject: [PHP] XML-RPC, is this the best approach for something like this?


> Hi guys!
>
> I'm wrapping up a web hosting control panel written in PHP that fills up a
> queue with commands such as create web hosting account, or change
password.
>
> A Perl based CRON job on each server will query the database trying to
> determine what tasks it needs to execute. The problem however is that
these
> jobs will run every 60s which isn't fast enough for my boss. He'd like to
> see things happen instantly.
>
> There are a few ways this could be accomplish that I could think of.
>
> 1) Write a daemon that queries the database for tasks only when the
infinite
> while loop determines that the master server sent a request to begin
> querying the master database for tasks.
> 2) The CRON job could be set to run at a lower interval, maybe every 30s.
> 3) Write a deamon that opens a port using sockets to listen for commands
and
> executes.
> 4) Using XML-RPC, construct an encrypted payload across a SSL connection
to
> the remote server.
>
> Some of the problems I'm facing is getting a response back from the server
> in case there are any issues with account creation. At the moment, there
is
> a disconnection between the master database and the web hosting servers in
> which if an error is generated, the user does not know believing
everything
> is okay and an email is dispatched to the admin to check out the problem.
>
> I'm also faced with tasks that running on top of each other. Perhaps it
took
> the server 60s to create the hosting account because the load was
incredibly
> high. Then the second job starts up, which would be to delete the catch
all
> account. The catch all account does not exist, but only in the database it
> does.
>
> I think method 1 will fix the instant change account maintenance problem,
> but I still can't get any responses back from the server if account
creation
> was not successful.
>
> Method 2 will not fix the instant change, only making it quicker.
>
> Method 3 will fix the instant change and responds back if there are issues
>
> Method 4 sounds like the best method, yet I'm afraid of the script timing
> out and permissions issue. I don't want the remote machine running PHP
> that's parsing the XML payload to run with high level permissions and I
hate
> to compile another instance of PHP and Apache.
>
> So I'm left with Method 3 with probably the best choice. Before I dive
into
> the world of socket development, is there any recommendations or feedback?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to