Xml-rpc server with long-run methods

hi,

please let me explain my idea of simple ruby-based backup system:)

on each node runs XML-RPC server; these nodes recieve commands from master server;

for example, node recieves:
Backup.run(“rsync”, “/etc”, “backup.clnet.cz”)
answers:
"code => “100”, “description” => "command queued"
does backup (long-run process) and informs administrator (via email, or xml-rpc call to master server)

the problem is that i don’t know how to implement this with xml-rpc ruby implementation; only way how to send answer to xml-rpc client is “return” in xml-rpc handler

so a little recap:) i want to receive command, answer to client and do something after it (and NOT receive command, do something and answer to client after it)

···

require “xmlrpc/server”

server = XMLRPC::CGIServer.new
server.set_parser(XMLRPC::XMLParser::REXMLStreamParser.new)

class BackupHandler

    def run(method, path, destination)

            return "code" => "100", "description" => "command queued"
	
	    "backup stuff"

	    "xml-rpc call to master server"

    end

end

server.add_handler(“Backup”, BackupHandler.new)
server.serve

regards,
pavel