Archive of UserLand's first discussion group, started October 5, 1998.
Asynchronous XML-RPC
Author: Dave Winer Posted: 3/7/1999; 2:49:08 PM Topic: Asynchronous XML-RPC Msg #: 3770 Prev/Next: 3769 / 3771
Here's a new version of betty.rpc.client that supports asynchronous calling.This is the solution to the problem of how to send bits of information between various UserLand servers, so indexing will work cross-servers, and membership info will follow the user from server to server, whether it's in California or Seattle. It's also going to help us set up mirrors.
We use betty.rpc.client, but call it with three new optional parameters. We do it in such a way that the client keeps calling until it gets thru to the server. The calls accumulate in a queue that's watch by an agent. Every second it checks the queue and tries one call. If it fails it logically moves to the end of the queue. The next second it tries the next one.
Here are the three new params for betty.rpc.client:
- flAsynch, defaults to false, if true it's an asynchronous call.
- adrCallback, defaults to nil, if non-nil, it's the routine we call when we connect. It takes a single parameter, the address of a table describing the RPC request, including the value returned by the server. The routine pointed to by this address must not be local to the script calling betty.rpc.client because it won't be around when the actual RPC call is made. It must be in Frontier.root or in a guest database.
- extraInfo, defaults to nil, it's any kind of object, it's available to the callback to help it interpret the response.
Note the enclosure is system.verbs.builtins.betty.rpc, because there's a new script betty.rpc.agent that does the background monitoring. A call to it is installed in system.agents by the betty.rpc.client, if it's not present, so it's self-initializing.
There are responses to this message:
- Re: Asynchronous XML-RPC, Heath Tanner, 3/7/1999; 3:09:08 PM
- Re: Asynchronous XML-RPC, Matt Daw, 3/7/1999; 4:20:23 PM
- Re: Asynchronous XML-RPC, Andrew Duncan, 3/7/1999; 6:36:26 PM
This page was archived on 6/13/2001; 4:48:31 PM.
© Copyright 1998-2001 UserLand Software, Inc.